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

#include <backward_euler_problem.h>

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

Public Member Functions

 BackwardEulerProblem (OPTPROBLEM &OP)
 
 ~BackwardEulerProblem ()
 
std::string GetName ()
 
InitialProblem
< BackwardEulerProblem
< OPTPROBLEM, SPARSITYPATTERN,
VECTOR, dopedim, dealdim, FE,
DH >, VECTOR, dealdim > & 
GetInitialProblem ()
 
BackwardEulerProblem
< OPTPROBLEM, SPARSITYPATTERN,
VECTOR, dopedim, dealdim, FE,
DH > & 
GetBaseProblem ()
 
template<typename EDC >
void ElementEquation (const EDC &edc, dealii::Vector< double > &local_vector, double scale, double)
 
template<typename EDC >
void ElementRhs (const EDC &edc, dealii::Vector< double > &local_vector, double scale)
 
void PointRhs (const std::map< std::string, const dealii::Vector< double > * > &param_values, const std::map< std::string, const VECTOR * > &domain_values, VECTOR &rhs_vector, double scale)
 
template<typename EDC >
void ElementMatrix (const EDC &edc, dealii::FullMatrix< double > &local_matrix)
 
template<typename FDC >
void FaceEquation (const FDC &fdc, dealii::Vector< double > &local_vector, double scale, double)
 
template<typename FDC >
void InterfaceEquation (const FDC &fdc, dealii::Vector< double > &local_vector, double scale, double)
 
template<typename FDC >
void FaceRhs (const FDC &fdc, dealii::Vector< double > &local_vector, double scale=1.)
 
template<typename FDC >
void FaceMatrix (const FDC &fdc, dealii::FullMatrix< double > &local_matrix)
 
template<typename FDC >
void InterfaceMatrix (const FDC &fdc, dealii::FullMatrix< double > &local_matrix)
 
template<typename FDC >
void BoundaryEquation (const FDC &fdc, dealii::Vector< double > &local_vector, double scale, double)
 
template<typename FDC >
void BoundaryRhs (const FDC &fdc, dealii::Vector< double > &local_vector, double scale)
 
template<typename FDC >
void BoundaryMatrix (const FDC &fdc, dealii::FullMatrix< double > &local_matrix)
 
- Public Member Functions inherited from DOpE::PrimalTSBase< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >
 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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >

Class to compute time dependent problems with the backward Euler time stepping scheme.

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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::BackwardEulerProblem ( 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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::~BackwardEulerProblem ( )
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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::BoundaryEquation ( const FDC &  fdc,
dealii::Vector< double > &  local_vector,
double  scale,
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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::BoundaryMatrix ( const FDC &  fdc,
dealii::FullMatrix< double > &  local_matrix 
)
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 FDC >
void DOpE::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::BoundaryRhs ( const FDC &  fdc,
dealii::Vector< double > &  local_vector,
double  scale 
)
inline

Same functionality as for the ElementRhs, 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 FaceRhs.
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 EDC >
void DOpE::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::ElementEquation ( const EDC &  edc,
dealii::Vector< double > &  local_vector,
double  scale,
double   
)
inline

Computes the value of the element equation for the time-step problem. This is build from the three functions ElementEquation, ElementTimeEquation, ElementTimeEquationExplicit provided by the PDE: ElementEquation: The spatial integrals ElementTimeEquation: The time derivative part in the equation if can be approximated with difference quotient between t_n and t_{n+1}. TimeEquationExplicit: Explicit calculation of the time derivative if a simple difference quotient is not sufficient as it may happen for timederivatives of nonlinear terms.

The function is divided into two parts `old' and `new' which are given to the Newton solver. Then, the computation is done in two steps: first computation of the old Newton- or time step equation parts. After, computation of the actual parts.

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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::ElementMatrix ( const EDC &  edc,
dealii::FullMatrix< double > &  local_matrix 
)
inline

Computes the value of the element matrix which is derived by computing the directional derivatives of the residuum equation of the PDE under consideration. This function itself contains a maximum of four subroutines of matrix equations: ElementMatrix, ElementMatrixExplicit, ElementTimeMatrix, ElementTimeMatrixExplicit. So far, all three types are needed for fluid-structure interaction problems: ElementMatrix: implicit terms, like pressure. ElementMatrixExplicit: stress tensors, fluid convection, etc. TimeMatrixExplicit: time derivatives of certain variables which are combined with transformations, etc.

In fluid problems, the ElementMatrix terms coincide. However the TimeMatrix terms differ: ElementTimeMatrix: time derivatives, e.g., dt v in direction v

This function is just considered in the `new' part. This is due to that directional derivatives vanish if they are applied to old values which are, of course, already computed and therefore constant.

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
edcA DataContainer holding all the needed information of the element
local_matrixThe local matrix is quadratic and has size local DoFs times local DoFs and is filled by the locally computed values. For more information of its functionality, please search for the keyword `FullMatrix' in the deal.ii manual.
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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::ElementRhs ( const EDC &  edc,
dealii::Vector< double > &  local_vector,
double  scale 
)
inline

Computes the value of the right-hand side. The function is divided into two parts `old' and `new' which are given the Newton solver. Then, the computation is done in two steps: first computation of the old Newton- or time step equation parts. After, computation of the actual parts.

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
edcA DataContainer holding all the needed information of the element
local_vectorThis vector contains the locally computed values of the ElementRhs. 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.
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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::FaceEquation ( const FDC &  fdc,
dealii::Vector< double > &  local_vector,
double  scale,
double   
)
inline

Same functionality as for the 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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::FaceMatrix ( const FDC &  fdc,
dealii::FullMatrix< double > &  local_matrix 
)
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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::FaceRhs ( const FDC &  fdc,
dealii::Vector< double > &  local_vector,
double  scale = 1. 
)
inline

Same functionality as for the ElementRhs, 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 FaceRhs.
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>
BackwardEulerProblem<OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH>& DOpE::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::GetBaseProblem ( )
inline

Returns a pointer to the base problem, here `this'. This behavior is temporary to allow use of the BackwardEulerProblem until all subproblems (i.e., Primal, Dual, Tangent,...) have their own 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>
InitialProblem< BackwardEulerProblem<OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH>, VECTOR, dealdim>& DOpE::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::GetInitialProblem ( )
inline

Returns a pointer to the problem used to calculate the initial values used for this scheme.

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>
std::string DOpE::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::GetName ( )
inline

Returns the name of the time stepping scheme.

Returns
A string containing the name of the time stepping scheme.
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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::InterfaceEquation ( const FDC &  fdc,
dealii::Vector< double > &  local_vector,
double  scale,
double   
)
inline

Same functionality as for the 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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::InterfaceMatrix ( const FDC &  fdc,
dealii::FullMatrix< double > &  local_matrix 
)
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::BackwardEulerProblem< OPTPROBLEM, SPARSITYPATTERN, VECTOR, dopedim, dealdim, FE, DH >::PointRhs ( const std::map< std::string, const dealii::Vector< double > * > &  param_values,
const std::map< std::string, const VECTOR * > &  domain_values,
VECTOR &  rhs_vector,
double  scale 
)
inline

Computes the value of the right-hand side of the problem at hand, if it contains pointevaluations. The function is divided into two parts `old' and `new' which are given the Newton solver. Then, the computation is done in two steps: first computation of the old Newton- or time step equation parts. After, computation of the actual parts.

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: