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

Implements a modified Up/Down Schema with one operation dim. More...

#include <UpDownOneOpDimEnhanced.hpp>

Inheritance diagram for sgpp::pde::UpDownOneOpDimEnhanced:
sgpp::base::OperationMatrix sgpp::base::OperationMatrix sgpp::pde::OperationLaplaceEnhancedLinear sgpp::pde::OperationLaplaceEnhancedLinearBoundary

Public Member Functions

virtual void mult (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)
 starts the Multiplication with the matrix More...
 
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...
 
void multParallelBuildingBlock (sgpp::base::DataVector &alpha, sgpp::base::DataVector &result)
 this functions provides the same functionality as the normal mult routine. More...
 
 UpDownOneOpDimEnhanced (sgpp::base::GridStorage *storage, sgpp::base::DataVector &coef)
 Constructor. More...
 
 UpDownOneOpDimEnhanced (sgpp::base::GridStorage *storage, sgpp::base::DataVector &coef)
 Constructor. More...
 
 UpDownOneOpDimEnhanced (sgpp::base::GridStorage *storage)
 Constructor. More...
 
 UpDownOneOpDimEnhanced (sgpp::base::GridStorage *storage)
 Constructor. More...
 
virtual ~UpDownOneOpDimEnhanced ()
 Destructor. More...
 
virtual ~UpDownOneOpDimEnhanced ()
 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
 
typedef sgpp::base::GridStorage::grid_iterator grid_iterator
 

Protected Member Functions

virtual void down (sgpp::base::DataMatrix &alpha, sgpp::base::DataMatrix &result, size_t dim)=0
 1D down Operation More...
 
virtual void down (sgpp::base::DataMatrix &alpha, sgpp::base::DataMatrix &result, size_t dim)=0
 1D down Operation More...
 
virtual void up (sgpp::base::DataMatrix &alpha, sgpp::base::DataMatrix &result, size_t dim)=0
 1D up Operation More...
 
virtual void up (sgpp::base::DataMatrix &alpha, sgpp::base::DataMatrix &result, size_t dim)=0
 1D up Operation More...
 
void updown (sgpp::base::DataMatrix &alpha, sgpp::base::DataMatrix &result, size_t dim)
 Recursive procedure for updown. More...
 
