Plugins
|
#include <linear_implicit_timestep.h>
Public Types | |
typedef TAlgebra | algebra_type |
Type of algebra. | |
typedef ITimeDiscretization< TAlgebra > | base_type |
Type of base class. | |
typedef IDomainDiscretization< algebra_type > | domain_discretization_type |
Domain Discretization type. | |
typedef algebra_type::matrix_type | matrix_type |
Type of algebra matrix. | |
typedef algebra_type::vector_type | vector_type |
Type of algebra vector. | |
![]() | |
typedef TAlgebra | algebra_type |
typedef IDomainDiscretization< TAlgebra > | domain_discretization_type |
typedef algebra_type::vector_type | vector_type |
![]() | |
typedef TAlgebra | algebra_type |
typedef TAlgebra::matrix_type | matrix_type |
typedef TAlgebra::vector_type | vector_type |
![]() | |
typedef TAlgebra | algebra_type |
typedef TAlgebra::matrix_type | matrix_type |
typedef TAlgebra::vector_type | vector_type |
![]() | |
typedef TVector | vector_type |
Protected Member Functions | |
virtual number | update_scaling (std::vector< number > &vSM, std::vector< number > &vSA, number dt, number currentTime, ConstSmartPtr< VectorTimeSeries< vector_type > > prevSol) |
![]() | |
void | enter_debug_writer_section (const char *secDir) |
void | enter_debug_writer_section (std::string secDir) |
void | leave_debug_writer_section () |
void | write_debug (const matrix_type &mat, const char *filename) |
void | write_debug (const matrix_type &mat, std::string name) |
![]() | |
void | enter_vector_debug_writer_section (const char *secDir) |
void | enter_vector_debug_writer_section (std::string secDir) |
void | leave_vector_debug_writer_section () |
void | print_debugger_message (const char *msg) |
void | print_debugger_message (std::string msg) |
virtual void | write_debug (const vector_type &vec, std::string name) |
Static Protected Attributes | |
static const size_t | m_prevSteps =1 |
number of previous steps needed. | |
This time stepping scheme discretizes equations of the form
\[ M \partial_t u(t) = f(t) \]
as
\[ (M - \Delta t J) \left( u(t^{k+1}) - u(t^k) \right) = \Delta t \cdot f(t^{k}) \]
Thus, for \(\theta = 1 \) this is the Backward-Euler time stepping.
typedef TAlgebra ug::LinearImplicitEuler< TAlgebra >::algebra_type |
Type of algebra.
typedef ITimeDiscretization<TAlgebra> ug::LinearImplicitEuler< TAlgebra >::base_type |
Type of base class.
typedef IDomainDiscretization<algebra_type> ug::LinearImplicitEuler< TAlgebra >::domain_discretization_type |
Domain Discretization type.
typedef algebra_type::matrix_type ug::LinearImplicitEuler< TAlgebra >::matrix_type |
Type of algebra matrix.
typedef algebra_type::vector_type ug::LinearImplicitEuler< TAlgebra >::vector_type |
Type of algebra vector.
|
inline |
CTOR.
References SPNULL.
|
inline |
CTOR.
References SPNULL.
|
inline |
CTOR.
References SPNULL.
|
inlinevirtual |
DTOR.
void ug::LinearImplicitEuler< TAlgebra >::adjust_solution | ( | vector_type & | u, |
const GridLevel & | gl | ||
) |
References ug::LIB_LIMEX, PROFILE_BEGIN_GROUP, UG_CATCH_THROW, and UG_DLOG.
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)
References ug::LIB_LIMEX, PROFILE_BEGIN_GROUP, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
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$
References ug::GetNNZs(), ug::LIB_LIMEX, PROFILE_BEGIN_GROUP, SPNULL, UG_ASSERT, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
void ug::LinearImplicitEuler< TAlgebra >::assemble_linear | ( | matrix_type & | A, |
vector_type & | b, | ||
const GridLevel & | gl | ||
) |
Should return (M+tau A) delta = tau f.
References ug::LIB_LIMEX, PROFILE_BEGIN_GROUP, UG_ASSERT, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
void ug::LinearImplicitEuler< TAlgebra >::assemble_rhs | ( | vector_type & | b, |
const GridLevel & | gl | ||
) |
References PROFILE_BEGIN_GROUP, UG_ASSERT, UG_CATCH_THROW, and UG_THROW.
void ug::LinearImplicitEuler< TAlgebra >::assemble_rhs | ( | vector_type & | b, |
const vector_type & | u, | ||
const GridLevel & | gl | ||
) |
References PROFILE_BEGIN_GROUP, UG_ASSERT, UG_CATCH_THROW, and UG_THROW.
|
inline |
|
inline |
|
inline |
Some simplifications for linear systems. (In this case, the mass matrix is not re-assembled.)
References ug::LinearImplicitEuler< TAlgebra >::m_useLinearMode.
|
inline |
|
inlinevirtual |
Implements ug::ITimeDiscretization< TAlgebra >.
|
virtual |
Implements ug::ITimeDiscretization< TAlgebra >.
References ug::LIB_LIMEX, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
|
inlinevirtual |
Implements ug::ITimeDiscretization< TAlgebra >.
References ug::LinearImplicitEuler< TAlgebra >::m_futureTime.
|
inline |
Invalidate all cached operators.
References ug::LinearImplicitEuler< TAlgebra >::invalidate_gamma(), ug::LinearImplicitEuler< TAlgebra >::m_bMatrixJNeedsUpdate, ug::LinearImplicitEuler< TAlgebra >::m_spMatrixCacheMk, and SPNULL.
|
inline |
Invalidate Gamma operator.
References ug::LinearImplicitEuler< TAlgebra >::m_bGammaNeedsUpdate, ug::LinearImplicitEuler< TAlgebra >::m_spGammaOp, and SPNULL.
Referenced by ug::LinearImplicitEuler< TAlgebra >::invalidate().
|
inlinevirtual |
Implements ug::ITimeDiscretization< TAlgebra >.
References ug::LinearImplicitEuler< TAlgebra >::m_prevSteps.
|
inlinevirtual |
Implements ug::ITimeDiscretization< TAlgebra >.
|
virtual |
Implements ug::ITimeDiscretization< TAlgebra >.
References ug::LIB_LIMEX, make_sp(), PROFILE_BEGIN_GROUP, SPNULL, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
|
virtual |
Implements ug::ITimeDiscretization< TAlgebra >.
References ug::LIB_LIMEX, make_sp(), PROFILE_BEGIN_GROUP, SPNULL, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
|
inline |
|
inline |
|
inlinevirtual |
Implements ug::ITimeDiscretization< TAlgebra >.
|
inlineprotectedvirtual |
|
inline |
|
protected |
Referenced by ug::LinearImplicitEuler< TAlgebra >::invalidate_gamma().
|
protected |
Referenced by ug::LinearImplicitEuler< TAlgebra >::invalidate().
|
protected |
Time Step size.
|
protected |
Future Time.
Referenced by ug::LinearImplicitEuler< TAlgebra >::future_time().
|
protected |
Previous solutions.
|
staticprotected |
number of previous steps needed.
Referenced by ug::LinearImplicitEuler< TAlgebra >::num_prev_steps().
|
protected |
Gamma disc.
Referenced by ug::LinearImplicitEuler< TAlgebra >::set_gamma_disc().
|
protected |
Gamma operator.
Referenced by ug::LinearImplicitEuler< TAlgebra >::invalidate_gamma().
|
protected |
Referenced by ug::LinearImplicitEuler< TAlgebra >::invalidate().
|
protected |
|
protected |
Operator.
|
protected |
|
protected |
|
protected |
Scaling for mass part.
|
protected |
Scaling for stiffness part.