https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
MooseVariableData< OutputType > Class Template Reference

#include <MooseVariableData.h>

Inheritance diagram for MooseVariableData< OutputType >:
[legend]

Public Types

typedef MooseArray< OutputSecond > FieldVariableSecond
 
typedef MooseArray< OutputType > FieldVariableCurl
 
typedef MooseArray< OutputDivergence > FieldVariableDivergence
 
typedef Moose::ShapeType< OutputType >::type OutputShape
 
typedef libMesh::TensorTools::IncrementRank< OutputShape >::type OutputShapeGradient
 
typedef libMesh::TensorTools::IncrementRank< OutputShapeGradient >::type OutputShapeSecond
 
typedef libMesh::TensorTools::DecrementRank< OutputShape >::type OutputShapeDivergence
 
typedef MooseArray< std::vector< OutputShape > > FieldVariablePhiValue
 
typedef MooseArray< std::vector< OutputShapeGradient > > FieldVariablePhiGradient
 
typedef MooseArray< std::vector< OutputShapeSecond > > FieldVariablePhiSecond
 
typedef MooseArray< std::vector< OutputShape > > FieldVariablePhiCurl
 
typedef MooseArray< std::vector< OutputShapeDivergence > > FieldVariablePhiDivergence
 
typedef MooseArray< std::vector< OutputShape > > FieldVariableTestValue
 
typedef MooseArray< std::vector< OutputShapeGradient > > FieldVariableTestGradient
 
typedef MooseArray< std::vector< OutputShapeSecond > > FieldVariableTestSecond
 
typedef MooseArray< std::vector< OutputShape > > FieldVariableTestCurl
 
typedef MooseArray< std::vector< OutputShapeDivergence > > FieldVariableTestDivergence
 
typedef libMesh::TensorTools::IncrementRank< OutputType >::type OutputGradient
 
typedef libMesh::TensorTools::IncrementRank< OutputGradient >::type OutputSecond
 
typedef libMesh::TensorTools::DecrementRank< OutputType >::type OutputDivergence
 
typedef MooseArray< OutputType > FieldVariableValue
 
typedef MooseArray< OutputGradient > FieldVariableGradient
 
typedef Moose::DOFType< OutputType >::type DofValue
 
typedef Moose::ADType< DofValue >::type ADDofValue
 
typedef MooseArray< DofValue > DofValues
 
typedef MooseArray< ADDofValue > ADDofValues
 

Public Member Functions

 MooseVariableData (const MooseVariableFE< OutputType > &var, SystemBase &sys, THREAD_ID tid, Moose::ElementType element_type, const QBase *const &qrule_in, const QBase *const &qrule_face_in, const Node *const &node, const Elem *const &elem)
 
bool needsAD () const
 Returns whether this data structure needs automatic differentiation calculations.
 
void setGeometry (Moose::GeometryType gm_type)
 Set the geometry type before calculating variables values.
 
void computeValues ()
 compute the variable values
 
void computeConstantMonomialValues ()
 compute the values for const monomial variables
 
template<bool constant_monomial>
void computeAD (const unsigned int num_dofs, const unsigned int nqp)
 compute AD things
 
void computeNodalValues ()
 compute nodal things
 
const FieldVariablePhiValue & phi () const
 phi getter
 
const FieldVariablePhiValue & phiFace () const
 phi_face getter
 
const FieldVariablePhiGradient & gradPhi () const
 grad_phi getter
 
const MappedArrayVariablePhiGradient & arrayGradPhi () const
 mapped_grad_phi getter
 
const FieldVariablePhiGradient & gradPhiFace () const
 grad_phi_face getter
 
const MappedArrayVariablePhiGradient & arrayGradPhiFace () const
 mapped_grad_phi_face getter
 
const FieldVariablePhiSecond & secondPhi () const
 second_phi getter
 
const FieldVariablePhiSecond & secondPhiFace () const
 second_phi_face getter
 
const FieldVariablePhiCurl & curlPhi () const
 curl_phi getter
 
const FieldVariablePhiCurl & curlPhiFace () const
 curl_phi_face getter
 
const FieldVariablePhiDivergence & divPhi () const
 divergence_phi getter
 
const FieldVariablePhiDivergence & divPhiFace () const
 divergence_phi_face getter
 
const ADTemplateVariablePhiGradient< OutputShape > & adGradPhi () const
 ad_grad_phi getter
 
const ADTemplateVariablePhiGradient< OutputShape > & adGradPhiFace () const
 ad_grad_phi_face getter
 
std::size_t phiSize () const
 Return phi size.
 
std::size_t phiFaceSize () const
 Return phiFace size.
 
bool usesSecondPhi () const
 Whether or not this variable is computing any second derivatives.
 
bool computingCurl () const
 Whether or not this variable is computing the curl.
 
bool computingDiv () const
 Whether or not this variable is computing the divergence.
 
bool isNodal () const override
 
bool hasDoFsOnNodes () const override
 Whether this data is associated with a variable that has DoFs on nodes.
 
libMesh::FEContinuity getContinuity () const override
 Return the variable continuity.
 
const Node *const & node () const
 
const dof_id_type & nodalDofIndex () const
 
bool isNodalDefined () const
 
const Elem *const & currentElem () const
 The current element.
 
const unsigned int & currentSide () const
 The current side.
 
void prepareIC ()
 prepare the initial condition
 
const FieldVariableGradient & gradSlnDot () const
 Local time derivative of solution gradient getter.
 
const FieldVariableGradient & gradSlnDotDot () const
 Local second time derivative of solution gradient getter.
 
const FieldVariableSecond & secondSln (Moose::SolutionState state) const
 Local solution second spatial derivative getter.
 
const FieldVariableCurl & curlSln (Moose::SolutionState state) const
 Local solution curl getter.
 
const FieldVariableDivergence & divSln (Moose::SolutionState state) const
 Local solution divergence getter.
 
const ADTemplateVariableValue< OutputType > & adSln () const
 
const ADTemplateVariableGradient< OutputType > & adGradSln () const
 
const ADTemplateVariableValue< OutputType > & adSlnFace () const
 Solution getter for objects that only ever evaluate on element faces, such as AD integrated BCs.
 
const ADTemplateVariableGradient< OutputType > & adGradSlnFace () const
 Face counterpart of adGradSln(); see adSlnFace().
 
const ADTemplateVariableGradient< OutputType > & adGradSlnDot () const
 Volume-only: on element faces the AD gradient time derivative is not computed, because it would require the AD face shape function gradients, and the returned array is left empty.
 
const ADTemplateVariableSecond< OutputType > & adSecondSln () const
 
const ADTemplateVariableValue< OutputType > & adUDot () const
 
const ADTemplateVariableValue< OutputType > & adUDotDot () const
 
const FieldVariableValue & uDot () const
 
const FieldVariableValue & uDotDot () const
 
const FieldVariableValue & uDotOld () const
 
const FieldVariableValue & uDotDotOld () const
 
const VariableValue & duDotDu () const
 
const VariableValue & duDotDotDu () const
 
const ADTemplateVariableCurl< OutputType > & adCurlSln () const
 
const OutputType & nodalValueDot () const
 
const OutputType & nodalValueDotDot () const
 
const OutputType & nodalValueDotOld () const
 
const OutputType & nodalValueDotDotOld () const
 
const OutputType & nodalValueDuDotDu () const
 
const OutputType & nodalValueDuDotDotDu () const
 
const Moose::ADType< OutputType >::type & adNodalValue () const
 
void setDofValues (const DenseVector< DofValue > &values)
 Set local DOF values and evaluate the values on quadrature points.
 
void insertNodalValue (libMesh::NumericVector< libMesh::Number > &residual, const DofValue &v)
 Write a nodal value to the passed-in solution vector.
 
DofValue getNodalValue (const Node &node, Moose::SolutionState state) const
 
DofValue getElementalValue (const Elem *elem, Moose::SolutionState state, unsigned int idx=0) const
 
void getDofIndices (const Elem *elem, std::vector< dof_id_type > &dof_indices) const
 
const std::vector< dof_id_type > & dofIndices () const
 
unsigned int numberOfDofs () const
 
void clearDofIndices ()
 
void prepare ()
 Get the dof indices corresponding to the current element.
 
void reinitNode ()
 Prepare degrees of freedom for the current node.
 
void reinitAux ()
 Prepare dof indices and solution values for elemental auxiliary variables.
 
void reinitNodes (const std::vector< dof_id_type > &nodes)
 Set _dof_indices to the degrees of freedom existing on the passed-in nodes.
 
void addSolution (libMesh::NumericVector< libMesh::Number > &sol, const DenseVector< libMesh::Number > &v) const
 Add passed in local DOF values to a solution vector.
 
const DofValues & dofValuesDot () const
 
const DofValues & dofValuesDotOld () const
 
const DofValues & dofValuesDotDot () const
 
const DofValues & dofValuesDotDotOld () const
 
const MooseArray< libMesh::Number > & dofValuesDuDotDu () const
 
const MooseArray< libMesh::Number > & dofValuesDuDotDotDu () const
 
const ADDofValues & adDofValues () const
 Return the AD dof values.
 
const ADDofValues & adDofValuesDot () const
 Return the AD time derivative values of degrees of freedom.
 
const FieldVariableValue & increment () const
 Increment getter.
 
void computeIncrementAtQps (const libMesh::NumericVector< libMesh::Number > &increment_vec)
 Compute and store incremental change in solution at QPs based on increment_vec.
 
void computeIncrementAtNode (const libMesh::NumericVector< libMesh::Number > &increment_vec)
 Compute and store incremental change at the current node based on increment_vec.
 
void insertNodalValue (NumericVector< Number > &residual, const RealEigenVector &v)
 
RealEigenVector getNodalValue (const Node &node, Moose::SolutionState state) const
 
RealEigenVector getElementalValue (const Elem *elem, const Moose::SolutionState state, const unsigned int idx) const
 
void computeIncrementAtQps (const NumericVector< Number > &increment_vec)
 
void computeIncrementAtNode (const NumericVector< Number > &increment_vec)
 
const FieldVariableValue & sln (Moose::SolutionState state) const
 Local solution getter.
 
const FieldVariableGradient & gradSln (Moose::SolutionState state) const
 Local solution gradient getter.
 
unsigned int oldestSolutionStateRequested () const
 The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).
 
void setNodalValue (const OutputType &value)
 Set nodal value.
 
void setNodalValue (const RealVectorValue &value)
 
void insert (libMesh::NumericVector< libMesh::Number > &residual)
 Set the current local DOF values to the input vector.
 
void insert (NumericVector< Number > &residual)
 
void add (libMesh::NumericVector< libMesh::Number > &residual)
 Add the current local DOF values to the input vector.
 
void add (NumericVector< Number > &residual)
 
const DofValues & dofValues () const
 
const DofValues & dofValuesOld () const
 
const DofValues & dofValuesOlder () const
 
const DofValues & dofValuesPreviousNL () const
 
const OutputType & nodalValue (Moose::SolutionState state) const
 
const MooseArray< OutputType > & nodalValueArray (Moose::SolutionState state) const
 
const FieldVariableValue & vectorTagValue (TagID tag) const
 
const FieldVariableGradient & vectorTagGradient (TagID tag) const
 
const FieldVariableValue & matrixTagValue (TagID tag) const
 
const DofValues & nodalVectorTagValue (TagID tag) const
 
const DofValues & nodalMatrixTagValue (TagID tag) const
 
const DofValues & vectorTagDofValue (TagID tag) const
 
const DofValues & vectorTagDofValue (Moose::SolutionState state) const
 
void setActiveTags (const std::set< TagID > &vtags)
 Set the active vector tags.
 
void prepareAux ()
 Clear aux state.
 
void sizeMatrixTagData ()
 size matrix tag data
 
void setDofValue (const DofValue &value, unsigned int index)
 dof value setters
 

Protected Member Functions

virtual const MooseVariableField< OutputType > & var () const
 
void insertSolutionTag (TagID tag_id)
 insert a solution tag into our tag containers
 
void needSolutionState (unsigned int state)
 Request that we have at least state number of older solution states/vectors.
 
void fetchDofValues ()
 Helper methods for assigning dof values from their corresponding solution values.
 
void fetchDofValues ()
 
void fetchDofValues ()
 
void zeroSizeDofValues ()
 
void getArrayDofValues (const libMesh::NumericVector< libMesh::Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
 
void assignNodalValue ()
 
void assignNodalValue ()
 
void assignNodalValue ()
 
template<typename ReturnType , typename Functor >
const ReturnType & stateToTagHelper (Moose::SolutionState state, Functor functor)
 Helper method that converts a SolutionState argument into a corresponding tag ID, potentially requesting necessary additional solution states and assigning tag id data members, and then calls the provided functor with the tag ID.
 
void resizeVectorTagData (TagID tag)
 resize the vector tag need flags and data containers to accomodate this tag index
 

Protected Attributes

SystemBase & _sys
 The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data.
 
const SubProblem & _subproblem
 The subproblem which we can query for information related to tagged vectors and matrices.
 
const THREAD_ID _tid
 The thread ID that this object is on.
 
const libMesh::DofMap & _dof_map
 The degree of freedom map from libMesh.
 
unsigned int _count
 Number of components of the associated variable.
 
bool _has_dof_values
 Whether we currently have degree of freedom values stored in our local containers (corresponding to the current element)
 
unsigned int _max_state
 The maximum number of older solution states our variable needs.
 
TagID _solution_tag
 The vector tag ID corresponding to the solution vector.
 
TagID _old_solution_tag
 The vector tag ID corresponding to the old solution vector.
 
TagID _older_solution_tag
 The vector tag ID corresponding to the older solution vector.
 
TagID _previous_nl_solution_tag
 The vector tag ID corresponding to the previous nonlinear iteration's solution vector.
 
std::vector< dof_id_type > _dof_indices
 The dof indices for the current element.
 
std::vector< bool > _need_vector_tag_dof_u
 
std::vector< bool > _need_matrix_tag_dof_u
 
std::vector< DofValues > _vector_tags_dof_u
 
std::vector< DofValues > _matrix_tags_dof_u
 
std::vector< FieldVariableValue > _vector_tag_u
 
std::vector< bool > _need_vector_tag_u
 
std::vector< FieldVariableGradient > _vector_tag_grad
 
std::vector< bool > _need_vector_tag_grad
 
std::vector< FieldVariableValue > _matrix_tag_u
 
std::vector< bool > _need_matrix_tag_u
 
OutputType _nodal_value
 Nodal values.
 
OutputType _nodal_value_old
 
OutputType _nodal_value_older
 
OutputType _nodal_value_previous_nl
 
MooseArray< OutputType > _nodal_value_array
 Nodal values as MooseArrays for use with AuxKernels.
 
MooseArray< OutputType > _nodal_value_old_array
 
MooseArray< OutputType > _nodal_value_older_array
 
bool _need_u_dot
 u dot flags
 
bool _need_u_dotdot
 
bool _need_u_dot_old
 
bool _need_u_dotdot_old
 
bool _need_du_dot_du
 
bool _need_du_dotdot_du
 
bool _need_grad_dot
 gradient dot flags
 
bool _need_grad_dotdot
 
bool _need_dof_values_dot
 local solution flags
 
bool _need_dof_values_dotdot
 
bool _need_dof_values_dot_old
 
bool _need_dof_values_dotdot_old
 
bool _need_dof_du_dot_du
 
bool _need_dof_du_dotdot_du
 
DofValues _dof_values_dot
 time derivative of the solution values
 
DofValues _dof_values_dotdot
 second time derivative of the solution values
 
DofValues _dof_values_dot_old
 the previous time step's solution value time derivative
 
DofValues _dof_values_dotdot_old
 the previous time step's solution value second time derivative
 
MooseArray< libMesh::Number > _dof_du_dot_du
 derivatives of the solution value time derivative with respect to the degrees of freedom
 
MooseArray< libMesh::Number > _dof_du_dotdot_du
 derivatives of the solution value second time derivative with respect to the degrees of freedom
 
OutputType _nodal_value_dot
 nodal values of u_dot
 
OutputType _nodal_value_dotdot
 nodal values of u_dotdot
 
OutputType _nodal_value_dot_old
 nodal values of u_dot_old
 
OutputType _nodal_value_dotdot_old
 nodal values of u_dotdot_old
 
std::set< TagID > _required_vector_tags
 The set of vector tags (residual + solution) we need to evaluate.
 
std::set< TagID > _solution_tags
 The set of solution tags we need to evaluate.
 

Private Member Functions

void fetchADDofValues ()
 Helper method for assigning the ad_dof* arrays.
 
void assignADNodalValue ()
 Helper method for assigning nodal values from their corresponding solution values (dof values as they're referred to here in this class).
 
template<bool constant_monomial>
void computeValuesInternal ()
 Internal method for computeValues() and computeConstantMonomialValues()
 
template<bool constant_monomial, typename DestinationType , typename ShapeType , typename DofValuesType >
void fill (DestinationType &dest, const ShapeType &phi, const DofValuesType &dof_values, unsigned int nqp, std::size_t num_shapes)
 
void needADGradPhiFace () const
 Ask the assembly to compute the AD face shape function gradients, which this variable's AD gradient and AD face test function gradients are built from.
 
void fetchADDofValues ()
 
void assignADNodalValue ()
 

Private Attributes

const MooseVariableFE< OutputType > & _var
 A const reference to the owning MooseVariableFE object.
 
const libMesh::FEType & _fe_type
 
const unsigned int _var_num
 
const Assembly & _assembly
 
Moose::ElementType _element_type
 The element type this object is storing data for. This is either Element, Neighbor, or Lower.
 
bool _is_nodal
 if variable is nodal
 
dof_id_type _nodal_dof_index
 The dof index for the current node.
 
libMesh::FEContinuity _continuity
 Continuity type of the variable.
 
FieldVariableValue _increment
 Increment in the variable used in dampers.
 
Moose::ADType< OutputType >::type _ad_nodal_value
 AD nodal value.
 
ADReal _ad_zero
 A zero AD variable.
 
bool _need_second = false
 SolutionState second_u flags.
 
bool _need_second_old = false
 
bool _need_second_older = false
 
bool _need_second_previous_nl = false
 
bool _need_curl = false
 curl flags
 
bool _need_curl_old = false
 
bool _need_curl_older = false
 
bool _need_div = false
 divergence flags
 
bool _need_div_old = false
 
bool _need_div_older = false
 
bool _need_ad = false
 AD flags.
 
bool _need_ad_volume = false
 Whether AD is needed with the volume quadrature rule.
 
bool _need_ad_u = false
 
bool _need_ad_grad_u = false
 
bool _need_ad_grad_u_face = false
 Whether the AD gradient is needed on element faces, i.e. requested through adGradSlnFace()
 
bool _need_ad_grad_u_dot = false
 
bool _need_ad_second_u = false
 
bool _need_ad_curl_u = false
 
bool _need_ad_div_u = false
 
bool _need_ad_u_dot = false
 
bool _need_ad_u_dotdot = false
 
bool _has_dof_indices
 
FieldVariableGradient _grad_u_dot
 grad_u dots
 
FieldVariableGradient _grad_u_dotdot
 
FieldVariableSecond _second_u
 second_u
 
FieldVariableSecond _second_u_old
 
FieldVariableSecond _second_u_older
 
FieldVariableSecond _second_u_previous_nl
 
FieldVariableCurl _curl_u
 curl_u
 
FieldVariableCurl _curl_u_old
 
FieldVariableCurl _curl_u_older
 
FieldVariableDivergence _div_u
 divergence_u
 
FieldVariableDivergence _div_u_old
 
FieldVariableDivergence _div_u_older
 
ADTemplateVariableValue< OutputType > _ad_u
 AD u.
 
ADTemplateVariableGradient< OutputType > _ad_grad_u
 
ADTemplateVariableSecond< OutputType > _ad_second_u
 
ADDofValues _ad_dof_values
 
ADDofValues _ad_dofs_dot
 
MooseArray< ADRealEigenVector > _ad_dofs_dot_eigen
 
ADDofValues _ad_dofs_dotdot
 
MooseArray< ADRealEigenVector > _ad_dofs_dotdot_eigen
 
ADTemplateVariableValue< OutputType > _ad_u_dot
 
ADTemplateVariableValue< OutputType > _ad_u_dotdot
 
ADTemplateVariableGradient< OutputType > _ad_grad_u_dot
 
ADTemplateVariableCurl< OutputType > _ad_curl_u
 
FieldVariableValue _u_dot
 u_dot (time derivative)
 
FieldVariableValue _u_dotdot
 u_dotdot (second time derivative)
 
FieldVariableValue _u_dot_old
 u_dot_old (time derivative)
 
FieldVariableValue _u_dotdot_old
 u_dotdot_old (second time derivative)
 
VariableValue _du_dot_du
 derivative of u_dot wrt u
 
VariableValue _du_dotdot_du
 derivative of u_dotdot wrt u
 
const QBase *const & _qrule
 The current qrule.
 
const QBase *const & _qrule_face
 
const FieldVariablePhiValue * _phi
 
const FieldVariablePhiGradient * _grad_phi
 
const FieldVariablePhiSecond * _second_phi
 
const FieldVariablePhiCurl * _curl_phi
 
const FieldVariablePhiDivergence * _div_phi
 
MappedArrayVariablePhiGradient _mapped_grad_phi
 
MappedArrayVariablePhiGradient _mapped_grad_phi_face
 
MappedArrayVariablePhiGradient _mapped_grad_phi_neighbor
 
MappedArrayVariablePhiGradient _mapped_grad_phi_face_neighbor
 
const FieldVariablePhiValue * _phi_face
 
const FieldVariablePhiGradient * _grad_phi_face
 
const FieldVariablePhiSecond * _second_phi_face
 
const FieldVariablePhiCurl * _curl_phi_face
 
const FieldVariablePhiDivergence * _div_phi_face
 
const ADTemplateVariablePhiGradient< OutputShape > * _ad_grad_phi
 
const ADTemplateVariablePhiGradient< OutputShape > * _ad_grad_phi_face
 
const QBase * _current_qrule
 
const FieldVariablePhiValue * _current_phi
 
const FieldVariablePhiGradient * _current_grad_phi
 
const FieldVariablePhiSecond * _current_second_phi
 
const FieldVariablePhiCurl * _current_curl_phi
 
const FieldVariablePhiDivergence * _current_div_phi
 
const ADTemplateVariablePhiGradient< OutputShape > * _current_ad_grad_phi
 
const bool _use_dual
 
std::function< const typename OutputTools< OutputType >::VariablePhiValue &(const Assembly &, libMesh::FEType)> _phi_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiValue &(const Assembly &, libMesh::FEType)> _phi_face_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiGradient &(const Assembly &, libMesh::FEType)> _grad_phi_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiGradient &(const Assembly &, libMesh::FEType)> _grad_phi_face_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiSecond &(const Assembly &, libMesh::FEType)> _second_phi_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiSecond &(const Assembly &, libMesh::FEType)> _second_phi_face_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiCurl &(const Assembly &, libMesh::FEType)> _curl_phi_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiCurl &(const Assembly &, libMesh::FEType)> _curl_phi_face_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiDivergence &(const Assembly &, libMesh::FEType)> _div_phi_assembly_method
 
std::function< const typename OutputTools< OutputShape >::VariablePhiDivergence &(const Assembly &, libMesh::FEType)> _div_phi_face_assembly_method
 
std::function< const ADTemplateVariablePhiGradient< OutputShape > &(const Assembly &, libMesh::FEType)> _ad_grad_phi_assembly_method
 
std::function< const ADTemplateVariablePhiGradient< OutputShape > &(const Assembly &, libMesh::FEType)> _ad_grad_phi_face_assembly_method
 
const TimeIntegrator * _time_integrator
 Pointer to time integrator.
 
const Node *const & _node
 The current node.
 
const Elem *const & _elem
 The current elem.
 
const bool _displaced
 Whether this variable is being calculated on a displaced system.
 
const unsigned int & _current_side
 The current element side.
 
ADReal _ad_real_dummy = 0
 A dummy ADReal variable.
 

Detailed Description

template<typename OutputType>
class MooseVariableData< OutputType >

Definition at line 48 of file MooseVariableData.h.

Member Typedef Documentation

◆ ADDofValue

template<typename OutputType >
typedef Moose::ADType<DofValue>::type MooseVariableDataBase< OutputType >::ADDofValue
inherited

Definition at line 47 of file MooseVariableDataBase.h.

◆ ADDofValues

template<typename OutputType >
typedef MooseArray<ADDofValue> MooseVariableDataBase< OutputType >::ADDofValues
inherited

Definition at line 49 of file MooseVariableDataBase.h.

◆ DofValue

template<typename OutputType >
typedef Moose::DOFType<OutputType>::type MooseVariableDataBase< OutputType >::DofValue
inherited

Definition at line 46 of file MooseVariableDataBase.h.

◆ DofValues

template<typename OutputType >
typedef MooseArray<DofValue> MooseVariableDataBase< OutputType >::DofValues
inherited

Definition at line 48 of file MooseVariableDataBase.h.

◆ FieldVariableCurl

template<typename OutputType >
typedef MooseArray<OutputType> MooseVariableData< OutputType >::FieldVariableCurl

Definition at line 60 of file MooseVariableData.h.

◆ FieldVariableDivergence

template<typename OutputType >
typedef MooseArray<OutputDivergence> MooseVariableData< OutputType >::FieldVariableDivergence

Definition at line 61 of file MooseVariableData.h.

◆ FieldVariableGradient

template<typename OutputType >
typedef MooseArray<OutputGradient> MooseVariableDataBase< OutputType >::FieldVariableGradient
inherited

Definition at line 43 of file MooseVariableDataBase.h.

◆ FieldVariablePhiCurl

template<typename OutputType >
typedef MooseArray<std::vector<OutputShape> > MooseVariableData< OutputType >::FieldVariablePhiCurl

Definition at line 75 of file MooseVariableData.h.

◆ FieldVariablePhiDivergence

template<typename OutputType >
typedef MooseArray<std::vector<OutputShapeDivergence> > MooseVariableData< OutputType >::FieldVariablePhiDivergence

Definition at line 76 of file MooseVariableData.h.

◆ FieldVariablePhiGradient

template<typename OutputType >
typedef MooseArray<std::vector<OutputShapeGradient> > MooseVariableData< OutputType >::FieldVariablePhiGradient

Definition at line 73 of file MooseVariableData.h.

◆ FieldVariablePhiSecond

template<typename OutputType >
typedef MooseArray<std::vector<OutputShapeSecond> > MooseVariableData< OutputType >::FieldVariablePhiSecond

Definition at line 74 of file MooseVariableData.h.

◆ FieldVariablePhiValue

template<typename OutputType >
typedef MooseArray<std::vector<OutputShape> > MooseVariableData< OutputType >::FieldVariablePhiValue

Definition at line 72 of file MooseVariableData.h.

◆ FieldVariableSecond

template<typename OutputType >
typedef MooseArray<OutputSecond> MooseVariableData< OutputType >::FieldVariableSecond

Definition at line 59 of file MooseVariableData.h.

◆ FieldVariableTestCurl

template<typename OutputType >
typedef MooseArray<std::vector<OutputShape> > MooseVariableData< OutputType >::FieldVariableTestCurl

Definition at line 83 of file MooseVariableData.h.

◆ FieldVariableTestDivergence

template<typename OutputType >
typedef MooseArray<std::vector<OutputShapeDivergence> > MooseVariableData< OutputType >::FieldVariableTestDivergence

Definition at line 84 of file MooseVariableData.h.

◆ FieldVariableTestGradient

template<typename OutputType >
typedef MooseArray<std::vector<OutputShapeGradient> > MooseVariableData< OutputType >::FieldVariableTestGradient

Definition at line 81 of file MooseVariableData.h.

◆ FieldVariableTestSecond

template<typename OutputType >
typedef MooseArray<std::vector<OutputShapeSecond> > MooseVariableData< OutputType >::FieldVariableTestSecond

Definition at line 82 of file MooseVariableData.h.

◆ FieldVariableTestValue

template<typename OutputType >
typedef MooseArray<std::vector<OutputShape> > MooseVariableData< OutputType >::FieldVariableTestValue

Definition at line 80 of file MooseVariableData.h.

◆ FieldVariableValue

template<typename OutputType >
typedef MooseArray<OutputType> MooseVariableDataBase< OutputType >::FieldVariableValue
inherited

Definition at line 42 of file MooseVariableDataBase.h.

◆ OutputDivergence

template<typename OutputType >
typedef libMesh::TensorTools::DecrementRank<OutputType>::type MooseVariableDataBase< OutputType >::OutputDivergence
inherited

Definition at line 39 of file MooseVariableDataBase.h.

◆ OutputGradient

template<typename OutputType >
typedef libMesh::TensorTools::IncrementRank<OutputType>::type MooseVariableDataBase< OutputType >::OutputGradient
inherited

Definition at line 37 of file MooseVariableDataBase.h.

◆ OutputSecond

template<typename OutputType >
typedef libMesh::TensorTools::IncrementRank<OutputGradient>::type MooseVariableDataBase< OutputType >::OutputSecond
inherited

Definition at line 38 of file MooseVariableDataBase.h.

◆ OutputShape

template<typename OutputType >
typedef Moose::ShapeType<OutputType>::type MooseVariableData< OutputType >::OutputShape

Definition at line 64 of file MooseVariableData.h.

◆ OutputShapeDivergence

template<typename OutputType >
typedef libMesh::TensorTools::DecrementRank<OutputShape>::type MooseVariableData< OutputType >::OutputShapeDivergence

Definition at line 69 of file MooseVariableData.h.

◆ OutputShapeGradient

template<typename OutputType >
typedef libMesh::TensorTools::IncrementRank<OutputShape>::type MooseVariableData< OutputType >::OutputShapeGradient

Definition at line 67 of file MooseVariableData.h.

◆ OutputShapeSecond

template<typename OutputType >
typedef libMesh::TensorTools::IncrementRank<OutputShapeGradient>::type MooseVariableData< OutputType >::OutputShapeSecond

Definition at line 68 of file MooseVariableData.h.

Constructor & Destructor Documentation

◆ MooseVariableData()

template<typename OutputType >
MooseVariableData< OutputType >::MooseVariableData ( const MooseVariableFE< OutputType > &  var,
SystemBase &  sys,
THREAD_ID  tid,
Moose::ElementType  element_type,
const QBase *const &  qrule_in,
const QBase *const &  qrule_face_in,
const Node *const &  node,
const Elem *const &  elem 
)

Definition at line 26 of file MooseVariableData.C.

36 _var(var),
37 _fe_type(var.feType()),
38 _var_num(var.number()),
40 _element_type(element_type),
41 _ad_zero(0),
42 _has_dof_indices(false),
43 _qrule(qrule_in),
44 _qrule_face(qrule_face_in),
45 _use_dual(var.useDual()),
54 _time_integrator(nullptr),
55 _node(node),
56 _elem(elem),
57 _displaced(dynamic_cast<const DisplacedSystem *>(&_sys) ? true : false),
59{
60 _continuity = FEInterface::get_continuity(_fe_type);
61
63
65
66 // Initialize AD zero with zero derivatives
67 const auto old_do = ADReal::do_derivatives;
68 ADReal::do_derivatives = true;
69 _ad_zero = 0.;
70 ADReal::do_derivatives = old_do;
71
72 switch (_element_type)
73 {
75 {
76 _phi_assembly_method = &Assembly::fePhi<OutputShape>;
77 _phi_face_assembly_method = &Assembly::fePhiFace<OutputShape>;
78 _grad_phi_assembly_method = &Assembly::feGradPhi<OutputShape>;
79 _grad_phi_face_assembly_method = &Assembly::feGradPhiFace<OutputShape>;
80 _second_phi_assembly_method = &Assembly::feSecondPhi<OutputShape>;
81 _second_phi_face_assembly_method = &Assembly::feSecondPhiFace<OutputShape>;
82 _curl_phi_assembly_method = &Assembly::feCurlPhi<OutputShape>;
83 _curl_phi_face_assembly_method = &Assembly::feCurlPhiFace<OutputShape>;
84 _div_phi_assembly_method = &Assembly::feDivPhi<OutputShape>;
85 _div_phi_face_assembly_method = &Assembly::feDivPhiFace<OutputShape>;
86 _ad_grad_phi_assembly_method = &Assembly::feADGradPhi<OutputShape>;
87 _ad_grad_phi_face_assembly_method = &Assembly::feADGradPhiFace<OutputShape>;
88
91 break;
92 }
94 {
95 _phi_assembly_method = &Assembly::fePhiNeighbor<OutputShape>;
96 _phi_face_assembly_method = &Assembly::fePhiFaceNeighbor<OutputShape>;
97 _grad_phi_assembly_method = &Assembly::feGradPhiNeighbor<OutputShape>;
98 _grad_phi_face_assembly_method = &Assembly::feGradPhiFaceNeighbor<OutputShape>;
99 _second_phi_assembly_method = &Assembly::feSecondPhiNeighbor<OutputShape>;
100 _second_phi_face_assembly_method = &Assembly::feSecondPhiFaceNeighbor<OutputShape>;
101 _curl_phi_assembly_method = &Assembly::feCurlPhiNeighbor<OutputShape>;
102 _curl_phi_face_assembly_method = &Assembly::feCurlPhiFaceNeighbor<OutputShape>;
103 _div_phi_assembly_method = &Assembly::feDivPhiNeighbor<OutputShape>;
104 _div_phi_face_assembly_method = &Assembly::feDivPhiFaceNeighbor<OutputShape>;
105
106 _ad_grad_phi = nullptr;
107 _ad_grad_phi_face = nullptr;
108 break;
109 }
111 {
112 if (_use_dual)
113 {
114 _phi_assembly_method = &Assembly::feDualPhiLower<OutputType>;
115 _phi_face_assembly_method = &Assembly::feDualPhiLower<OutputType>; // Place holder
116 _grad_phi_assembly_method = &Assembly::feGradDualPhiLower<OutputType>;
117 _grad_phi_face_assembly_method = &Assembly::feGradDualPhiLower<OutputType>; // Place holder
118 }
119 else
120 {
121 _phi_assembly_method = &Assembly::fePhiLower<OutputType>;
122 _phi_face_assembly_method = &Assembly::fePhiLower<OutputType>; // Place holder
123 _grad_phi_assembly_method = &Assembly::feGradPhiLower<OutputType>;
124 _grad_phi_face_assembly_method = &Assembly::feGradPhiLower<OutputType>; // Place holder
125 }
126
127 _ad_grad_phi = nullptr;
128 _ad_grad_phi_face = nullptr;
129 break;
130 }
131 }
136}
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data.
virtual const MooseVariableField< OutputType > & var() const
const THREAD_ID _tid
The thread ID that this object is on.
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
std::function< const typename OutputTools< OutputShape >::VariablePhiSecond &(const Assembly &, libMesh::FEType)> _second_phi_assembly_method
const libMesh::FEType & _fe_type
std::function< const typename OutputTools< OutputShape >::VariablePhiSecond &(const Assembly &, libMesh::FEType)> _second_phi_face_assembly_method
std::function< const typename OutputTools< OutputShape >::VariablePhiDivergence &(const Assembly &, libMesh::FEType)> _div_phi_face_assembly_method
std::function< const typename OutputTools< OutputShape >::VariablePhiCurl &(const Assembly &, libMesh::FEType)> _curl_phi_face_assembly_method
const FieldVariablePhiGradient * _grad_phi_face
const QBase *const & _qrule
The current qrule.
std::function< const ADTemplateVariablePhiGradient< OutputShape > &(const Assembly &, libMesh::FEType)> _ad_grad_phi_assembly_method
bool _is_nodal
if variable is nodal
const MooseVariableFE< OutputType > & _var
A const reference to the owning MooseVariableFE object.
const FieldVariablePhiValue * _phi
std::function< const typename OutputTools< OutputShape >::VariablePhiGradient &(const Assembly &, libMesh::FEType)> _grad_phi_assembly_method
const FieldVariablePhiValue * _phi_face
ADReal _ad_zero
A zero AD variable.
const unsigned int _var_num
const FieldVariablePhiGradient * _grad_phi
const ADTemplateVariablePhiGradient< OutputShape > * _ad_grad_phi
std::function< const typename OutputTools< OutputShape >::VariablePhiCurl &(const Assembly &, libMesh::FEType)> _curl_phi_assembly_method
const ADTemplateVariablePhiGradient< OutputShape > * _ad_grad_phi_face
const QBase *const & _qrule_face
std::function< const typename OutputTools< OutputShape >::VariablePhiGradient &(const Assembly &, libMesh::FEType)> _grad_phi_face_assembly_method
std::function< const ADTemplateVariablePhiGradient< OutputShape > &(const Assembly &, libMesh::FEType)> _ad_grad_phi_face_assembly_method
const Elem *const & _elem
The current elem.
const bool _displaced
Whether this variable is being calculated on a displaced system.
const Node *const & _node
The current node.
std::function< const typename OutputTools< OutputShape >::VariablePhiDivergence &(const Assembly &, libMesh::FEType)> _div_phi_assembly_method
const TimeIntegrator * _time_integrator
Pointer to time integrator.
const unsigned int & _current_side
The current element side.
const Assembly & _assembly
Moose::ElementType _element_type
The element type this object is storing data for. This is either Element, Neighbor,...
libMesh::FEContinuity _continuity
Continuity type of the variable.
const Node *const & node() const
std::function< const typename OutputTools< OutputShape >::VariablePhiValue &(const Assembly &, libMesh::FEType)> _phi_face_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiValue &(const Assembly &, libMesh::FEType)> _phi_assembly_method
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
unsigned int number() const
Gets the number of this system.
const TimeIntegrator * queryTimeIntegrator(const unsigned int var_num) const
Retrieve the time integrator that integrates the given variable's equation.
@ VAR_SOLVER
Definition MooseTypes.h:770

Member Function Documentation

◆ adCurlSln()

template<typename OutputType >
const ADTemplateVariableCurl< OutputType > & MooseVariableData< OutputType >::adCurlSln ( ) const
inline

Definition at line 381 of file MooseVariableData.h.

382 {
384 curlPhi();
385 curlPhiFace();
386 return _ad_curl_u;
387 }
const FieldVariablePhiCurl & curlPhi() const
curl_phi getter
ADTemplateVariableCurl< OutputType > _ad_curl_u
bool _need_ad_volume
Whether AD is needed with the volume quadrature rule.
const FieldVariablePhiCurl & curlPhiFace() const
curl_phi_face getter

◆ add() [1/2]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::add ( libMesh::NumericVector< libMesh::Number > &  residual)
inherited

Add the current local DOF values to the input vector.

Definition at line 468 of file MooseVariableDataBase.C.

469{
470 if (_has_dof_values)
471 {
472 const auto & dof_values = _vector_tags_dof_u[_solution_tag];
473 residual.add_vector(&dof_values[0], _dof_indices);
474 }
475}
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
std::vector< DofValues > _vector_tags_dof_u
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
virtual void add_vector(const T *v, const std::vector< numeric_index_type > &dof_indices)

◆ add() [2/2]

void MooseVariableDataBase< RealEigenVector >::add ( NumericVector< Number > &  residual)
inherited

Definition at line 479 of file MooseVariableDataBase.C.

480{
481 if (_has_dof_values)
482 {
483 const auto & dof_values = _vector_tags_dof_u[_solution_tag];
484 mooseAssert(_dof_indices.size() % _count == 0,
485 "Dof indices should be cleanly divisible by the variable count");
486 const auto n_shapes = _dof_indices.size() / _count;
487 for (const auto indx : index_range(_dof_indices))
488 {
489 const auto i = indx % n_shapes;
490 const auto j = indx / n_shapes;
491 residual.add(_dof_indices[indx], dof_values[i](j));
492 }
493 }
494}
unsigned int _count
Number of components of the associated variable.
virtual void add(const numeric_index_type i, const T value)=0
auto index_range(const T &sizable)

◆ adDofValues()

template<typename OutputType >
const MooseVariableData< OutputType >::ADDofValues & MooseVariableData< OutputType >::adDofValues ( ) const

Return the AD dof values.

Definition at line 807 of file MooseVariableData.h.

808{
809 _need_ad = _need_ad_volume = true;
810 return _ad_dof_values;
811}

◆ adDofValuesDot()

template<typename OutputType >
const MooseVariableData< OutputType >::ADDofValues & MooseVariableData< OutputType >::adDofValuesDot ( ) const

Return the AD time derivative values of degrees of freedom.

Definition at line 815 of file MooseVariableData.h.

816{
818 if (!_time_integrator)
819 // See explanation in adUDot() body
820 _need_u_dot = true;
821 return _ad_dofs_dot;
822}

◆ addSolution()

template<typename OutputType >
void MooseVariableData< OutputType >::addSolution ( libMesh::NumericVector< libMesh::Number > &  sol,
const DenseVector< libMesh::Number > &  v 
) const

Add passed in local DOF values to a solution vector.

Definition at line 1094 of file MooseVariableData.C.

1096{
1097 sol.add_vector(v, _dof_indices);
1098}

◆ adGradPhi()

template<typename OutputType >
const ADTemplateVariablePhiGradient< typename MooseVariableData< OutputType >::OutputShape > & MooseVariableData< OutputType >::adGradPhi ( ) const

ad_grad_phi getter

Definition at line 868 of file MooseVariableData.h.

869{
871 mooseError("Unsupported element type: ", Moose::stringify(_element_type));
872 mooseAssert(_ad_grad_phi, "this should be non-null");
873 return *_ad_grad_phi;
874}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:65

◆ adGradPhiFace()

template<typename OutputType >
const ADTemplateVariablePhiGradient< typename MooseVariableData< OutputType >::OutputShape > & MooseVariableData< OutputType >::adGradPhiFace ( ) const

ad_grad_phi_face getter

Definition at line 878 of file MooseVariableData.h.

879{
881 mooseError("Unsupported element type: ", Moose::stringify(_element_type));
882 mooseAssert(_ad_grad_phi_face, "this should be non-null");
884 return *_ad_grad_phi_face;
885}
void needADGradPhiFace() const
Ask the assembly to compute the AD face shape function gradients, which this variable's AD gradient a...

◆ adGradSln()

template<typename OutputType >
const ADTemplateVariableGradient< OutputType > & MooseVariableData< OutputType >::adGradSln ( ) const
inline

Definition at line 303 of file MooseVariableData.h.

304 {
306 return _ad_grad_u;
307 }
ADTemplateVariableGradient< OutputType > _ad_grad_u

◆ adGradSlnDot()

template<typename OutputType >
const ADTemplateVariableGradient< OutputType > & MooseVariableData< OutputType >::adGradSlnDot ( ) const
inline

Volume-only: on element faces the AD gradient time derivative is not computed, because it would require the AD face shape function gradients, and the returned array is left empty.

Definition at line 335 of file MooseVariableData.h.

336 {
338
339 if (!_time_integrator)
340 // If we don't have a time integrator (this will be the case for variables that are a part of
341 // the AuxiliarySystem) then we have no way to calculate _ad_grad_u_dot and we are just going
342 // to copy the values from _grad_u_dot. Of course in order to be able to do that we need to
343 // calculate _grad_u_dot
344 _need_grad_dot = true;
345
346 return _ad_grad_u_dot;
347 }
bool _need_grad_dot
gradient dot flags
ADTemplateVariableGradient< OutputType > _ad_grad_u_dot

◆ adGradSlnFace()

template<typename OutputType >
const ADTemplateVariableGradient< OutputType > & MooseVariableData< OutputType >::adGradSlnFace ( ) const
inline

Face counterpart of adGradSln(); see adSlnFace().

Objects evaluating on element faces must use this accessor: on a face, the AD gradient is only computed when it was requested here.

Definition at line 324 of file MooseVariableData.h.

325 {
328 return _ad_grad_u;
329 }
bool _need_ad_grad_u_face
Whether the AD gradient is needed on element faces, i.e. requested through adGradSlnFace()

◆ adNodalValue()

template<typename OutputType >
const Moose::ADType< OutputType >::type & MooseVariableData< OutputType >::adNodalValue ( ) const

Definition at line 826 of file MooseVariableData.h.

827{
828 // _ad_nodal_value is assigned by computeNodalValues(), not by the quadrature-rule path, so
829 // this request carries no need for AD with the volume quadrature rule.
830 _need_ad = true;
831 return _ad_nodal_value;
832}
Moose::ADType< OutputType >::type _ad_nodal_value
AD nodal value.

◆ adSecondSln()

template<typename OutputType >
const ADTemplateVariableSecond< OutputType > & MooseVariableData< OutputType >::adSecondSln ( ) const
inline

Definition at line 349 of file MooseVariableData.h.

350 {
352 secondPhi();
354 return _ad_second_u;
355 }
ADTemplateVariableSecond< OutputType > _ad_second_u
const FieldVariablePhiSecond & secondPhi() const
second_phi getter
const FieldVariablePhiSecond & secondPhiFace() const
second_phi_face getter

◆ adSln()

template<typename OutputType >
const ADTemplateVariableValue< OutputType > & MooseVariableData< OutputType >::adSln ( ) const
inline

Definition at line 297 of file MooseVariableData.h.

298 {
300 return _ad_u;
301 }
ADTemplateVariableValue< OutputType > _ad_u
AD u.

◆ adSlnFace()

template<typename OutputType >
const ADTemplateVariableValue< OutputType > & MooseVariableData< OutputType >::adSlnFace ( ) const
inline

Solution getter for objects that only ever evaluate on element faces, such as AD integrated BCs.

Identical to adSln() except that it does not request AD on element interiors, where such an object never reads the result.

Definition at line 314 of file MooseVariableData.h.

315 {
316 _need_ad = _need_ad_u = true;
317 return _ad_u;
318 }

◆ adUDot()

template<typename OutputType >
const ADTemplateVariableValue< OutputType > & MooseVariableData< OutputType >::adUDot ( ) const

Definition at line 836 of file MooseVariableData.h.

837{
839
840 if (!_time_integrator)
841 // If we don't have a time integrator (this will be the case for variables that are a part of
842 // the AuxiliarySystem) then we have no way to calculate _ad_u_dot and we are just going to
843 // copy the values from _u_dot. Of course in order to be able to do that we need to calculate
844 // _u_dot
845 _need_u_dot = true;
846
847 return _ad_u_dot;
848}
ADTemplateVariableValue< OutputType > _ad_u_dot

◆ adUDotDot()

template<typename OutputType >
const ADTemplateVariableValue< OutputType > & MooseVariableData< OutputType >::adUDotDot ( ) const

Definition at line 852 of file MooseVariableData.h.

853{
855
856 if (!_time_integrator)
857 // If we don't have a time integrator (this will be the case for variables that are a part
858 // of the AuxiliarySystem) then we have no way to calculate _ad_u_dotdot and we are just
859 // going to copy the values from _u_dotdot. Of course in order to be able to do that we need
860 // to calculate _u_dotdot
861 _need_u_dotdot = true;
862
863 return _ad_u_dotdot;
864}
ADTemplateVariableValue< OutputType > _ad_u_dotdot

◆ arrayGradPhi()

template<typename OutputType >
const MappedArrayVariablePhiGradient & MooseVariableData< OutputType >::arrayGradPhi ( ) const
inline

mapped_grad_phi getter

Definition at line 155 of file MooseVariableData.h.

156 {
157 mooseAssert(var().fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY, "Not an array variable");
158 return _mapped_grad_phi;
159 }
MappedArrayVariablePhiGradient _mapped_grad_phi
@ VAR_FIELD_ARRAY
Definition MooseTypes.h:780

◆ arrayGradPhiFace()

template<typename OutputType >
const MappedArrayVariablePhiGradient & MooseVariableData< OutputType >::arrayGradPhiFace ( ) const
inline

mapped_grad_phi_face getter

Definition at line 169 of file MooseVariableData.h.

170 {
171 mooseAssert(var().fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY, "Not an array variable");
173 }
MappedArrayVariablePhiGradient _mapped_grad_phi_face

◆ assignADNodalValue() [1/2]

template<typename OutputType >
void MooseVariableData< OutputType >::assignADNodalValue ( )
private

Helper method for assigning nodal values from their corresponding solution values (dof values as they're referred to here in this class).

This method is only truly meaningful for nodal basis families

Definition at line 1376 of file MooseVariableData.C.

1377{
1378 mooseAssert(_ad_dof_values.size(), "The AD dof values container must have size greater than 0");
1380}
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition MooseArray.h:259

◆ assignADNodalValue() [2/2]

void MooseVariableData< RealVectorValue >::assignADNodalValue ( )
private

Definition at line 1384 of file MooseVariableData.C.

1385{
1386 const auto num_dofs = _dof_indices.size();
1387 mooseAssert(_ad_dof_values.size() == num_dofs,
1388 "Our dof values container size should match the dof indices container size");
1389 for (const auto i : make_range(num_dofs))
1391}
IntRange< T > make_range(T beg, T end)

◆ assignNodalValue() [1/3]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::assignNodalValue ( )
protectedinherited

Definition at line 763 of file MooseVariableDataBase.C.

764{
765 bool is_transient = _subproblem.isTransient();
767
768 auto & dof_values = _vector_tags_dof_u[_solution_tag];
769 _nodal_value = dof_values[0];
771
772 if (is_transient)
773 {
775 {
778 }
780 {
783 }
792 }
795}
OutputType _nodal_value_dotdot
nodal values of u_dotdot
OutputType _nodal_value_dot_old
nodal values of u_dot_old
bool _need_dof_values_dot
local solution flags
TagID _previous_nl_solution_tag
The vector tag ID corresponding to the previous nonlinear iteration's solution vector.
DofValues _dof_values_dotdot
second time derivative of the solution values
TagID _old_solution_tag
The vector tag ID corresponding to the old solution vector.
unsigned int oldestSolutionStateRequested() const
The oldest solution state that is requested for this variable (0 = current, 1 = old,...
OutputType _nodal_value_dotdot_old
nodal values of u_dotdot_old
TagID _older_solution_tag
The vector tag ID corresponding to the older solution vector.
DofValues _dof_values_dot_old
the previous time step's solution value time derivative
DofValues _dof_values_dot
time derivative of the solution values
MooseArray< OutputType > _nodal_value_old_array
DofValues _dof_values_dotdot_old
the previous time step's solution value second time derivative
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
OutputType _nodal_value
Nodal values.
OutputType _nodal_value_dot
nodal values of u_dot
MooseArray< OutputType > _nodal_value_older_array
virtual bool isTransient() const =0
const TagID INVALID_TAG_ID
Definition MooseTypes.C:23
libmesh_assert(ctx)

◆ assignNodalValue() [2/3]

void MooseVariableDataBase< RealVectorValue >::assignNodalValue ( )
protectedinherited

◆ assignNodalValue() [3/3]

void MooseVariableDataBase< RealVectorValue >::assignNodalValue ( )
protectedinherited

Definition at line 799 of file MooseVariableDataBase.C.

800{
801 bool is_transient = _subproblem.isTransient();
802
803 auto n = _dof_indices.size();
805
806 auto & dof_values = _vector_tags_dof_u[_solution_tag];
807 for (decltype(n) i = 0; i < n; ++i)
808 _nodal_value(i) = dof_values[i];
810
811 if (is_transient)
812 {
814 {
815 auto & dof_values_old = _vector_tags_dof_u[_old_solution_tag];
816 for (decltype(n) i = 0; i < n; ++i)
817 _nodal_value_old(i) = dof_values_old[i];
819 }
821 {
822 auto & dof_values_older = _vector_tags_dof_u[_older_solution_tag];
823 for (decltype(n) i = 0; i < n; ++i)
824 _nodal_value_older(i) = dof_values_older[i];
826 }
828 for (decltype(n) i = 0; i < n; ++i)
831 for (decltype(n) i = 0; i < n; ++i)
834 for (decltype(n) i = 0; i < n; ++i)
837 for (decltype(n) i = 0; i < n; ++i)
839 }
841 {
842 auto & dof_values_previous_nl = _vector_tags_dof_u[_previous_nl_solution_tag];
843 for (decltype(n) i = 0; i < n; ++i)
844 _nodal_value_previous_nl(i) = dof_values_previous_nl[i];
845 }
846}

◆ clearDofIndices()

template<typename OutputType >
void MooseVariableData< OutputType >::clearDofIndices ( )
inline

Definition at line 425 of file MooseVariableData.h.

425{ _dof_indices.clear(); }

◆ computeAD()

template<typename OutputType >
template<bool constant_monomial>
void MooseVariableData< OutputType >::computeAD ( const unsigned int  num_dofs,
const unsigned int  nqp 
)

compute AD things

Definition at line 798 of file MooseVariableData.C.

799{
801 const auto n_test = num_dofs / _count;
802
803 // Values
804 if (_need_ad_u)
805 fill<constant_monomial>(_ad_u, *_current_phi, _ad_dof_values, nqp, n_test);
806 // Grad. On an element face, only fill the gradient when a face object requested it. Otherwise it
807 // stays empty so that a face object that read it through the volume accessor adGradSln() fails
808 // the bounds assertion instead of silently using gradients built without the AD face shape
809 // function gradients. Neighbor data never uses AD shape function gradients and is not affected.
810 const bool on_element_face =
812 if (_need_ad_grad_u && on_element_face && !_need_ad_grad_u_face)
813 _ad_grad_u.resize(0);
814 else if (_need_ad_grad_u)
815 {
816 // The latter check here is for handling the fact that we have not yet implemented
817 // calculation of ad_grad_phi for neighbor and neighbor-face, so if we are in that
818 // situation we need to default to using the non-ad grad_phi
820 fill<constant_monomial>(_ad_grad_u, *_current_ad_grad_phi, _ad_dof_values, nqp, n_test);
821 else
822 fill<constant_monomial>(_ad_grad_u, *_current_grad_phi, _ad_dof_values, nqp, n_test);
823 }
824 // Second
825 if constexpr (std::is_same_v<OutputType, Real>)
827 fill<constant_monomial>(_ad_second_u, *_current_second_phi, _ad_dof_values, nqp, n_test);
828 // Curl
829 if (_need_ad_curl_u)
830 fill<constant_monomial>(_ad_curl_u, *_current_curl_phi, _ad_dof_values, nqp, n_test);
831
832 const bool is_transient = _subproblem.isTransient();
833 if (is_transient)
834 {
835 if (_need_ad_u_dot)
836 {
838 fill<constant_monomial>(_ad_u_dot, *_current_phi, _ad_dofs_dot, nqp, n_test);
839 // We are too early in the setup to have a time integrator, so we are not really using the
840 // AD-derivatives. We set the AD value of the derivatives to the nonAD value
841 else
842 {
843 _ad_u_dot.resize(nqp);
844 for (const auto qp : make_range(nqp))
845 _ad_u_dot[qp] = _u_dot[qp];
846 }
847 }
848
850 {
852 fill<constant_monomial>(_ad_u_dotdot, *_current_phi, _ad_dofs_dotdot, nqp, n_test);
853 else
854 {
855 _ad_u_dotdot.resize(nqp);
856 for (const auto qp : make_range(nqp))
857 _ad_u_dotdot[qp] = _u_dotdot[qp];
858 }
859 }
860
861 // The gradient time derivative is volume-only, so on an element face it is left empty for the
862 // same reason as the gradient above
863 if (_need_ad_grad_u_dot && on_element_face)
865 else if (_need_ad_grad_u_dot)
866 {
868 {
869 // The latter check here is for handling the fact that we have not yet implemented
870 // calculation of ad_grad_phi for neighbor and neighbor-face, so if we are in that
871 // situation we need to default to using the non-ad grad_phi
873 fill<constant_monomial>(_ad_grad_u_dot, *_current_ad_grad_phi, _ad_dofs_dot, nqp, n_test);
874 else
875 fill<constant_monomial>(_ad_grad_u_dot, *_current_grad_phi, _ad_dofs_dot, nqp, n_test);
876 }
877 else
878 {
879 _ad_grad_u_dot.resize(nqp);
880 for (const auto qp : make_range(nqp))
881 _ad_grad_u_dot[qp] = _grad_u_dot[qp];
882 }
883 }
884 }
885}
void resize(unsigned int size)
Change the number of elements the array can store.
Definition MooseArray.h:216
FieldVariableGradient _grad_u_dot
grad_u dots
const FieldVariablePhiGradient * _current_grad_phi
FieldVariableValue _u_dot
u_dot (time derivative)
const QBase * _current_qrule
const ADTemplateVariablePhiGradient< OutputShape > * _current_ad_grad_phi
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
const FieldVariablePhiSecond * _current_second_phi
void fetchADDofValues()
Helper method for assigning the ad_dof* arrays.
const FieldVariablePhiCurl * _current_curl_phi
ADDofValues _ad_dofs_dotdot
const FieldVariablePhiValue * _current_phi

◆ computeConstantMonomialValues()

template<typename OutputType >
void MooseVariableData< OutputType >::computeConstantMonomialValues ( )

compute the values for const monomial variables

Definition at line 699 of file MooseVariableData.C.

700{
701 if (_dof_indices.size() == 0)
702 return;
703
704 // Monomial optimizations are not appropriate after p-refinement
705 if (_elem->p_level())
707 else
708 computeValuesInternal</* constant_monomial = */ true>();
709}
void computeValuesInternal()
Internal method for computeValues() and computeConstantMonomialValues()
void computeValues()
compute the variable values

◆ computeIncrementAtNode() [1/2]

template<typename OutputType >
void MooseVariableData< OutputType >::computeIncrementAtNode ( const libMesh::NumericVector< libMesh::Number > &  increment_vec)

Compute and store incremental change at the current node based on increment_vec.

Definition at line 1228 of file MooseVariableData.C.

1229{
1230 if (!isNodal())
1231 mooseError("computeIncrementAtNode can only be called for nodal variables");
1232
1233 _increment.resize(1);
1234
1235 // Compute the increment for the current DOF
1236 _increment[0] = increment_vec(_dof_indices[0]);
1237}
bool isNodal() const override
FieldVariableValue _increment
Increment in the variable used in dampers.

◆ computeIncrementAtNode() [2/2]

void MooseVariableData< RealEigenVector >::computeIncrementAtNode ( const NumericVector< Number > &  increment_vec)

Definition at line 1241 of file MooseVariableData.C.

1243{
1244 if (!isNodal())
1245 mooseError("computeIncrementAtNode can only be called for nodal variables");
1246
1247 _increment.resize(1);
1248
1249 // Compute the increment for the current DOF
1250 if (isNodal())
1251 for (unsigned int j = 0; j < _count; j++)
1252 _increment[0](j) = increment_vec(_dof_indices[0] + j);
1253 else
1254 {
1255 unsigned int n = 0;
1256 const auto n_dof_indices = _dof_indices.size();
1257 for (const auto j : make_range(_count))
1258 {
1259 _increment[0](j) = increment_vec(_dof_indices[0] + n);
1260 n += n_dof_indices;
1261 }
1262 }
1263}

◆ computeIncrementAtQps() [1/2]

template<typename OutputType >
void MooseVariableData< OutputType >::computeIncrementAtQps ( const libMesh::NumericVector< libMesh::Number > &  increment_vec)

Compute and store incremental change in solution at QPs based on increment_vec.

Definition at line 1177 of file MooseVariableData.C.

1178{
1179 unsigned int nqp = _qrule->n_points();
1180
1181 _increment.resize(nqp);
1182 // Compute the increment at each quadrature point
1183 unsigned int num_dofs = _dof_indices.size();
1184 for (const auto qp : make_range(nqp))
1185 {
1186 _increment[qp] = 0.;
1187 for (const auto i : make_range(num_dofs))
1188 _increment[qp] += (*_phi)[i][qp] * increment_vec(_dof_indices[i]);
1189 }
1190}
unsigned int n_points() const

◆ computeIncrementAtQps() [2/2]

void MooseVariableData< RealEigenVector >::computeIncrementAtQps ( const NumericVector< Number > &  increment_vec)

Definition at line 1194 of file MooseVariableData.C.

1196{
1197 unsigned int nqp = _qrule->n_points();
1198
1199 _increment.resize(nqp);
1200 // Compute the increment at each quadrature point
1201 unsigned int num_dofs = _dof_indices.size();
1202 if (isNodal())
1203 {
1204 for (const auto qp : make_range(nqp))
1205 {
1206 for (const auto i : make_range(num_dofs))
1207 for (const auto j : make_range(_count))
1208 _increment[qp](j) += (*_phi)[i][qp] * increment_vec(_dof_indices[i] + j);
1209 }
1210 }
1211 else
1212 {
1213 for (const auto qp : make_range(nqp))
1214 {
1215 unsigned int n = 0;
1216 for (const auto j : make_range(_count))
1217 for (const auto i : make_range(num_dofs))
1218 {
1219 _increment[qp](j) += (*_phi)[i][qp] * increment_vec(_dof_indices[i] + n);
1220 n += num_dofs;
1221 }
1222 }
1223 }
1224}
for(PetscInt i=0;i< nvars;++i)

◆ computeNodalValues()

template<typename OutputType >
void MooseVariableData< OutputType >::computeNodalValues ( )

compute nodal things

Definition at line 1357 of file MooseVariableData.C.

1358{
1359 if (_has_dof_indices)
1360 {
1363
1364 if (_need_ad)
1365 {
1368 }
1369 }
1370 else
1372}
void fetchDofValues()
Helper methods for assigning dof values from their corresponding solution values.
void assignADNodalValue()
Helper method for assigning nodal values from their corresponding solution values (dof values as they...

◆ computeValues()

template<typename OutputType >
void MooseVariableData< OutputType >::computeValues ( )

compute the variable values

Definition at line 692 of file MooseVariableData.C.

693{
694 computeValuesInternal</* constant_monomial = */ false>();
695}

◆ computeValuesInternal()

template<typename OutputType >
template<bool constant_monomial>
void MooseVariableData< OutputType >::computeValuesInternal ( )
private

Internal method for computeValues() and computeConstantMonomialValues()

Monomial is a template parameter so that we get compile time optimization for constant monomial vs non-constant monomial

Definition at line 535 of file MooseVariableData.C.

536{
537 const auto num_dofs = _dof_indices.size();
538 const auto num_shapes = num_dofs / _count;
539
540 if (num_dofs > 0)
542
543 const bool is_transient = _subproblem.isTransient();
544 const auto nqp = _current_qrule->n_points();
545 const auto & active_coupleable_matrix_tags =
547
548 // Map grad_phi using Eigen so that we can perform array operations easier
549 if constexpr (std::is_same_v<OutputType, RealEigenVector>)
550 {
551 if (_qrule == _current_qrule)
552 {
553 _mapped_grad_phi.resize(num_shapes);
554 for (const auto i : make_range(num_shapes))
555 {
556 _mapped_grad_phi[i].resize(nqp, Eigen::Map<RealDIMValue>(nullptr));
557 for (const auto qp : make_range(nqp))
558 // Note: this does NOT do any allocation. It is "reconstructing" the object in place
559 new (&_mapped_grad_phi[i][qp])
560 Eigen::Map<RealDIMValue>(const_cast<Real *>(&(*_current_grad_phi)[i][qp](0)));
561 }
562 }
563 else
564 {
565 _mapped_grad_phi_face.resize(num_shapes);
566 for (const auto i : make_range(num_shapes))
567 {
568 _mapped_grad_phi_face[i].resize(nqp, Eigen::Map<RealDIMValue>(nullptr));
569 for (const auto qp : make_range(nqp))
570 // Note: this does NOT do any allocation. It is "reconstructing" the object in place
571 new (&_mapped_grad_phi_face[i][qp])
572 Eigen::Map<RealDIMValue>(const_cast<Real *>(&(*_current_grad_phi)[i][qp](0)));
573 }
574 }
575 }
576
577 mooseAssert(
580 "We're requiring a second calculation but have not set a second shape function!");
581 mooseAssert(!(_need_curl || _need_curl_old) || _current_curl_phi,
582 "We're requiring a curl calculation but have not set a curl shape function!");
583 mooseAssert(!(_need_div || _need_div_old) || _current_div_phi,
584 "We're requiring a divergence calculation but have not set a div shape function!");
585
586 // Curl
587 if (_need_curl)
588 fill<constant_monomial>(
590 if (is_transient && _need_curl_old)
591 fill<constant_monomial>(
593
594 // Div
595 if (_need_div)
596 fill<constant_monomial>(
598 if (is_transient && _need_div_old)
599 fill<constant_monomial>(
601
602 // Second
603 if (_need_second)
604 fill<constant_monomial>(
607 fill<constant_monomial>(_second_u_previous_nl,
610 nqp,
611 num_shapes);
612
613 // Vector tags
614 for (auto tag : _required_vector_tags)
615 {
616 if (_need_vector_tag_u[tag] && _sys.hasVector(tag))
617 {
618 mooseAssert(_sys.getVector(tag).closed(), "Vector should be closed");
619 fill<constant_monomial>(
620 _vector_tag_u[tag], *_current_phi, _vector_tags_dof_u[tag], nqp, num_shapes);
621 }
622 if (_need_vector_tag_grad[tag] && _sys.hasVector(tag))
623 {
624 mooseAssert(_sys.getVector(tag).closed(), "Vector should be closed");
625 fill<constant_monomial>(
626 _vector_tag_grad[tag], *_current_grad_phi, _vector_tags_dof_u[tag], nqp, num_shapes);
627 }
628 }
629
630 // Matrix tags
631 for (auto tag : active_coupleable_matrix_tags)
633 fill<constant_monomial>(
634 _matrix_tag_u[tag], *_current_phi, _matrix_tags_dof_u[tag], nqp, num_shapes);
635
636 // Derivatives and old values
637 if (is_transient)
638 {
640 fill<constant_monomial>(_second_u_old,
643 nqp,
644 num_shapes);
646 fill<constant_monomial>(_second_u_older,
649 nqp,
650 num_shapes);
651 if (_need_u_dot)
652 fill<constant_monomial>(_u_dot, *_current_phi, _dof_values_dot, nqp, num_shapes);
653 if (_need_u_dotdot)
654 fill<constant_monomial>(_u_dotdot, *_current_phi, _dof_values_dotdot, nqp, num_shapes);
655 if (_need_u_dot_old)
656 fill<constant_monomial>(_u_dot_old, *_current_phi, _dof_values_dot_old, nqp, num_shapes);
658 fill<constant_monomial>(
660
661 if (_need_du_dot_du)
662 {
663 _du_dot_du.resize(nqp);
664 for (const auto i : make_range(num_shapes))
665 for (const auto qp : make_range(nqp))
666 _du_dot_du[qp] = _dof_du_dot_du[i];
667 }
669 {
671 for (const auto i : make_range(num_shapes))
672 for (const auto qp : make_range(nqp))
674 }
675
676 if (_need_grad_dot)
677 fill<constant_monomial>(_grad_u_dot, *_current_grad_phi, _dof_values_dot, nqp, num_shapes);
679 fill<constant_monomial>(
681 }
682
683 // A variable whose AD was only ever requested through the face-scoped accessors has no
684 // consumer on element interiors, so seeding the derivatives there is wasted work. In the
685 // volume context _current_qrule is _qrule; see setGeometry().
687 computeAD<constant_monomial>(num_dofs, nqp);
688}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
std::vector< FieldVariableValue > _vector_tag_u
std::vector< FieldVariableValue > _matrix_tag_u
std::vector< bool > _need_matrix_tag_u
std::vector< DofValues > _matrix_tags_dof_u
std::vector< bool > _need_vector_tag_u
MooseArray< libMesh::Number > _dof_du_dotdot_du
derivatives of the solution value second time derivative with respect to the degrees of freedom
std::vector< FieldVariableGradient > _vector_tag_grad
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
MooseArray< libMesh::Number > _dof_du_dot_du
derivatives of the solution value time derivative with respect to the degrees of freedom
std::vector< bool > _need_vector_tag_grad
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u
bool _need_curl
curl flags
FieldVariableCurl _curl_u
curl_u
bool _need_second
SolutionState second_u flags.
FieldVariableSecond _second_u_previous_nl
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
FieldVariableDivergence _div_u
divergence_u
FieldVariableDivergence _div_u_old
FieldVariableSecond _second_u
second_u
FieldVariableCurl _curl_u_old
FieldVariableSecond _second_u_old
void fill(DestinationType &dest, const ShapeType &phi, const DofValuesType &dof_values, unsigned int nqp, std::size_t num_shapes)
FieldVariableSecond _second_u_older
const FieldVariablePhiDivergence * _current_div_phi
bool _need_div
divergence flags
FieldVariableValue _u_dotdot_old
u_dotdot_old (second time derivative)
VariableValue _du_dot_du
derivative of u_dot wrt u
FieldVariableGradient _grad_u_dotdot
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition SubProblem.C:382
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition SystemBase.C:924
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition SystemBase.C:933
virtual bool closed() const
Definition JsonIO.h:71
MapBase< T1, T2, std::map > Map
Definition KokkosMap.h:360
Eigen::Matrix< Real, Moose::dim, 1 > RealDIMValue
Definition MooseTypes.h:146
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computingCurl()

template<typename OutputType >
bool MooseVariableData< OutputType >::computingCurl ( ) const
inline

Whether or not this variable is computing the curl.

Definition at line 236 of file MooseVariableData.h.

236{ return _need_curl || _need_curl_old; }

◆ computingDiv()

template<typename OutputType >
bool MooseVariableData< OutputType >::computingDiv ( ) const
inline

Whether or not this variable is computing the divergence.

Definition at line 241 of file MooseVariableData.h.

241{ return _need_div || _need_div_old; }

◆ curlPhi()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariablePhiCurl & MooseVariableData< OutputType >::curlPhi ( ) const

curl_phi getter

Definition at line 383 of file MooseVariableData.C.

384{
386 return *_curl_phi;
387}
const FieldVariablePhiCurl * _curl_phi

Referenced by MooseVariableData< OutputType >::adCurlSln().

◆ curlPhiFace()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariablePhiCurl & MooseVariableData< OutputType >::curlPhiFace ( ) const

curl_phi_face getter

Definition at line 391 of file MooseVariableData.C.

392{
394 return *_curl_phi_face;
395}
const FieldVariablePhiCurl * _curl_phi_face

Referenced by MooseVariableData< OutputType >::adCurlSln().

◆ curlSln()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableCurl & MooseVariableData< OutputType >::curlSln ( Moose::SolutionState  state) const

Local solution curl getter.

Parameters
stateThe state of the simulation: current, old, older

Definition at line 305 of file MooseVariableData.C.

306{
307 curlPhi();
308 curlPhiFace();
309 switch (state)
310 {
311 case Moose::Current:
312 {
313 _need_curl = true;
314 return _curl_u;
315 }
316
317 case Moose::Old:
318 {
319 _need_curl_old = true;
320 return _curl_u_old;
321 }
322
323 case Moose::Older:
324 {
325 _need_curl_older = true;
326 return _curl_u_older;
327 }
328
329 default:
330 mooseError("We don't currently support curl from the previous non-linear iteration");
331 }
332}
FieldVariableCurl _curl_u_older
@ Current
Definition MooseTypes.h:263

◆ currentElem()

template<typename OutputType >
const Elem *const & MooseVariableData< OutputType >::currentElem ( ) const
inline

The current element.

Definition at line 255 of file MooseVariableData.h.

255{ return _elem; }

◆ currentSide()

template<typename OutputType >
const unsigned int & MooseVariableData< OutputType >::currentSide ( ) const
inline

The current side.

Definition at line 260 of file MooseVariableData.h.

260{ return _current_side; }

◆ divPhi()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariablePhiDivergence & MooseVariableData< OutputType >::divPhi ( ) const

divergence_phi getter

Definition at line 399 of file MooseVariableData.C.

400{
402 return *_div_phi;
403}
const FieldVariablePhiDivergence * _div_phi

◆ divPhiFace()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariablePhiDivergence & MooseVariableData< OutputType >::divPhiFace ( ) const

divergence_phi_face getter

Definition at line 407 of file MooseVariableData.C.

408{
410 return *_div_phi_face;
411}
const FieldVariablePhiDivergence * _div_phi_face

◆ divSln()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableDivergence & MooseVariableData< OutputType >::divSln ( Moose::SolutionState  state) const

Local solution divergence getter.

Parameters
stateThe state of the simulation: current, old, older

Definition at line 336 of file MooseVariableData.C.

337{
338 divPhi();
339 divPhiFace();
340 switch (state)
341 {
342 case Moose::Current:
343 {
344 _need_div = true;
345 return _div_u;
346 }
347
348 case Moose::Old:
349 {
350 _need_div_old = true;
351 return _div_u_old;
352 }
353
354 case Moose::Older:
355 {
356 _need_div_older = true;
357 return _div_u_older;
358 }
359
360 default:
361 mooseError("We don't currently support divergence from the previous non-linear iteration");
362 }
363}
const FieldVariablePhiDivergence & divPhiFace() const
divergence_phi_face getter
const FieldVariablePhiDivergence & divPhi() const
divergence_phi getter
FieldVariableDivergence _div_u_older

◆ dofIndices()

template<typename OutputType >
const std::vector< dof_id_type > & MooseVariableData< OutputType >::dofIndices ( ) const
inline

Definition at line 423 of file MooseVariableData.h.

423{ return _dof_indices; }

◆ dofValues()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DofValues & MooseVariableDataBase< OutputType >::dofValues ( ) const
inherited

Definition at line 354 of file MooseVariableDataBase.C.

355{
357}
const DofValues & vectorTagDofValue(TagID tag) const

◆ dofValuesDot()

template<typename OutputType >
const MooseVariableData< OutputType >::DofValues & MooseVariableData< OutputType >::dofValuesDot ( ) const

Definition at line 1102 of file MooseVariableData.C.

1103{
1104 if (_sys.solutionUDot())
1105 {
1106 _need_dof_values_dot = true;
1107 return _dof_values_dot;
1108 }
1109 else
1110 mooseError("MooseVariableData: Time derivative of solution (`u_dot`) is not stored. Please set "
1111 "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
1112}
virtual NumericVector< Number > * solutionUDot()
Definition SystemBase.h:292

◆ dofValuesDotDot()

template<typename OutputType >
const MooseVariableData< OutputType >::DofValues & MooseVariableData< OutputType >::dofValuesDotDot ( ) const

Definition at line 1116 of file MooseVariableData.C.

1117{
1118 if (_sys.solutionUDotDot())
1119 {
1121 return _dof_values_dotdot;
1122 }
1123 else
1124 mooseError("MooseVariableData: Second time derivative of solution (`u_dotdot`) is not stored. "
1125 "Please set uDotDotRequested() to true in FEProblemBase before requesting "
1126 "`u_dotdot`.");
1127}
virtual NumericVector< Number > * solutionUDotDot()
Definition SystemBase.h:293

◆ dofValuesDotDotOld()

template<typename OutputType >
const MooseVariableData< OutputType >::DofValues & MooseVariableData< OutputType >::dofValuesDotDotOld ( ) const

Definition at line 1146 of file MooseVariableData.C.

1147{
1149 {
1152 }
1153 else
1154 mooseError("MooseVariableData: Old second time derivative of solution (`u_dotdot_old`) is not "
1155 "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
1156 "requesting `u_dotdot_old`.");
1157}
virtual NumericVector< Number > * solutionUDotDotOld()
Definition SystemBase.h:295

◆ dofValuesDotOld()

template<typename OutputType >
const MooseVariableData< OutputType >::DofValues & MooseVariableData< OutputType >::dofValuesDotOld ( ) const

Definition at line 1131 of file MooseVariableData.C.

1132{
1133 if (_sys.solutionUDotOld())
1134 {
1136 return _dof_values_dot_old;
1137 }
1138 else
1139 mooseError("MooseVariableData: Old time derivative of solution (`u_dot_old`) is not stored. "
1140 "Please set uDotOldRequested() to true in FEProblemBase before requesting "
1141 "`u_dot_old`.");
1142}
virtual NumericVector< Number > * solutionUDotOld()
Definition SystemBase.h:294

◆ dofValuesDuDotDotDu()

template<typename OutputType >
const MooseArray< Number > & MooseVariableData< OutputType >::dofValuesDuDotDotDu ( ) const

Definition at line 1169 of file MooseVariableData.C.

1170{
1172 return _dof_du_dotdot_du;
1173}

◆ dofValuesDuDotDu()

template<typename OutputType >
const MooseArray< Number > & MooseVariableData< OutputType >::dofValuesDuDotDu ( ) const

Definition at line 1161 of file MooseVariableData.C.

1162{
1163 _need_dof_du_dot_du = true;
1164 return _dof_du_dot_du;
1165}

◆ dofValuesOld()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DofValues & MooseVariableDataBase< OutputType >::dofValuesOld ( ) const
inherited

Definition at line 361 of file MooseVariableDataBase.C.

362{
364}

◆ dofValuesOlder()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DofValues & MooseVariableDataBase< OutputType >::dofValuesOlder ( ) const
inherited

Definition at line 368 of file MooseVariableDataBase.C.

369{
371}

◆ dofValuesPreviousNL()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DofValues & MooseVariableDataBase< OutputType >::dofValuesPreviousNL ( ) const
inherited

Definition at line 375 of file MooseVariableDataBase.C.

376{
378}
@ PreviousNL
Definition MooseTypes.h:266

◆ duDotDotDu()

template<typename OutputType >
const VariableValue & MooseVariableData< OutputType >::duDotDotDu ( ) const
inline

Definition at line 375 of file MooseVariableData.h.

376 {
377 _need_du_dotdot_du = true;
378 return _du_dotdot_du;
379 }

◆ duDotDu()

template<typename OutputType >
const VariableValue & MooseVariableData< OutputType >::duDotDu ( ) const
inline

Definition at line 369 of file MooseVariableData.h.

370 {
371 _need_du_dot_du = true;
372 return _du_dot_du;
373 }

◆ fetchADDofValues() [1/2]

template<typename OutputType >
void MooseVariableData< OutputType >::fetchADDofValues ( )
private

Helper method for assigning the ad_dof* arrays.

Definition at line 713 of file MooseVariableData.C.

714{
715 const auto num_dofs = _dof_indices.size();
716
717 const bool do_derivatives = Moose::doDerivatives(_subproblem, _sys);
718
719 _ad_dof_values.resize(num_dofs);
720 for (const auto i : make_range(num_dofs))
722 // NOTE! You have to do this AFTER setting the value!
723 if (do_derivatives)
724 for (const auto i : make_range(num_dofs))
725 Moose::derivInsert(_ad_dof_values[i].derivatives(), _dof_indices[i], 1.);
726
727 const bool is_transient = _subproblem.isTransient();
728 if (is_transient && _need_ad_u_dot)
729 {
730 _ad_dofs_dot.resize(num_dofs);
732 _ad_dofs_dotdot.resize(num_dofs);
733
735 {
736 if (_time_integrator->dt())
737 {
738 for (const auto i : make_range(num_dofs))
740 for (const auto i : make_range(num_dofs))
741 _time_integrator->computeADTimeDerivatives(_ad_dofs_dot[i],
742 _dof_indices[i],
745 }
746 else
747 // Executing something with a time derivative at initial should not put a NaN
748 for (const auto i : make_range(num_dofs))
749 {
750 _ad_dofs_dot[i] = 0.;
752 _ad_dofs_dotdot[i] = 0;
753 }
754 }
755 // We are too early in the setup to have a time integrator, so we are not really using the
756 // AD-derivatives. We set the AD value of the derivatives to the nonAD value
757 else
758 for (const auto i : make_range(num_dofs))
759 {
763 }
764 }
765}
ADReal _ad_real_dummy
A dummy ADReal variable.
const Real & dt() const
Returns the time step size.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
bool doDerivatives(const SubProblem &subproblem, const SystemBase &sys)
Definition ADUtils.C:83
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &derivs, libMesh::dof_id_type index, Real value)
Definition ADReal.h:21

◆ fetchADDofValues() [2/2]

void MooseVariableData< RealEigenVector >::fetchADDofValues ( )
private

Definition at line 769 of file MooseVariableData.C.

770{
771 const auto num_dofs = _dof_indices.size();
772
773 const bool do_derivatives = Moose::doDerivatives(_subproblem, _sys);
774 const auto n_test = num_dofs / _count;
775 mooseAssert(num_dofs == _count * n_test,
776 "Our assertions around number of dofs, test functions, and count are incorrect");
777
778 _ad_dof_values.resize(n_test);
779 // Test is outer, count is inner
780 for (const auto i : make_range(n_test))
781 {
783 for (const auto j : make_range(_count))
784 {
785 auto & dual_number = _ad_dof_values[i](j);
786 const auto global_dof_index = _dof_indices[j * n_test + i];
787 dual_number = (*_sys.currentSolution())(global_dof_index);
788 // NOTE! You have to do this AFTER setting the value!
789 if (do_derivatives)
790 Moose::derivInsert(dual_number.derivatives(), global_dof_index, 1.);
791 }
792 }
793}
virtual const NumericVector< Number > *const & currentSolution() const =0
The solution vector that is currently being operated on.

◆ fetchDofValues() [1/3]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::fetchDofValues ( )
protectedinherited

Helper methods for assigning dof values from their corresponding solution values.

Definition at line 561 of file MooseVariableDataBase.C.

562{
563 bool is_transient = _subproblem.isTransient();
564
565 auto n = _dof_indices.size();
567
568 if (is_transient)
569 {
571 {
575 }
577 {
581 }
583 {
587 }
589 {
593 }
595 {
597 for (decltype(n) i = 0; i < n; ++i)
598 _dof_du_dot_du[i] = _sys.duDotDu(_var.number());
599 }
601 {
603 for (decltype(n) i = 0; i < n; ++i)
605 }
606 }
607
608 for (auto tag : _required_vector_tags)
610 if ((_subproblem.vectorTagType(tag) == Moose::VECTOR_TAG_RESIDUAL &&
611 _subproblem.safeAccessTaggedVectors()) ||
612 _subproblem.vectorTagType(tag) == Moose::VECTOR_TAG_SOLUTION)
613 {
614 // tag is defined on problem but may not be used by a system
615 // the grain tracker requires being able to read from solution vectors that we are also in
616 // the process of writing :-/
617 // Note: the extra vector tags are also still not closed when a TagVectorAux uses them
618 if (_sys.hasVector(tag) /* && _sys.getVector(tag).closed()*/)
619 {
620 auto & vec = _sys.getVector(tag);
621 _vector_tags_dof_u[tag].resize(n);
622 vec.get(_dof_indices, &_vector_tags_dof_u[tag][0]);
623 }
624 }
625
627 {
628 auto & active_coupleable_matrix_tags =
630
631 for (auto tag : active_coupleable_matrix_tags)
632 {
634 if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag))
635 {
636 mooseAssert(_sys.getMatrix(tag).closed(),
637 "Matrix with tag '" + std::to_string(tag) + "' should be closed");
638 auto & mat = _sys.getMatrix(tag);
639 _matrix_tags_dof_u[tag].resize(n);
640 for (unsigned i = 0; i < n; i++)
641 _matrix_tags_dof_u[tag][i] = mat(_dof_indices[i], _dof_indices[i]);
642 }
643 }
644 }
645}
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.
std::vector< bool > _need_matrix_tag_dof_u
std::vector< bool > _need_vector_tag_dof_u
virtual bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
Definition SubProblem.h:742
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
virtual bool matrixTagActive(TagID tag) const
If or not a matrix tag is active.
virtual const Number & duDotDu(unsigned int var_num=0) const
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition SystemBase.h:391
virtual Number & duDotDotDu()
Definition SystemBase.h:288
virtual void get(const std::vector< numeric_index_type > &index, T *values) const
virtual bool closed() const=0
@ VECTOR_TAG_SOLUTION
@ VECTOR_TAG_RESIDUAL

◆ fetchDofValues() [2/3]

void MooseVariableDataBase< RealEigenVector >::fetchDofValues ( )
protectedinherited

◆ fetchDofValues() [3/3]

void MooseVariableDataBase< RealEigenVector >::fetchDofValues ( )
protectedinherited

Definition at line 664 of file MooseVariableDataBase.C.

665{
666 bool is_transient = _subproblem.isTransient();
667
668 auto n = _dof_indices.size() / _count;
670
671 if (is_transient)
672 {
674 {
677 }
679 {
682 }
684 {
687 }
689 {
692 }
693 }
694
695 for (auto tag : _required_vector_tags)
696 if ((_subproblem.vectorTagType(tag) == Moose::VECTOR_TAG_RESIDUAL &&
697 _subproblem.safeAccessTaggedVectors()) ||
698 _subproblem.vectorTagType(tag) == Moose::VECTOR_TAG_SOLUTION)
699 // tag is defined on problem but may not be used by a system
700 if (_sys.hasVector(tag))
701 {
702 mooseAssert(_sys.getVector(tag).closed(),
703 "Vector with tag '" + std::to_string(tag) + "' should be closed");
705 }
706
708 {
709 auto & active_coupleable_matrix_tags =
711 for (auto tag : active_coupleable_matrix_tags)
712 {
713 _matrix_tags_dof_u[tag].resize(n);
715 if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag))
716 {
717 mooseAssert(_sys.getMatrix(tag).closed(),
718 "Matrix with tag '" + std::to_string(tag) + "' should be closed");
719 auto & mat = _sys.getMatrix(tag);
720 for (unsigned i = 0; i < n; i++)
721 for (unsigned j = 0; j < _count; j++)
722 _matrix_tags_dof_u[tag][i](j) = mat(_dof_indices[i] + j, _dof_indices[i] + j);
723 }
724 }
725 }
726
728 {
730 for (decltype(n) i = 0; i < n; ++i)
731 _dof_du_dot_du[i] = _sys.duDotDu(_var.number());
732 }
734 {
736 for (decltype(n) i = 0; i < n; ++i)
738 }
739}
void getArrayDofValues(const libMesh::NumericVector< libMesh::Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const

◆ fill()

template<typename OutputType >
template<bool constant_monomial, typename DestinationType , typename ShapeType , typename DofValuesType >
void MooseVariableData< OutputType >::fill ( DestinationType &  dest,
const ShapeType &  phi,
const DofValuesType &  dof_values,
unsigned int  nqp,
std::size_t  num_shapes 
)
private

Definition at line 419 of file MooseVariableData.C.

424{
425 if constexpr (constant_monomial)
426 libmesh_ignore(num_shapes);
427
428 // Deduce OutputType
429 constexpr bool is_real = std::is_same_v<OutputType, Real>;
430 constexpr bool is_real_vector = std::is_same_v<OutputType, RealVectorValue>;
431 constexpr bool is_eigen = std::is_same_v<OutputType, RealEigenVector>;
432 static_assert(is_real || is_real_vector || is_eigen, "Unsupported type");
433
434 // this is only used in the RealEigenVector case to get this->_count
435 if constexpr (!is_eigen)
436 libmesh_ignore(this);
437
438 // Deduce type of value within dest MooseArray
439 using dest_array_type = typename std::remove_reference_t<decltype(dest)>::value_type;
440 constexpr bool is_value =
441 std::is_same_v<dest_array_type, OutputType> ||
442 std::is_same_v<dest_array_type, typename Moose::ADType<OutputType>::type>;
443 constexpr bool is_gradient =
444 std::is_same_v<dest_array_type, OutputGradient> ||
445 std::is_same_v<dest_array_type, typename Moose::ADType<OutputGradient>::type>;
446 constexpr bool is_second =
447 std::is_same_v<dest_array_type, OutputSecond> ||
448 std::is_same_v<dest_array_type, typename Moose::ADType<OutputSecond>::type>;
449 constexpr bool is_divergence =
450 std::is_same_v<dest_array_type, OutputDivergence> ||
451 std::is_same_v<dest_array_type, typename Moose::ADType<OutputDivergence>::type>;
452 static_assert(is_value || is_gradient || is_second || is_divergence,
453 "Unsupported destination array type");
454
455 // Sets a value to zero at a quadrature point
456 const auto set_zero = [this, &dest](const auto qp)
457 {
458 if constexpr (!is_eigen)
459 libmesh_ignore(this);
460
461 if constexpr (is_real || is_real_vector)
462 dest[qp] = 0;
463 else if constexpr (is_eigen)
464 {
465 if constexpr (is_value)
466 dest[qp].setZero(this->_count);
467 else if constexpr (is_gradient)
468 dest[qp].setZero(this->_count, LIBMESH_DIM);
469 else if constexpr (is_second)
470 dest[qp].setZero(this->_count, LIBMESH_DIM * LIBMESH_DIM);
471 else
472 static_assert(Moose::always_false<OutputType, dest_array_type>, "Unsupported type");
473 }
474 else
475 static_assert(Moose::always_false<OutputType, dest_array_type>, "Unsupported type");
476 };
477
478 // Accumulates a value
479 const auto accumulate = [&dest, &phi, &dof_values](const auto i, const auto qp)
480 {
481 if constexpr (is_real || is_real_vector || (is_eigen && is_value))
482 {
483 if constexpr (is_value || is_divergence)
484 dest[qp] += phi[i][qp] * dof_values[i];
485 else if constexpr (is_gradient || is_second)
486 dest[qp].add_scaled(phi[i][qp], dof_values[i]);
487 else
488 static_assert(Moose::always_false<OutputType, dest_array_type>, "Unsupported type");
489 }
490 else if constexpr (is_eigen)
491 {
492 if constexpr (is_gradient)
493 {
494 for (const auto d : make_range(Moose::dim))
495 dest[qp].col(d) += phi[i][qp](d) * dof_values[i];
496 }
497 else if constexpr (is_second)
498 {
499 for (unsigned int d = 0, d1 = 0; d1 < LIBMESH_DIM; ++d1)
500 for (const auto d2 : make_range(Moose::dim))
501 dest[qp].col(d++) += phi[i][qp](d1, d2) * dof_values[i];
502 }
503 else
504 static_assert(Moose::always_false<OutputType, dest_array_type>, "Unsupported type");
505 }
506 else
507 static_assert(Moose::always_false<OutputType, dest_array_type>, "Unsupported type");
508 };
509
510 dest.resize(nqp);
511
512 // Monomial case, accumulate dest[0] and set dest[>0] to dest[0]
513 if constexpr (constant_monomial)
514 {
515 mooseAssert(num_shapes == 1, "Should have only one shape function for a constant monomial");
516 set_zero(0);
517 accumulate(0, 0);
518 for (unsigned int qp = 1; qp < nqp; ++qp)
519 dest[qp] = dest[0];
520 }
521 // Non constant monomial case
522 else
523 {
524 for (const auto qp : make_range(nqp))
525 set_zero(qp);
526 for (const auto i : make_range(num_shapes))
527 for (const auto qp : make_range(nqp))
528 accumulate(i, qp);
529 }
530}
unsigned int dim
const FieldVariablePhiValue & phi() const
phi getter
void libmesh_ignore(const Args &...)

◆ getArrayDofValues()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::getArrayDofValues ( const libMesh::NumericVector< libMesh::Number > &  sol,
unsigned int  n,
MooseArray< RealEigenVector > &  dof_values 
) const
protectedinherited

Definition at line 649 of file MooseVariableDataBase.C.

652{
653 dof_values.resize(nshapes);
654 for (const auto i : make_range(nshapes))
655 {
656 dof_values[i].resize(_count);
657 for (const auto j : make_range(_count))
658 dof_values[i](j) = sol(_dof_indices[j * nshapes + i]);
659 }
660}

◆ getContinuity()

template<typename OutputType >
libMesh::FEContinuity MooseVariableData< OutputType >::getContinuity ( ) const
inlineoverridevirtual

Return the variable continuity.

Implements MooseVariableDataBase< OutputType >.

Definition at line 247 of file MooseVariableData.h.

247{ return _continuity; };

◆ getDofIndices()

template<typename OutputType >
void MooseVariableData< OutputType >::getDofIndices ( const Elem *  elem,
std::vector< dof_id_type > &  dof_indices 
) const

Definition at line 1083 of file MooseVariableData.C.

1085{
1086 if constexpr (std::is_same<OutputType, RealEigenVector>::value)
1087 _dof_map.array_dof_indices(elem, dof_indices, _var_num);
1088 else
1089 _dof_map.dof_indices(elem, dof_indices, _var_num);
1090}
const libMesh::DofMap & _dof_map
The degree of freedom map from libMesh.
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
void array_dof_indices(const Elem *const elem, std::vector< dof_id_type > &di, const unsigned int vn, int p_level=-12345) const

◆ getElementalValue() [1/2]

RealEigenVector MooseVariableData< RealEigenVector >::getElementalValue ( const Elem *  elem,
const Moose::SolutionState  state,
const unsigned int  idx 
) const

Definition at line 1040 of file MooseVariableData.C.

1043{
1045 "getElementalValue has a really bad API name. It is retrieving a value from the solution "
1046 "vector for a particular dof index. Generally speaking it has absolutely no equivalence to "
1047 "an 'elemental' value, which most people would consider to be something like an element "
1048 "average value");
1049
1050 static thread_local std::vector<dof_id_type> dof_indices;
1051 _dof_map.array_dof_indices(elem, dof_indices, _var_num);
1052 mooseAssert(dof_indices.size() % _count == 0,
1053 "The number of array dof indices should divide cleanly by the variable count");
1054 const auto num_shapes = dof_indices.size() / _count;
1055
1057
1058 switch (state)
1059 {
1060 case Moose::Current:
1061 for (unsigned int i = 0; i < _count; ++i)
1062 v(i) = (*_sys.currentSolution())(dof_indices[i * num_shapes + idx]);
1063 break;
1064
1065 case Moose::Old:
1066 for (unsigned int i = 0; i < _count; ++i)
1067 v(i) = _sys.solutionOld()(dof_indices[i * num_shapes + idx]);
1068 break;
1069
1070 case Moose::Older:
1071 for (unsigned int i = 0; i < _count; ++i)
1072 v(i) = _sys.solutionOlder()(dof_indices[i * num_shapes + idx]);
1073 break;
1074
1075 default:
1076 mooseError("PreviousNL not currently supported for getElementalValue");
1077 }
1078 return v;
1079}
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition MooseError.h:363
NumericVector< Number > & solutionOld()
Definition SystemBase.h:216
NumericVector< Number > & solutionOlder()
Definition SystemBase.h:217
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition MooseTypes.h:147

◆ getElementalValue() [2/2]

template<typename OutputType >
MooseVariableData< OutputType >::DofValue MooseVariableData< OutputType >::getElementalValue ( const Elem *  elem,
Moose::SolutionState  state,
unsigned int  idx = 0 
) const

Definition at line 1015 of file MooseVariableData.C.

1018{
1019 static thread_local std::vector<dof_id_type> dof_indices;
1020 _dof_map.dof_indices(elem, dof_indices, _var_num);
1021
1022 switch (state)
1023 {
1024 case Moose::Current:
1025 return (*_sys.currentSolution())(dof_indices[idx]);
1026
1027 case Moose::Old:
1028 return _sys.solutionOld()(dof_indices[idx]);
1029
1030 case Moose::Older:
1031 return _sys.solutionOlder()(dof_indices[idx]);
1032
1033 default:
1034 mooseError("PreviousNL not currently supported for getElementalValue");
1035 }
1036}

◆ getNodalValue() [1/2]

template<typename OutputType >
MooseVariableData< OutputType >::DofValue MooseVariableData< OutputType >::getNodalValue ( const Node &  node,
Moose::SolutionState  state 
) const

Definition at line 944 of file MooseVariableData.C.

945{
946 mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
947
948 // Make sure that the node has DOFs
949 /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
950 * produce a better error (see misc/check_error.node_value_off_block) */
951 mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
952 "Node " << node.id() << " does not contain any dofs for the "
953 << _sys.system().variable_name(_var_num) << " variable");
954
955 dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
956
957 switch (state)
958 {
959 case Moose::Current:
960 return (*_sys.currentSolution())(dof);
961
962 case Moose::Old:
963 return _sys.solutionOld()(dof);
964
965 case Moose::Older:
966 return _sys.solutionOlder()(dof);
967
968 default:
969 mooseError("PreviousNL not currently supported for getNodalValue");
970 }
971}
bool isSemiLocal(Node *const node) const
Returns true if the node is semi-local.
Definition MooseMesh.C:1003
virtual MooseMesh & mesh()=0
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
const std::string & variable_name(const unsigned int i) const
uint8_t dof_id_type

◆ getNodalValue() [2/2]

RealEigenVector MooseVariableData< RealEigenVector >::getNodalValue ( const Node &  node,
Moose::SolutionState  state 
) const

Definition at line 975 of file MooseVariableData.C.

977{
978 mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
979
980 // Make sure that the node has DOFs
981 /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
982 * produce a better error (see misc/check_error.node_value_off_block) */
983 mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
984 "Node " << node.id() << " does not contain any dofs for the "
985 << _sys.system().variable_name(_var_num) << " variable");
986
987 dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
988
990 switch (state)
991 {
992 case Moose::Current:
993 for (unsigned int i = 0; i < _count; ++i)
994 v(i) = (*_sys.currentSolution())(dof++);
995 break;
996
997 case Moose::Old:
998 for (unsigned int i = 0; i < _count; ++i)
999 v(i) = _sys.solutionOld()(dof++);
1000 break;
1001
1002 case Moose::Older:
1003 for (unsigned int i = 0; i < _count; ++i)
1004 v(i) = _sys.solutionOlder()(dof++);
1005 break;
1006
1007 default:
1008 mooseError("PreviousNL not currently supported for getNodalValue");
1009 }
1010 return v;
1011}

◆ gradPhi()

template<typename OutputType >
const FieldVariablePhiGradient & MooseVariableData< OutputType >::gradPhi ( ) const
inline

grad_phi getter

Definition at line 150 of file MooseVariableData.h.

150{ return *_grad_phi; }

◆ gradPhiFace()

template<typename OutputType >
const FieldVariablePhiGradient & MooseVariableData< OutputType >::gradPhiFace ( ) const
inline

grad_phi_face getter

Definition at line 164 of file MooseVariableData.h.

164{ return *_grad_phi_face; }

◆ gradSln()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableGradient & MooseVariableDataBase< OutputType >::gradSln ( Moose::SolutionState  state) const
inherited

Local solution gradient getter.

Parameters
stateThe state of the simulation: current, old, older, previous nl

Definition at line 329 of file MooseVariableDataBase.C.

330{
331 auto functor = [this](TagID tag_id) -> const FieldVariableGradient &
332 { return vectorTagGradient(tag_id); };
333
334 _var.requireQpComputations();
335
336 return const_cast<MooseVariableDataBase<OutputType> *>(this)
337 ->stateToTagHelper<FieldVariableGradient>(state, functor);
338}
unsigned int TagID
Definition MooseTypes.h:238
MooseArray< OutputGradient > FieldVariableGradient
const FieldVariableGradient & vectorTagGradient(TagID tag) const

◆ gradSlnDot()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableGradient & MooseVariableData< OutputType >::gradSlnDot ( ) const

Local time derivative of solution gradient getter.

Definition at line 237 of file MooseVariableData.C.

238{
239 if (_sys.solutionUDot())
240 {
241 _need_grad_dot = true;
242 return _grad_u_dot;
243 }
244 else
245 mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
246 "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
247}

◆ gradSlnDotDot()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableGradient & MooseVariableData< OutputType >::gradSlnDotDot ( ) const

Local second time derivative of solution gradient getter.

Definition at line 251 of file MooseVariableData.C.

252{
253 if (_sys.solutionUDotDot())
254 {
255 _need_grad_dotdot = true;
256 return _grad_u_dotdot;
257 }
258 else
259 mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
260 "Please set uDotDotRequested() to true in FEProblemBase before requesting "
261 "`u_dotdot`.");
262}

◆ hasDoFsOnNodes()

template<typename OutputType >
bool MooseVariableData< OutputType >::hasDoFsOnNodes ( ) const
inlineoverridevirtual

Whether this data is associated with a variable that has DoFs on nodes.

Implements MooseVariableDataBase< OutputType >.

Definition at line 246 of file MooseVariableData.h.

◆ increment()

template<typename OutputType >
const FieldVariableValue & MooseVariableData< OutputType >::increment ( ) const
inline

Increment getter.

Returns
The increment

Definition at line 479 of file MooseVariableData.h.

479{ return _increment; }

◆ insert() [1/2]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::insert ( libMesh::NumericVector< libMesh::Number > &  residual)
inherited

Set the current local DOF values to the input vector.

Definition at line 436 of file MooseVariableDataBase.C.

437{
438 if (_has_dof_values)
439 {
440 const auto & dof_values = _vector_tags_dof_u[_solution_tag];
441 mooseAssert(dof_values.size() == _dof_indices.size(),
442 "Degree of freedom values size and degree of freedom indices sizes must match.");
443 residual.insert(&dof_values[0], _dof_indices);
444 }
445}
virtual void insert(const T *v, const std::vector< numeric_index_type > &dof_indices)

◆ insert() [2/2]

void MooseVariableDataBase< RealEigenVector >::insert ( NumericVector< Number > &  residual)
inherited

Definition at line 449 of file MooseVariableDataBase.C.

450{
451 if (_has_dof_values)
452 {
453 const auto & dof_values = _vector_tags_dof_u[_solution_tag];
454 mooseAssert(_dof_indices.size() % _count == 0,
455 "Dof indices should be cleanly divisible by the variable count");
456 const auto n_shapes = _dof_indices.size() / _count;
457 for (const auto indx : index_range(_dof_indices))
458 {
459 const auto i = indx % n_shapes;
460 const auto j = indx / n_shapes;
461 residual.set(_dof_indices[indx], dof_values[i](j));
462 }
463 }
464}
virtual void set(const numeric_index_type i, const T value)=0

◆ insertNodalValue() [1/2]

template<typename OutputType >
void MooseVariableData< OutputType >::insertNodalValue ( libMesh::NumericVector< libMesh::Number > &  residual,
const DofValue &  v 
)

Write a nodal value to the passed-in solution vector.

Definition at line 927 of file MooseVariableData.C.

929{
930 residual.set(_nodal_dof_index, v);
931}
dof_id_type _nodal_dof_index
The dof index for the current node.

◆ insertNodalValue() [2/2]

void MooseVariableData< RealEigenVector >::insertNodalValue ( NumericVector< Number > &  residual,
const RealEigenVector &  v 
)

Definition at line 935 of file MooseVariableData.C.

937{
938 for (const auto j : make_range(_count))
939 residual.set(_nodal_dof_index + j, v(j));
940}

◆ insertSolutionTag()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::insertSolutionTag ( TagID  tag_id)
protectedinherited

insert a solution tag into our tag containers

Definition at line 330 of file MooseVariableDataBase.h.

331{
332 _solution_tags.insert(tag_id);
333 _required_vector_tags.insert(tag_id);
334}
std::set< TagID > _solution_tags
The set of solution tags we need to evaluate.

Referenced by MooseVariableDataBase< OutputType >::MooseVariableDataBase().

◆ isNodal()

template<typename OutputType >
bool MooseVariableData< OutputType >::isNodal ( ) const
inlineoverridevirtual
Returns
Whether this data is associated with a nodal variable

Implements MooseVariableDataBase< OutputType >.

Definition at line 245 of file MooseVariableData.h.

245{ return _is_nodal; }

◆ isNodalDefined()

template<typename OutputType >
bool MooseVariableData< OutputType >::isNodalDefined ( ) const
inline

Definition at line 250 of file MooseVariableData.h.

250{ return _has_dof_indices; }

◆ matrixTagValue()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableValue & MooseVariableDataBase< OutputType >::matrixTagValue ( TagID  tag) const
inherited

Definition at line 232 of file MooseVariableDataBase.C.

233{
234 if (tag >= _matrix_tag_u.size())
235 {
236 _need_matrix_tag_u.resize(tag + 1, false);
237 const_cast<MooseVariableDataBase<OutputType> *>(this)->_matrix_tag_u.resize(tag + 1);
238 }
239
240 _var.requireQpComputations();
241
242 _need_matrix_tag_u[tag] = true;
243
244 if (_sys.hasMatrix(tag))
245 return _matrix_tag_u[tag];
246 else
247 mooseError("Tag ", tag, " is not associated with any matrix for variable ", _var.name());
248}

◆ needADGradPhiFace()

template<typename OutputType >
void MooseVariableData< OutputType >::needADGradPhiFace ( ) const
private

Ask the assembly to compute the AD face shape function gradients, which this variable's AD gradient and AD face test function gradients are built from.

Definition at line 140 of file MooseVariableData.C.

141{
143}
void needADGradPhiFace() const
Request that face reinitialization compute the AD shape function gradients.
Definition Assembly.h:1675

Referenced by MooseVariableData< OutputType >::adGradSlnFace().

◆ needsAD()

template<typename OutputType >
bool MooseVariableData< OutputType >::needsAD ( ) const
inline

Returns whether this data structure needs automatic differentiation calculations.

Definition at line 104 of file MooseVariableData.h.

104{ return _need_ad; }

◆ needSolutionState()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::needSolutionState ( unsigned int  state)
protectedinherited

Request that we have at least state number of older solution states/vectors.

Definition at line 259 of file MooseVariableDataBase.C.

260{
261 if (state > _max_state)
262 {
263 _sys.needSolutionState(state);
264 _max_state = state;
265 }
266}
unsigned int _max_state
The maximum number of older solution states our variable needs.
virtual void needSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time, libMesh::ParallelType parallel_type=GHOSTED)
Registers that the solution state state is needed.

◆ nodalDofIndex()

template<typename OutputType >
const dof_id_type & MooseVariableData< OutputType >::nodalDofIndex ( ) const
inline

Definition at line 249 of file MooseVariableData.h.

249{ return _nodal_dof_index; }

◆ nodalMatrixTagValue()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DofValues & MooseVariableDataBase< OutputType >::nodalMatrixTagValue ( TagID  tag) const
inherited

Definition at line 123 of file MooseVariableDataBase.C.

124{
125 if (isNodal())
126 {
127 if (tag >= _matrix_tags_dof_u.size())
128 {
129 _need_matrix_tag_dof_u.resize(tag + 1, false);
130 const_cast<MooseVariableDataBase<OutputType> *>(this)->_matrix_tags_dof_u.resize(tag + 1);
131 }
132
133 _need_matrix_tag_dof_u[tag] = true;
134
135 if (_sys.hasMatrix(tag))
136 return _matrix_tags_dof_u[tag];
137 else
139 "Tag ", tag, " is not associated with any matrix for nodal variable ", _var.name());
140 }
141 else
142 mooseError("Nodal values can be requested only on nodal variables, variable '",
143 _var.name(),
144 "' is not nodal.");
145}
virtual bool isNodal() const =0

◆ nodalValue()

template<typename OutputType >
const OutputType & MooseVariableDataBase< OutputType >::nodalValue ( Moose::SolutionState  state) const
inherited

Definition at line 498 of file MooseVariableDataBase.C.

499{
500 if (isNodal())
501 {
502 // Request the correct solution states and data members
503 vectorTagDofValue(state);
504 switch (state)
505 {
506 case Moose::Current:
507 return _nodal_value;
508
509 case Moose::Old:
510 return _nodal_value_old;
511
512 case Moose::Older:
513 return _nodal_value_older;
514
517
518 default:
519 // We should never get here but gcc requires that we have a default. See
520 // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
521 mooseError("Unknown SolutionState!");
522 }
523 }
524 else
525 mooseError("Nodal values can be requested only on nodal variables, variable '",
526 _var.name(),
527 "' is not nodal.");
528}

◆ nodalValueArray()

template<typename OutputType >
const MooseArray< OutputType > & MooseVariableDataBase< OutputType >::nodalValueArray ( Moose::SolutionState  state) const
inherited

Definition at line 532 of file MooseVariableDataBase.C.

533{
534 if (isNodal())
535 {
536 // Request the correct solution states and data members
537 vectorTagDofValue(state);
538 switch (state)
539 {
540 case Moose::Current:
541 return _nodal_value_array;
542
543 case Moose::Old:
545
546 case Moose::Older:
548
549 default:
550 mooseError("No current support for PreviousNL for nodal value array");
551 }
552 }
553 else
554 mooseError("Nodal values can be requested only on nodal variables, variable '",
555 _var.name(),
556 "' is not nodal.");
557}

◆ nodalValueDot()

template<typename OutputType >
const OutputType & MooseVariableData< OutputType >::nodalValueDot ( ) const

Definition at line 1267 of file MooseVariableData.C.

1268{
1269 if (isNodal())
1270 {
1271 if (_sys.solutionUDot())
1272 {
1273 _need_dof_values_dot = true;
1274 return _nodal_value_dot;
1275 }
1276 else
1277 mooseError(
1278 "MooseVariableData: Time derivative of solution (`u_dot`) is not stored. Please set "
1279 "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
1280 }
1281 else
1282 mooseError("Nodal values can be requested only on nodal variables, variable '",
1283 var().name(),
1284 "' is not nodal.");
1285}
std::string name(const ElemQuality q)

◆ nodalValueDotDot()

template<typename OutputType >
const OutputType & MooseVariableData< OutputType >::nodalValueDotDot ( ) const

Definition at line 1289 of file MooseVariableData.C.

1290{
1291 if (isNodal())
1292 {
1293 if (_sys.solutionUDotDot())
1294 {
1296 return _nodal_value_dotdot;
1297 }
1298 else
1299 mooseError(
1300 "MooseVariableData: Second time derivative of solution (`u_dotdot`) is not stored. "
1301 "Please set uDotDotRequested() to true in FEProblemBase before requesting "
1302 "`u_dotdot`.");
1303 }
1304 else
1305 mooseError("Nodal values can be requested only on nodal variables, variable '",
1306 var().name(),
1307 "' is not nodal.");
1308}

◆ nodalValueDotDotOld()

template<typename OutputType >
const OutputType & MooseVariableData< OutputType >::nodalValueDotDotOld ( ) const

Definition at line 1334 of file MooseVariableData.C.

1335{
1336 if (isNodal())
1337 {
1339 {
1342 }
1343 else
1344 mooseError(
1345 "MooseVariableData: Old second time derivative of solution (`u_dotdot_old`) is not "
1346 "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
1347 "requesting `u_dotdot_old`.");
1348 }
1349 else
1350 mooseError("Nodal values can be requested only on nodal variables, variable '",
1351 var().name(),
1352 "' is not nodal.");
1353}

◆ nodalValueDotOld()

template<typename OutputType >
const OutputType & MooseVariableData< OutputType >::nodalValueDotOld ( ) const

Definition at line 1312 of file MooseVariableData.C.

1313{
1314 if (isNodal())
1315 {
1316 if (_sys.solutionUDotOld())
1317 {
1319 return _nodal_value_dot_old;
1320 }
1321 else
1322 mooseError("MooseVariableData: Old time derivative of solution (`u_dot_old`) is not stored. "
1323 "Please set uDotOldRequested() to true in FEProblemBase before requesting "
1324 "`u_dot_old`.");
1325 }
1326 else
1327 mooseError("Nodal values can be requested only on nodal variables, variable '",
1328 var().name(),
1329 "' is not nodal.");
1330}

◆ nodalValueDuDotDotDu()

template<typename OutputType >
const OutputType & MooseVariableData< OutputType >::nodalValueDuDotDotDu ( ) const

◆ nodalValueDuDotDu()

template<typename OutputType >
const OutputType & MooseVariableData< OutputType >::nodalValueDuDotDu ( ) const

◆ nodalVectorTagValue()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DofValues & MooseVariableDataBase< OutputType >::nodalVectorTagValue ( TagID  tag) const
inherited

Definition at line 100 of file MooseVariableDataBase.C.

101{
102 if (isNodal())
103 {
104 if (tag >= _need_vector_tag_dof_u.size())
106
107 _need_vector_tag_dof_u[tag] = true;
108
109 if (_sys.hasVector(tag))
110 return _vector_tags_dof_u[tag];
111 else
113 "Tag ", tag, " is not associated with any vector for nodal variable ", _var.name());
114 }
115 else
116 mooseError("Nodal values can be requested only on nodal variables, variable '",
117 _var.name(),
118 "' is not nodal.");
119}
void resizeVectorTagData(TagID tag)
resize the vector tag need flags and data containers to accomodate this tag index

◆ node()

template<typename OutputType >
const Node *const & MooseVariableData< OutputType >::node ( ) const
inline

Definition at line 248 of file MooseVariableData.h.

248{ return _node; }

◆ numberOfDofs()

template<typename OutputType >
unsigned int MooseVariableData< OutputType >::numberOfDofs ( ) const
inline

Definition at line 424 of file MooseVariableData.h.

424{ return _dof_indices.size(); }

◆ oldestSolutionStateRequested()

template<typename OutputType >
unsigned int MooseVariableDataBase< OutputType >::oldestSolutionStateRequested ( ) const
inherited

The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).

Definition at line 252 of file MooseVariableDataBase.C.

253{
254 return _max_state;
255}

◆ phi()

template<typename OutputType >
const FieldVariablePhiValue & MooseVariableData< OutputType >::phi ( ) const
inline

phi getter

Definition at line 140 of file MooseVariableData.h.

140{ return *_phi; }

◆ phiFace()

template<typename OutputType >
const FieldVariablePhiValue & MooseVariableData< OutputType >::phiFace ( ) const
inline

phi_face getter

Definition at line 145 of file MooseVariableData.h.

145{ return *_phi_face; }

◆ phiFaceSize()

template<typename OutputType >
std::size_t MooseVariableData< OutputType >::phiFaceSize ( ) const
inline

Return phiFace size.

Definition at line 223 of file MooseVariableData.h.

223{ return _phi_face->size(); }

◆ phiSize()

template<typename OutputType >
std::size_t MooseVariableData< OutputType >::phiSize ( ) const
inline

Return phi size.

Definition at line 218 of file MooseVariableData.h.

218{ return _phi->size(); }

◆ prepare()

template<typename OutputType >
void MooseVariableData< OutputType >::prepare ( )

Get the dof indices corresponding to the current element.

Definition at line 1413 of file MooseVariableData.C.

1414{
1415 if constexpr (std::is_same<OutputType, RealEigenVector>::value)
1417 else
1419
1420 _has_dof_values = false;
1421
1422 // FIXME: remove this when the Richard's module is migrated to use the new NodalCoupleable
1423 // interface.
1425}

◆ prepareAux()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::prepareAux ( )
inlineinherited

Clear aux state.

Definition at line 142 of file MooseVariableDataBase.h.

142{ _has_dof_values = false; }

◆ prepareIC()

template<typename OutputType >
void MooseVariableData< OutputType >::prepareIC ( )

prepare the initial condition

Definition at line 1395 of file MooseVariableData.C.

1396{
1397 if constexpr (std::is_same<RealEigenVector, OutputType>::value)
1399 else
1401
1402 mooseAssert(_dof_indices.size() % _count == 0,
1403 "The number of dof indices should divide cleanly by the variable count");
1404 const auto num_shapes = _dof_indices.size() / _count;
1405 _vector_tags_dof_u[_solution_tag].resize(num_shapes);
1406
1407 unsigned int nqp = _qrule->n_points();
1408 _vector_tag_u[_solution_tag].resize(nqp);
1409}

◆ reinitAux()

template<typename OutputType >
void MooseVariableData< OutputType >::reinitAux ( )

Prepare dof indices and solution values for elemental auxiliary variables.

Definition at line 1450 of file MooseVariableData.C.

1451{
1452 /* FIXME: this method is only for elemental auxiliary variables, so
1453 * we may want to rename it */
1454 if (_elem)
1455 {
1456 if constexpr (std::is_same<RealEigenVector, OutputType>::value)
1458 else
1460 if (_elem->n_dofs(_sys.number(), _var_num) > 0)
1461 {
1462 // FIXME: Setting _nodal_dof_index inside of a method that apparently is only for "elemental"
1463 // aux variables seems absolutely absurd
1465
1467
1468 mooseAssert(_dof_indices.size() % _count == 0,
1469 "The number of dof indices should be cleanly divisible by the variable count");
1470 const auto num_shapes = _dof_indices.size() / _count;
1471 for (auto & dof_u : _vector_tags_dof_u)
1472 dof_u.resize(num_shapes);
1473
1474 for (auto & dof_u : _matrix_tags_dof_u)
1475 dof_u.resize(num_shapes);
1476
1477 _has_dof_indices = true;
1478 }
1479 else
1480 _has_dof_indices = false;
1481 }
1482 else
1483 _has_dof_indices = false;
1484}

◆ reinitNode()

template<typename OutputType >
void MooseVariableData< OutputType >::reinitNode ( )

Prepare degrees of freedom for the current node.

Definition at line 1429 of file MooseVariableData.C.

1430{
1431 if constexpr (std::is_same<OutputType, RealEigenVector>::value)
1433 else
1435
1436 const auto n_dofs = _dof_indices.size();
1437 if (n_dofs)
1438 {
1439 // For standard variables. _nodal_dof_index is retrieved by nodalDofIndex() which is used in
1440 // NodalBC for example
1442 _has_dof_indices = true;
1443 }
1444 else
1445 _has_dof_indices = false;
1446}

◆ reinitNodes()

template<typename OutputType >
void MooseVariableData< OutputType >::reinitNodes ( const std::vector< dof_id_type > &  nodes)

Set _dof_indices to the degrees of freedom existing on the passed-in nodes.

Parameters
nodesThe nodes to grab the degrees of freedom for

Definition at line 1488 of file MooseVariableData.C.

1489{
1490 _dof_indices.clear();
1491 for (const auto & node_id : nodes)
1492 {
1493 auto && nd = _subproblem.mesh().getMesh().query_node_ptr(node_id);
1494 if (nd && (_subproblem.mesh().isSemiLocal(const_cast<Node *>(nd))))
1495 {
1496 if (nd->n_dofs(_sys.number(), _var_num) > 0)
1497 {
1498 if constexpr (std::is_same<RealEigenVector, OutputType>::value)
1499 {
1500 static thread_local std::vector<dof_id_type> dof_indices;
1501 _dof_map.array_dof_indices(nd, dof_indices, _var_num);
1502 for (const auto dof : dof_indices)
1503 _dof_indices.push_back(dof);
1504 }
1505 else
1506 {
1507 dof_id_type dof = nd->dof_number(_sys.number(), _var_num, 0);
1508 _dof_indices.push_back(dof);
1509 }
1510 }
1511 }
1512 }
1513
1514 if (!_dof_indices.empty())
1515 _has_dof_indices = true;
1516 else
1517 _has_dof_indices = false;
1518}
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition MooseMesh.C:3512

◆ resizeVectorTagData()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::resizeVectorTagData ( TagID  tag)
protectedinherited

resize the vector tag need flags and data containers to accomodate this tag index

Definition at line 149 of file MooseVariableDataBase.C.

150{
151 mooseAssert(_need_vector_tag_dof_u.size() == _need_vector_tag_u.size() &&
154 _need_vector_tag_dof_u.size() == _vector_tag_u.size() &&
156 "These sizes should be in sync.");
157
158 auto check_capacity = [tag](const auto & vector_to_check)
159 {
160 if (tag + 1 > vector_to_check.capacity())
161 mooseError("New size greater than tag capacity. This will cause reallocation which will "
162 "invalidate any stored references.");
163 };
164 check_capacity(_need_vector_tag_dof_u);
165 check_capacity(_need_vector_tag_u);
166 check_capacity(_need_vector_tag_grad);
167 check_capacity(_vector_tags_dof_u);
168 check_capacity(_vector_tag_u);
169 check_capacity(_vector_tag_grad);
170
171 _need_vector_tag_dof_u.resize(tag + 1, false);
172 _need_vector_tag_u.resize(tag + 1, false);
173 _need_vector_tag_grad.resize(tag + 1, false);
174 _vector_tags_dof_u.resize(tag + 1);
175 _vector_tag_u.resize(tag + 1);
176 _vector_tag_grad.resize(tag + 1);
177}

◆ secondPhi()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariablePhiSecond & MooseVariableData< OutputType >::secondPhi ( ) const

second_phi getter

Definition at line 367 of file MooseVariableData.C.

368{
370 return *_second_phi;
371}
const FieldVariablePhiSecond * _second_phi

Referenced by MooseVariableData< OutputType >::adSecondSln().

◆ secondPhiFace()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariablePhiSecond & MooseVariableData< OutputType >::secondPhiFace ( ) const

second_phi_face getter

Definition at line 375 of file MooseVariableData.C.

376{
378 return *_second_phi_face;
379}
const FieldVariablePhiSecond * _second_phi_face

Referenced by MooseVariableData< OutputType >::adSecondSln().

◆ secondSln()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableSecond & MooseVariableData< OutputType >::secondSln ( Moose::SolutionState  state) const

Local solution second spatial derivative getter.

Parameters
stateThe state of the simulation: current, old, older, previous nl

Definition at line 266 of file MooseVariableData.C.

267{
268 secondPhi();
270 switch (state)
271 {
272 case Moose::Current:
273 {
274 _need_second = true;
275 return _second_u;
276 }
277
278 case Moose::Old:
279 {
280 _need_second_old = true;
281 return _second_u_old;
282 }
283
284 case Moose::Older:
285 {
286 _need_second_older = true;
287 return _second_u_older;
288 }
289
291 {
294 }
295
296 default:
297 // We should never get here but gcc requires that we have a default. See
298 // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
299 mooseError("Unknown SolutionState!");
300 }
301}

◆ setActiveTags()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::setActiveTags ( const std::set< TagID > &  vtags)
inherited

Set the active vector tags.

Parameters
vtagsAdditional vector tags that this variable will need to query at dof indices for, in addition to our own required solution tags

Definition at line 314 of file MooseVariableDataBase.h.

315{
317 for (const auto tag : vtags)
319
320 if (!_required_vector_tags.empty())
321 {
322 const auto largest_tag_id = *_required_vector_tags.rbegin();
323 if (largest_tag_id >= _need_vector_tag_dof_u.size())
324 resizeVectorTagData(largest_tag_id);
325 }
326}
void insert(libMesh::NumericVector< libMesh::Number > &residual)
Set the current local DOF values to the input vector.

◆ setDofValue()

template<typename OutputType >
void MooseVariableData< OutputType >::setDofValue ( const DofValue &  value,
unsigned int  index 
)

dof value setters

Definition at line 889 of file MooseVariableData.C.

890{
891 auto & dof_values = _vector_tags_dof_u[_solution_tag];
892 dof_values[index] = value;
893 _has_dof_values = true;
894
895 auto & u = _vector_tag_u[_solution_tag];
896 const auto nqps = u.size();
897 const auto ndofs = dof_values.size();
898 for (const auto qp : make_range(nqps))
899 u[qp] *= 0.;
900 for (const auto qp : make_range(nqps))
901 for (const auto i : make_range(ndofs))
902 u[qp] += (*_phi)[i][qp] * dof_values[i];
903}
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ setDofValues()

template<typename OutputType >
void MooseVariableData< OutputType >::setDofValues ( const DenseVector< DofValue > &  values)

Set local DOF values and evaluate the values on quadrature points.

Definition at line 907 of file MooseVariableData.C.

908{
909 auto & dof_values = _vector_tags_dof_u[_solution_tag];
910 for (unsigned int i = 0; i < values.size(); i++)
911 dof_values[i] = values(i);
912
913 _has_dof_values = true;
914
915 auto & u = _vector_tag_u[_solution_tag];
916 const auto nqps = u.size();
917 const auto ndofs = dof_values.size();
918 for (const auto qp : make_range(nqps))
919 u[qp] *= 0.;
920 for (const auto qp : make_range(nqps))
921 for (const auto i : make_range(ndofs))
922 u[qp] += (*_phi)[i][qp] * dof_values[i];
923}
std::array< Real, 2 > values
Definition MortarUtils.C:52

◆ setGeometry()

template<typename OutputType >
void MooseVariableData< OutputType >::setGeometry ( Moose::GeometryType  gm_type)

Set the geometry type before calculating variables values.

Parameters
gm_typeThe type type of geometry; either Volume or Face

Definition at line 147 of file MooseVariableData.C.

◆ setNodalValue() [1/2]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::setNodalValue ( const OutputType &  value)
inherited

Set nodal value.

Definition at line 382 of file MooseVariableDataBase.C.

383{
384 // dof_values here is indexed per shape function, with each entry holding all _count array
385 // components packed into a single OutputType value. setNodalValue writes only one shape
386 // function's value, so it is only valid for a variable with a single shape function, e.g. a
387 // nodal Lagrange variable or a CONSTANT-order elemental variable; a variable with more than
388 // one shape function must use setDofValues instead. A subparametric variable, e.g. the pressure
389 // of a Taylor-Hood pair, has nodes on its elements that carry none of its degrees of freedom;
390 // callers query isNodalDefined() to skip those nodes before reaching this method.
391 mooseAssert(_dof_indices.size() == _count,
392 "setNodalValue is only valid for a variable with one shape function per node");
393 auto & dof_values = _vector_tags_dof_u[_solution_tag];
394 dof_values.resize(/*n_shapes=*/1);
395 dof_values[0] = value; // update variable nodal value
396 _has_dof_values = true;
398
399 // Update the qp values as well
400 auto & u = _vector_tag_u[_solution_tag];
401 for (unsigned int qp = 0; qp < u.size(); qp++)
402 u[qp] = value;
403}

◆ setNodalValue() [2/2]

void MooseVariableDataBase< RealVectorValue >::setNodalValue ( const RealVectorValue &  value)
inherited

Definition at line 407 of file MooseVariableDataBase.C.

408{
409 // Unlike the generic implementation above, a vector-valued variable is never an array
410 // variable, so _count is always 1 and dof_values is indexed per component of the vector
411 // rather than per shape function -- each shape function contributes one raw degree of
412 // freedom per component given the finite element family and order constraints we set below.
413 mooseAssert(_count == 1, "Vector-valued variables cannot be array variables");
414 mooseAssert(
415 _var.feType().family == LAGRANGE_VEC ||
416 (_var.feType().family == MONOMIAL_VEC && _var.feType().order == CONSTANT &&
417 (!_var.feType().p_refinement || !_subproblem.doingPRefinement())),
418 "setNodalValue only makes sense for LAGRANGE_VEC or non-p-refined CONSTANT MONOMIAL_VEC "
419 "vector variables");
420 mooseAssert(_dof_indices.size() <= _var.sys().mesh().getMesh().mesh_dimension(),
421 "The number of dof indices for a vector variable should be at most the mesh manifold "
422 "dimension. We cannot use an exact equality because it's possible the vector "
423 "variable could live on a lower-dimensional manifold.");
424
425 auto & dof_values = _vector_tags_dof_u[_solution_tag];
426 dof_values.resize(_dof_indices.size());
427 for (const auto i : index_range(dof_values))
428 dof_values[i] = value(i);
429
430 _has_dof_values = true;
432}
bool doingPRefinement() const

◆ sizeMatrixTagData()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::sizeMatrixTagData ( )
inherited

size matrix tag data

Definition at line 87 of file MooseVariableDataBase.C.

88{
89 auto num_matrix_tags = _subproblem.numMatrixTags();
90
91 _matrix_tags_dof_u.resize(num_matrix_tags);
92 _need_matrix_tag_dof_u.resize(num_matrix_tags, false);
93
94 _need_matrix_tag_u.resize(num_matrix_tags, false);
95 _matrix_tag_u.resize(num_matrix_tags);
96}
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition SubProblem.h:251

◆ sln()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableValue & MooseVariableDataBase< OutputType >::sln ( Moose::SolutionState  state) const
inherited

Local solution getter.

Parameters
stateThe state of the simulation: current, old, older, previous nl

Definition at line 316 of file MooseVariableDataBase.C.

317{
318 auto functor = [this](TagID tag_id) -> const FieldVariableValue &
319 { return vectorTagValue(tag_id); };
320
321 _var.requireQpComputations();
322
323 return const_cast<MooseVariableDataBase<OutputType> *>(this)
324 ->stateToTagHelper<FieldVariableValue>(state, functor);
325}
const FieldVariableValue & vectorTagValue(TagID tag) const
MooseArray< OutputType > FieldVariableValue

Referenced by MooseVariableDataFV< OutputType >::sln().

◆ stateToTagHelper()

template<typename OutputType >
template<typename ReturnType , typename Functor >
const ReturnType & MooseVariableDataBase< OutputType >::stateToTagHelper ( Moose::SolutionState  state,
Functor  functor 
)
protectedinherited

Helper method that converts a SolutionState argument into a corresponding tag ID, potentially requesting necessary additional solution states and assigning tag id data members, and then calls the provided functor with the tag ID.

Definition at line 271 of file MooseVariableDataBase.C.

273{
274 if (state > 0)
275 {
276 // We need to request all states that are between current and the requested state
277 stateToTagHelper<ReturnType>(Moose::SolutionState(static_cast<int>(state) - 1), functor);
278 needSolutionState(cast_int<unsigned int>(state));
279 }
280
281 switch (state)
282 {
283 case Moose::Current:
285
286 case Moose::Old:
287 {
290 return functor(_old_solution_tag);
291 }
292
293 case Moose::Older:
294 {
297 return functor(_older_solution_tag);
298 }
299
301 {
304 return functor(_previous_nl_solution_tag);
305 }
306
307 default:
308 // We should never get here but gcc requires that we have a default. See
309 // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
310 mooseError("Unknown SolutionState!");
311 }
312}
void insertSolutionTag(TagID tag_id)
insert a solution tag into our tag containers
void needSolutionState(unsigned int state)
Request that we have at least state number of older solution states/vectors.
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition SubProblem.C:195
const TagName OLDER_SOLUTION_TAG
Definition MooseTypes.C:27
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition MooseTypes.C:28
SolutionState
Definition MooseTypes.h:262
const TagName OLD_SOLUTION_TAG
Definition MooseTypes.C:26
const TagName SOLUTION_TAG
Definition MooseTypes.C:25

◆ uDot()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableValue & MooseVariableData< OutputType >::uDot ( ) const

Definition at line 178 of file MooseVariableData.C.

179{
180 if (_sys.solutionUDot())
181 {
182 _need_u_dot = true;
183 return _u_dot;
184 }
185 else
186 mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
187 "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
188}

◆ uDotDot()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableValue & MooseVariableData< OutputType >::uDotDot ( ) const

Definition at line 192 of file MooseVariableData.C.

193{
194 if (_sys.solutionUDotDot())
195 {
196 _need_u_dotdot = true;
197 return _u_dotdot;
198 }
199 else
200 mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
201 "Please set uDotDotRequested() to true in FEProblemBase before requesting "
202 "`u_dotdot`.");
203}

◆ uDotDotOld()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableValue & MooseVariableData< OutputType >::uDotDotOld ( ) const

Definition at line 222 of file MooseVariableData.C.

223{
225 {
226 _need_u_dotdot_old = true;
227 return _u_dotdot_old;
228 }
229 else
230 mooseError("MooseVariableFE: Old second time derivative of solution (`u_dotdot_old`) is not "
231 "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
232 "requesting `u_dotdot_old`");
233}

◆ uDotOld()

template<typename OutputType >
const MooseVariableData< OutputType >::FieldVariableValue & MooseVariableData< OutputType >::uDotOld ( ) const

Definition at line 207 of file MooseVariableData.C.

208{
209 if (_sys.solutionUDotOld())
210 {
211 _need_u_dot_old = true;
212 return _u_dot_old;
213 }
214 else
215 mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
216 "Please set uDotOldRequested() to true in FEProblemBase before requesting "
217 "`u_dot_old`.");
218}

◆ usesSecondPhi()

template<typename OutputType >
bool MooseVariableData< OutputType >::usesSecondPhi ( ) const
inline

Whether or not this variable is computing any second derivatives.

Definition at line 228 of file MooseVariableData.h.

◆ var()

template<typename OutputType >
virtual const MooseVariableField< OutputType > & MooseVariableDataBase< OutputType >::var ( ) const
inlineprotectedvirtualinherited
Returns
The variable to which the data in this class belongs to

Reimplemented in MooseVariableDataFV< OutputType >, and MooseVariableDataLinearFV< OutputType >.

Definition at line 153 of file MooseVariableDataBase.h.

153{ return _var; }

Referenced by MooseVariableData< OutputType >::arrayGradPhi(), and MooseVariableData< OutputType >::arrayGradPhiFace().

◆ vectorTagDofValue() [1/2]

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DofValues & MooseVariableDataBase< OutputType >::vectorTagDofValue ( Moose::SolutionState  state) const
inherited

Definition at line 342 of file MooseVariableDataBase.C.

343{
344 auto functor = [this](TagID tag_id) -> const DofValues & { return vectorTagDofValue(tag_id); };
345
346 _var.requireQpComputations();
347
348 return const_cast<MooseVariableDataBase<OutputType> *>(this)->stateToTagHelper<DofValues>(
349 state, functor);
350}
MooseArray< DofValue > DofValues

◆ vectorTagDofValue() [2/2]

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DofValues & MooseVariableDataBase< OutputType >::vectorTagDofValue ( TagID  tag) const
inherited

Definition at line 198 of file MooseVariableDataBase.C.

199{
200 if (tag >= _need_vector_tag_dof_u.size())
202
203 _var.requireQpComputations();
204
205 _need_vector_tag_dof_u[tag] = true;
206
207 if (_sys.hasVector(tag))
208 return _vector_tags_dof_u[tag];
209 else
210 mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
211}

◆ vectorTagGradient()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableGradient & MooseVariableDataBase< OutputType >::vectorTagGradient ( TagID  tag) const
inherited

Definition at line 215 of file MooseVariableDataBase.C.

216{
217 if (tag >= _need_vector_tag_grad.size())
219
220 _var.requireQpComputations();
221
222 _need_vector_tag_grad[tag] = true;
223
224 if (_sys.hasVector(tag))
225 return _vector_tag_grad[tag];
226 else
227 mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
228}

◆ vectorTagValue()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableValue & MooseVariableDataBase< OutputType >::vectorTagValue ( TagID  tag) const
inherited

Definition at line 181 of file MooseVariableDataBase.C.

182{
183 if (tag >= _need_vector_tag_u.size())
185
186 _var.requireQpComputations();
187
188 _need_vector_tag_u[tag] = true;
189
190 if (_sys.hasVector(tag))
191 return _vector_tag_u[tag];
192 else
193 mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
194}

◆ zeroSizeDofValues()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::zeroSizeDofValues ( )
protectedinherited

Definition at line 743 of file MooseVariableDataBase.C.

744{
746 {
753 }
754
755 for (auto & dof_values : _vector_tags_dof_u)
756 dof_values.resize(0);
757
758 _has_dof_values = false;
759}

Member Data Documentation

◆ _ad_curl_u

template<typename OutputType >
ADTemplateVariableCurl<OutputType> MooseVariableData< OutputType >::_ad_curl_u
private

Definition at line 624 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adCurlSln().

◆ _ad_dof_values

template<typename OutputType >
ADDofValues MooseVariableData< OutputType >::_ad_dof_values
private

Definition at line 616 of file MooseVariableData.h.

◆ _ad_dofs_dot

template<typename OutputType >
ADDofValues MooseVariableData< OutputType >::_ad_dofs_dot
private

Definition at line 617 of file MooseVariableData.h.

◆ _ad_dofs_dot_eigen

template<typename OutputType >
MooseArray<ADRealEigenVector> MooseVariableData< OutputType >::_ad_dofs_dot_eigen
private

Definition at line 618 of file MooseVariableData.h.

◆ _ad_dofs_dotdot

template<typename OutputType >
ADDofValues MooseVariableData< OutputType >::_ad_dofs_dotdot
private

Definition at line 619 of file MooseVariableData.h.

◆ _ad_dofs_dotdot_eigen

template<typename OutputType >
MooseArray<ADRealEigenVector> MooseVariableData< OutputType >::_ad_dofs_dotdot_eigen
private

Definition at line 620 of file MooseVariableData.h.

◆ _ad_grad_phi

template<typename OutputType >
const ADTemplateVariablePhiGradient<OutputShape>* MooseVariableData< OutputType >::_ad_grad_phi
private

◆ _ad_grad_phi_assembly_method

template<typename OutputType >
std::function<const ADTemplateVariablePhiGradient<OutputShape> &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_ad_grad_phi_assembly_method
private

◆ _ad_grad_phi_face

template<typename OutputType >
const ADTemplateVariablePhiGradient<OutputShape>* MooseVariableData< OutputType >::_ad_grad_phi_face
private

◆ _ad_grad_phi_face_assembly_method

template<typename OutputType >
std::function<const ADTemplateVariablePhiGradient<OutputShape> &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_ad_grad_phi_face_assembly_method
private

◆ _ad_grad_u

template<typename OutputType >
ADTemplateVariableGradient<OutputType> MooseVariableData< OutputType >::_ad_grad_u
private

◆ _ad_grad_u_dot

template<typename OutputType >
ADTemplateVariableGradient<OutputType> MooseVariableData< OutputType >::_ad_grad_u_dot
private

Definition at line 623 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adGradSlnDot().

◆ _ad_nodal_value

template<typename OutputType >
Moose::ADType<OutputType>::type MooseVariableData< OutputType >::_ad_nodal_value
private

AD nodal value.

Definition at line 552 of file MooseVariableData.h.

◆ _ad_real_dummy

template<typename OutputType >
ADReal MooseVariableData< OutputType >::_ad_real_dummy = 0
private

A dummy ADReal variable.

Definition at line 749 of file MooseVariableData.h.

◆ _ad_second_u

template<typename OutputType >
ADTemplateVariableSecond<OutputType> MooseVariableData< OutputType >::_ad_second_u
private

Definition at line 615 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adSecondSln().

◆ _ad_u

template<typename OutputType >
ADTemplateVariableValue<OutputType> MooseVariableData< OutputType >::_ad_u
private

◆ _ad_u_dot

template<typename OutputType >
ADTemplateVariableValue<OutputType> MooseVariableData< OutputType >::_ad_u_dot
private

Definition at line 621 of file MooseVariableData.h.

◆ _ad_u_dotdot

template<typename OutputType >
ADTemplateVariableValue<OutputType> MooseVariableData< OutputType >::_ad_u_dotdot
private

Definition at line 622 of file MooseVariableData.h.

◆ _ad_zero

template<typename OutputType >
ADReal MooseVariableData< OutputType >::_ad_zero
private

A zero AD variable.

Definition at line 555 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::MooseVariableData().

◆ _assembly

template<typename OutputType >
const Assembly& MooseVariableData< OutputType >::_assembly
private

◆ _continuity

template<typename OutputType >
libMesh::FEContinuity MooseVariableData< OutputType >::_continuity
private

◆ _count

template<typename OutputType >
unsigned int MooseVariableDataBase< OutputType >::_count
protectedinherited

Number of components of the associated variable.

Definition at line 202 of file MooseVariableDataBase.h.

◆ _curl_phi

template<typename OutputType >
const FieldVariablePhiCurl* MooseVariableData< OutputType >::_curl_phi
mutableprivate

Definition at line 656 of file MooseVariableData.h.

◆ _curl_phi_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiCurl &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_curl_phi_assembly_method
private

◆ _curl_phi_face

template<typename OutputType >
const FieldVariablePhiCurl* MooseVariableData< OutputType >::_curl_phi_face
mutableprivate

Definition at line 669 of file MooseVariableData.h.

◆ _curl_phi_face_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiCurl &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_curl_phi_face_assembly_method
private

◆ _curl_u

template<typename OutputType >
FieldVariableCurl MooseVariableData< OutputType >::_curl_u
private

curl_u

Definition at line 603 of file MooseVariableData.h.

◆ _curl_u_old

template<typename OutputType >
FieldVariableCurl MooseVariableData< OutputType >::_curl_u_old
private

Definition at line 604 of file MooseVariableData.h.

◆ _curl_u_older

template<typename OutputType >
FieldVariableCurl MooseVariableData< OutputType >::_curl_u_older
private

Definition at line 605 of file MooseVariableData.h.

◆ _current_ad_grad_phi

template<typename OutputType >
const ADTemplateVariablePhiGradient<OutputShape>* MooseVariableData< OutputType >::_current_ad_grad_phi
private

Definition at line 681 of file MooseVariableData.h.

◆ _current_curl_phi

template<typename OutputType >
const FieldVariablePhiCurl* MooseVariableData< OutputType >::_current_curl_phi
private

Definition at line 679 of file MooseVariableData.h.

◆ _current_div_phi

template<typename OutputType >
const FieldVariablePhiDivergence* MooseVariableData< OutputType >::_current_div_phi
private

Definition at line 680 of file MooseVariableData.h.

◆ _current_grad_phi

template<typename OutputType >
const FieldVariablePhiGradient* MooseVariableData< OutputType >::_current_grad_phi
private

Definition at line 677 of file MooseVariableData.h.

◆ _current_phi

template<typename OutputType >
const FieldVariablePhiValue* MooseVariableData< OutputType >::_current_phi
private

Definition at line 676 of file MooseVariableData.h.

◆ _current_qrule

template<typename OutputType >
const QBase* MooseVariableData< OutputType >::_current_qrule
private

Definition at line 675 of file MooseVariableData.h.

◆ _current_second_phi

template<typename OutputType >
const FieldVariablePhiSecond* MooseVariableData< OutputType >::_current_second_phi
private

Definition at line 678 of file MooseVariableData.h.

◆ _current_side

template<typename OutputType >
const unsigned int& MooseVariableData< OutputType >::_current_side
private

The current element side.

Definition at line 746 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::currentSide().

◆ _displaced

template<typename OutputType >
const bool MooseVariableData< OutputType >::_displaced
private

Whether this variable is being calculated on a displaced system.

Definition at line 743 of file MooseVariableData.h.

◆ _div_phi

template<typename OutputType >
const FieldVariablePhiDivergence* MooseVariableData< OutputType >::_div_phi
mutableprivate

Definition at line 657 of file MooseVariableData.h.

◆ _div_phi_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiDivergence &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_div_phi_assembly_method
private

◆ _div_phi_face

template<typename OutputType >
const FieldVariablePhiDivergence* MooseVariableData< OutputType >::_div_phi_face
mutableprivate

Definition at line 670 of file MooseVariableData.h.

◆ _div_phi_face_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiDivergence &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_div_phi_face_assembly_method
private

◆ _div_u

template<typename OutputType >
FieldVariableDivergence MooseVariableData< OutputType >::_div_u
private

divergence_u

Definition at line 608 of file MooseVariableData.h.

◆ _div_u_old

template<typename OutputType >
FieldVariableDivergence MooseVariableData< OutputType >::_div_u_old
private

Definition at line 609 of file MooseVariableData.h.

◆ _div_u_older

template<typename OutputType >
FieldVariableDivergence MooseVariableData< OutputType >::_div_u_older
private

Definition at line 610 of file MooseVariableData.h.

◆ _dof_du_dot_du

template<typename OutputType >
MooseArray<libMesh::Number> MooseVariableDataBase< OutputType >::_dof_du_dot_du
protectedinherited

derivatives of the solution value time derivative with respect to the degrees of freedom

Definition at line 281 of file MooseVariableDataBase.h.

◆ _dof_du_dotdot_du

template<typename OutputType >
MooseArray<libMesh::Number> MooseVariableDataBase< OutputType >::_dof_du_dotdot_du
protectedinherited

derivatives of the solution value second time derivative with respect to the degrees of freedom

Definition at line 284 of file MooseVariableDataBase.h.

◆ _dof_indices

template<typename OutputType >
std::vector<dof_id_type> MooseVariableDataBase< OutputType >::_dof_indices
protectedinherited

◆ _dof_map

template<typename OutputType >
const libMesh::DofMap& MooseVariableDataBase< OutputType >::_dof_map
protectedinherited

The degree of freedom map from libMesh.

Definition at line 199 of file MooseVariableDataBase.h.

◆ _dof_values_dot

template<typename OutputType >
DofValues MooseVariableDataBase< OutputType >::_dof_values_dot
protectedinherited

time derivative of the solution values

Definition at line 273 of file MooseVariableDataBase.h.

◆ _dof_values_dot_old

template<typename OutputType >
DofValues MooseVariableDataBase< OutputType >::_dof_values_dot_old
protectedinherited

the previous time step's solution value time derivative

Definition at line 277 of file MooseVariableDataBase.h.

◆ _dof_values_dotdot

template<typename OutputType >
DofValues MooseVariableDataBase< OutputType >::_dof_values_dotdot
protectedinherited

second time derivative of the solution values

Definition at line 275 of file MooseVariableDataBase.h.

◆ _dof_values_dotdot_old

template<typename OutputType >
DofValues MooseVariableDataBase< OutputType >::_dof_values_dotdot_old
protectedinherited

the previous time step's solution value second time derivative

Definition at line 279 of file MooseVariableDataBase.h.

◆ _du_dot_du

template<typename OutputType >
VariableValue MooseVariableData< OutputType >::_du_dot_du
private

derivative of u_dot wrt u

Definition at line 641 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::duDotDu().

◆ _du_dotdot_du

template<typename OutputType >
VariableValue MooseVariableData< OutputType >::_du_dotdot_du
private

derivative of u_dotdot wrt u

Definition at line 644 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::duDotDotDu().

◆ _elem

template<typename OutputType >
const Elem* const& MooseVariableData< OutputType >::_elem
private

The current elem.

This has to be a reference because the current elem will be constantly changing. If we initialized this to point to one elem, then in the next calculation we would be pointing to the wrong place!

Definition at line 740 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::currentElem().

◆ _element_type

template<typename OutputType >
Moose::ElementType MooseVariableData< OutputType >::_element_type
private

The element type this object is storing data for. This is either Element, Neighbor, or Lower.

Definition at line 537 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::MooseVariableData().

◆ _fe_type

template<typename OutputType >
const libMesh::FEType& MooseVariableData< OutputType >::_fe_type
private

◆ _grad_phi

template<typename OutputType >
const FieldVariablePhiGradient* MooseVariableData< OutputType >::_grad_phi
private

◆ _grad_phi_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiGradient &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_grad_phi_assembly_method
private

◆ _grad_phi_face

template<typename OutputType >
const FieldVariablePhiGradient* MooseVariableData< OutputType >::_grad_phi_face
private

◆ _grad_phi_face_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiGradient &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_grad_phi_face_assembly_method
private

◆ _grad_u_dot

template<typename OutputType >
FieldVariableGradient MooseVariableData< OutputType >::_grad_u_dot
private

grad_u dots

Definition at line 593 of file MooseVariableData.h.

◆ _grad_u_dotdot

template<typename OutputType >
FieldVariableGradient MooseVariableData< OutputType >::_grad_u_dotdot
private

Definition at line 594 of file MooseVariableData.h.

◆ _has_dof_indices

template<typename OutputType >
bool MooseVariableData< OutputType >::_has_dof_indices
private

◆ _has_dof_values

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_has_dof_values
protectedinherited

Whether we currently have degree of freedom values stored in our local containers (corresponding to the current element)

Definition at line 206 of file MooseVariableDataBase.h.

Referenced by MooseVariableDataBase< OutputType >::prepareAux().

◆ _increment

template<typename OutputType >
FieldVariableValue MooseVariableData< OutputType >::_increment
private

Increment in the variable used in dampers.

Definition at line 549 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::increment().

◆ _is_nodal

template<typename OutputType >
bool MooseVariableData< OutputType >::_is_nodal
private

◆ _mapped_grad_phi

template<typename OutputType >
MappedArrayVariablePhiGradient MooseVariableData< OutputType >::_mapped_grad_phi
private

Definition at line 660 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::arrayGradPhi().

◆ _mapped_grad_phi_face

template<typename OutputType >
MappedArrayVariablePhiGradient MooseVariableData< OutputType >::_mapped_grad_phi_face
private

◆ _mapped_grad_phi_face_neighbor

template<typename OutputType >
MappedArrayVariablePhiGradient MooseVariableData< OutputType >::_mapped_grad_phi_face_neighbor
private

Definition at line 663 of file MooseVariableData.h.

◆ _mapped_grad_phi_neighbor

template<typename OutputType >
MappedArrayVariablePhiGradient MooseVariableData< OutputType >::_mapped_grad_phi_neighbor
private

Definition at line 662 of file MooseVariableData.h.

◆ _matrix_tag_u

template<typename OutputType >
std::vector<FieldVariableValue> MooseVariableDataBase< OutputType >::_matrix_tag_u
protectedinherited

Definition at line 238 of file MooseVariableDataBase.h.

◆ _matrix_tags_dof_u

template<typename OutputType >
std::vector<DofValues> MooseVariableDataBase< OutputType >::_matrix_tags_dof_u
protectedinherited

Definition at line 232 of file MooseVariableDataBase.h.

◆ _max_state

template<typename OutputType >
unsigned int MooseVariableDataBase< OutputType >::_max_state
protectedinherited

The maximum number of older solution states our variable needs.

Definition at line 209 of file MooseVariableDataBase.h.

◆ _need_ad

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad = false
mutableprivate

◆ _need_ad_curl_u

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_curl_u = false
mutableprivate

Definition at line 585 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adCurlSln().

◆ _need_ad_div_u

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_div_u = false
mutableprivate

Definition at line 586 of file MooseVariableData.h.

◆ _need_ad_grad_u

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_grad_u = false
mutableprivate

◆ _need_ad_grad_u_dot

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_grad_u_dot = false
mutableprivate

Definition at line 583 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adGradSlnDot().

◆ _need_ad_grad_u_face

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_grad_u_face = false
mutableprivate

Whether the AD gradient is needed on element faces, i.e. requested through adGradSlnFace()

Definition at line 582 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adGradSlnFace().

◆ _need_ad_second_u

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_second_u = false
mutableprivate

Definition at line 584 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adSecondSln().

◆ _need_ad_u

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_u = false
mutableprivate

◆ _need_ad_u_dot

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_u_dot = false
mutableprivate

Definition at line 587 of file MooseVariableData.h.

◆ _need_ad_u_dotdot

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_u_dotdot = false
mutableprivate

Definition at line 588 of file MooseVariableData.h.

◆ _need_ad_volume

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_ad_volume = false
mutableprivate

Whether AD is needed with the volume quadrature rule.

Requests made through the face-scoped accessors do not set this, so a variable whose only AD consumers are face objects (an AD integrated BC, for instance) skips AD seeding on element interiors.

Definition at line 578 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adCurlSln(), MooseVariableData< OutputType >::adGradSln(), MooseVariableData< OutputType >::adGradSlnDot(), MooseVariableData< OutputType >::adSecondSln(), and MooseVariableData< OutputType >::adSln().

◆ _need_curl

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_curl = false
mutableprivate

curl flags

Definition at line 564 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::computingCurl().

◆ _need_curl_old

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_curl_old = false
mutableprivate

Definition at line 565 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::computingCurl().

◆ _need_curl_older

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_curl_older = false
mutableprivate

Definition at line 566 of file MooseVariableData.h.

◆ _need_div

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_div = false
mutableprivate

divergence flags

Definition at line 569 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::computingDiv().

◆ _need_div_old

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_div_old = false
mutableprivate

Definition at line 570 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::computingDiv().

◆ _need_div_older

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_div_older = false
mutableprivate

Definition at line 571 of file MooseVariableData.h.

◆ _need_dof_du_dot_du

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_dof_du_dot_du
mutableprotectedinherited

Definition at line 269 of file MooseVariableDataBase.h.

◆ _need_dof_du_dotdot_du

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_dof_du_dotdot_du
mutableprotectedinherited

Definition at line 270 of file MooseVariableDataBase.h.

◆ _need_dof_values_dot

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_dof_values_dot
mutableprotectedinherited

local solution flags

Definition at line 265 of file MooseVariableDataBase.h.

◆ _need_dof_values_dot_old

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_dof_values_dot_old
mutableprotectedinherited

Definition at line 267 of file MooseVariableDataBase.h.

◆ _need_dof_values_dotdot

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_dof_values_dotdot
mutableprotectedinherited

Definition at line 266 of file MooseVariableDataBase.h.

◆ _need_dof_values_dotdot_old

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_dof_values_dotdot_old
mutableprotectedinherited

Definition at line 268 of file MooseVariableDataBase.h.

◆ _need_du_dot_du

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_du_dot_du
mutableprotectedinherited

◆ _need_du_dotdot_du

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_du_dotdot_du
mutableprotectedinherited

◆ _need_grad_dot

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_grad_dot
mutableprotectedinherited

gradient dot flags

Definition at line 261 of file MooseVariableDataBase.h.

Referenced by MooseVariableData< OutputType >::adGradSlnDot().

◆ _need_grad_dotdot

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_grad_dotdot
mutableprotectedinherited

Definition at line 262 of file MooseVariableDataBase.h.

◆ _need_matrix_tag_dof_u

template<typename OutputType >
std::vector<bool> MooseVariableDataBase< OutputType >::_need_matrix_tag_dof_u
mutableprotectedinherited

Definition at line 227 of file MooseVariableDataBase.h.

◆ _need_matrix_tag_u

template<typename OutputType >
std::vector<bool> MooseVariableDataBase< OutputType >::_need_matrix_tag_u
mutableprotectedinherited

Definition at line 239 of file MooseVariableDataBase.h.

◆ _need_second

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_second = false
mutableprivate

SolutionState second_u flags.

Definition at line 558 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::usesSecondPhi().

◆ _need_second_old

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_second_old = false
mutableprivate

Definition at line 559 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::usesSecondPhi().

◆ _need_second_older

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_second_older = false
mutableprivate

Definition at line 560 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::usesSecondPhi().

◆ _need_second_previous_nl

template<typename OutputType >
bool MooseVariableData< OutputType >::_need_second_previous_nl = false
mutableprivate

Definition at line 561 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::usesSecondPhi().

◆ _need_u_dot

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_u_dot
mutableprotectedinherited

u dot flags

Definition at line 253 of file MooseVariableDataBase.h.

◆ _need_u_dot_old

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_u_dot_old
mutableprotectedinherited

Definition at line 255 of file MooseVariableDataBase.h.

◆ _need_u_dotdot

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_u_dotdot
mutableprotectedinherited

Definition at line 254 of file MooseVariableDataBase.h.

◆ _need_u_dotdot_old

template<typename OutputType >
bool MooseVariableDataBase< OutputType >::_need_u_dotdot_old
mutableprotectedinherited

Definition at line 256 of file MooseVariableDataBase.h.

◆ _need_vector_tag_dof_u

template<typename OutputType >
std::vector<bool> MooseVariableDataBase< OutputType >::_need_vector_tag_dof_u
mutableprotectedinherited

◆ _need_vector_tag_grad

template<typename OutputType >
std::vector<bool> MooseVariableDataBase< OutputType >::_need_vector_tag_grad
mutableprotectedinherited

◆ _need_vector_tag_u

template<typename OutputType >
std::vector<bool> MooseVariableDataBase< OutputType >::_need_vector_tag_u
mutableprotectedinherited

◆ _nodal_dof_index

template<typename OutputType >
dof_id_type MooseVariableData< OutputType >::_nodal_dof_index
private

The dof index for the current node.

Definition at line 543 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::nodalDofIndex().

◆ _nodal_value

template<typename OutputType >
OutputType MooseVariableDataBase< OutputType >::_nodal_value
protectedinherited

Nodal values.

Definition at line 242 of file MooseVariableDataBase.h.

◆ _nodal_value_array

template<typename OutputType >
MooseArray<OutputType> MooseVariableDataBase< OutputType >::_nodal_value_array
protectedinherited

Nodal values as MooseArrays for use with AuxKernels.

Definition at line 248 of file MooseVariableDataBase.h.

Referenced by MooseVariableDataBase< OutputType >::MooseVariableDataBase().

◆ _nodal_value_dot

template<typename OutputType >
OutputType MooseVariableDataBase< OutputType >::_nodal_value_dot
protectedinherited

nodal values of u_dot

Definition at line 287 of file MooseVariableDataBase.h.

◆ _nodal_value_dot_old

template<typename OutputType >
OutputType MooseVariableDataBase< OutputType >::_nodal_value_dot_old
protectedinherited

nodal values of u_dot_old

Definition at line 291 of file MooseVariableDataBase.h.

◆ _nodal_value_dotdot

template<typename OutputType >
OutputType MooseVariableDataBase< OutputType >::_nodal_value_dotdot
protectedinherited

nodal values of u_dotdot

Definition at line 289 of file MooseVariableDataBase.h.

◆ _nodal_value_dotdot_old

template<typename OutputType >
OutputType MooseVariableDataBase< OutputType >::_nodal_value_dotdot_old
protectedinherited

nodal values of u_dotdot_old

Definition at line 293 of file MooseVariableDataBase.h.

◆ _nodal_value_old

template<typename OutputType >
OutputType MooseVariableDataBase< OutputType >::_nodal_value_old
protectedinherited

Definition at line 243 of file MooseVariableDataBase.h.

◆ _nodal_value_old_array

template<typename OutputType >
MooseArray<OutputType> MooseVariableDataBase< OutputType >::_nodal_value_old_array
protectedinherited

◆ _nodal_value_older

template<typename OutputType >
OutputType MooseVariableDataBase< OutputType >::_nodal_value_older
protectedinherited

Definition at line 244 of file MooseVariableDataBase.h.

◆ _nodal_value_older_array

template<typename OutputType >
MooseArray<OutputType> MooseVariableDataBase< OutputType >::_nodal_value_older_array
protectedinherited

◆ _nodal_value_previous_nl

template<typename OutputType >
OutputType MooseVariableDataBase< OutputType >::_nodal_value_previous_nl
protectedinherited

Definition at line 245 of file MooseVariableDataBase.h.

◆ _node

template<typename OutputType >
const Node* const& MooseVariableData< OutputType >::_node
private

The current node.

This has to be a reference because the current node will be constantly changing. If we initialized this to point to one node, then in the next calculation we would be pointing to the wrong place!

Definition at line 735 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::node().

◆ _old_solution_tag

template<typename OutputType >
TagID MooseVariableDataBase< OutputType >::_old_solution_tag
protectedinherited

The vector tag ID corresponding to the old solution vector.

Definition at line 215 of file MooseVariableDataBase.h.

◆ _older_solution_tag

template<typename OutputType >
TagID MooseVariableDataBase< OutputType >::_older_solution_tag
protectedinherited

The vector tag ID corresponding to the older solution vector.

Definition at line 218 of file MooseVariableDataBase.h.

◆ _phi

template<typename OutputType >
const FieldVariablePhiValue* MooseVariableData< OutputType >::_phi
private

◆ _phi_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputType>::VariablePhiValue &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_phi_assembly_method
private

◆ _phi_face

template<typename OutputType >
const FieldVariablePhiValue* MooseVariableData< OutputType >::_phi_face
private

◆ _phi_face_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiValue &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_phi_face_assembly_method
private

◆ _previous_nl_solution_tag

template<typename OutputType >
TagID MooseVariableDataBase< OutputType >::_previous_nl_solution_tag
protectedinherited

The vector tag ID corresponding to the previous nonlinear iteration's solution vector.

Definition at line 221 of file MooseVariableDataBase.h.

◆ _qrule

template<typename OutputType >
const QBase* const& MooseVariableData< OutputType >::_qrule
private

The current qrule.

This has to be a reference because the current qrule will be constantly changing. If we initialized this to point to one qrule, then in the next calculation we would be pointing to the wrong place!

Definition at line 649 of file MooseVariableData.h.

◆ _qrule_face

template<typename OutputType >
const QBase* const& MooseVariableData< OutputType >::_qrule_face
private

Definition at line 650 of file MooseVariableData.h.

◆ _required_vector_tags

template<typename OutputType >
std::set<TagID> MooseVariableDataBase< OutputType >::_required_vector_tags
protectedinherited

The set of vector tags (residual + solution) we need to evaluate.

Definition at line 296 of file MooseVariableDataBase.h.

◆ _second_phi

template<typename OutputType >
const FieldVariablePhiSecond* MooseVariableData< OutputType >::_second_phi
mutableprivate

Definition at line 655 of file MooseVariableData.h.

◆ _second_phi_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiSecond &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_second_phi_assembly_method
private

◆ _second_phi_face

template<typename OutputType >
const FieldVariablePhiSecond* MooseVariableData< OutputType >::_second_phi_face
mutableprivate

Definition at line 668 of file MooseVariableData.h.

◆ _second_phi_face_assembly_method

template<typename OutputType >
std::function<const typename OutputTools<OutputShape>::VariablePhiSecond &(const Assembly &, libMesh::FEType)> MooseVariableData< OutputType >::_second_phi_face_assembly_method
private

◆ _second_u

template<typename OutputType >
FieldVariableSecond MooseVariableData< OutputType >::_second_u
private

second_u

Definition at line 597 of file MooseVariableData.h.

◆ _second_u_old

template<typename OutputType >
FieldVariableSecond MooseVariableData< OutputType >::_second_u_old
private

Definition at line 598 of file MooseVariableData.h.

◆ _second_u_older

template<typename OutputType >
FieldVariableSecond MooseVariableData< OutputType >::_second_u_older
private

Definition at line 599 of file MooseVariableData.h.

◆ _second_u_previous_nl

template<typename OutputType >
FieldVariableSecond MooseVariableData< OutputType >::_second_u_previous_nl
private

Definition at line 600 of file MooseVariableData.h.

◆ _solution_tag

template<typename OutputType >
TagID MooseVariableDataBase< OutputType >::_solution_tag
protectedinherited

The vector tag ID corresponding to the solution vector.

Definition at line 212 of file MooseVariableDataBase.h.

◆ _solution_tags

template<typename OutputType >
std::set<TagID> MooseVariableDataBase< OutputType >::_solution_tags
protectedinherited

The set of solution tags we need to evaluate.

Definition at line 299 of file MooseVariableDataBase.h.

◆ _subproblem

template<typename OutputType >
const SubProblem& MooseVariableDataBase< OutputType >::_subproblem
protectedinherited

The subproblem which we can query for information related to tagged vectors and matrices.

Definition at line 193 of file MooseVariableDataBase.h.

Referenced by MooseVariableDataBase< OutputType >::MooseVariableDataBase(), and MooseVariableDataFV< OutputType >::MooseVariableDataFV().

◆ _sys

template<typename OutputType >
SystemBase& MooseVariableDataBase< OutputType >::_sys
protectedinherited

The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data.

Definition at line 190 of file MooseVariableDataBase.h.

Referenced by MooseVariableData< OutputType >::MooseVariableData().

◆ _tid

template<typename OutputType >
const THREAD_ID MooseVariableDataBase< OutputType >::_tid
protectedinherited

The thread ID that this object is on.

Definition at line 196 of file MooseVariableDataBase.h.

◆ _time_integrator

template<typename OutputType >
const TimeIntegrator* MooseVariableData< OutputType >::_time_integrator
private

Pointer to time integrator.

Definition at line 730 of file MooseVariableData.h.

Referenced by MooseVariableData< OutputType >::adGradSlnDot(), and MooseVariableData< OutputType >::MooseVariableData().

◆ _u_dot

template<typename OutputType >
FieldVariableValue MooseVariableData< OutputType >::_u_dot
private

u_dot (time derivative)

Definition at line 629 of file MooseVariableData.h.

◆ _u_dot_old

template<typename OutputType >
FieldVariableValue MooseVariableData< OutputType >::_u_dot_old
private

u_dot_old (time derivative)

Definition at line 635 of file MooseVariableData.h.

◆ _u_dotdot

template<typename OutputType >
FieldVariableValue MooseVariableData< OutputType >::_u_dotdot
private

u_dotdot (second time derivative)

Definition at line 632 of file MooseVariableData.h.

◆ _u_dotdot_old

template<typename OutputType >
FieldVariableValue MooseVariableData< OutputType >::_u_dotdot_old
private

u_dotdot_old (second time derivative)

Definition at line 638 of file MooseVariableData.h.

◆ _use_dual

template<typename OutputType >
const bool MooseVariableData< OutputType >::_use_dual
private

◆ _var

template<typename OutputType >
const MooseVariableFE<OutputType>& MooseVariableData< OutputType >::_var
private

A const reference to the owning MooseVariableFE object.

Definition at line 528 of file MooseVariableData.h.

◆ _var_num

template<typename OutputType >
const unsigned int MooseVariableData< OutputType >::_var_num
private

◆ _vector_tag_grad

template<typename OutputType >
std::vector<FieldVariableGradient> MooseVariableDataBase< OutputType >::_vector_tag_grad
protectedinherited

◆ _vector_tag_u

template<typename OutputType >
std::vector<FieldVariableValue> MooseVariableDataBase< OutputType >::_vector_tag_u
protectedinherited

◆ _vector_tags_dof_u

template<typename OutputType >
std::vector<DofValues> MooseVariableDataBase< OutputType >::_vector_tags_dof_u
protectedinherited

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