ug4
ug::ITimeDiscretization< TAlgebra > Class Template Referenceabstract

Time Discretization Interface. More...

#include <time_disc_interface.h>

+ Inheritance diagram for ug::ITimeDiscretization< TAlgebra >:

Public Types

typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef IDomainDiscretization< TAlgebra > domain_discretization_type
 Domain Discretization type. More...
 
typedef algebra_type::vector_type vector_type
 Vector type. More...
 
- Public Types inherited from ug::IAssemble< TAlgebra >
typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef TAlgebra::matrix_type matrix_type
 Type of algebra matrix. More...
 
typedef TAlgebra::vector_type vector_type
 Type of algebra vector. More...
 

Public Member Functions

virtual SmartPtr< IConstraint< TAlgebra > > constraint (size_t i)
 returns the i'th constraint More...
 
SmartPtr< IDomainDiscretization< TAlgebra > > domain_disc () const
 return underlying domain disc More...
 
virtual void finish_step (SmartPtr< VectorTimeSeries< vector_type > > currSol)=0
 
virtual number future_time () const =0
 returns the future time point (i.e. the one that will be computed) More...
 
 ITimeDiscretization (SmartPtr< IDomainDiscretization< TAlgebra > > spDD)
 create and set domain discretization More...
 
virtual size_t num_constraints () const
 returns the number of constraint More...
 
virtual size_t num_prev_steps () const =0
 returns number of previous time steps needed More...
 
virtual size_t num_stages () const =0
 returns the number of stages More...
 
virtual void prepare_step (SmartPtr< VectorTimeSeries< vector_type > > prevSol, number dt)=0
 prepares the assembling of Defect/Jacobian for a time step More...
 
virtual void set_stage (size_t stage)=0
 sets the stage More...
 
virtual void prepare_step_elem (SmartPtr< VectorTimeSeries< vector_type > > prevSol, number dt, const GridLevel &gl)=0
 prepares the assembling of Defect/Jacobian for a time step More...
 
void prepare_step_elem (SmartPtr< VectorTimeSeries< vector_type > > prevSol, number dt)
 prepares the assembling of Defect/Jacobian for a time step More...
 
virtual void finish_step_elem (SmartPtr< VectorTimeSeries< vector_type > > currSol, const GridLevel &gl)=0
 
void finish_step_elem (SmartPtr< VectorTimeSeries< vector_type > > currSol)
 
- Public Member Functions inherited from ug::IAssemble< TAlgebra >
void adjust_solution (vector_type &u)
 
virtual void adjust_solution (vector_type &u, const GridLevel &gl)=0
 sets dirichlet values in solution vector More...
 
void assemble_defect (vector_type &d, const vector_type &u)
 
virtual void assemble_defect (vector_type &d, const vector_type &u, const GridLevel &gl)=0
 assembles Defect More...
 
void assemble_jacobian (matrix_type &J, const vector_type &u)
 
virtual void assemble_jacobian (matrix_type &J, const vector_type &u, const GridLevel &gl)=0
 assembles Jacobian (or Approximation of Jacobian) More...
 
void assemble_linear (matrix_type &A, vector_type &b)
 
virtual void assemble_linear (matrix_type &A, vector_type &b, const GridLevel &gl)=0
 Assembles Matrix and Right-Hand-Side for a linear problem. More...
 
void assemble_mass_matrix (matrix_type &M, const vector_type &u)
 
virtual void assemble_mass_matrix (matrix_type &M, const vector_type &u, const GridLevel &gl)
 assembles mass matrix More...
 
void assemble_rhs (vector_type &b)
 
virtual void assemble_rhs (vector_type &b, const GridLevel &gl)=0
 Assembles Right-Hand-Side for a linear problem. More...
 
virtual void assemble_rhs (vector_type &rhs, const vector_type &u)
 
virtual void assemble_rhs (vector_type &rhs, const vector_type &u, const GridLevel &gl)=0
 assembles rhs More...
 
void assemble_stiffness_matrix (matrix_type &A, const vector_type &u)
 
virtual void assemble_stiffness_matrix (matrix_type &A, const vector_type &u, const GridLevel &gl)
 assembles stiffness matrix More...
 