void updown (sgpp::base::DataMatrix &alpha, sgpp::base::DataMatrix &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...
 
sgpp::base::DataVectorcoefs
 Pointer to the sgpp::base::DataVector of the coefs. 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 modified Up/Down Schema with one operation dim.

All $d$ Up/Downs are executed concurrently and the results are merged afterwards.

Member Typedef Documentation

◆ grid_iterator [1/2]

◆ grid_iterator [2/2]

Constructor & Destructor Documentation

◆ UpDownOneOpDimEnhanced() [1/4]

sgpp::pde::UpDownOneOpDimEnhanced::UpDownOneOpDimEnhanced ( sgpp::base::GridStorage storage,
sgpp::base::DataVector coef 
)

Constructor.

Parameters
storagethe grid's sgpp::base::GridStorage object
coefreference to a sgpp::base::DataVector object that contains the bilinear form's constant coefficients; one per dimension

◆ UpDownOneOpDimEnhanced() [2/4]

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

Constructor.

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

◆ ~UpDownOneOpDimEnhanced() [1/2]

sgpp::pde::UpDownOneOpDimEnhanced::~UpDownOneOpDimEnhanced ( )
virtual

Destructor.

◆ UpDownOneOpDimEnhanced() [3/4]

sgpp::pde::UpDownOneOpDimEnhanced::UpDownOneOpDimEnhanced ( sgpp::base::GridStorage storage,
sgpp::base::DataVector coef 
)

Constructor.

Parameters
storagethe grid's sgpp::base::GridStorage object
coefreference to a sgpp::base::DataVector object that contains the bilinear form's constant coefficients; one per dimension

◆ UpDownOneOpDimEnhanced() [4/4]

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

Constructor.

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

◆ ~UpDownOneOpDimEnhanced() [2/2]

virtual sgpp::pde::UpDownOneOpDimEnhanced::~UpDownOneOpDimEnhanced ( )
virtual

Destructor.

Member Function Documentation

◆ down() [1/2]

virtual void sgpp::pde::UpDownOneOpDimEnhanced::down ( sgpp::base::DataMatrix alpha,
sgpp::base::DataMatrix result,
size_t  dim 
)
protectedpure virtual

1D down Operation

Parameters
dimdimension in which to apply the down-part
alphamatrix of coefficients
resultmatrix to store the results of all dimensions

Implemented in sgpp::pde::OperationLaplaceEnhancedLinearBoundary, and sgpp::pde::OperationLaplaceEnhancedLinear.

Referenced by updown().

◆ down() [2/2]

virtual void sgpp::pde::UpDownOneOpDimEnhanced::down ( sgpp::base::DataMatrix alpha,
sgpp::base::DataMatrix result,
size_t  dim 
)
protectedpure virtual

1D down Operation

Parameters
dimdimension in which to apply the down-part
alphamatrix of coefficients
resultmatrix to store the results of all dimensions

Implemented in sgpp::pde::OperationLaplaceEnhancedLinearBoundary, and sgpp::pde::OperationLaplaceEnhancedLinear.

◆ mult() [1/2]

void sgpp::pde::UpDownOneOpDimEnhanced::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 coefs, sgpp::base::DataVector::getSize(), numAlgoDims_, sgpp::base::DataVector::setAll(), and updown().

◆ mult() [2/2]

virtual void sgpp::pde::UpDownOneOpDimEnhanced::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.

◆ multParallelBuildingBlock() [1/2]

void sgpp::pde::UpDownOneOpDimEnhanced::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 coefs, sgpp::base::DataVector::getSize(), numAlgoDims_, sgpp::base::DataVector::setAll(), and updown().

◆ multParallelBuildingBlock() [2/2]

void sgpp::pde::UpDownOneOpDimEnhanced::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

◆ up() [1/2]

virtual void sgpp::pde::UpDownOneOpDimEnhanced::up ( sgpp::base::DataMatrix alpha,
sgpp::base::DataMatrix result,
size_t  dim 
)
protectedpure virtual

1D up Operation

Parameters
dimdimension in which to apply the up-part
alphamatrix of coefficients
resultmatrix to store the results of all dimensions

Implemented in sgpp::pde::OperationLaplaceEnhancedLinearBoundary, and sgpp::pde::OperationLaplaceEnhancedLinear.

◆ up() [2/2]

virtual void sgpp::pde::UpDownOneOpDimEnhanced::up ( sgpp::base::DataMatrix alpha,
sgpp::base::DataMatrix result,
size_t  dim 
)
protectedpure virtual

1D up Operation

Parameters
dimdimension in which to apply the up-part
alphamatrix of coefficients
resultmatrix to store the results of all dimensions

Implemented in sgpp::pde::OperationLaplaceEnhancedLinearBoundary, and sgpp::pde::OperationLaplaceEnhancedLinear.

Referenced by updown().

◆ updown() [1/2]

void sgpp::pde::UpDownOneOpDimEnhanced::updown ( sgpp::base::DataMatrix alpha,
sgpp::base::DataMatrix result,
size_t  dim 
)
protected

Recursive procedure for updown.

Parameters
dimthe current dimension
alphamatrix of coefficients
resultmatrix to store the results of all dimensions

References sgpp::base::DataMatrix::add(), down(), sgpp::base::DataMatrix::getNrows(), maxParallelDims_, numAlgoDims_, and up().

Referenced by mult(), and multParallelBuildingBlock().

◆ updown() [2/2]

void sgpp::pde::UpDownOneOpDimEnhanced::updown ( sgpp::base::DataMatrix alpha,
sgpp::base::DataMatrix result,
size_t  dim 
)
protected

Recursive procedure for updown.

Parameters
dimthe current dimension
alphamatrix of coefficients
resultmatrix to store the results of all dimensions

Member Data Documentation

◆ algoDims

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

algorithmic dimensions, operator is applied in this dimensions

◆ coefs

sgpp::base::DataVector * sgpp::pde::UpDownOneOpDimEnhanced::coefs
protected

Pointer to the sgpp::base::DataVector of the coefs.

Referenced by mult(), and multParallelBuildingBlock().

◆ maxParallelDims_

static const size_t sgpp::pde::UpDownOneOpDimEnhanced::maxParallelDims_ = TASKS_PARALLEL_UPDOWN
staticprotected

max number of parallel stages (dimension recursive calls)

Referenced by updown().

◆ numAlgoDims_

const size_t sgpp::pde::UpDownOneOpDimEnhanced::numAlgoDims_
protected

number of algorithmic dimensions

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

◆ storage


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