OGS
|
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 acquired 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.
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 43 of file VectorProvider.h.
#include <VectorProvider.h>
Public Member Functions | |
virtual GlobalVector & | getVector (std::size_t &id)=0 |
Get an uninitialized vector with the given id . | |
virtual GlobalVector & | getVector (GlobalVector const &x)=0 |
Get a copy of x . | |
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 . | |
virtual GlobalVector & | getVector (MathLib::MatrixSpecifications const &ms)=0 |
Get a vector according to the given specifications. | |
virtual GlobalVector & | getVector (MathLib::MatrixSpecifications const &ms, std::size_t &id)=0 |
virtual void | releaseVector (GlobalVector const &x)=0 |
virtual | ~VectorProvider ()=default |
|
virtualdefault |
|
pure virtual |
Get a copy of x
.
Implemented in NumLib::SimpleMatrixVectorProvider.
|
pure virtual |
Get a copy of x
in the storage of the vector with the given id
.
Implemented in NumLib::SimpleMatrixVectorProvider.
|
pure virtual |
Get a vector according to the given specifications.
Implemented in NumLib::SimpleMatrixVectorProvider.
|
pure virtual |
Get a vector according to the given specifications in the storage of the vector with the given id
.
Implemented in NumLib::SimpleMatrixVectorProvider.
|
pure virtual |
Get an uninitialized vector with the given id
.
Implemented in NumLib::SimpleMatrixVectorProvider.
Referenced by NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::TimeDiscretizedODESystem(), NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Picard >::TimeDiscretizedODESystem(), ProcessLib::AssemblyMixin< Process >::assembleWithJacobian(), NumLib::NonlinearSolver< NonlinearSolverTag::Newton >::calculateNonEquilibriumInitialResiduum(), NumLib::NonlinearSolver< NonlinearSolverTag::Picard >::calculateNonEquilibriumInitialResiduum(), NumLib::MatrixTranslatorGeneral< ODESystemTag::FirstOrderImplicitQuasilinear >::computeRhs(), NumLib::StaggeredCoupling::initializeCoupledSolutions(), NumLib::NonlinearSolver< NonlinearSolverTag::Newton >::solve(), NumLib::NonlinearSolver< NonlinearSolverTag::Picard >::solve(), NumLib::PETScNonlinearSolver::solve(), and ProcessLib::ComponentTransport::ComponentTransportProcess::solveReactionEquation().
|
pure virtual |
Release the given vector.
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::NonlinearSolver< NonlinearSolverTag::Newton >::~NonlinearSolver(), NumLib::StaggeredCoupling::~StaggeredCoupling(), NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::~TimeDiscretizedODESystem(), NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Picard >::~TimeDiscretizedODESystem(), ProcessLib::TimeLoop::~TimeLoop(), ProcessLib::AssemblyMixin< Process >::assembleWithJacobian(), NumLib::NonlinearSolver< NonlinearSolverTag::Picard >::calculateNonEquilibriumInitialResiduum(), NumLib::MatrixTranslatorGeneral< ODESystemTag::FirstOrderImplicitQuasilinear >::computeRhs(), NumLib::NonlinearSolver< NonlinearSolverTag::Newton >::solve(), NumLib::NonlinearSolver< NonlinearSolverTag::Picard >::solve(), NumLib::PETScNonlinearSolver::solve(), and ProcessLib::ComponentTransport::ComponentTransportProcess::solveReactionEquation().