DOpE
Public Member Functions
DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH > Class Template Reference

#include <primal_ts_base.h>

Inheritance diagram for DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >:
DOpE::TSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH > DOpE::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH > DOpE::CrankNicolsonProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH > DOpE::ForwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH > DOpE::FractionalStepThetaProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH > DOpE::ShiftedCrankNicolsonProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >

Public Member Functions

 PrimalTSBase (OPTPROBLEM &OP)
 
 ~PrimalTSBase ()
 
template<typename EDC >
void Init_ElementEquation (const EDC &edc, dealii::Vector< double > &local_vector, double scale, double scale_ico)
 
template<typename EDC >
void Init_ElementRhs (const EDC &edc, dealii::Vector< double > &local_vector, double scale)
 
template<typename EDC >
void Init_ElementMatrix (const EDC &edc, dealii::FullMatrix< double > &local_matrix, double scale, double scale_ico)
 
void Init_PointRhs (const std::map< std::string, const dealii::Vector< double > * > &, const std::map< std::string, const VECTOR * > &, VECTOR &, double)
 
template<typename FDC >
void Init_FaceEquation (const FDC &, dealii::Vector< double > &, double, double)
 
template<typename FDC >
void Init_InterfaceEquation (const FDC &, dealii::Vector< double > &, double, double)
 
template<typename FDC >
void Init_BoundaryEquation (const FDC &, dealii::Vector< double > &, double, double)
 
template<typename FDC >
void Init_FaceMatrix (const FDC &, FullMatrix< double > &, double, double)
 
template<typename FDC >
void Init_InterfaceMatrix (const FDC &, FullMatrix< double > &, double, double)
 
template<typename FDC >
void Init_BoundaryMatrix (const FDC &, FullMatrix< double > &, double, double)
 
- Public Member Functions inherited from DOpE::TSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >
 TSBase (OPTPROBLEM &OP)
 
 ~TSBase ()
 
void SetStepPart (std::string s)
 
void SetTime (double time, unsigned int time_dof_number, const TimeIterator &interval, bool initial=false)
 
template<typename DATACONTAINER >
double ElementFunctional (const DATACONTAINER &dc)
 
double PointFunctional (const std::map< std::string, const dealii::Vector< double > * > &param_values, const std::map< std::string, const VECTOR * > &domain_values)
 
template<typename FACEDATACONTAINER >
double BoundaryFunctional (const FACEDATACONTAINER &fdc)
 
template<typename FACEDATACONTAINER >
double FaceFunctional (const FACEDATACONTAINER &fdc)
 
const dealii::SmartPointer
< const dealii::FESystem
< dealdim > > 
GetFESystem () const
 
bool HasFaces () const
 
bool HasPoints () const
 
bool HasInterfaces () const
 
template<typename ELEMENTITERATOR >
bool AtInterface (ELEMENTITERATOR &element, unsigned int face) const
 
dealii::UpdateFlags GetUpdateFlags () const
 
dealii::UpdateFlags GetFaceUpdateFlags () const
 
const std::vector< unsigned int > & GetDirichletColors () const
 
const std::vector< bool > & GetDirichletCompMask (unsigned int color) const
 
const dealii::Function< dealdim > & GetDirichletValues (unsigned int color, const std::map< std::string, const dealii::Vector< double > * > &param_values, const std::map< std::string, const VECTOR * > &domain_values) const
 
const dealii::Function< dealdim > & GetInitialValues () const
 
const std::vector< unsigned int > & GetBoundaryEquationColors () const
 
const std::vector< unsigned int > & GetBoundaryFunctionalColors () const
 
unsigned int GetNFunctionals () const
 
unsigned int GetNBlocks () const
 
unsigned int GetDoFsPerBlock (unsigned int b) const
 
const std::vector< unsigned int > & GetDoFsPerBlock () const
 
const dealii::ConstraintMatrix & GetDoFConstraints () const
 
std::string GetType () const
 
std::string GetDoFType () const
 
std::string GetFunctionalType () const
 
std::string GetFunctionalName () const
 
DOpEOutputHandler< VECTOR > * GetOutputHandler ()
 
const SpaceTimeHandler< FE, DH,
SPARSITYPATTERN, VECTOR,
dopedim, dealdim > * 
GetSpaceTimeHandler () const
 
SpaceTimeHandler< FE, DH,
SPARSITYPATTERN, VECTOR,
dopedim, dealdim > * 
GetSpaceTimeHandler ()
 
void ComputeSparsityPattern (SPARSITYPATTERN &sparsity) const
 

Additional Inherited Members

- Protected Member Functions inherited from DOpE::TSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >
OPTPROBLEM & GetProblem ()
 
std::string GetPart () const
 

Detailed Description

template<typename OPTPROBLEM, typename SPARSITYPATTERN, typename VECTOR, int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
class DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >

This class contains the methods which all primal time stepping schemes share.

Template Parameters
<OPTPROBLEM>The problem to deal with.
<SPARSITYPATTERN>The sparsity pattern for control & state.
<VECTOR>The vector type for control & state (i.e. dealii::Vector<double> or dealii::BlockVector<double>)
<dopedim>The dimension for the control variable.
<dealdim>The dimension of the state variable.
<FE>The type of finite elements in use, must be compatible with the DH.
<DH>The type of the DoFHandler in use (to be more precise: The type of the dealii-DoFhandler which forms the base class of the DOpEWrapper::DoFHandler in use.)

Constructor & Destructor Documentation

template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::PrimalTSBase ( OPTPROBLEM &  OP)
inline
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::~PrimalTSBase ( )
inline

Member Function Documentation

template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename FDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_BoundaryEquation ( const FDC &  ,
dealii::Vector< double > &  ,
double  ,
double   
)
inline

