https://mooseframework.inl.gov
Public Member Functions | Public Attributes | Private Member Functions | Friends | List of all members
Moose::StateArg Struct Reference

State argument for evaluating functors. More...

#include <MooseFunctorArguments.h>

Public Member Functions

 StateArg (bool)=delete
 Prevent implicit conversions from boolean to avoid users accidentally constructing a time argument when they meant to construct a skewness argument, etc. More...
 
 StateArg (unsigned int state_in)
 
 StateArg (unsigned int state_in, SolutionIterationType iteration_type_in)
 
bool operator== (const StateArg &other) const
 

Public Attributes

unsigned int state
 The state. More...
 
SolutionIterationType iteration_type
 The solution iteration type, e.g. time or nonlinear. More...
 

Private Member Functions

 StateArg ()
 

Friends

StateArg currentState ()
 

Detailed Description

State argument for evaluating functors.

The iteration type indicates whether you want to evaluate a functor based on some iterate state of a transient calculation, nonlinear solve, etc. The state indicates which iterate of the iterate type we want to evaluate on. A state of 0 indicates "current", e.g. the current time or the current nonlinear iteration (which should actually be equivalent); a state of 1 indicates the most-recent "old" time or the most recent previous nonlinear iteration, etc.

Definition at line 121 of file MooseFunctorArguments.h.

Constructor & Destructor Documentation

◆ StateArg() [1/4]

Moose::StateArg::StateArg ( bool  )
delete

Prevent implicit conversions from boolean to avoid users accidentally constructing a time argument when they meant to construct a skewness argument, etc.

◆ StateArg() [2/4]

Moose::StateArg::StateArg ( unsigned int  state_in)
inline

Definition at line 129 of file MooseFunctorArguments.h.

SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
unsigned int state
The state.

◆ StateArg() [3/4]

Moose::StateArg::StateArg ( unsigned int  state_in,
SolutionIterationType  iteration_type_in 
)
inline

Definition at line 131 of file MooseFunctorArguments.h.

132  : state(state_in), iteration_type(iteration_type_in)
133  {
134  }
SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
unsigned int state
The state.

◆ StateArg() [4/4]

Moose::StateArg::StateArg ( )
inlineprivate

Definition at line 150 of file MooseFunctorArguments.h.

SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
unsigned int state
The state.

Member Function Documentation

◆ operator==()

bool Moose::StateArg::operator== ( const StateArg other) const
inline

Definition at line 136 of file MooseFunctorArguments.h.

137  {
138  return state == other.state && iteration_type == other.iteration_type;
139  }
SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
unsigned int state
The state.

Friends And Related Function Documentation

◆ currentState

StateArg currentState ( )
friend

Definition at line 156 of file MooseFunctorArguments.h.

157 {
158  return {};
159 }

Member Data Documentation

◆ iteration_type

SolutionIterationType Moose::StateArg::iteration_type

◆ state

unsigned int Moose::StateArg::state

The state.

Zero represents the most recent state, so for any kind of iteration type, a zero state represents the current state, e.g. current solution One may represent the 'old' value (one before, in the iteration_type specified), and two an 'older' or two steps away state

Definition at line 144 of file MooseFunctorArguments.h.

Referenced by MooseVariableFV< Real >::adGradSln(), FVFunctionDirichletBC::boundaryValue(), MooseVariableFE< Real >::computeSolution(), MooseLinearVariableFV< Real >::getElemValue(), MooseVariableFV< Real >::getElemValue(), MooseVariableField< Real >::getSolution(), FEProblemBase::getTimeFromStateArg(), Moose::FunctorBase< libMesh::VectorValue >::operator()(), and operator==().


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