SG++-Doxygen-Documentation
sgpp::pde::StdUpDown Class Referenceabstract

Implements a standard Up/Down Schema without any operation dim. More...

#include <StdUpDown.hpp>

Inheritance diagram for sgpp::pde::StdUpDown:
sgpp::base::OperationMatrix sgpp::pde::OperationLTwoDotProductLinear sgpp::pde::OperationLTwoDotProductLinearBoundary sgpp::pde::OperationLTwoDotProductLinearStretched sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary

Public Member Functions

virtual void mult (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)
 starts the Multiplication with the matrix More...
 
void multParallelBuildingBlock (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)
 this functions provides the same functionality as the normal mult routine. More...
 
 StdUpDown (sgpp::base::GridStorage *storage)
 Constructor. More...
 
virtual ~StdUpDown ()
 Destructor. More...
 
- Public Member Functions inherited from sgpp::base::OperationMatrix
 OperationMatrix ()
 Constructor. More...
 
virtual ~OperationMatrix ()
 Destructor. More...
 

Protected Types

typedef sgpp::base::GridStorage::grid_iterator grid_iterator
 

Protected Member Functions

virtual void down (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result, size_t dim)=0
 1D down Operation More...
 
virtual void up (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result, size_t dim)=0
 1D up Operation More...
 
void updown (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result, size_t dim)
 Recursive procedure for updown. More...
 

Protected Attributes

const std::vector< size_t > algoDims
 algorithmic dimensions, operator is applied in this dimensions More...
 
const size_t numAlgoDims_
 number of algorithmic dimensions More...
 
sgpp::base::GridStoragestorage
 Pointer to the grid's storage object. More...
 

Static Protected Attributes

static const size_t maxParallelDims_ = TASKS_PARALLEL_UPDOWN
 max number of parallel stages (dimension recursive calls) More...
 

Detailed Description

Implements a standard Up/Down Schema without any operation dim.

Member Typedef Documentation

◆ grid_iterator

Constructor & Destructor Documentation

◆ StdUpDown()

sgpp::pde::StdUpDown::StdUpDown ( sgpp::base::GridStorage storage)
explicit

Constructor.

Parameters
storagethe grid's sgpp::base::GridStorage object

◆ ~StdUpDown()

sgpp::pde::StdUpDown::~StdUpDown ( )
virtual

Destructor.

Member Function Documentation

◆ down()

virtual void sgpp::pde::StdUpDown::down ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result,
size_t  dim 
)
protectedpure virtual

1D down Operation

Parameters
dimdimension in which to apply the down-part
alphavector of coefficients
resultvector to store the results in

Implemented in sgpp::pde::OperationLTwoDotProductLinear, sgpp::pde::OperationLTwoDotProductLinearBoundary, sgpp::pde::OperationLTwoDotProductLinearStretched, and sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary.

Referenced by updown().

◆ mult()

void sgpp::pde::StdUpDown::mult ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result 
)
virtual

starts the Multiplication with the matrix

Parameters
alphaDataVector that contains the ansatzfunctions' coefficients
resultDataVector into which the result of the Laplace operation is stored

Implements sgpp::base::OperationMatrix.

References sgpp::base::DataVector::add(), sgpp::base::DataVector::getSize(), numAlgoDims_, sgpp::base::DataVector::setAll(), and updown().

◆ multParallelBuildingBlock()

void sgpp::pde::StdUpDown::multParallelBuildingBlock ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result 
)

this functions provides the same functionality as the normal mult routine.

However, it doesn't set up an OpenMP task initialization as the mult routine. This method has to be called within a OpenMP task parallelized region.

Using this function is useful in following case: Assuming the solver of a certain requires several operators in the space discretization (e.g. Black Scholes Equations) this method can be used to parallelize their calculation which might results results in a better parallel efficiency on systems with 4 or more cores hence fewer barriers are needed.

Parameters
alphavector of coefficients
resultvector to store the results in

References sgpp::base::DataVector::add(), sgpp::base::DataVector::getSize(), numAlgoDims_, sgpp::base::DataVector::setAll(), and updown().

◆ up()

virtual void sgpp::pde::StdUpDown::up ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result,
size_t  dim 
)
protectedpure virtual

1D up Operation

Parameters
dimdimension in which to apply the up-part
alphavector of coefficients
resultvector to store the results in

Implemented in sgpp::pde::OperationLTwoDotProductLinear, sgpp::pde::OperationLTwoDotProductLinearBoundary, sgpp::pde::OperationLTwoDotProductLinearStretched, and sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary.

Referenced by updown().

◆ updown()

void sgpp::pde::StdUpDown::updown ( sgpp::base::DataVector alpha,
sgpp::base::DataVector result,
size_t  dim 
)
protected

Recursive procedure for updown.

Parameters
dimthe current dimension
alphavector of coefficients
resultvector to store the results in

References sgpp::base::DataVector::add(), algoDims, down(), sgpp::base::DataVector::getSize(), maxParallelDims_, numAlgoDims_, and up().

Referenced by mult(), and multParallelBuildingBlock().

Member Data Documentation

◆ algoDims

const std::vector<size_t> sgpp::pde::StdUpDown::algoDims
protected

algorithmic dimensions, operator is applied in this dimensions

Referenced by updown().

◆ maxParallelDims_

const size_t sgpp::pde::StdUpDown::maxParallelDims_ = TASKS_PARALLEL_UPDOWN
staticprotected

max number of parallel stages (dimension recursive calls)

Referenced by updown().

◆ numAlgoDims_

const size_t sgpp::pde::StdUpDown::numAlgoDims_
protected

number of algorithmic dimensions

Referenced by mult(), multParallelBuildingBlock(), and updown().

◆ storage


The documentation for this class was generated from the following files: