SG++-Doxygen-Documentation
|
Implements a standard Up/Down Schema without any operation dim. More...
#include <StdUpDown.hpp>
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::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 standard Up/Down Schema without any operation dim.
|
protected |
|
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 | vector of coefficients |
result | vector to store the results in |
Implemented in sgpp::pde::OperationLTwoDotProductLinear, sgpp::pde::OperationLTwoDotProductLinearBoundary, sgpp::pde::OperationLTwoDotProductLinearStretched, and sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary.
Referenced by 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.
References sgpp::base::DataVector::add(), sgpp::base::DataVector::getSize(), numAlgoDims_, sgpp::base::DataVector::setAll(), and updown().
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.
alpha | vector of coefficients |
result | vector to store the results in |
References sgpp::base::DataVector::add(), sgpp::base::DataVector::getSize(), numAlgoDims_, sgpp::base::DataVector::setAll(), and updown().
|
protectedpure virtual |
1D up Operation
dim | dimension in which to apply the up-part |
alpha | vector of coefficients |
result | vector to store the results in |
Implemented in sgpp::pde::OperationLTwoDotProductLinear, sgpp::pde::OperationLTwoDotProductLinearBoundary, sgpp::pde::OperationLTwoDotProductLinearStretched, and sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary.
Referenced by updown().
|
protected |
Recursive procedure for updown.
dim | the current dimension |
alpha | vector of coefficients |
result | vector 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().
|
protected |
algorithmic dimensions, operator is applied in this dimensions
Referenced by updown().
|
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::OperationLTwoDotProductLinear::down(), sgpp::pde::OperationLTwoDotProductLinearBoundary::down(), sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary::down(), sgpp::pde::OperationLTwoDotProductLinearStretched::down(), sgpp::pde::OperationLTwoDotProductLinearStretched::up(), sgpp::pde::OperationLTwoDotProductLinear::up(), sgpp::pde::OperationLTwoDotProductLinearBoundary::up(), and sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary::up().