Same functionality as for the ElementEquation, but on Boundaries. Note that no time derivatives may occure on faces of the domain at present!

Template Parameters
<FDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., FaceDataContainer
Parameters
fdcThe FDC object.
local_vectorThis vector contains the locally computed values of the Facequation.
scaleA scaling factor which is -1 or 1 depending on the subroutine to compute.
scale_icoGiven for compatibility reasons with the ElementEquation in PDEInterface. Should not be used here!
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename FDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_BoundaryMatrix ( const FDC &  ,
FullMatrix< double > &  ,
double  ,
double   
)
inline

Same functionality as for the ElementMatrix, but on Boundaries. Note that no time derivatives may occure on faces of the domain at present!

Template Parameters
<FDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., FaceDataContainer
Parameters
fdcThe FDC object.
local_matrixThis matrix contains the locally computed values of the FaceMatrix.
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename EDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_ElementEquation ( const EDC &  edc,
dealii::Vector< double > &  local_vector,
double  scale,
double  scale_ico 
)
inline

Computes the value of the element contributions to the equation for the calculation of the initial values

Template Parameters
<EDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., ElementDataContainer
Parameters
edcThe EDC object.
local_vectorThis vector contains the locally computed values of the element equation. For more information on dealii::Vector, please visit, the deal.ii manual pages.
scaleA scaling factor which is -1 or 1 depending on the subroutine to compute.
scale_icoGiven for compatibility reasons with the ElementEquation in PDEInterface. Should not be used here!
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename EDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_ElementMatrix ( const EDC &  edc,
dealii::FullMatrix< double > &  local_matrix,
double  scale,
double  scale_ico 
)
inline

Computes the value of the element contributions to the Matrix for the calculation of the initial values

Template Parameters
<EDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., ElementDataContainer
Parameters
edcThe EDC object.
local_matrixThis vector contains the locally computed values of the elementmatrix.
scaleA scaling factor which is -1 or 1 depending on the subroutine to compute.
scale_icoGiven for compatibility reasons with the ElementEquation in PDEInterface. Should not be used here!
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename EDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_ElementRhs ( const EDC &  edc,
dealii::Vector< double > &  local_vector,
double  scale 
)
inline

Computes the value of the element contributions to the RHS for the calculation of the initial values

Template Parameters
<EDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., ElementDataContainer
Parameters
edcThe EDC object.
local_vectorThis vector contains the locally computed values of the elementrhs.
scaleA scaling factor which is -1 or 1 depending on the subroutine to compute.
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename FDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_FaceEquation ( const FDC &  ,
dealii::Vector< double > &  ,
double  ,
double   
)
inline

Same functionality as for the Init_ElementEquation, but on Faces. Note that no time derivatives may occure on faces of the domain at present!

Template Parameters
<FDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., FaceDataContainer
Parameters
fdcThe FDC object.
local_vectorThis vector contains the locally computed values of the Facequation.
scaleA scaling factor which is -1 or 1 depending on the subroutine to compute.
scale_icoGiven for compatibility reasons with the ElementEquation in PDEInterface. Should not be used here!
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename FDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_FaceMatrix ( const FDC &  ,
FullMatrix< double > &  ,
double  ,
double   
)
inline

Same functionality as for the ElementMatrix, but on Faces. Note that no time derivatives may occure on faces of the domain at present!

Template Parameters
<FDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., FaceDataContainer
Parameters
fdcThe FDC object.
local_matrixThis matrix contains the locally computed values of the FaceMatrix.
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename FDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_InterfaceEquation ( const FDC &  ,
dealii::Vector< double > &  ,
double  ,
double   
)
inline

Same functionality as for the Init_ElementEquation, but on Interfaces, i.e. the same as FaceEquation but with access to the FEValues on both sides. Note that no time derivatives may occure on faces of the domain at present!

Template Parameters
<FDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., FaceDataContainer
Parameters
fdcThe FDC object.
local_vectorThis vector contains the locally computed values of the InterfaceEquation.
scaleA scaling factor which is -1 or 1 depending on the subroutine to compute.
scale_icoGiven for compatibility reasons with the ElementEquation in PDEInterface. Should not be used here!
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
template<typename FDC >
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_InterfaceMatrix ( const FDC &  ,
FullMatrix< double > &  ,
double  ,
double   
)
inline

Same functionality as for the ElementMatrix, but on Interfaces. Note that no time derivatives may occure on faces of the domain at present!

Template Parameters
<FDC>A container that contains all relevant data needed on the element, e.g., element size, finite element values; see, e.g., FaceDataContainer
Parameters
fdcThe FDC object.
local_matrixThis matrix contains the locally computed values of the InterfaceMatrix.
template<typename OPTPROBLEM , typename SPARSITYPATTERN , typename VECTOR , int dopedim, int dealdim, template< int, int > class FE = dealii::FESystem, template< int, int > class DH = dealii::DoFHandler>
void DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::Init_PointRhs ( const std::map< std::string, const dealii::Vector< double > * > &  ,
const std::map< std::string, const VECTOR * > &  ,
VECTOR &  ,
double   
)
inline

Computes the value of the point contributions to the Rhs for the calculation of the initial values

Parameters
param_valuesA std::map containing parameter data (e.g. non space dependent data). If the control is done by parameters, it is contained in this map at the position "control".
domain_valuesA std::map containing domain data (i.e., nodal vectors for FE-Functions). If the control is distributed, it is contained in this map at the position "control". The state may always be found in this map at the position "state"
local_vectorThis vector contains the locally computed values of the PointRhs. For more information on dealii::Vector, please visit, the deal.ii manual pages.
scaleA scaling factor which is -1 or 1 depending on the subroutine to compute.

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