|
ug4
|
multi step time stepping scheme More...
#include <theta_time_step.h>
Inheritance diagram for ug::MultiStepTimeDiscretization< TAlgebra >:Public Types | |
| typedef TAlgebra | algebra_type |
| Type of algebra. | |
| typedef IDomainDiscretization< algebra_type > | domain_discretization_type |
| Domain Discretization type. | |
| typedef CPUAlgebra::vector_type | error_vector_type |
| Type of algebra vector. | |
| typedef algebra_type::matrix_type | matrix_type |
| Type of algebra matrix. | |
| typedef algebra_type::vector_type | vector_type |
| Type of algebra vector. | |
Public Types inherited from ug::ITimeDiscretization< TAlgebra > | |
| typedef TAlgebra | algebra_type |
| Algebra type. | |
| typedef IDomainDiscretization< TAlgebra > | domain_discretization_type |
| Domain Discretization type. | |
| typedef algebra_type::vector_type | vector_type |
| Vector type. | |
Public Types inherited from ug::IAssemble< TAlgebra > | |
| typedef TAlgebra | algebra_type |
| Algebra type. | |
| typedef TAlgebra::matrix_type | matrix_type |
| Type of algebra matrix. | |
| typedef TAlgebra::vector_type | vector_type |
| Type of algebra vector. | |
Public Member Functions | |
| void | adjust_solution (vector_type &u, const GridLevel &gl) |
| void | assemble_defect (vector_type &d, const vector_type &u, const GridLevel &gl) |
| void | assemble_jacobian (matrix_type &J, const vector_type &u, const GridLevel &gl) |
| void | assemble_linear (matrix_type &A, vector_type &b, const GridLevel &gl) |
| void | assemble_rhs (vector_type &b, const GridLevel &gl) |
| void | assemble_rhs (vector_type &b, const vector_type &u, const GridLevel &gl) |
| void | calc_error (const vector_type &u) |
| void | calc_error (const vector_type &u, error_vector_type &u_vtk) |
| void | calc_error (const vector_type &u, error_vector_type *u_vtk) |
| Error estimator ///. | |
| virtual void | finish_step (SmartPtr< VectorTimeSeries< vector_type > > currSol) |
| virtual void | finish_step_elem (SmartPtr< VectorTimeSeries< vector_type > > currSol, const GridLevel &gl) |
| virtual number | future_time () const |
| returns the future time point (i.e. the one that will be computed) | |
| void | invalidate_error () |
| bool | is_error_valid () |
| returns whether error indicators are valid | |
| MultiStepTimeDiscretization (SmartPtr< IDomainDiscretization< algebra_type > > spDD) | |
| constructor | |
| virtual size_t | num_prev_steps () const |
| returns number of previous time steps needed | |
| virtual void | prepare_step (SmartPtr< VectorTimeSeries< vector_type > > prevSol, number dt) |
| prepares the assembling of Defect/Jacobian for a time step | |
| virtual void | prepare_step_elem (SmartPtr< VectorTimeSeries< vector_type > > prevSol, number dt, const GridLevel &gl) |
| prepares the assembling of Defect/Jacobian for a time step | |
| virtual | ~MultiStepTimeDiscretization () |
Public Member Functions inherited from ug::ITimeDiscretization< TAlgebra > | |
| virtual SmartPtr< IConstraint< TAlgebra > > | constraint (size_t i) |
| returns the i'th constraint | |
| SmartPtr< IDomainDiscretization< TAlgebra > > | domain_disc () const |
| return underlying domain disc | |
| ITimeDiscretization (SmartPtr< IDomainDiscretization< TAlgebra > > spDD) | |
| create and set domain discretization | |
| virtual size_t | num_constraints () const |
| returns the number of constraint | |
| virtual size_t | num_stages () const =0 |
| returns the number of stages | |
| virtual void | set_stage (size_t stage)=0 |
| sets the stage | |
| void | prepare_step_elem (SmartPtr< VectorTimeSeries< vector_type > > prevSol, number dt) |
| prepares the assembling of Defect/Jacobian for a time step | |
| 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 | |
| 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 | |
| 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) | |
| 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. | |
| 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 | |
| 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. | |
| 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 | |
| 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 | |
| virtual | ~IAssemble () |
| Virtual Destructor. | |
Protected Member Functions | |
| virtual number | update_scaling (std::vector< number > &vSM, std::vector< number > &vSA, number dt, number currentTime, ConstSmartPtr< VectorTimeSeries< vector_type > > prevSol)=0 |
| Error estimator ///. | |
Protected Attributes | |
| number | m_dt |
| Time Step size. | |
| number | m_futureTime |
| Future Time. | |
| SmartPtr< VectorTimeSeries< vector_type > > | m_pPrevSol |
| Previous solutions. | |
| size_t | m_prevSteps |
| number of previous steps needed. | |
| std::vector< number > | m_vScaleMass |
| Scaling for mass part. | |
| std::vector< number > | m_vScaleStiff |
| Scaling for stiffness part. | |
Protected Attributes inherited from ug::ITimeDiscretization< TAlgebra > | |
| SmartPtr< IDomainDiscretization< TAlgebra > > | m_spDomDisc |
| Domain Discretization. | |
multi step time stepping scheme
| typedef TAlgebra ug::MultiStepTimeDiscretization< TAlgebra >::algebra_type |
Type of algebra.
| typedef IDomainDiscretization<algebra_type> ug::MultiStepTimeDiscretization< TAlgebra >::domain_discretization_type |
Domain Discretization type.
| typedef CPUAlgebra::vector_type ug::MultiStepTimeDiscretization< TAlgebra >::error_vector_type |
Type of algebra vector.
| typedef algebra_type::matrix_type ug::MultiStepTimeDiscretization< TAlgebra >::matrix_type |
Type of algebra matrix.
| typedef algebra_type::vector_type ug::MultiStepTimeDiscretization< TAlgebra >::vector_type |
Type of algebra vector.
|
inline |
constructor
|
inlinevirtual |
| void ug::MultiStepTimeDiscretization< TAlgebra >::adjust_solution | ( | vector_type & | u, |
| const GridLevel & | gl | ||
| ) |
References PROFILE_BEGIN_GROUP, and UG_CATCH_THROW.
| void ug::MultiStepTimeDiscretization< TAlgebra >::assemble_defect | ( | vector_type & | d, |
| const vector_type & | u, | ||
| const GridLevel & | gl | ||
| ) |
References PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_THROW.
| void ug::MultiStepTimeDiscretization< TAlgebra >::assemble_jacobian | ( | matrix_type & | J, |
| const vector_type & | u, | ||
| const GridLevel & | gl | ||
| ) |
References PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_THROW.
| void ug::MultiStepTimeDiscretization< TAlgebra >::assemble_linear | ( | matrix_type & | A, |
| vector_type & | b, | ||
| const GridLevel & | gl | ||
| ) |
References PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_THROW.
| void ug::MultiStepTimeDiscretization< TAlgebra >::assemble_rhs | ( | vector_type & | b, |
| const GridLevel & | gl | ||
| ) |
References PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_THROW.
| void ug::MultiStepTimeDiscretization< TAlgebra >::assemble_rhs | ( | vector_type & | b, |
| const vector_type & | u, | ||
| const GridLevel & | gl | ||
| ) |
References PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_THROW.
|
inline |
|
inline |
| void ug::MultiStepTimeDiscretization< TAlgebra >::calc_error | ( | const vector_type & | u, |
| error_vector_type * | u_vtk | ||
| ) |
Error estimator ///.
calculates error indicators for elements from error estimators
References PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_THROW.
|
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.
| [in] | currSol | the solution at the previous time steps |
| [in] | dt | size of time step |
Implements ug::ITimeDiscretization< TAlgebra >.
References UG_CATCH_THROW, and UG_THROW.
|
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.
| [in] | currSol | the current solution |
| [in] | dd | DoF Distribution |
Implements ug::ITimeDiscretization< TAlgebra >.
References UG_CATCH_THROW, and UG_THROW.
|
inlinevirtual |
returns the future time point (i.e. the one that will be computed)
Implements ug::ITimeDiscretization< TAlgebra >.
References ug::MultiStepTimeDiscretization< TAlgebra >::m_futureTime.
|
inline |
marks error indicators as invalid; in order to revalidate them, they will have to be newly calculated by a call to calc_error
References ug::ITimeDiscretization< TAlgebra >::m_spDomDisc.
|
inline |
returns whether error indicators are valid
References ug::ITimeDiscretization< TAlgebra >::m_spDomDisc.
|
inlinevirtual |
returns number of previous time steps needed
Implements ug::ITimeDiscretization< TAlgebra >.
References ug::MultiStepTimeDiscretization< TAlgebra >::m_prevSteps.
|
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.
| [in] | prevSol | the solution at the previous time steps |
| [in] | dt | size of time step |
Implements ug::ITimeDiscretization< TAlgebra >.
Reimplemented in ug::SDIRK< TAlgebra >.
References PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_THROW.
|
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.
| [in] | prevSol | the solution at the previous time steps |
| [in] | dt | size of time step |
| [in] | dd | DoF Distribution |
Implements ug::ITimeDiscretization< TAlgebra >.
References PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_THROW.
|
protectedpure virtual |
Error estimator ///.
updates the scaling factors, returns the future time
Implemented in ug::ThetaTimeStep< TAlgebra >, ug::BDF< TAlgebra >, and ug::SDIRK< TAlgebra >.
|
protected |
Time Step size.
|
protected |
Future Time.
Referenced by ug::MultiStepTimeDiscretization< TAlgebra >::future_time().
|
protected |
Previous solutions.
|
protected |
number of previous steps needed.
Referenced by ug::MultiStepTimeDiscretization< TAlgebra >::num_prev_steps(), ug::SDIRK< TAlgebra >::SDIRK(), ug::SDIRK< TAlgebra >::SDIRK(), ug::BDF< TAlgebra >::set_order(), ug::ThetaTimeStep< TAlgebra >::ThetaTimeStep(), ug::ThetaTimeStep< TAlgebra >::ThetaTimeStep(), and ug::ThetaTimeStep< TAlgebra >::ThetaTimeStep().
|
protected |
Scaling for mass part.
|
protected |
Scaling for stiffness part.