#include <linear_implicit_timestep.h>
Public Types | |
typedef ITimeDiscretization< TAlgebra > | base_type |
Type of base class. | |
typedef TAlgebra | algebra_type |
Type of algebra. | |
typedef algebra_type::matrix_type | matrix_type |
Type of algebra matrix. | |
typedef algebra_type::vector_type | vector_type |
Type of algebra vector. | |
typedef IDomainDiscretization< algebra_type > | domain_discretization_type |
Domain Discretization type. | |
Public Member Functions | |
LinearImplicitEuler (SmartPtr< IDomainDiscretization< algebra_type > > spDD) | |
CTOR. | |
LinearImplicitEuler (SmartPtr< IDomainDiscretization< algebra_type > > spDefectDisc, SmartPtr< IDomainDiscretization< algebra_type > > spMatrixJDisc) | |
CTOR. | |
LinearImplicitEuler (SmartPtr< IDomainDiscretization< algebra_type > > spDefectDisc, SmartPtr< IDomainDiscretization< algebra_type > > spMatrixJDisc, SmartPtr< IDomainDiscretization< algebra_type > > spGammaDisc) | |
CTOR. | |
virtual | ~LinearImplicitEuler () |
DTOR. | |
virtual size_t | num_prev_steps () const |
virtual void | prepare_step (SmartPtr< VectorTimeSeries< vector_type > > prevSol, number dt) |
virtual void | prepare_step_elem (SmartPtr< VectorTimeSeries< vector_type > > prevSol, number dt, const GridLevel &gl) |
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 |
void | assemble_jacobian (matrix_type &J, const vector_type &u, const GridLevel &gl) |
Meant to assemble J(u) c = d(u), but abused here... (u not used!) | |
void | assemble_defect (vector_type &d, const vector_type &u, const GridLevel &gl) |
Meant to assemble d(u), but abused here... (u not used!) | |
void | assemble_linear (matrix_type &A, vector_type &b, const GridLevel &gl) |
Should return (M+tau A) delta = tau f. | |
void | assemble_rhs (vector_type &b, const vector_type &u, const GridLevel &gl) |
void | assemble_rhs (vector_type &b, const GridLevel &gl) |
void | adjust_solution (vector_type &u, const GridLevel &gl) |
virtual size_t | num_stages () const |
virtual void | set_stage (size_t stage) |
void | enable_linear_mode () |
Some simplifications for linear systems. (In this case, the mass matrix is not re-assembled.) | |
void | disable_linear_mode () |
bool | use_linear_mode () const |
void | enable_matrix_cache () |
void | disable_matrix_cache () |
void | set_matrix_cache (bool useCache) |
void | invalidate () |
Invalidate all cached operators. | |
void | invalidate_gamma () |
Invalidate Gamma operator. | |
void | set_gamma_disc (SmartPtr< IDomainDiscretization< algebra_type > > spGammaDisc) |
Protected Member Functions | |
virtual number | update_scaling (std::vector< number > &vSM, std::vector< number > &vSA, number dt, number currentTime, ConstSmartPtr< VectorTimeSeries< vector_type > > prevSol) |
Protected Attributes | |
std::vector< number > | m_vScaleMass |
Scaling for mass part. | |
std::vector< number > | m_vScaleStiff |
Scaling for stiffness part. | |
SmartPtr< VectorTimeSeries< vector_type > > | m_pPrevSol |
Previous solutions. | |
number | m_dt |
Time Step size. | |
number | m_futureTime |
Future Time. | |
SmartPtr< IDomainDiscretization< algebra_type > > | m_spMatrixJDisc |
SmartPtr< AssembledLinearOperator< algebra_type > > | m_spMatrixJOp |
Operator. | |
bool | m_bMatrixJNeedsUpdate |
bool | m_useLinearMode |
SmartPtr< IDomainDiscretization< algebra_type > > | m_spGammaDisc |
Gamma disc. | |
SmartPtr< AssembledLinearOperator< algebra_type > > | m_spGammaOp |
Gamma operator. | |
bool | m_bGammaNeedsUpdate |
SmartPtr< matrix_type > | m_spMatrixCacheMk |
bool | m_useCachedMatrices |
Static Protected Attributes | |
static const size_t | m_prevSteps =1 |
number of previous steps needed. | |
This time stepping scheme discretizes equations of the form
as
Thus, for
void ug::LinearImplicitEuler< TAlgebra >::assemble_defect | ( | vector_type & | d, |
const vector_type & | u, | ||
const GridLevel & | gl ) |
Meant to assemble d(u), but abused here... (u not used!)
WARNING: This function is abused Must return : d_A(k-1):= tau * F(k-1) - A(k-1) u(k-1)
void ug::LinearImplicitEuler< TAlgebra >::assemble_jacobian | ( | matrix_type & | J_limex, |
const vector_type & | u, | ||
const GridLevel & | gl ) |
Meant to assemble J(u) c = d(u), but abused here... (u not used!)
WARNING: This function is abused Must return: $Mk + \tau J$
|
inlinevirtual |
|
virtual |
|
inlinevirtual |
|
virtual |
|
virtual |