https://mooseframework.inl.gov
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NonlinearTimeIntegratorInterface Class Reference

Interface class for routines and member variables for time integrators relying on Newton's method. More...

#include <NonlinearTimeIntegratorInterface.h>

Inheritance diagram for NonlinearTimeIntegratorInterface:
[legend]

Public Member Functions

 NonlinearTimeIntegratorInterface (FEProblemBase &problem, SystemBase &system)
 
virtual void postResidual (NumericVector< Number > &)
 Callback to the NonLinearTimeIntegratorInterface called immediately after the residuals are computed in NonlinearSystem::computeResidual(). More...
 
TagID uDotFactorTag () const
 Returns the tag for the nodal multiplication factor for the residual calculation of the udot term. More...
 
TagID uDotDotFactorTag () const
 Returns the tag for the nodal multiplication factor for the residual calculation of the udotdot term. More...
 

Protected Member Functions

NumericVector< Number > * addVector (const std::string &name, const bool project, const libMesh::ParallelType type)
 Wrapper around vector addition for nonlinear time integrators. More...
 

Protected Attributes

NonlinearSystemBase_nl
 Pointer to the nonlinear system, can happen that we dont have any. More...
 
libMesh::NonlinearImplicitSystem_nonlinear_implicit_system
 libMesh nonlinear implicit system, if applicable; otherwise, nullptr More...
 
NumericVector< Number > * _Re_time
 residual vector for time contributions More...
 
NumericVector< Number > * _Re_non_time
 residual vector for non-time contributions More...
 
const TagID _u_dot_factor_tag
 The vector tag for the nodal multiplication factor for the residual calculation of the udot term. More...
 
const TagID _u_dotdot_factor_tag
 The vector tag for the nodal multiplication factor for the residual calculation of the udotdot term. More...
 

Detailed Description

Interface class for routines and member variables for time integrators relying on Newton's method.

Definition at line 34 of file NonlinearTimeIntegratorInterface.h.

Constructor & Destructor Documentation

◆ NonlinearTimeIntegratorInterface()

NonlinearTimeIntegratorInterface::NonlinearTimeIntegratorInterface ( FEProblemBase problem,
SystemBase system 
)

Definition at line 18 of file NonlinearTimeIntegratorInterface.C.

20  : _nl(dynamic_cast<NonlinearSystemBase *>(&system)),
21  _nonlinear_implicit_system(_nl ? dynamic_cast<NonlinearImplicitSystem *>(&_nl->system())
22  : nullptr),
23  _Re_time(_nl ? &_nl->getResidualTimeVector() : nullptr),
27 {
28 }
NumericVector< Number > & getResidualTimeVector()
Return a numeric vector that is associated with the time tag.
const TagID _u_dot_factor_tag
The vector tag for the nodal multiplication factor for the residual calculation of the udot term...
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:92
NonlinearSystemBase * _nl
Pointer to the nonlinear system, can happen that we dont have any.
NumericVector< Number > * _Re_time
residual vector for time contributions
libMesh::NonlinearImplicitSystem * _nonlinear_implicit_system
libMesh nonlinear implicit system, if applicable; otherwise, nullptr
const TagID _u_dotdot_factor_tag
The vector tag for the nodal multiplication factor for the residual calculation of the udotdot term...
NumericVector< Number > * _Re_non_time
residual vector for non-time contributions
NumericVector< Number > & getResidualNonTimeVector()
Return a numeric vector that is associated with the nontime tag.
virtual libMesh::System & system() override
Get the reference to the libMesh system.

Member Function Documentation

◆ addVector()

NumericVector< Number > * NonlinearTimeIntegratorInterface::addVector ( const std::string &  name,
const bool  project,
const libMesh::ParallelType  type 
)
protected

Wrapper around vector addition for nonlinear time integrators.

If we don't operate on a nonlinear system we don't need to add the vector.

Parameters
nameThe name of the vector
projectIf the vector should be projected
typeThe parallel distribution of the vetor

Definition at line 31 of file NonlinearTimeIntegratorInterface.C.

Referenced by AStableDirk4::AStableDirk4(), ExplicitTimeIntegrator::ExplicitTimeIntegrator(), LStableDirk3::LStableDirk3(), and LStableDirk4::LStableDirk4().

34 {
35  if (_nl)
36  return &_nl->addVector(name, project, type);
37  else
38  return nullptr;
39 }
NonlinearSystemBase * _nl
Pointer to the nonlinear system, can happen that we dont have any.
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.

◆ postResidual()

virtual void NonlinearTimeIntegratorInterface::postResidual ( NumericVector< Number > &  )
inlinevirtual

Callback to the NonLinearTimeIntegratorInterface called immediately after the residuals are computed in NonlinearSystem::computeResidual().

The residual vector which is passed in to this function should be filled in by the user with the _Re_time and _Re_non_time vectors in a way that makes sense for the particular TimeIntegration method.

Reimplemented in ExplicitRK2, AStableDirk4, LStableDirk4, ExplicitTVDRK2, ImplicitMidpoint, LStableDirk3, LStableDirk2, CrankNicolson, ActuallyExplicitEuler, BDF2, NewmarkBeta, ExplicitEuler, ImplicitEuler, and ExplicitSSPRungeKutta.

Definition at line 47 of file NonlinearTimeIntegratorInterface.h.

47 {}

◆ uDotDotFactorTag()

TagID NonlinearTimeIntegratorInterface::uDotDotFactorTag ( ) const
inline

Returns the tag for the nodal multiplication factor for the residual calculation of the udotdot term.

By default, this tag will be associated with udotdot.

Definition at line 62 of file NonlinearTimeIntegratorInterface.h.

62 { return _u_dotdot_factor_tag; }
const TagID _u_dotdot_factor_tag
The vector tag for the nodal multiplication factor for the residual calculation of the udotdot term...

◆ uDotFactorTag()

TagID NonlinearTimeIntegratorInterface::uDotFactorTag ( ) const
inline

Returns the tag for the nodal multiplication factor for the residual calculation of the udot term.

By default, this tag will be associated with udot.

Definition at line 55 of file NonlinearTimeIntegratorInterface.h.

55 { return _u_dot_factor_tag; }
const TagID _u_dot_factor_tag
The vector tag for the nodal multiplication factor for the residual calculation of the udot term...

Member Data Documentation

◆ _nl

NonlinearSystemBase* NonlinearTimeIntegratorInterface::_nl
protected

◆ _nonlinear_implicit_system

libMesh::NonlinearImplicitSystem* NonlinearTimeIntegratorInterface::_nonlinear_implicit_system
protected

◆ _Re_non_time

NumericVector<Number>* NonlinearTimeIntegratorInterface::_Re_non_time
protected

◆ _Re_time

NumericVector<Number>* NonlinearTimeIntegratorInterface::_Re_time
protected

◆ _u_dot_factor_tag

const TagID NonlinearTimeIntegratorInterface::_u_dot_factor_tag
protected

The vector tag for the nodal multiplication factor for the residual calculation of the udot term.

Definition at line 86 of file NonlinearTimeIntegratorInterface.h.

Referenced by CentralDifference::computeTimeDerivatives(), CentralDifference::initialSetup(), and uDotFactorTag().

◆ _u_dotdot_factor_tag

const TagID NonlinearTimeIntegratorInterface::_u_dotdot_factor_tag
protected

The vector tag for the nodal multiplication factor for the residual calculation of the udotdot term.

Definition at line 89 of file NonlinearTimeIntegratorInterface.h.

Referenced by CentralDifference::computeTimeDerivatives(), CentralDifference::initialSetup(), and uDotDotFactorTag().


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