virtual ~IAssemble ()
 Virtual Destructor. More...
 

Protected Attributes

SmartPtr< IDomainDiscretization< TAlgebra > > m_spDomDisc
 Domain Discretization. More...
 

Private Member Functions

SmartPtr< AssemblingTuner< TAlgebra > > ass_tuner ()
 
ConstSmartPtr< AssemblingTuner< TAlgebra > > ass_tuner () const
 

Detailed Description

template<typename TAlgebra>
class ug::ITimeDiscretization< TAlgebra >

Time Discretization Interface.

Defines the time discretization interface.

This class uses a ISpatialDiscretization in order to implement the IAssemble interface.

After the method prepare step has been called, Jacobian/Defect can be computed.

Template Parameters
TAlgebraAlgebra Type

Member Typedef Documentation

◆ algebra_type

template<typename TAlgebra >
typedef TAlgebra ug::ITimeDiscretization< TAlgebra >::algebra_type

Algebra type.

◆ domain_discretization_type

template<typename TAlgebra >
typedef IDomainDiscretization<TAlgebra> ug::ITimeDiscretization< TAlgebra >::domain_discretization_type

Domain Discretization type.

◆ vector_type

template<typename TAlgebra >
typedef algebra_type::vector_type ug::ITimeDiscretization< TAlgebra >::vector_type

Vector type.

Constructor & Destructor Documentation

◆ ITimeDiscretization()

template<typename TAlgebra >
ug::ITimeDiscretization< TAlgebra >::ITimeDiscretization ( SmartPtr< IDomainDiscretization< TAlgebra > >  spDD)
inline

create and set domain discretization

Parameters
[in]ddDomain Discretization

Member Function Documentation

◆ ass_tuner() [1/2]

template<typename TAlgebra >
SmartPtr<AssemblingTuner<TAlgebra> > ug::ITimeDiscretization< TAlgebra >::ass_tuner ( )
inlineprivatevirtual

returns the assemble adapter

Implements ug::IAssemble< TAlgebra >.

References ug::ITimeDiscretization< TAlgebra >::m_spDomDisc.

◆ ass_tuner() [2/2]

template<typename TAlgebra >
ConstSmartPtr<AssemblingTuner<TAlgebra> > ug::ITimeDiscretization< TAlgebra >::ass_tuner ( ) const
inlineprivatevirtual

returns the assemble adapter

Implements ug::IAssemble< TAlgebra >.

References ug::ITimeDiscretization< TAlgebra >::m_spDomDisc.

◆ constraint()

template<typename TAlgebra >
virtual SmartPtr<IConstraint<TAlgebra> > ug::ITimeDiscretization< TAlgebra >::constraint ( size_t  i)
inlinevirtual

returns the i'th constraint

Implements ug::IAssemble< TAlgebra >.

References ug::ITimeDiscretization< TAlgebra >::m_spDomDisc.

◆ domain_disc()

template<typename TAlgebra >
SmartPtr<IDomainDiscretization<TAlgebra> > ug::ITimeDiscretization< TAlgebra >::domain_disc ( ) const
inline

return underlying domain disc

References ug::ITimeDiscretization< TAlgebra >::m_spDomDisc.

◆ finish_step()

template<typename TAlgebra >
virtual void ug::ITimeDiscretization< TAlgebra >::finish_step ( SmartPtr< VectorTimeSeries< vector_type > >  currSol)
pure virtual

finishes a time step and allows to adapt data depending on the current solution elemDisc-wise This function is called after the assembling routines at the end of a time step.

Parameters
[in]currSolthe solution at the previous time steps
[in]dtsize of time step

Implemented in ug::MultiStepTimeDiscretization< TAlgebra >.

◆ finish_step_elem() [1/2]

template<typename TAlgebra >
void ug::ITimeDiscretization< TAlgebra >::finish_step_elem ( SmartPtr< VectorTimeSeries< vector_type > >  currSol)
inline

finishes a time step and allows to adapt data depending on the current solution element-wise This function is called after the assembling routines at the end of a time step. Within this function "fsh_timestep_elem" is called which allows modifying data depending on the current solution at element-level.

Parameters
[in]currSolthe current solution
[in]ddDoF Distribution

