OGS 6.2.2-87-g988ee9c30.dirty.20200123122242
NumLib::VectorProvider Class Referenceabstract

Detailed Description

Manages storage for vectors.

This interface provides storage management semantics for vectors, which can be acquired at a certain point in time, be released later on and be acquired again etc.

"Released" means that the caller indicates, that he currently does not need that Vector instance, i.e, Either it is not needed anymore for the entire program run, or it is temporarily not needed, but might be aquired again later on. Thereby the implementation of this interface can decide, whether the storage for the specific vector can be freed or reused in the meantime.

All get-methods of this class come in two variants: One with an id argument, and one without. The latter makes it possible to temporarily release a vector during the program run and re-acquire it again. The former variant is intended as a short-cut that simplifies vector acquisition for callers that will use the same vector throughout all of their lifetime without releasing it intermediately.

Attention
The first time a vector is acquired by a method with id argument, the id has to be initialized with zero. The respective method then will set the id to the specific id of the returned vector.

Definition at line 54 of file MatrixProviderUser.h.

#include <MatrixProviderUser.h>

Inheritance diagram for NumLib::VectorProvider:

Public Member Functions

virtual GlobalVector & getVector ()=0
 Get an uninitialized vector. More...
 
virtual GlobalVector & getVector (std::size_t &id)=0
 Get an uninitialized vector with the given id. More...
 
virtual GlobalVector & getVector (GlobalVector const &x)=0
 Get a copy of x. More...
 
virtual GlobalVector & getVector (GlobalVector const &x, std::size_t &id)=0
 Get a copy of x in the storage of the vector with the given id. More...
 
virtual GlobalVector & getVector (MathLib::MatrixSpecifications const &ms)=0
 Get a vector according to the given specifications. More...
 
virtual GlobalVector & getVector (MathLib::MatrixSpecifications const &ms, std::size_t &id)=0
 
virtual void releaseVector (GlobalVector const &x)=0
 
virtual ~VectorProvider ()=default
 

Constructor & Destructor Documentation

◆ ~VectorProvider()

virtual NumLib::VectorProvider::~VectorProvider ( )
virtualdefault

Member Function Documentation

◆ getVector() [1/6]

◆ getVector() [2/6]

virtual GlobalVector& NumLib::VectorProvider::getVector ( std::size_t &  id)
pure virtual

Get an uninitialized vector with the given id.

Implemented in NumLib::SimpleMatrixVectorProvider.

◆ getVector() [3/6]

virtual GlobalVector& NumLib::VectorProvider::getVector ( GlobalVector const &  x)
pure virtual

Get a copy of x.

Implemented in NumLib::SimpleMatrixVectorProvider.

◆ getVector() [4/6]

virtual GlobalVector& NumLib::VectorProvider::getVector ( GlobalVector const &  x,
std::size_t &  id 
)
pure virtual

Get a copy of x in the storage of the vector with the given id.

Implemented in NumLib::SimpleMatrixVectorProvider.

◆ getVector() [5/6]

virtual GlobalVector& NumLib::VectorProvider::getVector ( MathLib::MatrixSpecifications const &  ms)
pure virtual

Get a vector according to the given specifications.

Implemented in NumLib::SimpleMatrixVectorProvider.

◆ getVector() [6/6]

virtual GlobalVector& NumLib::VectorProvider::getVector ( MathLib::MatrixSpecifications const &  ms,
std::size_t &  id 
)
pure virtual

Get a vector according to the given specifications in the storage of the vector with the given id.

Implemented in NumLib::SimpleMatrixVectorProvider.

◆ releaseVector()

virtual void NumLib::VectorProvider::releaseVector ( GlobalVector const &  x)
pure virtual

Release the given vector.

Precondition
x must have been acquired before, i.e., you must not call this method twice in a row in the same x!

Implemented in NumLib::SimpleMatrixVectorProvider.

Referenced by NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::assemble(), NumLib::MatrixTranslatorGeneral< ODESystemTag::FirstOrderImplicitQuasilinear >::computeRhs(), NumLib::MatrixTranslatorForwardEuler< ODESystemTag::FirstOrderImplicitQuasilinear >::computeRhs(), NumLib::MatrixTranslatorCrankNicolson< ODESystemTag::FirstOrderImplicitQuasilinear >::computeRhs(), NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::getResidual(), NumLib::NonlinearSolver< NonlinearSolverTag::Newton >::solve(), NumLib::NonlinearSolver< NonlinearSolverTag::Picard >::solve(), NumLib::BackwardDifferentiationFormula::~BackwardDifferentiationFormula(), NumLib::BackwardEuler::~BackwardEuler(), NumLib::CrankNicolson::~CrankNicolson(), NumLib::ForwardEuler::~ForwardEuler(), NumLib::MatrixTranslatorCrankNicolson< ODESystemTag::FirstOrderImplicitQuasilinear >::~MatrixTranslatorCrankNicolson(), NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::~TimeDiscretizedODESystem(), NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Picard >::~TimeDiscretizedODESystem(), and ProcessLib::TimeLoop::~TimeLoop().


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