SG++-Doxygen-Documentation
|
Implements a modified Up/Down Schema with one operation dim. More...
#include <UpDownOneOpDimEnhanced.hpp>
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::DataVector * | coefs |
Pointer to the sgpp::base::DataVector of the coefs. More... | |
const size_t | numAlgoDims_ |
number of algorithmic dimensions More... | |
sgpp::base::GridStorage * | storage |
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... | |
Implements a modified Up/Down Schema with one operation dim.
All $d$ Up/Downs are executed concurrently and the results are merged afterwards.
|
protected |
|
protected |
sgpp::pde::UpDownOneOpDimEnhanced::UpDownOneOpDimEnhanced | ( | sgpp::base::GridStorage * | storage, |
sgpp::base::DataVector & | coef | ||
) |
Constructor.
storage | the grid's sgpp::base::GridStorage object |
coef | reference to a sgpp::base::DataVector object that contains the bilinear form's constant coefficients; one per dimension |
|
explicit |
Constructor.
storage | the grid's sgpp::base::GridStorage object |
|
virtual |
Destructor.
sgpp::pde::UpDownOneOpDimEnhanced::UpDownOneOpDimEnhanced | ( | sgpp::base::GridStorage * | storage, |
sgpp::base::DataVector & | coef | ||
) |
Constructor.
storage | the grid's sgpp::base::GridStorage object |
coef | reference to a sgpp::base::DataVector object that contains the bilinear form's constant coefficients; one per dimension |
|
explicit |
Constructor.
storage | the grid's sgpp::base::GridStorage object |
|
virtual |
Destructor.
|
protectedpure virtual |
1D down Operation
dim | dimension in which to apply the down-part |
alpha | matrix of coefficients |
result | matrix to store the results of all dimensions |
Implemented in sgpp::pde::OperationLaplaceEnhancedLinearBoundary, and sgpp::pde::OperationLaplaceEnhancedLinear.
Referenced by updown().
|
protectedpure virtual |
1D down Operation
dim | dimension in which to apply the down-part |
alpha | matrix of coefficients |
result | matrix to store the results of all dimensions |
Implemented in sgpp::pde::OperationLaplaceEnhancedLinearBoundary, and sgpp::pde::OperationLaplaceEnhancedLinear.
|
virtual |
starts the Multiplication with the matrix
alpha | DataVector that contains the ansatzfunctions' coefficients |
result | DataVector 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().
|
virtual |
starts the Multiplication with the matrix
alpha | DataVector that contains the ansatzfunctions' coefficients |
result | DataVector into which the result of the Laplace operation is stored |
Implements sgpp::base::OperationMatrix.
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.
alpha | vector of coefficients |
result | vector to store the results in |
References coefs, sgpp::base::DataVector::getSize(), numAlgoDims_, sgpp::base::DataVector::setAll(), and updown().
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.
alpha | vector of coefficients |
result | vector to store the results in |
|
protectedpure virtual |
1D up Operation
dim | dimension in which to apply the up-part |
alpha | matrix of coefficients |
result | matrix to store the results of all dimensions |
Implemented in sgpp::pde::OperationLaplaceEnhancedLinearBoundary, and sgpp::pde::OperationLaplaceEnhancedLinear.
|
protectedpure virtual |
1D up Operation
dim | dimension in which to apply the up-part |
alpha | matrix of coefficients |
result | matrix to store the results of all dimensions |
Implemented in sgpp::pde::OperationLaplaceEnhancedLinearBoundary, and sgpp::pde::OperationLaplaceEnhancedLinear.
Referenced by updown().
|
protected |
Recursive procedure for updown.
dim | the current dimension |
alpha | matrix of coefficients |
result | matrix 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().
|
protected |
Recursive procedure for updown.
dim | the current dimension |
alpha | matrix of coefficients |
result | matrix to store the results of all dimensions |
|
protected |
algorithmic dimensions, operator is applied in this dimensions
|
protected |
Pointer to the sgpp::base::DataVector of the coefs.
Referenced by mult(), and multParallelBuildingBlock().
|
staticprotected |
max number of parallel stages (dimension recursive calls)
Referenced by updown().
|
protected |
number of algorithmic dimensions
Referenced by mult(), multParallelBuildingBlock(), and updown().
|
protected |
Pointer to the grid's storage object.
Referenced by sgpp::pde::OperationLaplaceEnhancedLinear::down(), sgpp::pde::OperationLaplaceEnhancedLinearBoundary::down(), sgpp::pde::OperationLaplaceEnhancedLinear::up(), and sgpp::pde::OperationLaplaceEnhancedLinearBoundary::up().