References ug::ITimeDiscretization< TAlgebra >::finish_step_elem().

◆ finish_step_elem() [2/2]

template<typename TAlgebra >
virtual void ug::ITimeDiscretization< TAlgebra >::finish_step_elem ( SmartPtr< VectorTimeSeries< vector_type > >  currSol,
const GridLevel gl 
)
pure virtual

finishes a time step and allows to adapt data depending on the current solution element-wise This function is called after the assembling routines at the end of a time step. Within this function "fsh_timestep_elem" is called which allows modifying data depending on the current solution at element-level.

Parameters
[in]currSolthe current solution
[in]ddDoF Distribution

Implemented in ug::MultiStepTimeDiscretization< TAlgebra >.

Referenced by ug::ITimeDiscretization< TAlgebra >::finish_step_elem().

◆ future_time()

template<typename TAlgebra >
virtual number ug::ITimeDiscretization< TAlgebra >::future_time ( ) const
pure virtual

returns the future time point (i.e. the one that will be computed)

Implemented in ug::MultiStepTimeDiscretization< TAlgebra >, and ug::LinearImplicitEuler< class >.

◆ num_constraints()

template<typename TAlgebra >
virtual size_t ug::ITimeDiscretization< TAlgebra >::num_constraints ( ) const
inlinevirtual

returns the number of constraint

Implements ug::IAssemble< TAlgebra >.

References ug::ITimeDiscretization< TAlgebra >::m_spDomDisc.

◆ num_prev_steps()

template<typename TAlgebra >
virtual size_t ug::ITimeDiscretization< TAlgebra >::num_prev_steps ( ) const
pure virtual

returns number of previous time steps needed

Implemented in ug::MultiStepTimeDiscretization< TAlgebra >, and ug::LinearImplicitEuler< class >.

◆ num_stages()

template<typename TAlgebra >
virtual size_t ug::ITimeDiscretization< TAlgebra >::num_stages ( ) const
pure virtual

◆ prepare_step()

template<typename TAlgebra >
virtual void ug::ITimeDiscretization< TAlgebra >::prepare_step ( SmartPtr< VectorTimeSeries< vector_type > >  prevSol,
number  dt 
)
pure virtual

prepares the assembling of Defect/Jacobian for a time step

This function supplies the TimeDiscretization with previous time steps and step size before the assembling routines can be called.

Parameters
[in]prevSolthe solution at the previous time steps
[in]dtsize of time step

Implemented in ug::SDIRK< TAlgebra >, and ug::MultiStepTimeDiscretization< TAlgebra >.

◆ prepare_step_elem() [1/2]

template<typename TAlgebra >
void ug::ITimeDiscretization< TAlgebra >::prepare_step_elem ( SmartPtr< VectorTimeSeries< vector_type > >  prevSol,
number  dt 
)
inline

prepares the assembling of Defect/Jacobian for a time step

This function supplies the TimeDiscretization with previous time steps and step size before the assembling routines can be called. A sub-routine at element-level ("prep_timestep_elem") is called within this function.

Parameters
[in]prevSolthe solution at the previous time steps
[in]dtsize of time step
[in]ddDoF Distribution

References ug::ITimeDiscretization< TAlgebra >::prepare_step_elem().

◆ prepare_step_elem() [2/2]

template<typename TAlgebra >
virtual void ug::ITimeDiscretization< TAlgebra >::prepare_step_elem ( SmartPtr< VectorTimeSeries< vector_type > >  prevSol,
number  dt,
const GridLevel gl 
)
pure virtual

prepares the assembling of Defect/Jacobian for a time step

This function supplies the TimeDiscretization with previous time steps and step size before the assembling routines can be called. A sub-routine at element-level ("prep_timestep_elem") is called within this function.

Parameters
[in]prevSolthe solution at the previous time steps
[in]dtsize of time step
[in]ddDoF Distribution

Implemented in ug::MultiStepTimeDiscretization< TAlgebra >.

Referenced by ug::ITimeDiscretization< TAlgebra >::prepare_step_elem().

◆ set_stage()

template<typename TAlgebra >
virtual void ug::ITimeDiscretization< TAlgebra >::set_stage ( size_t  stage)
pure virtual

Member Data Documentation

◆ m_spDomDisc


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