www.mooseframework.org
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MooseVariableData< OutputType > Class Template Reference

#include <MooseVariableData.h>

Public Types

typedef TensorTools::IncrementRank< OutputType >::type OutputGradient
 
typedef TensorTools::IncrementRank< OutputGradient >::type OutputSecond
 
typedef TensorTools::DecrementRank< OutputType >::type OutputDivergence
 
typedef MooseArray< OutputType > FieldVariableValue
 
typedef MooseArray< OutputGradientFieldVariableGradient
 
typedef MooseArray< OutputSecondFieldVariableSecond
 
typedef MooseArray< OutputType > FieldVariableCurl
 
typedef MooseArray< OutputDivergenceFieldVariableDivergence
 
typedef Moose::ShapeType< OutputType >::type OutputShape
 
typedef TensorTools::IncrementRank< OutputShape >::type OutputShapeGradient
 
typedef TensorTools::IncrementRank< OutputShapeGradient >::type OutputShapeSecond
 
typedef 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 Moose::DOFType< OutputType >::type OutputData
 
typedef MooseArray< OutputDataDoFValue
 

Public Member Functions

 MooseVariableData (const MooseVariableFE< OutputType > &var, const 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. More...
 
void setGeometry (Moose::GeometryType gm_type)
 Set the geometry type before calculating variables values. More...
 
void computeValues ()
 compute the variable values More...
 
void computeMonomialValues ()
 compute the values for const monomial variables More...
 
void computeAD (const unsigned int num_dofs, const unsigned int nqp)
 compute AD things More...
 
void computeNodalValues ()
 compute nodal things More...
 
const FieldVariablePhiValuephi () const
 phi getter More...
 
const FieldVariablePhiValuephiFace () const
 phi_face getter More...
 
const FieldVariablePhiGradientgradPhi () const
 grad_phi getter More...
 
const MappedArrayVariablePhiGradientarrayGradPhi () const
 mapped_grad_phi getter More...
 
const FieldVariablePhiGradientgradPhiFace () const
 grad_phi_face getter More...
 
const MappedArrayVariablePhiGradientarrayGradPhiFace () const
 mapped_grad_phi_face getter More...
 
const FieldVariablePhiSecondsecondPhi () const
 second_phi getter More...
 
const FieldVariablePhiSecondsecondPhiFace () const
 second_phi_face getter More...
 
const FieldVariablePhiCurlcurlPhi () const
 curl_phi getter More...
 
const FieldVariablePhiCurlcurlPhiFace () const
 curl_phi_face getter More...
 
template<ComputeStage compute_stage>
const VariableTestGradientType< OutputShape, compute_stage >::typeadGradPhi () const
 ad_grad_phi getter More...
 
template<ComputeStage compute_stage>
const VariableTestGradientType< OutputShape, compute_stage >::typeadGradPhiFace () const
 ad_grad_phi_face getter More...
 
size_t phiSize () const
 Return phi size. More...
 
size_t phiFaceSize () const
 Return phiFace size. More...
 
bool usesSecondPhi () const
 Whether or not this variable is computing any second derivatives. More...
 
bool computingCurl () const
 Whether or not this variable is computing the curl. More...
 
bool isNodal () const
 
const Node *const & node () const
 
const dof_id_type & nodalDofIndex () const
 
bool isNodalDefined () const
 
const Elem *const & currentElem () const
 The current element. More...
 
const unsigned int & currentSide () const
 The current side. More...
 
void prepareIC ()
 prepare the initial condition More...
 
const FieldVariableValuesln (Moose::SolutionState state) const
 Local solution getter. More...
 
const FieldVariableGradientgradSln (Moose::SolutionState state) const
 Local solution gradient getter. More...
 
const FieldVariableGradientgradSlnDot () const
 Local time derivative of solution gradient getter. More...
 
const FieldVariableGradientgradSlnDotDot () const
 Local second time derivative of solution gradient getter. More...
 
const FieldVariableSecondsecondSln (Moose::SolutionState state) const
 Local solution second spatial derivative getter. More...
 
const FieldVariableCurlcurlSln (Moose::SolutionState state) const
 Local solution curl getter. More...
 
template<ComputeStage compute_stage>
const VariableValueType< OutputType, compute_stage >::typeadSln () const
 
template<ComputeStage compute_stage>
const VariableGradientType< OutputType, compute_stage >::typeadGradSln () const
 
template<ComputeStage compute_stage>
const VariableSecondType< OutputType, compute_stage >::typeadSecondSln () const
 
template<ComputeStage compute_stage>
const VariableValueType< OutputType, compute_stage >::typeadUDot () const
 
const FieldVariableValueuDot () const
 
const FieldVariableValueuDotDot () const
 
const FieldVariableValueuDotOld () const
 
const FieldVariableValueuDotDotOld () const
 
const VariableValueduDotDu () const
 
const VariableValueduDotDotDu () const
 
const OutputType & nodalValue (Moose::SolutionState state) const
 
const MooseArray< OutputType > & nodalValueArray (Moose::SolutionState state) 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
 
template<ComputeStage compute_stage>
const Moose::ValueType< OutputType, compute_stage >::typeadNodalValue () const
 
const DoFValuenodalVectorTagValue (TagID tag) const
 
const DoFValuenodalMatrixTagValue (TagID tag) const
 
void setNodalValue (const OutputType &value, unsigned int idx=0)
 Set nodal value. More...
 
void setDofValues (const DenseVector< OutputData > &values)
 Set local DOF values and evaluate the values on quadrature points. More...
 
void setDofValue (const OutputData &value, unsigned int index)
 
void insertNodalValue (NumericVector< Number > &residual, const OutputData &v)
 Write a nodal value to the passed-in solution vector. More...
 
OutputData getNodalValue (const Node &node, Moose::SolutionState state) const
 
OutputData 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. More...
 
void hasDofValues (bool has_dof_values)
 setter of _has_dof_values More...
 
void reinitNode ()
 Prepare degrees of freedom for the current node. More...
 
void prepareAux ()
 Prepare dof indices and solution values for elemental auxiliary variables. More...
 
void reinitAux ()
 Prepare dof indices and solution values for elemental auxiliary variables. More...
 
void reinitNodes (const std::vector< dof_id_type > &nodes)
 Set _dof_indices to the degrees of freedom existing on the passed-in nodes. More...
 
void insert (NumericVector< Number > &residual)
 Set the current local DOF values to the input vector. More...
 
void add (NumericVector< Number > &residual)
 Add the current local DOF values to the input vector. More...
 
void addSolution (NumericVector< Number > &sol, const DenseVector< Number > &v) const
 Add passed in local DOF values to a solution vector. More...
 
const DoFValuedofValues () const
 
const DoFValuedofValuesOld () const
 
const DoFValuedofValuesOlder () const
 
const DoFValuedofValuesPreviousNL () const
 
const DoFValuedofValuesDot () const
 
const DoFValuedofValuesDotOld () const
 
const DoFValuedofValuesDotDot () const
 
const DoFValuedofValuesDotDotOld () const
 
const MooseArray< Number > & dofValuesDuDotDu () const
 
const MooseArray< Number > & dofValuesDuDotDotDu () const
 
template<ComputeStage compute_stage>
const MooseArray< typename Moose::RealType< compute_stage >::type > & adDofValues () const
 Return the AD dof values. More...
 
const FieldVariableValueincrement () const
 Increment getter. More...
 
void computeIncrementAtQps (const NumericVector< Number > &increment_vec)
 Compute and store incremental change in solution at QPs based on increment_vec. More...
 
void computeIncrementAtNode (const NumericVector< Number > &increment_vec)
 Compute and store incremental change at the current node based on increment_vec. More...
 
const FieldVariableValuevectorTagValue (TagID tag)
 
const FieldVariableValuematrixTagValue (TagID tag)
 
template<>
const VariableValueadSln () const
 
template<>
const VariableGradientadGradSln () const
 
template<>
const VariableSecondadSecondSln () const
 
template<>
const VariableValueadUDot () const
 
template<>
const VectorVariableValueadSln () const
 
template<>
const VectorVariableGradientadGradSln () const
 
template<>
const VectorVariableSecondadSecondSln () const
 
template<>
const VectorVariableValueadUDot () const
 
template<>
const MooseArray< Real > & adDofValues () const
 
template<>
const MooseArray< Real > & adDofValues () const
 
template<>
const Real & adNodalValue () const
 
template<>
const RealVectorValue & adNodalValue () const
 
template<>
const VariableTestGradientType< Real, RESIDUAL >::typeadGradPhi () const
 
template<>
const VariableTestGradientType< RealVectorValue, RESIDUAL >::typeadGradPhi () const
 
template<>
const VariableTestGradientType< Real, RESIDUAL >::typeadGradPhiFace () const
 
template<>
const VariableTestGradientType< RealVectorValue, RESIDUAL >::typeadGradPhiFace () const
 
template<>
void computeValues ()
 
template<>
void computeMonomialValues ()
 
template<>
void computeAD (const unsigned int, const unsigned int)
 
template<>
void setNodalValue (const RealVectorValue &value, unsigned int idx)
 
template<>
void insertNodalValue (NumericVector< Number > &residual, const RealEigenVector &v)
 
template<>
RealEigenVector getNodalValue (const Node &node, Moose::SolutionState state) const
 
template<>
RealEigenVector getElementalValue (const Elem *elem, Moose::SolutionState state, unsigned int idx) const
 
template<>
void insert (NumericVector< Number > &residual)
 
template<>
void add (NumericVector< Number > &residual)
 
template<>
void addSolution (NumericVector< Number > &sol, const DenseVector< Number > &v) const
 
template<>
void computeIncrementAtQps (const NumericVector< Number > &increment_vec)
 
template<>
void computeIncrementAtNode (const NumericVector< Number > &increment_vec)
 
template<>
const VariableValueadSln () const
 
template<>
const VectorVariableValueadSln () const
 
template<>
const VariableGradientadGradSln () const
 
template<>
const VectorVariableGradientadGradSln () const
 
template<>
const VariableSecondadSecondSln () const
 
template<>
const VectorVariableSecondadSecondSln () const
 
template<>
const VariableValueadUDot () const
 
template<>
const VectorVariableValueadUDot () const
 
template<>
const MooseArray< Real > & adDofValues () const
 
template<>
const MooseArray< Real > & adDofValues () const
 
template<>
const Real & adNodalValue () const
 
template<>
const RealVectorValue & adNodalValue () const
 

Private Member Functions

void assignADNodalValue (const DualReal &value, const unsigned int &component)
 Helper methods for assigning nodal values from their corresponding solution values (dof values as they're referred to here in this class). More...
 
void assignNodalValue ()
 
void fetchDoFValues ()
 
void fetchADDoFValues ()
 
void zeroSizeDofValues ()
 
void getArrayDoFValues (const NumericVector< Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
 
template<>
void fetchDoFValues ()
 
template<>
void fetchDoFValues ()
 
template<>
void fetchADDoFValues ()
 
template<>
void assignNodalValue ()
 
template<>
void assignADNodalValue (const DualReal &value, const unsigned int &)
 
template<>
void assignADNodalValue (const DualReal &value, const unsigned int &component)
 

Private Attributes

const MooseVariableFE< OutputType > & _var
 A const reference to the owning MooseVariableFE object. More...
 
const FEType & _fe_type
 
const unsigned int _var_num
 
const SystemBase_sys
 
const SubProblem_subproblem
 
THREAD_ID _tid
 
const Assembly_assembly
 
const DofMap & _dof_map
 
Moose::ElementType _element_type
 The element type this object is storing data for. This is either Element, Neighbor, or Lower. More...
 
unsigned int _count
 Number of components of the associated variable. More...
 
std::vector< dof_id_type > _dof_indices
 The dof indices for the current element. More...
 
std::vector< bool > _need_vector_tag_dof_u
 
std::vector< bool > _need_matrix_tag_dof_u
 
bool _is_nodal
 if variable is nodal More...
 
dof_id_type _nodal_dof_index
 The dof index for the current node. More...
 
std::vector< DoFValue_vector_tags_dof_u
 
std::vector< DoFValue_matrix_tags_dof_u
 
std::vector< FieldVariableValue_vector_tag_u
 
std::vector< bool > _need_vector_tag_u
 
std::vector< FieldVariableValue_matrix_tag_u
 
std::vector< bool > _need_matrix_tag_u
 
FEContinuity _continuity
 Continuity type of the variable. More...
 
FieldVariableValue _increment
 Increment in the variable used in dampers. More...
 
OutputType _nodal_value
 Nodal values. More...
 
OutputType _nodal_value_old
 
OutputType _nodal_value_older
 
OutputType _nodal_value_previous_nl
 
OutputType _nodal_value_dot
 nodal values of u_dot More...
 
OutputType _nodal_value_dotdot
 nodal values of u_dotdot More...
 
OutputType _nodal_value_dot_old
 nodal values of u_dot_old More...
 
OutputType _nodal_value_dotdot_old
 nodal values of u_dotdot_old More...
 
MooseArray< OutputType > _nodal_value_array
 Nodal values as MooseArrays for use with AuxKernels. More...
 
MooseArray< OutputType > _nodal_value_old_array
 
MooseArray< OutputType > _nodal_value_older_array
 
Moose::ValueType< OutputType, JACOBIAN >::type _ad_nodal_value
 AD nodal value. More...
 
const DualReal _ad_zero
 A zero AD variable. More...
 
bool _need_u_old
 u flags More...
 
bool _need_u_older
 
bool _need_u_previous_nl
 
bool _need_u_dot
 u dot flags More...
 
bool _need_ad_u_dot
 
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_old
 gradient flags More...
 
bool _need_grad_older
 
bool _need_grad_previous_nl
 
bool _need_grad_dot
 gradient dot flags More...
 
bool _need_grad_dotdot
 
bool _need_second
 SolutionState second_u flags. More...
 
bool _need_second_old
 
bool _need_second_older
 
bool _need_second_previous_nl
 
bool _need_curl
 curl flags More...
 
bool _need_curl_old
 
bool _need_curl_older
 
bool _need_ad
 AD flags. More...
 
bool _need_ad_u
 
bool _need_ad_grad_u
 
bool _need_ad_second_u
 
bool _need_dof_values
 local solution flags More...
 
bool _need_dof_values_old
 
bool _need_dof_values_older
 
bool _need_dof_values_previous_nl
 
bool _need_dof_values_dot
 
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
 
bool _has_dof_indices
 
bool _has_dof_values
 
DoFValue _dof_values
 local solution values More...
 
DoFValue _dof_values_old
 
DoFValue _dof_values_older
 
DoFValue _dof_values_previous_nl
 
DoFValue _dof_values_dot
 nodal values of u_dot More...
 
DoFValue _dof_values_dotdot
 nodal values of u_dotdot More...
 
DoFValue _dof_values_dot_old
 nodal values of u_dot_old More...
 
DoFValue _dof_values_dotdot_old
 nodal values of u_dotdot_old More...
 
MooseArray< Number > _dof_du_dot_du
 nodal values of derivative of u_dot wrt u More...
 
MooseArray< Number > _dof_du_dotdot_du
 nodal values of derivative of u_dotdot wrt u More...
 
FieldVariableValue _u
 u More...
 
FieldVariableValue _u_old
 
FieldVariableValue _u_older
 
FieldVariableValue _u_previous_nl
 
FieldVariableGradient _grad_u
 grad_u More...
 
FieldVariableGradient _grad_u_old
 
FieldVariableGradient _grad_u_older
 
FieldVariableGradient _grad_u_previous_nl
 
FieldVariableGradient _grad_u_dot
 grad_u dots More...
 
FieldVariableGradient _grad_u_dotdot
 
FieldVariableSecond _second_u
 second_u More...
 
FieldVariableSecond _second_u_old
 
FieldVariableSecond _second_u_older
 
FieldVariableSecond _second_u_previous_nl
 
FieldVariableCurl _curl_u
 curl_u More...
 
FieldVariableCurl _curl_u_old
 
FieldVariableCurl _curl_u_older
 
VariableValueType< OutputShape, JACOBIAN >::type _ad_u
 AD u. More...
 
VariableGradientType< OutputShape, JACOBIAN >::type _ad_grad_u
 
VariableSecondType< OutputShape, JACOBIAN >::type _ad_second_u
 
MooseArray< DualReal_ad_dof_values
 
MooseArray< DualReal_ad_dofs_dot
 
VariableValueType< OutputShape, JACOBIAN >::type _ad_u_dot
 
FieldVariableValue _u_dot
 u_dot (time derivative) More...
 
FieldVariableValue _u_dotdot
 u_dotdot (second time derivative) More...
 
FieldVariableValue _u_dotdot_bak
 
FieldVariableValue _u_dot_old
 u_dot_old (time derivative) More...
 
FieldVariableValue _u_dot_old_bak
 
FieldVariableValue _u_dotdot_old
 u_dotdot_old (second time derivative) More...
 
FieldVariableValue _u_dotdot_old_bak
 
VariableValue _du_dot_du
 derivative of u_dot wrt u More...
 
VariableValue _du_dotdot_du
 derivative of u_dotdot wrt u More...
 
VariableValue _du_dotdot_du_bak
 
const QBase *const & _qrule
 The current qrule. More...
 
const QBase *const & _qrule_face
 
const FieldVariablePhiValue_phi
 
const FieldVariablePhiGradient_grad_phi
 
const FieldVariablePhiSecond_second_phi
 
const FieldVariablePhiCurl_curl_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 VariableTestGradientType< OutputShape, JACOBIAN >::type_ad_grad_phi
 
const VariableTestGradientType< OutputShape, JACOBIAN >::type_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 VariableTestGradientType< OutputShape, JACOBIAN >::type_current_ad_grad_phi
 
std::function< const typename OutputTools< OutputType >::VariablePhiValue &(const Assembly &, FEType)> _phi_assembly_method
 
std::function< const typename OutputTools< OutputType >::VariablePhiValue &(const Assembly &, FEType)> _phi_face_assembly_method
 
std::function< const typename OutputTools< OutputType >::VariablePhiGradient &(const Assembly &, FEType)> _grad_phi_assembly_method
 
std::function< const typename OutputTools< OutputType >::VariablePhiGradient &(const Assembly &, FEType)> _grad_phi_face_assembly_method
 
std::function< const typename OutputTools< OutputType >::VariablePhiSecond &(const Assembly &, FEType)> _second_phi_assembly_method
 
std::function< const typename OutputTools< OutputType >::VariablePhiSecond &(const Assembly &, FEType)> _second_phi_face_assembly_method
 
std::function< const typename OutputTools< OutputType >::VariablePhiCurl &(const Assembly &, FEType)> _curl_phi_assembly_method
 
std::function< const typename OutputTools< OutputType >::VariablePhiCurl &(const Assembly &, FEType)> _curl_phi_face_assembly_method
 
std::function< const typename VariableTestGradientType< OutputType, ComputeStage::JACOBIAN >::type &(const Assembly &, FEType)> _ad_grad_phi_assembly_method
 
std::function< const typename VariableTestGradientType< OutputType, ComputeStage::JACOBIAN >::type &(const Assembly &, FEType)> _ad_grad_phi_face_assembly_method
 
const TimeIntegrator_time_integrator
 Pointer to time integrator. More...
 
const Node *const & _node
 The current node. More...
 
const Elem *const & _elem
 The current elem. More...
 
const bool _displaced
 Whether this variable is being calculated on a displaced system. More...
 
const unsigned int & _current_side
 The current element side. More...
 

Detailed Description

template<typename OutputType>
class MooseVariableData< OutputType >

Definition at line 62 of file MooseVariableData.h.

Member Typedef Documentation

◆ DoFValue

template<typename OutputType>
typedef MooseArray<OutputData> MooseVariableData< OutputType >::DoFValue

Definition at line 102 of file MooseVariableData.h.

◆ FieldVariableCurl

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

Definition at line 74 of file MooseVariableData.h.

◆ FieldVariableDivergence

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

Definition at line 75 of file MooseVariableData.h.

◆ FieldVariableGradient

template<typename OutputType>
typedef MooseArray<OutputGradient> MooseVariableData< OutputType >::FieldVariableGradient

Definition at line 72 of file MooseVariableData.h.

◆ FieldVariablePhiCurl

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

Definition at line 89 of file MooseVariableData.h.

◆ FieldVariablePhiDivergence

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

Definition at line 90 of file MooseVariableData.h.

◆ FieldVariablePhiGradient

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

Definition at line 87 of file MooseVariableData.h.

◆ FieldVariablePhiSecond

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

Definition at line 88 of file MooseVariableData.h.

◆ FieldVariablePhiValue

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

Definition at line 86 of file MooseVariableData.h.

◆ FieldVariableSecond

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

Definition at line 73 of file MooseVariableData.h.

◆ FieldVariableTestCurl

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

Definition at line 97 of file MooseVariableData.h.

◆ FieldVariableTestDivergence

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

Definition at line 98 of file MooseVariableData.h.

◆ FieldVariableTestGradient

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

Definition at line 95 of file MooseVariableData.h.

◆ FieldVariableTestSecond

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

Definition at line 96 of file MooseVariableData.h.

◆ FieldVariableTestValue

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

Definition at line 94 of file MooseVariableData.h.

◆ FieldVariableValue

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

Definition at line 71 of file MooseVariableData.h.

◆ OutputData

template<typename OutputType>
typedef Moose::DOFType<OutputType>::type MooseVariableData< OutputType >::OutputData

Definition at line 101 of file MooseVariableData.h.

◆ OutputDivergence

template<typename OutputType>
typedef TensorTools::DecrementRank<OutputType>::type MooseVariableData< OutputType >::OutputDivergence

Definition at line 68 of file MooseVariableData.h.

◆ OutputGradient

template<typename OutputType>
typedef TensorTools::IncrementRank<OutputType>::type MooseVariableData< OutputType >::OutputGradient

Definition at line 66 of file MooseVariableData.h.

◆ OutputSecond

template<typename OutputType>
typedef TensorTools::IncrementRank<OutputGradient>::type MooseVariableData< OutputType >::OutputSecond

Definition at line 67 of file MooseVariableData.h.

◆ OutputShape

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

Definition at line 78 of file MooseVariableData.h.

◆ OutputShapeDivergence

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

Definition at line 83 of file MooseVariableData.h.

◆ OutputShapeGradient

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

Definition at line 81 of file MooseVariableData.h.

◆ OutputShapeSecond

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

Definition at line 82 of file MooseVariableData.h.

Constructor & Destructor Documentation

◆ MooseVariableData()

template<typename OutputType>
MooseVariableData< OutputType >::MooseVariableData ( const MooseVariableFE< OutputType > &  var,
const 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 24 of file MooseVariableData.C.

33  : _var(var),
34  _fe_type(_var.feType()),
35  _var_num(_var.number()),
36  _sys(sys),
38  _tid(tid),
40  _dof_map(_sys.dofMap()),
41  _element_type(element_type),
42  _count(var.count()),
43  _ad_zero(0),
44  _need_u_old(false),
45  _need_u_older(false),
46  _need_u_previous_nl(false),
47  _need_u_dot(false),
48  _need_ad_u_dot(false),
49  _need_u_dotdot(false),
50  _need_u_dot_old(false),
51  _need_u_dotdot_old(false),
52  _need_du_dot_du(false),
53  _need_du_dotdot_du(false),
54  _need_grad_old(false),
55  _need_grad_older(false),
57  _need_grad_dot(false),
58  _need_grad_dotdot(false),
59  _need_second(false),
60  _need_second_old(false),
61  _need_second_older(false),
63  _need_curl(false),
64  _need_curl_old(false),
65  _need_curl_older(false),
66  _need_ad(false),
67  _need_ad_u(false),
68  _need_ad_grad_u(false),
69  _need_ad_second_u(false),
70  _need_dof_values(false),
71  _need_dof_values_old(false),
74  _need_dof_values_dot(false),
78  _need_dof_du_dot_du(false),
80  _has_dof_indices(false),
81  _has_dof_values(false),
82  _qrule(qrule_in),
83  _qrule_face(qrule_face_in),
90  _time_integrator(nullptr),
91  _node(node),
92  _elem(elem),
93  _displaced(dynamic_cast<const DisplacedSystem *>(&_sys) ? true : false),
95 {
96  // FIXME: continuity of FE type seems equivalent with the definition of nodal variables.
97  // Continuity does not depend on the FE dimension, so we just pass in a valid dimension.
98  if (_fe_type.family == NEDELEC_ONE || _fe_type.family == LAGRANGE_VEC ||
99  _fe_type.family == MONOMIAL_VEC)
100  _continuity = _assembly.getVectorFE(_fe_type, _sys.mesh().dimension())->get_continuity();
101  else
102  _continuity = _assembly.getFE(_fe_type, _sys.mesh().dimension())->get_continuity();
103 
104  _is_nodal = (_continuity == C_ZERO || _continuity == C_ONE);
105 
106  auto num_vector_tags = _sys.subproblem().numVectorTags();
107 
108  _vector_tags_dof_u.resize(num_vector_tags);
109  _need_vector_tag_dof_u.resize(num_vector_tags);
110 
111  _need_vector_tag_u.resize(num_vector_tags);
112  _vector_tag_u.resize(num_vector_tags);
113 
114  auto num_matrix_tags = _sys.subproblem().numMatrixTags();
115 
116  _matrix_tags_dof_u.resize(num_matrix_tags);
117  _need_matrix_tag_dof_u.resize(num_matrix_tags);
118 
119  _need_matrix_tag_u.resize(num_matrix_tags);
120  _matrix_tag_u.resize(num_matrix_tags);
121 
123 
124  // These MooseArray objects are used by AuxKernelBase for nodal AuxKernel objects, hence the size
125  // size is always 1 (i.e, nodal kernels work with _qp=0 only).
129 
130  switch (_element_type)
131  {
133  {
134  _phi_assembly_method = &Assembly::fePhi<OutputType>;
135  _phi_face_assembly_method = &Assembly::fePhiFace<OutputType>;
136  _grad_phi_assembly_method = &Assembly::feGradPhi<OutputType>;
137  _grad_phi_face_assembly_method = &Assembly::feGradPhiFace<OutputType>;
138  _second_phi_assembly_method = &Assembly::feSecondPhi<OutputType>;
139  _second_phi_face_assembly_method = &Assembly::feSecondPhiFace<OutputType>;
140  _curl_phi_assembly_method = &Assembly::feCurlPhi<OutputType>;
141  _curl_phi_face_assembly_method = &Assembly::feCurlPhiFace<OutputType>;
142  _ad_grad_phi_assembly_method = &Assembly::feADGradPhi<OutputType>;
143  _ad_grad_phi_face_assembly_method = &Assembly::feADGradPhiFace<OutputType>;
144 
147  break;
148  }
150  {
151  _phi_assembly_method = &Assembly::fePhiNeighbor<OutputType>;
152  _phi_face_assembly_method = &Assembly::fePhiFaceNeighbor<OutputType>;
153  _grad_phi_assembly_method = &Assembly::feGradPhiNeighbor<OutputType>;
154  _grad_phi_face_assembly_method = &Assembly::feGradPhiFaceNeighbor<OutputType>;
155  _second_phi_assembly_method = &Assembly::feSecondPhiNeighbor<OutputType>;
156  _second_phi_face_assembly_method = &Assembly::feSecondPhiFaceNeighbor<OutputType>;
157  _curl_phi_assembly_method = &Assembly::feCurlPhiNeighbor<OutputType>;
158  _curl_phi_face_assembly_method = &Assembly::feCurlPhiFaceNeighbor<OutputType>;
159 
160  _ad_grad_phi = nullptr;
161  _ad_grad_phi_face = nullptr;
162  break;
163  }
165  {
166  _phi_assembly_method = &Assembly::fePhiLower<OutputType>;
167  _phi_face_assembly_method = &Assembly::fePhiLower<OutputType>; // Place holder
168  _grad_phi_assembly_method = &Assembly::feGradPhiLower<OutputType>;
169  _grad_phi_face_assembly_method = &Assembly::feGradPhiLower<OutputType>; // Place holder
170 
171  _ad_grad_phi = nullptr;
172  _ad_grad_phi_face = nullptr;
173  break;
174  }
175  }
180 }

Member Function Documentation

◆ add() [1/2]

template<typename OutputType >
void MooseVariableData< OutputType >::add ( NumericVector< Number > &  residual)

Add the current local DOF values to the input vector.

Definition at line 1663 of file MooseVariableData.C.

1664 {
1665  if (_has_dof_values)
1666  residual.add_vector(&_dof_values[0], _dof_indices);
1667 }

◆ add() [2/2]

template<>
void MooseVariableData< RealEigenVector >::add ( NumericVector< Number > &  residual)

Definition at line 1671 of file MooseVariableData.C.

1672 {
1673  if (_has_dof_values)
1674  {
1675  if (isNodal())
1676  {
1677  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
1678  for (unsigned int j = 0; j < _count; ++j)
1679  residual.add(_dof_indices[i] + j, _dof_values[i](j));
1680  }
1681  else
1682  {
1683  unsigned int n = 0;
1684  for (unsigned int j = 0; j < _count; ++j)
1685  {
1686  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
1687  residual.add(_dof_indices[i] + n, _dof_values[i](j));
1688  n += _dof_indices.size();
1689  }
1690  }
1691  }
1692 }

◆ adDofValues() [1/5]

template<typename OutputType >
template<ComputeStage compute_stage>
const MooseArray< typename Moose::RealType< compute_stage >::type > & MooseVariableData< OutputType >::adDofValues ( ) const

Return the AD dof values.

Definition at line 806 of file MooseVariableData.h.

807 {
808  _need_ad = true;
809  return _ad_dof_values;
810 }

◆ adDofValues() [2/5]

template<>
const MooseArray< Real > & MooseVariableData< RealVectorValue >::adDofValues< RESIDUAL > ( ) const

◆ adDofValues() [3/5]

template<>
const MooseArray< Real > & MooseVariableData< Real >::adDofValues< RESIDUAL > ( ) const

◆ adDofValues() [4/5]

template<>
const MooseArray< Real > & MooseVariableData< Real >::adDofValues< RESIDUAL > ( ) const

Definition at line 2689 of file MooseVariableData.C.

2690 {
2691  return _dof_values;
2692 }

◆ adDofValues() [5/5]

template<>
const MooseArray< Real > & MooseVariableData< RealVectorValue >::adDofValues< RESIDUAL > ( ) const

Definition at line 2697 of file MooseVariableData.C.

2698 {
2699  return _dof_values;
2700 }

◆ addSolution() [1/2]

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

Add passed in local DOF values to a solution vector.

Definition at line 1696 of file MooseVariableData.C.

1698 {
1699  sol.add_vector(v, _dof_indices);
1700 }

◆ addSolution() [2/2]

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

Definition at line 1704 of file MooseVariableData.C.

1706 {
1707  unsigned int p = 0;
1708  for (unsigned int j = 0; j < _count; ++j)
1709  {
1710  unsigned int inc = (isNodal() ? j : j * _dof_indices.size());
1711  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
1712  sol.add(_dof_indices[i] + inc, v(p++));
1713  }
1714 }

◆ adGradPhi() [1/3]

template<typename OutputType>
template<ComputeStage compute_stage>
const VariableTestGradientType<OutputShape, compute_stage>::type& MooseVariableData< OutputType >::adGradPhi ( ) const
inline

ad_grad_phi getter

Definition at line 210 of file MooseVariableData.h.

211  {
212  return *_ad_grad_phi;
213  }

◆ adGradPhi() [2/3]

template<>
const VariableTestGradientType< Real, RESIDUAL >::type & MooseVariableData< Real >::adGradPhi< RESIDUAL > ( ) const
inline

Definition at line 879 of file MooseVariableData.h.

880 {
881  return *_grad_phi;
882 }

◆ adGradPhi() [3/3]

template<>
const VariableTestGradientType< RealVectorValue, RESIDUAL >::type & MooseVariableData< RealVectorValue >::adGradPhi< RESIDUAL > ( ) const
inline

Definition at line 887 of file MooseVariableData.h.

888 {
889  return *_grad_phi;
890 }

◆ adGradPhiFace() [1/3]

template<typename OutputType>
template<ComputeStage compute_stage>
const VariableTestGradientType<OutputShape, compute_stage>::type& MooseVariableData< OutputType >::adGradPhiFace ( ) const
inline

ad_grad_phi_face getter

Definition at line 219 of file MooseVariableData.h.

220  {
221  return *_ad_grad_phi_face;
222  }

◆ adGradPhiFace() [2/3]

template<>
const VariableTestGradientType< Real, RESIDUAL >::type & MooseVariableData< Real >::adGradPhiFace< RESIDUAL > ( ) const
inline

Definition at line 895 of file MooseVariableData.h.

896 {
897  return *_grad_phi_face;
898 }

◆ adGradPhiFace() [3/3]

template<>
const VariableTestGradientType< RealVectorValue, RESIDUAL >::type & MooseVariableData< RealVectorValue >::adGradPhiFace< RESIDUAL > ( ) const
inline

Definition at line 903 of file MooseVariableData.h.

904 {
905  return *_grad_phi_face;
906 }

◆ adGradSln() [1/5]

template<typename OutputType>
template<ComputeStage compute_stage>
const VariableGradientType<OutputType, compute_stage>::type& MooseVariableData< OutputType >::adGradSln ( ) const
inline

Definition at line 313 of file MooseVariableData.h.

314  {
315  _need_ad = _need_ad_grad_u = true;
316  return _ad_grad_u;
317  }

◆ adGradSln() [2/5]

template<>
const VariableGradient & MooseVariableData< Real >::adGradSln< RESIDUAL > ( ) const

◆ adGradSln() [3/5]

template<>
const VectorVariableGradient & MooseVariableData< RealVectorValue >::adGradSln< RESIDUAL > ( ) const

◆ adGradSln() [4/5]

template<>
const VariableGradient & MooseVariableData< Real >::adGradSln< RESIDUAL > ( ) const

Definition at line 2634 of file MooseVariableData.C.

2635 {
2636  return _grad_u;
2637 }

◆ adGradSln() [5/5]

template<>
const VectorVariableGradient & MooseVariableData< RealVectorValue >::adGradSln< RESIDUAL > ( ) const

Definition at line 2642 of file MooseVariableData.C.

2643 {
2644  return _grad_u;
2645 }

◆ adNodalValue() [1/5]

template<typename OutputType >
template<ComputeStage compute_stage>
const Moose::ValueType< OutputType, compute_stage >::type & MooseVariableData< OutputType >::adNodalValue ( ) const

Definition at line 815 of file MooseVariableData.h.

816 {
817  _need_ad = true;
818  return _ad_nodal_value;
819 }

◆ adNodalValue() [2/5]

template<>
const Real & MooseVariableData< Real >::adNodalValue< RESIDUAL > ( ) const

◆ adNodalValue() [3/5]

template<>
const RealVectorValue & MooseVariableData< RealVectorValue >::adNodalValue< RESIDUAL > ( ) const

◆ adNodalValue() [4/5]

template<>
const Real & MooseVariableData< Real >::adNodalValue< RESIDUAL > ( ) const

Definition at line 2705 of file MooseVariableData.C.

2706 {
2707  return _nodal_value;
2708 }

◆ adNodalValue() [5/5]

template<>
const RealVectorValue & MooseVariableData< RealVectorValue >::adNodalValue< RESIDUAL > ( ) const

Definition at line 2713 of file MooseVariableData.C.

2714 {
2715  return _nodal_value;
2716 }

◆ adSecondSln() [1/5]

template<typename OutputType>
template<ComputeStage compute_stage>
const VariableSecondType<OutputType, compute_stage>::type& MooseVariableData< OutputType >::adSecondSln ( ) const
inline

Definition at line 320 of file MooseVariableData.h.

321  {
322  _need_ad = _need_ad_second_u = true;
323  secondPhi();
324  secondPhiFace();
325  return _ad_second_u;
326  }

◆ adSecondSln() [2/5]

template<>
const VariableSecond & MooseVariableData< Real >::adSecondSln< RESIDUAL > ( ) const

◆ adSecondSln() [3/5]

template<>
const VectorVariableSecond & MooseVariableData< RealVectorValue >::adSecondSln< RESIDUAL > ( ) const

◆ adSecondSln() [4/5]

template<>
const VariableSecond & MooseVariableData< Real >::adSecondSln< RESIDUAL > ( ) const

Definition at line 2650 of file MooseVariableData.C.

2651 {
2652  _need_second = true;
2653  secondPhi();
2654  secondPhiFace();
2655  return _second_u;
2656 }

◆ adSecondSln() [5/5]

template<>
const VectorVariableSecond & MooseVariableData< RealVectorValue >::adSecondSln< RESIDUAL > ( ) const

Definition at line 2661 of file MooseVariableData.C.

2662 {
2663  _need_second = true;
2664  secondPhi();
2665  secondPhiFace();
2666  return _second_u;
2667 }

◆ adSln() [1/5]

template<typename OutputType>
template<ComputeStage compute_stage>
const VariableValueType<OutputType, compute_stage>::type& MooseVariableData< OutputType >::adSln ( ) const
inline

Definition at line 306 of file MooseVariableData.h.

307  {
308  _need_ad = _need_ad_u = true;
309  return _ad_u;
310  }

◆ adSln() [2/5]

template<>
const VariableValue & MooseVariableData< Real >::adSln< RESIDUAL > ( ) const

◆ adSln() [3/5]

template<>
const VectorVariableValue & MooseVariableData< RealVectorValue >::adSln< RESIDUAL > ( ) const

◆ adSln() [4/5]

template<>
const VariableValue & MooseVariableData< Real >::adSln< RESIDUAL > ( ) const

Definition at line 2618 of file MooseVariableData.C.

2619 {
2620  return _u;
2621 }

◆ adSln() [5/5]

template<>
const VectorVariableValue & MooseVariableData< RealVectorValue >::adSln< RESIDUAL > ( ) const

Definition at line 2626 of file MooseVariableData.C.

2627 {
2628  return _u;
2629 }

◆ adUDot() [1/5]

template<typename OutputType>
template<ComputeStage compute_stage>
const VariableValueType<OutputType, compute_stage>::type& MooseVariableData< OutputType >::adUDot ( ) const
inline

Definition at line 329 of file MooseVariableData.h.

330  {
331  _need_ad = _need_ad_u_dot = true;
332  return _ad_u_dot;
333  }

◆ adUDot() [2/5]

template<>
const VariableValue & MooseVariableData< Real >::adUDot< RESIDUAL > ( ) const

◆ adUDot() [3/5]

template<>
const VectorVariableValue & MooseVariableData< RealVectorValue >::adUDot< RESIDUAL > ( ) const

◆ adUDot() [4/5]

template<>
const VariableValue & MooseVariableData< Real >::adUDot< RESIDUAL > ( ) const

Definition at line 2672 of file MooseVariableData.C.

2673 {
2674 
2675  return uDot();
2676 }

◆ adUDot() [5/5]

template<>
const VectorVariableValue & MooseVariableData< RealVectorValue >::adUDot< RESIDUAL > ( ) const

Definition at line 2681 of file MooseVariableData.C.

2682 {
2683  return uDot();
2684 }

◆ arrayGradPhi()

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

mapped_grad_phi getter

Definition at line 166 of file MooseVariableData.h.

167  {
168  mooseAssert(_var.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY, "Not an array variable");
169  return _mapped_grad_phi;
170  }

◆ arrayGradPhiFace()

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

mapped_grad_phi_face getter

Definition at line 180 of file MooseVariableData.h.

181  {
182  mooseAssert(_var.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY, "Not an array variable");
183  return _mapped_grad_phi_face;
184  }

◆ assignADNodalValue() [1/3]

template<>
void MooseVariableData< Real >::assignADNodalValue ( const DualReal value,
const unsigned int &   
)
private

Definition at line 2493 of file MooseVariableData.C.

2494 {
2495  _ad_nodal_value = value;
2496 }

◆ assignADNodalValue() [2/3]

template<typename OutputType>
void MooseVariableData< OutputType >::assignADNodalValue ( const DualReal value,
const unsigned int &  component 
)
private

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

These methods are only truly meaningful for nodal basis families

◆ assignADNodalValue() [3/3]

template<>
void MooseVariableData< RealVectorValue >::assignADNodalValue ( const DualReal value,
const unsigned int &  component 
)
private

Definition at line 2500 of file MooseVariableData.C.

2502 {
2503  _ad_nodal_value(component) = value;
2504 }

◆ assignNodalValue() [1/2]

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

Definition at line 2419 of file MooseVariableData.C.

2420 {
2421  bool is_transient = _subproblem.isTransient();
2422 
2423  libmesh_assert(_dof_indices.size());
2424 
2427 
2428  if (is_transient)
2429  {
2431  {
2434  }
2436  {
2439  }
2448  }
2451 }

◆ assignNodalValue() [2/2]

template<>
void MooseVariableData< RealVectorValue >::assignNodalValue ( )
private

Definition at line 2455 of file MooseVariableData.C.

2456 {
2457  bool is_transient = _subproblem.isTransient();
2458 
2459  auto n = _dof_indices.size();
2460  libmesh_assert(n);
2461 
2462  for (decltype(n) i = 0; i < n; ++i)
2463  _nodal_value(i) = _dof_values[i];
2464 
2465  if (is_transient)
2466  {
2468  for (decltype(n) i = 0; i < n; ++i)
2471  for (decltype(n) i = 0; i < n; ++i)
2474  for (decltype(n) i = 0; i < n; ++i)
2477  for (decltype(n) i = 0; i < n; ++i)
2480  for (decltype(n) i = 0; i < n; ++i)
2483  for (decltype(n) i = 0; i < n; ++i)
2485  }
2487  for (decltype(n) i = 0; i < n; ++i)
2489 }

◆ clearDofIndices()

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

Definition at line 396 of file MooseVariableData.h.

396 { _dof_indices.clear(); }

◆ computeAD() [1/2]

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

compute AD things

Definition at line 1282 of file MooseVariableData.C.

1283 {
1284  _ad_dof_values.resize(num_dofs);
1285  if (_need_ad_u)
1286  _ad_u.resize(nqp);
1287 
1288  if (_need_ad_grad_u)
1289  _ad_grad_u.resize(nqp);
1290 
1291  if (_need_ad_second_u)
1292  _ad_second_u.resize(nqp);
1293 
1294  if (_need_ad_u_dot)
1295  {
1296  _ad_dofs_dot.resize(num_dofs);
1297  _ad_u_dot.resize(nqp);
1298  }
1299 
1300  // Derivatives are offset by the variable number
1301  size_t ad_offset;
1302  switch (_element_type)
1303  {
1305  ad_offset = _var_num * _sys.getMaxVarNDofsPerElem();
1306  break;
1307 
1309  ad_offset = _var_num * _sys.getMaxVarNDofsPerElem() +
1310  (_sys.system().n_vars() * _sys.getMaxVarNDofsPerElem());
1311  break;
1312 
1314  // At the time of writing, this Lower case is only used in mortar applications where we are
1315  // re-init'ing on Element, Neighbor, and Lower dimensional elements
1316  // simultaneously. Consequently, we make sure here that our offset is greater than the sum of
1317  // the element and neighbor dofs. I can imagine a future case in which you're not re-init'ing
1318  // on all three simultaneously in which case this offset could be smaller. Also note that the
1319  // number of dofs on lower-d elements is guaranteed to be lower than on the higher dimensional
1320  // element, but we're not using that knowledge here. In the future we could implement
1321  // something like SystemBase::getMaxVarNDofsPerFace (or *PerLowerDElem)
1322  ad_offset = 2 * _sys.system().n_vars() * _sys.getMaxVarNDofsPerElem() +
1324  break;
1325 
1326  default:
1327  mooseError(
1328  "Unsupported element type ",
1329  static_cast<typename std::underlying_type<decltype(_element_type)>::type>(_element_type));
1330  }
1331  mooseAssert(_var.kind() == Moose::VarKindType::VAR_AUXILIARY || ad_offset || !_var_num,
1332  "Either this is the zeroth variable or we should have an offset");
1333 
1334 #ifndef MOOSE_SPARSE_AD
1335  if (ad_offset + num_dofs > MOOSE_AD_MAX_DOFS_PER_ELEM)
1336  mooseError("Current number of dofs per element ",
1337  ad_offset + num_dofs,
1338  " is greater than AD_MAX_DOFS_PER_ELEM of ",
1339  MOOSE_AD_MAX_DOFS_PER_ELEM,
1340  ". You can run `configure --with-derivative-size=<n>` to request a larger "
1341  "derivative container.");
1342 #endif
1343 
1344  for (unsigned int qp = 0; qp < nqp; qp++)
1345  {
1346  if (_need_ad_u)
1347  _ad_u[qp] = _ad_zero;
1348 
1349  if (_need_ad_grad_u)
1350  _ad_grad_u[qp] = _ad_zero;
1351 
1352  if (_need_ad_second_u)
1353  _ad_second_u[qp] = _ad_zero;
1354 
1355  if (_need_ad_u_dot)
1356  _ad_u_dot[qp] = _ad_zero;
1357  }
1358 
1359  for (unsigned int i = 0; i < num_dofs; i++)
1360  {
1362 
1363  // NOTE! You have to do this AFTER setting the value!
1364  if (_var.kind() == Moose::VAR_NONLINEAR)
1365  Moose::derivInsert(_ad_dof_values[i].derivatives(), ad_offset + i, 1.);
1366 
1368  {
1369  _ad_dofs_dot[i] = _ad_dof_values[i];
1371  }
1372  }
1373 
1374  // Now build up the solution at each quadrature point:
1375  for (unsigned int i = 0; i < num_dofs; i++)
1376  {
1377  for (unsigned int qp = 0; qp < nqp; qp++)
1378  {
1379  if (_need_ad_u)
1380  _ad_u[qp] += _ad_dof_values[i] * (*_current_phi)[i][qp];
1381 
1382  if (_need_ad_grad_u)
1383  {
1384  // The latter check here is for handling the fact that we have not yet implemented
1385  // calculation of ad_grad_phi for neighbor and neighbor-face, so if we are in that situation
1386  // we need to default to using the non-ad grad_phi
1388  _ad_grad_u[qp] += _ad_dof_values[i] * (*_current_ad_grad_phi)[i][qp];
1389  else
1390  _ad_grad_u[qp] += _ad_dof_values[i] * (*_current_grad_phi)[i][qp];
1391  }
1392 
1393  if (_need_ad_second_u)
1394  // Note that this will not carry any derivatives with respect to displacements because those
1395  // calculations have not yet been implemented in Assembly
1396  _ad_second_u[qp] += _ad_dof_values[i] * (*_current_second_phi)[i][qp];
1397 
1399  _ad_u_dot[qp] += (*_current_phi)[i][qp] * _ad_dofs_dot[i];
1400  }
1401  }
1402 
1404  for (MooseIndex(nqp) qp = 0; qp < nqp; ++qp)
1405  _ad_u_dot[qp] = _u_dot[qp];
1406 }

◆ computeAD() [2/2]

template<>
void MooseVariableData< RealEigenVector >::computeAD ( const unsigned int  ,
const unsigned int   
)

Definition at line 1410 of file MooseVariableData.C.

1412 {
1413  mooseError("AD for array variable has not been implemented");
1414 }

◆ computeIncrementAtNode() [1/2]

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

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

Definition at line 1876 of file MooseVariableData.C.

1877 {
1878  if (!isNodal())
1879  mooseError("computeIncrementAtNode can only be called for nodal variables");
1880 
1881  _increment.resize(1);
1882 
1883  // Compute the increment for the current DOF
1884  _increment[0] = increment_vec(_dof_indices[0]);
1885 }

◆ computeIncrementAtNode() [2/2]

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

Definition at line 1889 of file MooseVariableData.C.

1891 {
1892  if (!isNodal())
1893  mooseError("computeIncrementAtNode can only be called for nodal variables");
1894 
1895  _increment.resize(1);
1896 
1897  // Compute the increment for the current DOF
1898  if (isNodal())
1899  for (unsigned int j = 0; j < _count; j++)
1900  _increment[0](j) = increment_vec(_dof_indices[0] + j);
1901  else
1902  {
1903  unsigned int n = 0;
1904  for (unsigned int j = 0; j < _count; j++)
1905  {
1906  _increment[0](j) = increment_vec(_dof_indices[0] + n);
1907  n += _dof_indices.size();
1908  }
1909  }
1910 }

◆ computeIncrementAtQps() [1/2]

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

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

Definition at line 1825 of file MooseVariableData.C.

1826 {
1827  unsigned int nqp = _qrule->n_points();
1828 
1829  _increment.resize(nqp);
1830  // Compute the increment at each quadrature point
1831  unsigned int num_dofs = _dof_indices.size();
1832  for (unsigned int qp = 0; qp < nqp; qp++)
1833  {
1834  _increment[qp] = 0;
1835  for (unsigned int i = 0; i < num_dofs; i++)
1836  _increment[qp] += (*_phi)[i][qp] * increment_vec(_dof_indices[i]);
1837  }
1838 }

◆ computeIncrementAtQps() [2/2]

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

Definition at line 1842 of file MooseVariableData.C.

1844 {
1845  unsigned int nqp = _qrule->n_points();
1846 
1847  _increment.resize(nqp);
1848  // Compute the increment at each quadrature point
1849  unsigned int num_dofs = _dof_indices.size();
1850  if (isNodal())
1851  {
1852  for (unsigned int qp = 0; qp < nqp; qp++)
1853  {
1854  for (unsigned int i = 0; i < num_dofs; i++)
1855  for (unsigned int j = 0; j < _count; j++)
1856  _increment[qp](j) += (*_phi)[i][qp] * increment_vec(_dof_indices[i] + j);
1857  }
1858  }
1859  else
1860  {
1861  for (unsigned int qp = 0; qp < nqp; qp++)
1862  {
1863  unsigned int n = 0;
1864  for (unsigned int j = 0; j < _count; j++)
1865  for (unsigned int i = 0; i < num_dofs; i++)
1866  {
1867  _increment[qp](j) += (*_phi)[i][qp] * increment_vec(_dof_indices[i] + n);
1868  n += num_dofs;
1869  }
1870  }
1871  }
1872 }

◆ computeMonomialValues() [1/2]

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

compute the values for const monomial variables

Definition at line 1066 of file MooseVariableData.C.

1067 {
1068  if (_dof_indices.size() == 0)
1069  return;
1070 
1071  bool is_transient = _subproblem.isTransient();
1072  unsigned int nqp = _current_qrule->n_points();
1073 
1074  _u.resize(nqp);
1075  _grad_u.resize(nqp);
1076 
1077  if (_need_second)
1078  _second_u.resize(nqp);
1079 
1080  if (_need_u_previous_nl)
1081  _u_previous_nl.resize(nqp);
1082 
1085 
1088 
1089  if (is_transient)
1090  {
1091  if (_need_u_dot)
1092  _u_dot.resize(nqp);
1093 
1094  if (_need_u_dotdot)
1095  _u_dotdot.resize(nqp);
1096 
1097  if (_need_u_dot_old)
1098  _u_dot_old.resize(nqp);
1099 
1100  if (_need_u_dotdot_old)
1101  _u_dotdot_old.resize(nqp);
1102 
1103  if (_need_du_dot_du)
1104  _du_dot_du.resize(nqp);
1105 
1106  if (_need_du_dotdot_du)
1107  _du_dotdot_du.resize(nqp);
1108 
1109  if (_need_u_old)
1110  _u_old.resize(nqp);
1111 
1112  if (_need_u_older)
1113  _u_older.resize(nqp);
1114 
1115  if (_need_grad_old)
1116  _grad_u_old.resize(nqp);
1117 
1118  if (_need_grad_older)
1119  _grad_u_older.resize(nqp);
1120 
1121  if (_need_second_old)
1122  _second_u_old.resize(nqp);
1123 
1124  if (_need_second_older)
1125  _second_u_older.resize(nqp);
1126  }
1127 
1128  if (_need_dof_values)
1129  _dof_values.resize(1);
1130 
1133 
1134  if (is_transient)
1135  {
1148  }
1149 
1150  const dof_id_type & idx = _dof_indices[0];
1151  const Real & soln = (*_sys.currentSolution())(idx);
1152  Real soln_old = 0;
1153  Real soln_older = 0;
1154  Real soln_previous_nl = 0;
1155  Real u_dot = 0;
1156  Real u_dotdot = 0;
1157  Real u_dot_old = 0;
1158  Real u_dotdot_old = 0;
1159  const Real & du_dot_du = _sys.duDotDu();
1160  const Real & du_dotdot_du = _sys.duDotDotDu();
1161 
1162  if (_need_dof_values)
1163  _dof_values[0] = soln;
1164 
1167  soln_previous_nl = (*_sys.solutionPreviousNewton())(idx);
1168 
1170  _dof_values_previous_nl[0] = soln_previous_nl;
1171 
1172  if (is_transient)
1173  {
1175  soln_old = _sys.solutionOld()(idx);
1176 
1178  soln_older = _sys.solutionOlder()(idx);
1179 
1181  _dof_values_old[0] = soln_old;
1182 
1184  _dof_values_older[0] = soln_older;
1185 
1186  if (_sys.solutionUDot())
1187  u_dot = (*_sys.solutionUDot())(idx);
1188  if (_sys.solutionUDotDot())
1189  u_dotdot = (*_sys.solutionUDotDot())(idx);
1190  if (_sys.solutionUDotOld())
1191  u_dot_old = (*_sys.solutionUDotOld())(idx);
1192  if (_sys.solutionUDotDotOld())
1193  u_dotdot_old = (*_sys.solutionUDotDotOld())(idx);
1194 
1196  _dof_values_dot[0] = u_dot;
1197 
1199  _dof_values_dotdot[0] = u_dotdot;
1200  }
1201 
1202  auto phi = (*_current_phi)[0][0];
1203 
1204  _u[0] = phi * soln;
1205 
1206  if (_need_u_previous_nl)
1207  _u_previous_nl[0] = phi * soln_previous_nl;
1208 
1209  if (is_transient)
1210  {
1211  if (_need_u_dot)
1212  _u_dot[0] = phi * u_dot;
1213 
1214  if (_need_u_dotdot)
1215  _u_dotdot[0] = phi * u_dotdot;
1216 
1217  if (_need_u_dot_old)
1218  _u_dot_old[0] = phi * u_dot_old;
1219 
1220  if (_need_u_dotdot_old)
1221  _u_dotdot_old[0] = phi * u_dotdot_old;
1222 
1223  if (_need_du_dot_du)
1224  _du_dot_du[0] = du_dot_du;
1225 
1226  if (_need_du_dotdot_du)
1227  _du_dotdot_du[0] = du_dotdot_du;
1228 
1229  if (_need_u_old)
1230  _u_old[0] = phi * soln_old;
1231 
1232  if (_need_u_older)
1233  _u_older[0] = phi * soln_older;
1234  }
1235 
1236  for (unsigned qp = 1; qp < nqp; ++qp)
1237  {
1238  _u[qp] = _u[0];
1239 
1240  if (_need_u_previous_nl)
1241  _u_previous_nl[qp] = _u_previous_nl[0];
1242 
1243  if (is_transient)
1244  {
1245  if (_need_u_dot)
1246  _u_dot[qp] = _u_dot[0];
1247 
1248  if (_need_u_dotdot)
1249  _u_dotdot[qp] = _u_dotdot[0];
1250 
1251  if (_need_u_dot_old)
1252  _u_dot_old[qp] = _u_dot_old[0];
1253 
1254  if (_need_u_dotdot_old)
1255  _u_dotdot_old[qp] = _u_dotdot_old[0];
1256 
1257  if (_need_du_dot_du)
1258  _du_dot_du[qp] = _du_dot_du[0];
1259 
1260  if (_need_du_dotdot_du)
1261  _du_dotdot_du[qp] = _du_dotdot_du[0];
1262 
1263  if (_need_u_old)
1264  _u_old[qp] = _u_old[0];
1265 
1266  if (_need_u_older)
1267  _u_older[qp] = _u_older[qp];
1268  }
1269  }
1270 }

◆ computeMonomialValues() [2/2]

template<>
void MooseVariableData< RealEigenVector >::computeMonomialValues ( )

Definition at line 1274 of file MooseVariableData.C.

1275 {
1276  // Fixeme: will think of optimization later
1277  computeValues();
1278 }

◆ computeNodalValues()

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

compute nodal things

Definition at line 2084 of file MooseVariableData.C.

2085 {
2086  if (_has_dof_indices)
2087  {
2088  fetchDoFValues();
2089  assignNodalValue();
2090 
2092  fetchADDoFValues();
2093  }
2094  else
2096 }

◆ computeValues() [1/2]

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

compute the variable values

Definition at line 471 of file MooseVariableData.C.

472 {
473  unsigned int num_dofs = _dof_indices.size();
474 
475  if (num_dofs > 0)
476  fetchDoFValues();
477 
478  bool is_transient = _subproblem.isTransient();
479  unsigned int nqp = _current_qrule->n_points();
480  auto && active_coupleable_vector_tags =
482  auto && active_coupleable_matrix_tags =
484 
485  _u.resize(nqp);
486  _grad_u.resize(nqp);
487 
488  for (auto tag : active_coupleable_vector_tags)
489  if (_need_vector_tag_u[tag])
490  _vector_tag_u[tag].resize(nqp);
491 
492  for (auto tag : active_coupleable_matrix_tags)
493  if (_need_matrix_tag_u[tag])
494  _matrix_tag_u[tag].resize(nqp);
495 
496  if (_need_second)
497  _second_u.resize(nqp);
498 
499  if (_need_curl)
500  _curl_u.resize(nqp);
501 
503  _u_previous_nl.resize(nqp);
504 
507 
510 
511  if (is_transient)
512  {
513  if (_need_u_dot)
514  _u_dot.resize(nqp);
515 
516  if (_need_u_dotdot)
517  _u_dotdot.resize(nqp);
518 
519  if (_need_u_dot_old)
520  _u_dot_old.resize(nqp);
521 
522  if (_need_u_dotdot_old)
523  _u_dotdot_old.resize(nqp);
524 
525  if (_need_du_dot_du)
526  _du_dot_du.resize(nqp);
527 
528  if (_need_du_dotdot_du)
529  _du_dotdot_du.resize(nqp);
530 
531  if (_need_grad_dot)
532  _grad_u_dot.resize(nqp);
533 
534  if (_need_grad_dotdot)
535  _grad_u_dotdot.resize(nqp);
536 
537  if (_need_u_old)
538  _u_old.resize(nqp);
539 
540  if (_need_u_older)
541  _u_older.resize(nqp);
542 
543  if (_need_grad_old)
544  _grad_u_old.resize(nqp);
545 
546  if (_need_grad_older)
547  _grad_u_older.resize(nqp);
548 
549  if (_need_second_old)
550  _second_u_old.resize(nqp);
551 
552  if (_need_curl_old)
553  _curl_u_old.resize(nqp);
554 
555  if (_need_second_older)
556  _second_u_older.resize(nqp);
557  }
558 
559  for (unsigned int i = 0; i < nqp; ++i)
560  {
561  _u[i] = 0;
562  _grad_u[i] = 0;
563 
564  for (auto tag : active_coupleable_vector_tags)
565  if (_need_vector_tag_u[tag])
566  _vector_tag_u[tag][i] = 0;
567 
568  for (auto tag : active_coupleable_matrix_tags)
569  if (_need_matrix_tag_u[tag])
570  _matrix_tag_u[tag][i] = 0;
571 
572  if (_need_second)
573  _second_u[i] = 0;
574 
575  if (_need_curl)
576  _curl_u[i] = 0;
577 
579  _u_previous_nl[i] = 0;
580 
582  _grad_u_previous_nl[i] = 0;
583 
585  _second_u_previous_nl[i] = 0;
586 
587  if (is_transient)
588  {
589  if (_need_u_dot)
590  _u_dot[i] = 0;
591 
592  if (_need_u_dotdot)
593  _u_dotdot[i] = 0;
594 
595  if (_need_u_dot_old)
596  _u_dot_old[i] = 0;
597 
598  if (_need_u_dotdot_old)
599  _u_dotdot_old[i] = 0;
600 
601  if (_need_du_dot_du)
602  _du_dot_du[i] = 0;
603 
604  if (_need_du_dotdot_du)
605  _du_dotdot_du[i] = 0;
606 
607  if (_need_grad_dot)
608  _grad_u_dot[i] = 0;
609 
610  if (_need_grad_dotdot)
611  _grad_u_dotdot[i] = 0;
612 
613  if (_need_u_old)
614  _u_old[i] = 0;
615 
616  if (_need_u_older)
617  _u_older[i] = 0;
618 
619  if (_need_grad_old)
620  _grad_u_old[i] = 0;
621 
622  if (_need_grad_older)
623  _grad_u_older[i] = 0;
624 
625  if (_need_second_old)
626  _second_u_old[i] = 0;
627 
628  if (_need_second_older)
629  _second_u_older[i] = 0;
630 
631  if (_need_curl_old)
632  _curl_u_old[i] = 0;
633  }
634  }
635 
636  bool second_required =
638  bool curl_required = _need_curl || _need_curl_old;
639 
640  for (unsigned int i = 0; i < num_dofs; i++)
641  {
642  for (unsigned int qp = 0; qp < nqp; qp++)
643  {
644  const OutputType phi_local = (*_current_phi)[i][qp];
645  const typename OutputTools<OutputType>::OutputGradient dphi_qp = (*_current_grad_phi)[i][qp];
646 
647  _u[qp] += phi_local * _dof_values[i];
648 
649  _grad_u[qp].add_scaled(dphi_qp, _dof_values[i]);
650 
651  if (is_transient)
652  {
653  if (_need_u_old)
654  _u_old[qp] += phi_local * _dof_values_old[i];
655 
656  if (_need_u_older)
657  _u_older[qp] += phi_local * _dof_values_older[i];
658 
659  if (_need_grad_old)
660  _grad_u_old[qp].add_scaled(dphi_qp, _dof_values_old[i]);
661 
662  if (_need_grad_older)
663  _grad_u_older[qp].add_scaled(dphi_qp, _dof_values_older[i]);
664 
665  if (_need_u_dot)
666  _u_dot[qp] += phi_local * _dof_values_dot[i];
667 
668  if (_need_u_dotdot)
669  _u_dotdot[qp] += phi_local * _dof_values_dotdot[i];
670 
671  if (_need_u_dot_old)
672  _u_dot_old[qp] += phi_local * _dof_values_dot_old[i];
673 
674  if (_need_u_dotdot_old)
675  _u_dotdot_old[qp] += phi_local * _dof_values_dotdot_old[i];
676 
677  if (_need_grad_dot)
678  _grad_u_dot[qp].add_scaled(dphi_qp, _dof_values_dot[i]);
679 
680  if (_need_grad_dotdot)
681  _grad_u_dotdot[qp].add_scaled(dphi_qp, _dof_values_dotdot[i]);
682 
683  if (_need_du_dot_du)
684  _du_dot_du[qp] = _dof_du_dot_du[i];
685 
686  if (_need_du_dotdot_du)
688  }
689 
690  if (second_required)
691  {
692  mooseAssert(
694  "We're requiring a second calculation but have not set a second shape function!");
695  const typename OutputTools<OutputType>::OutputSecond d2phi_local =
696  (*_current_second_phi)[i][qp];
697 
698  if (_need_second)
699  _second_u[qp].add_scaled(d2phi_local, _dof_values[i]);
700 
702  _second_u_previous_nl[qp].add_scaled(d2phi_local, _dof_values_previous_nl[i]);
703 
704  if (is_transient)
705  {
706  if (_need_second_old)
707  _second_u_old[qp].add_scaled(d2phi_local, _dof_values_old[i]);
708 
709  if (_need_second_older)
710  _second_u_older[qp].add_scaled(d2phi_local, _dof_values_older[i]);
711  }
712  }
713 
714  if (curl_required)
715  {
716  mooseAssert(_current_curl_phi,
717  "We're requiring a curl calculation but have not set a curl shape function!");
718  const OutputType curl_phi_local = (*_current_curl_phi)[i][qp];
719 
720  if (_need_curl)
721  _curl_u[qp] += curl_phi_local * _dof_values[i];
722 
723  if (is_transient && _need_curl_old)
724  _curl_u_old[qp] += curl_phi_local * _dof_values_old[i];
725  }
726 
727  for (auto tag : active_coupleable_vector_tags)
728  if (_need_vector_tag_u[tag])
729  _vector_tag_u[tag][qp] += phi_local * _vector_tags_dof_u[tag][i];
730 
731  for (auto tag : active_coupleable_matrix_tags)
732  if (_need_matrix_tag_u[tag])
733  _matrix_tag_u[tag][qp] += phi_local * _matrix_tags_dof_u[tag][i];
734 
736  _u_previous_nl[qp] += phi_local * _dof_values_previous_nl[i];
737 
739  _grad_u_previous_nl[qp].add_scaled(dphi_qp, _dof_values_previous_nl[i]);
740  }
741  }
742 
743  // Automatic differentiation
745  computeAD(num_dofs, nqp);
746 }

◆ computeValues() [2/2]

template<>
void MooseVariableData< RealEigenVector >::computeValues ( )

Definition at line 750 of file MooseVariableData.C.

751 {
752  unsigned int num_dofs = _dof_indices.size();
753 
754  if (num_dofs > 0)
755  fetchDoFValues();
756 
757  bool is_transient = _subproblem.isTransient();
758  unsigned int nqp = _current_qrule->n_points();
759  auto && active_coupleable_vector_tags =
761  auto && active_coupleable_matrix_tags =
763 
764  // Map grad_phi using Eigen so that we can perform array operations easier
765  if (_qrule == _current_qrule)
766  {
767  _mapped_grad_phi.resize(num_dofs);
768  for (unsigned int i = 0; i < num_dofs; i++)
769  {
770  _mapped_grad_phi[i].resize(nqp, Eigen::Map<RealDIMValue>(nullptr));
771  for (unsigned int qp = 0; qp < nqp; qp++)
772  // Note: this does NOT do any allocation. It is "reconstructing" the object in place
773  new (&_mapped_grad_phi[i][qp])
774  Eigen::Map<RealDIMValue>(const_cast<Real *>(&(*_current_grad_phi)[i][qp](0)));
775  }
776  }
777  else
778  {
779  _mapped_grad_phi_face.resize(num_dofs);
780  for (unsigned int i = 0; i < num_dofs; i++)
781  {
782  _mapped_grad_phi_face[i].resize(nqp, Eigen::Map<RealDIMValue>(nullptr));
783  for (unsigned int qp = 0; qp < nqp; qp++)
784  // Note: this does NOT do any allocation. It is "reconstructing" the object in place
785  new (&_mapped_grad_phi_face[i][qp])
786  Eigen::Map<RealDIMValue>(const_cast<Real *>(&(*_current_grad_phi)[i][qp](0)));
787  }
788  }
789 
790  _u.resize(nqp);
791  _grad_u.resize(nqp);
792 
793  for (auto tag : active_coupleable_vector_tags)
794  if (_need_vector_tag_u[tag])
795  _vector_tag_u[tag].resize(nqp);
796 
797  for (auto tag : active_coupleable_matrix_tags)
798  if (_need_matrix_tag_u[tag])
799  _matrix_tag_u[tag].resize(nqp);
800 
801  if (_need_second)
802  _second_u.resize(nqp);
803 
804  if (_need_curl)
805  _curl_u.resize(nqp);
806 
808  _u_previous_nl.resize(nqp);
809 
812 
815 
816  if (is_transient)
817  {
818  if (_need_u_dot)
819  _u_dot.resize(nqp);
820 
821  if (_need_u_dotdot)
822  _u_dotdot.resize(nqp);
823 
824  if (_need_u_dot_old)
825  _u_dot_old.resize(nqp);
826 
827  if (_need_u_dotdot_old)
828  _u_dotdot_old.resize(nqp);
829 
830  if (_need_du_dot_du)
831  _du_dot_du.resize(nqp);
832 
833  if (_need_du_dotdot_du)
834  _du_dotdot_du.resize(nqp);
835 
836  if (_need_grad_dot)
837  _grad_u_dot.resize(nqp);
838 
839  if (_need_grad_dotdot)
840  _grad_u_dotdot.resize(nqp);
841 
842  if (_need_u_old)
843  _u_old.resize(nqp);
844 
845  if (_need_u_older)
846  _u_older.resize(nqp);
847 
848  if (_need_grad_old)
849  _grad_u_old.resize(nqp);
850 
851  if (_need_grad_older)
852  _grad_u_older.resize(nqp);
853 
854  if (_need_second_old)
855  _second_u_old.resize(nqp);
856 
857  if (_need_curl_old)
858  _curl_u_old.resize(nqp);
859 
860  if (_need_second_older)
861  _second_u_older.resize(nqp);
862  }
863 
864  for (unsigned int i = 0; i < nqp; ++i)
865  {
866  _u[i].setZero(_count);
867  _grad_u[i].setZero(_count, LIBMESH_DIM);
868 
869  for (auto tag : active_coupleable_vector_tags)
870  if (_need_vector_tag_u[tag])
871  _vector_tag_u[tag][i].setZero(_count);
872 
873  for (auto tag : active_coupleable_matrix_tags)
874  if (_need_matrix_tag_u[tag])
875  _matrix_tag_u[tag][i].setZero(_count);
876 
877  if (_need_second)
878  _second_u[i].setZero(_count, LIBMESH_DIM * LIBMESH_DIM);
879 
880  if (_need_curl)
881  _curl_u[i].setZero(_count);
882 
884  _u_previous_nl[i].setZero(_count);
885 
887  _grad_u_previous_nl[i].setZero(_count, LIBMESH_DIM);
888 
890  _second_u_previous_nl[i].setZero(_count, LIBMESH_DIM * LIBMESH_DIM);
891 
892  if (is_transient)
893  {
894  if (_need_u_dot)
895  _u_dot[i].setZero(_count);
896 
897  if (_need_u_dotdot)
898  _u_dotdot[i].setZero(_count);
899 
900  if (_need_u_dot_old)
901  _u_dot_old[i].setZero(_count);
902 
903  if (_need_u_dotdot_old)
904  _u_dotdot_old[i].setZero(_count);
905 
906  if (_need_du_dot_du)
907  _du_dot_du[i] = 0;
908 
909  if (_need_du_dotdot_du)
910  _du_dotdot_du[i] = 0;
911 
912  if (_need_grad_dot)
913  _grad_u_dot[i].setZero(_count, LIBMESH_DIM);
914 
915  if (_need_grad_dotdot)
916  _grad_u_dotdot[i].setZero(_count, LIBMESH_DIM);
917 
918  if (_need_u_old)
919  _u_old[i].setZero(_count);
920 
921  if (_need_u_older)
922  _u_older[i].setZero(_count);
923 
924  if (_need_grad_old)
925  _grad_u_old[i].setZero(_count, LIBMESH_DIM);
926 
927  if (_need_grad_older)
928  _grad_u_older[i].setZero(_count, LIBMESH_DIM);
929 
930  if (_need_second_old)
931  _second_u_old[i].setZero(_count, LIBMESH_DIM * LIBMESH_DIM);
932 
933  if (_need_second_older)
934  _second_u_older[i].setZero(_count, LIBMESH_DIM * LIBMESH_DIM);
935 
936  if (_need_curl_old)
937  _curl_u_old[i].setZero(_count);
938  }
939  }
940 
941  bool second_required =
943  bool curl_required = _need_curl || _need_curl_old;
944 
945  for (unsigned int i = 0; i < num_dofs; i++)
946  {
947  for (unsigned int qp = 0; qp < nqp; qp++)
948  {
949  const OutputShape phi_local = (*_current_phi)[i][qp];
950  const OutputShapeGradient dphi_qp = (*_current_grad_phi)[i][qp];
951 
952  _u[qp] += phi_local * _dof_values[i];
953 
954  for (unsigned int d = 0; d < LIBMESH_DIM; ++d)
955  _grad_u[qp].col(d) += dphi_qp(d) * _dof_values[i];
956 
957  if (is_transient)
958  {
959  if (_need_u_old)
960  _u_old[qp] += phi_local * _dof_values_old[i];
961 
962  if (_need_u_older)
963  _u_older[qp] += phi_local * _dof_values_older[i];
964 
965  if (_need_grad_old)
966  for (unsigned int d = 0; d < LIBMESH_DIM; ++d)
967  _grad_u_old[qp].col(d) += dphi_qp(d) * _dof_values_old[i];
968 
969  if (_need_grad_older)
970  for (unsigned int d = 0; d < LIBMESH_DIM; ++d)
971  _grad_u_older[qp].col(d) += dphi_qp(d) * _dof_values_older[i];
972 
973  if (_need_u_dot)
974  _u_dot[qp] += phi_local * _dof_values_dot[i];
975 
976  if (_need_u_dotdot)
977  _u_dotdot[qp] += phi_local * _dof_values_dotdot[i];
978 
979  if (_need_u_dot_old)
980  _u_dot_old[qp] += phi_local * _dof_values_dot_old[i];
981 
982  if (_need_u_dotdot_old)
983  _u_dotdot_old[qp] += phi_local * _dof_values_dotdot_old[i];
984 
985  if (_need_grad_dot)
986  for (unsigned int d = 0; d < LIBMESH_DIM; ++d)
987  _grad_u_dot[qp].col(d) += dphi_qp(d) * _dof_values_dot[i];
988 
989  if (_need_grad_dotdot)
990  for (unsigned int d = 0; d < LIBMESH_DIM; ++d)
991  _grad_u_dotdot[qp].col(d) += dphi_qp(d) * _dof_values_dotdot[i];
992 
993  if (_need_du_dot_du)
994  _du_dot_du[qp] = _dof_du_dot_du[i];
995 
996  if (_need_du_dotdot_du)
998  }
999 
1000  if (second_required)
1001  {
1002  mooseAssert(
1004  "We're requiring a second calculation but have not set a second shape function!");
1005  const RealTensorValue d2phi_local = (*_current_second_phi)[i][qp];
1006 
1007  if (_need_second)
1008  for (unsigned int d = 0, d1 = 0; d1 < LIBMESH_DIM; ++d1)
1009  for (unsigned int d2 = 0; d2 < LIBMESH_DIM; ++d2)
1010  _second_u[qp].col(d++) += d2phi_local(d1, d2) * _dof_values[i];
1011 
1013  for (unsigned int d = 0, d1 = 0; d1 < LIBMESH_DIM; ++d1)
1014  for (unsigned int d2 = 0; d2 < LIBMESH_DIM; ++d2)
1015  _second_u_previous_nl[qp].col(d++) +=
1016  d2phi_local(d1, d2) * _dof_values_previous_nl[i];
1017 
1018  if (is_transient)
1019  {
1020  if (_need_second_old)
1021  for (unsigned int d = 0, d1 = 0; d1 < LIBMESH_DIM; ++d1)
1022  for (unsigned int d2 = 0; d2 < LIBMESH_DIM; ++d2)
1023  _second_u_old[qp].col(d++) += d2phi_local(d1, d2) * _dof_values_old[i];
1024 
1025  if (_need_second_older)
1026  for (unsigned int d = 0, d1 = 0; d1 < LIBMESH_DIM; ++d1)
1027  for (unsigned int d2 = 0; d2 < LIBMESH_DIM; ++d2)
1028  _second_u_older[qp].col(d++) += d2phi_local(d1, d2) * _dof_values_older[i];
1029  }
1030  }
1031 
1032  if (curl_required)
1033  {
1034  mooseAssert(_current_curl_phi,
1035  "We're requiring a curl calculation but have not set a curl shape function!");
1036  const auto curl_phi_local = (*_current_curl_phi)[i][qp];
1037 
1038  if (_need_curl)
1039  _curl_u[qp] += curl_phi_local * _dof_values[i];
1040 
1041  if (is_transient && _need_curl_old)
1042  _curl_u_old[qp] += curl_phi_local * _dof_values_old[i];
1043  }
1044 
1045  for (auto tag : active_coupleable_vector_tags)
1046  if (_need_vector_tag_u[tag])
1047  _vector_tag_u[tag][qp] += phi_local * _vector_tags_dof_u[tag][i];
1048 
1049  for (auto tag : active_coupleable_matrix_tags)
1050  if (_need_matrix_tag_u[tag])
1051  _matrix_tag_u[tag][qp] += phi_local * _matrix_tags_dof_u[tag][i];
1052 
1053  if (_need_u_previous_nl)
1054  _u_previous_nl[qp] += phi_local * _dof_values_previous_nl[i];
1055 
1057  for (unsigned int d = 0; d < LIBMESH_DIM; ++d)
1058  _grad_u_previous_nl[qp].col(d) += dphi_qp(d) * _dof_values_previous_nl[i];
1059  }
1060  }
1061  // No AD support for array variable yet.
1062 }

◆ computingCurl()

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

Whether or not this variable is computing the curl.

Definition at line 245 of file MooseVariableData.h.

245 { return _need_curl || _need_curl_old; }

◆ curlPhi()

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

curl_phi getter

Definition at line 455 of file MooseVariableData.C.

456 {
458  return *_curl_phi;
459 }

◆ curlPhiFace()

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

curl_phi_face getter

Definition at line 463 of file MooseVariableData.C.

◆ 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 408 of file MooseVariableData.C.

409 {
410  curlPhi();
411  curlPhiFace();
412  switch (state)
413  {
414  case Moose::Current:
415  {
416  _need_curl = true;
417  return _curl_u;
418  }
419 
420  case Moose::Old:
421  {
422  _need_curl_old = true;
423  return _curl_u_old;
424  }
425 
426  case Moose::Older:
427  {
428  _need_curl_older = true;
429  return _curl_u_older;
430  }
431 
432  default:
433  mooseError("We don't currently support curl from the previous non-linear iteration");
434  }
435 }

◆ currentElem()

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

The current element.

Definition at line 257 of file MooseVariableData.h.

257 { return _elem; }

◆ currentSide()

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

The current side.

Definition at line 262 of file MooseVariableData.h.

262 { return _current_side; }

◆ dofIndices()

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

Definition at line 394 of file MooseVariableData.h.

394 { return _dof_indices; }

◆ dofValues()

template<typename OutputType >
const MooseVariableData< OutputType >::DoFValue & MooseVariableData< OutputType >::dofValues ( ) const

Definition at line 1718 of file MooseVariableData.C.

1719 {
1720  _need_dof_values = true;
1721  return _dof_values;
1722 }

◆ dofValuesDot()

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

Definition at line 1750 of file MooseVariableData.C.

1751 {
1752  if (_sys.solutionUDot())
1753  {
1754  _need_dof_values_dot = true;
1755  return _dof_values_dot;
1756  }
1757  else
1758  mooseError("MooseVariableData: Time derivative of solution (`u_dot`) is not stored. Please set "
1759  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
1760 }

◆ dofValuesDotDot()

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

Definition at line 1764 of file MooseVariableData.C.

1765 {
1766  if (_sys.solutionUDotDot())
1767  {
1768  _need_dof_values_dotdot = true;
1769  return _dof_values_dotdot;
1770  }
1771  else
1772  mooseError("MooseVariableData: Second time derivative of solution (`u_dotdot`) is not stored. "
1773  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
1774  "`u_dotdot`.");
1775 }

◆ dofValuesDotDotOld()

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

Definition at line 1794 of file MooseVariableData.C.

1795 {
1796  if (_sys.solutionUDotDotOld())
1797  {
1799  return _dof_values_dotdot_old;
1800  }
1801  else
1802  mooseError("MooseVariableData: Old second time derivative of solution (`u_dotdot_old`) is not "
1803  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
1804  "requesting `u_dotdot_old`.");
1805 }

◆ dofValuesDotOld()

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

Definition at line 1779 of file MooseVariableData.C.

1780 {
1781  if (_sys.solutionUDotOld())
1782  {
1783  _need_dof_values_dot_old = true;
1784  return _dof_values_dot_old;
1785  }
1786  else
1787  mooseError("MooseVariableData: Old time derivative of solution (`u_dot_old`) is not stored. "
1788  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
1789  "`u_dot_old`.");
1790 }

◆ dofValuesDuDotDotDu()

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

Definition at line 1817 of file MooseVariableData.C.

1818 {
1819  _need_dof_du_dotdot_du = true;
1820  return _dof_du_dotdot_du;
1821 }

◆ dofValuesDuDotDu()

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

Definition at line 1809 of file MooseVariableData.C.

1810 {
1811  _need_dof_du_dot_du = true;
1812  return _dof_du_dot_du;
1813 }

◆ dofValuesOld()

template<typename OutputType >
const MooseVariableData< OutputType >::DoFValue & MooseVariableData< OutputType >::dofValuesOld ( ) const

Definition at line 1726 of file MooseVariableData.C.

1727 {
1728  _need_dof_values_old = true;
1729  return _dof_values_old;
1730 }

◆ dofValuesOlder()

template<typename OutputType >
const MooseVariableData< OutputType >::DoFValue & MooseVariableData< OutputType >::dofValuesOlder ( ) const

Definition at line 1734 of file MooseVariableData.C.

1735 {
1736  _need_dof_values_older = true;
1737  return _dof_values_older;
1738 }

◆ dofValuesPreviousNL()

template<typename OutputType >
const MooseVariableData< OutputType >::DoFValue & MooseVariableData< OutputType >::dofValuesPreviousNL ( ) const

Definition at line 1742 of file MooseVariableData.C.

1743 {
1745  return _dof_values_previous_nl;
1746 }

◆ duDotDotDu()

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

Definition at line 349 of file MooseVariableData.h.

350  {
351  _need_du_dotdot_du = true;
352  return _du_dotdot_du;
353  }

◆ duDotDu()

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

Definition at line 343 of file MooseVariableData.h.

344  {
345  _need_du_dot_du = true;
346  return _du_dot_du;
347  }

◆ fetchADDoFValues() [1/2]

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

Definition at line 2342 of file MooseVariableData.C.

2343 {
2344  auto n = _dof_indices.size();
2345  libmesh_assert(n);
2347  auto ad_offset = _var_num * _sys.getMaxVarNDofsPerNode();
2348 
2349  for (decltype(n) i = 0; i < n; ++i)
2350  {
2351  _ad_dof_values[i] = _dof_values[i];
2352  if (_var.kind() == Moose::VAR_NONLINEAR)
2353  Moose::derivInsert(_ad_dof_values[i].derivatives(), ad_offset + i, 1.);
2355  }
2356 }

◆ fetchADDoFValues() [2/2]

template<>
void MooseVariableData< RealEigenVector >::fetchADDoFValues ( )
private

Definition at line 2360 of file MooseVariableData.C.

2361 {
2362  mooseError("I do not know how to support AD with array variables");
2363 }

◆ fetchDoFValues() [1/3]

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

Definition at line 2144 of file MooseVariableData.C.

2145 {
2146  bool is_transient = _subproblem.isTransient();
2147 
2148  auto n = _dof_indices.size();
2149  libmesh_assert(n);
2150 
2151  _dof_values.resize(n);
2153 
2154  if (is_transient)
2155  {
2157  {
2160  }
2162  {
2165  }
2167  {
2168  libmesh_assert(_sys.solutionUDot());
2171  }
2173  {
2174  libmesh_assert(_sys.solutionUDotDot());
2177  }
2179  {
2180  libmesh_assert(_sys.solutionUDotOld());
2183  }
2185  {
2186  libmesh_assert(_sys.solutionUDotDotOld());
2189  }
2190  }
2191 
2194  {
2197  }
2198 
2200  {
2201  auto & active_coupleable_vector_tags =
2203  for (auto tag : active_coupleable_vector_tags)
2204  if (_need_vector_tag_u[tag] || _need_vector_tag_dof_u[tag])
2205  if (_sys.hasVector(tag) && _sys.getVector(tag).closed())
2206  {
2207  auto & vec = _sys.getVector(tag);
2208  _vector_tags_dof_u[tag].resize(n);
2209  vec.get(_dof_indices, &_vector_tags_dof_u[tag][0]);
2210  }
2211  }
2212 
2214  {
2215  auto & active_coupleable_matrix_tags =
2217  for (auto tag : active_coupleable_matrix_tags)
2218  {
2219  _matrix_tags_dof_u[tag].resize(n);
2220  if (_need_matrix_tag_dof_u[tag] || _need_matrix_tag_u[tag])
2221  if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag) && _sys.getMatrix(tag).closed())
2222  {
2223  auto & mat = _sys.getMatrix(tag);
2224  for (unsigned i = 0; i < n; i++)
2225  {
2226  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2227  _matrix_tags_dof_u[tag][i] = mat(_dof_indices[i], _dof_indices[i]);
2228  }
2229  }
2230  }
2231  }
2232 
2234  {
2236  for (decltype(n) i = 0; i < n; ++i)
2237  _dof_du_dot_du[i] = _sys.duDotDu();
2238  }
2240  {
2242  for (decltype(n) i = 0; i < n; ++i)
2244  }
2245 }

◆ fetchDoFValues() [2/3]

template<>
void MooseVariableData< RealEigenVector >::fetchDoFValues ( )
private

◆ fetchDoFValues() [3/3]

template<>
void MooseVariableData< RealEigenVector >::fetchDoFValues ( )
private

Definition at line 2249 of file MooseVariableData.C.

2250 {
2251  bool is_transient = _subproblem.isTransient();
2252 
2253  auto n = _dof_indices.size();
2254  libmesh_assert(n);
2255 
2256  /*
2257  * A note here: we might use Eigen::map to remove fetching data, a future work
2258  * we can consider.
2259  */
2260 
2262 
2263  if (is_transient)
2264  {
2270  {
2271  libmesh_assert(_sys.solutionUDot());
2273  }
2275  {
2276  libmesh_assert(_sys.solutionUDotDot());
2278  }
2280  {
2281  libmesh_assert(_sys.solutionUDotOld());
2283  }
2285  {
2286  libmesh_assert(_sys.solutionUDotDotOld());
2288  }
2289  }
2290 
2294 
2296  {
2297  auto & active_coupleable_vector_tags =
2299  for (auto tag : active_coupleable_vector_tags)
2300  if (_need_vector_tag_u[tag] || _need_vector_tag_dof_u[tag])
2301  if (_sys.hasVector(tag) && _sys.getVector(tag).closed())
2303  }
2304 
2306  {
2307  auto & active_coupleable_matrix_tags =
2309  for (auto tag : active_coupleable_matrix_tags)
2310  {
2311  _matrix_tags_dof_u[tag].resize(n);
2312  if (_need_matrix_tag_dof_u[tag] || _need_matrix_tag_u[tag])
2313  if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag) && _sys.getMatrix(tag).closed())
2314  {
2315  auto & mat = _sys.getMatrix(tag);
2316  for (unsigned i = 0; i < n; i++)
2317  {
2318  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2319  for (unsigned j = 0; j < _count; j++)
2320  _matrix_tags_dof_u[tag][i](j) = mat(_dof_indices[i] + j, _dof_indices[i] + j);
2321  }
2322  }
2323  }
2324  }
2325 
2327  {
2329  for (decltype(n) i = 0; i < n; ++i)
2330  _dof_du_dot_du[i] = _sys.duDotDu();
2331  }
2333  {
2335  for (decltype(n) i = 0; i < n; ++i)
2337  }
2338 }

◆ getArrayDoFValues()

template<typename OutputType >
void MooseVariableData< OutputType >::getArrayDoFValues ( const NumericVector< Number > &  sol,
unsigned int  n,
MooseArray< RealEigenVector > &  dof_values 
) const
inlineprivate

Definition at line 2387 of file MooseVariableData.C.

2390 {
2391  dof_values.resize(n);
2392  if (isNodal())
2393  {
2394  for (unsigned int i = 0; i < n; ++i)
2395  {
2396  dof_values[i].resize(_count);
2397  auto dof = _dof_indices[i];
2398  for (unsigned int j = 0; j < _count; ++j)
2399  dof_values[i](j) = sol(dof++);
2400  }
2401  }
2402  else
2403  {
2404  for (unsigned int i = 0; i < n; ++i)
2405  {
2406  dof_values[i].resize(_count);
2407  auto dof = _dof_indices[i];
2408  for (unsigned int j = 0; j < _count; ++j)
2409  {
2410  dof_values[i](j) = sol(dof);
2411  dof += n;
2412  }
2413  }
2414  }
2415 }

◆ getDofIndices()

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

Definition at line 1622 of file MooseVariableData.C.

1624 {
1625  _dof_map.dof_indices(elem, dof_indices, _var_num);
1626 }

◆ getElementalValue() [1/2]

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

Definition at line 1586 of file MooseVariableData.C.

1589 {
1590  std::vector<dof_id_type> dof_indices;
1591  _dof_map.dof_indices(elem, dof_indices, _var_num);
1592 
1593  dof_id_type dof = dof_indices[idx];
1594 
1596 
1597  switch (state)
1598  {
1599  case Moose::Current:
1600  for (unsigned int i = 0; i < _count; ++i)
1601  v(i) = (*_sys.currentSolution())(dof++);
1602  break;
1603 
1604  case Moose::Old:
1605  for (unsigned int i = 0; i < _count; ++i)
1606  v(i) = _sys.solutionOld()(dof++);
1607  break;
1608 
1609  case Moose::Older:
1610  for (unsigned int i = 0; i < _count; ++i)
1611  v(i) = _sys.solutionOlder()(dof++);
1612  break;
1613 
1614  default:
1615  mooseError("PreviousNL not currently supported for getElementalValue");
1616  }
1617  return v;
1618 }

◆ getElementalValue() [2/2]

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

Definition at line 1561 of file MooseVariableData.C.

1564 {
1565  std::vector<dof_id_type> dof_indices;
1566  _dof_map.dof_indices(elem, dof_indices, _var_num);
1567 
1568  switch (state)
1569  {
1570  case Moose::Current:
1571  return (*_sys.currentSolution())(dof_indices[idx]);
1572 
1573  case Moose::Old:
1574  return _sys.solutionOld()(dof_indices[idx]);
1575 
1576  case Moose::Older:
1577  return _sys.solutionOlder()(dof_indices[idx]);
1578 
1579  default:
1580  mooseError("PreviousNL not currently supported for getElementalValue");
1581  }
1582 }

◆ getNodalValue() [1/2]

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

Definition at line 1490 of file MooseVariableData.C.

1491 {
1492  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
1493 
1494  // Make sure that the node has DOFs
1495  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
1496  * produce a better error (see misc/check_error.node_value_off_block) */
1497  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
1498  "Node " << node.id() << " does not contain any dofs for the "
1499  << _sys.system().variable_name(_var_num) << " variable");
1500 
1501  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
1502 
1503  switch (state)
1504  {
1505  case Moose::Current:
1506  return (*_sys.currentSolution())(dof);
1507 
1508  case Moose::Old:
1509  return _sys.solutionOld()(dof);
1510 
1511  case Moose::Older:
1512  return _sys.solutionOlder()(dof);
1513 
1514  default:
1515  mooseError("PreviousNL not currently supported for getNodalValue");
1516  }
1517 }

◆ getNodalValue() [2/2]

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

Definition at line 1521 of file MooseVariableData.C.

1523 {
1524  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
1525 
1526  // Make sure that the node has DOFs
1527  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
1528  * produce a better error (see misc/check_error.node_value_off_block) */
1529  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
1530  "Node " << node.id() << " does not contain any dofs for the "
1531  << _sys.system().variable_name(_var_num) << " variable");
1532 
1533  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
1534 
1536  switch (state)
1537  {
1538  case Moose::Current:
1539  for (unsigned int i = 0; i < _count; ++i)
1540  v(i) = (*_sys.currentSolution())(dof++);
1541  break;
1542 
1543  case Moose::Old:
1544  for (unsigned int i = 0; i < _count; ++i)
1545  v(i) = _sys.solutionOld()(dof++);
1546  break;
1547 
1548  case Moose::Older:
1549  for (unsigned int i = 0; i < _count; ++i)
1550  v(i) = _sys.solutionOlder()(dof++);
1551  break;
1552 
1553  default:
1554  mooseError("PreviousNL not currently supported for getNodalValue");
1555  }
1556  return v;
1557 }

◆ gradPhi()

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

grad_phi getter

Definition at line 161 of file MooseVariableData.h.

161 { return *_grad_phi; }

◆ gradPhiFace()

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

grad_phi_face getter

Definition at line 175 of file MooseVariableData.h.

175 { return *_grad_phi_face; }

◆ gradSln()

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

Local solution gradient getter.

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

Definition at line 306 of file MooseVariableData.C.

307 {
308  switch (state)
309  {
310  case Moose::Current:
311  return _grad_u;
312 
313  case Moose::Old:
314  {
315  _need_grad_old = true;
316  return _grad_u_old;
317  }
318 
319  case Moose::Older:
320  {
321  _need_grad_older = true;
322  return _grad_u_older;
323  }
324 
325  case Moose::PreviousNL:
326  {
327  _need_grad_previous_nl = true;
328  return _grad_u_previous_nl;
329  }
330 
331  default:
332  // We should never get here but gcc requires that we have a default. See
333  // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
334  mooseError("Unknown SolutionState!");
335  }
336 }

◆ gradSlnDot()

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

Local time derivative of solution gradient getter.

Definition at line 340 of file MooseVariableData.C.

341 {
342  if (_sys.solutionUDot())
343  {
344  _need_grad_dot = true;
345  return _grad_u_dot;
346  }
347  else
348  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
349  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
350 }

◆ gradSlnDotDot()

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

Local second time derivative of solution gradient getter.

Definition at line 354 of file MooseVariableData.C.

355 {
356  if (_sys.solutionUDotDot())
357  {
358  _need_grad_dotdot = true;
359  return _grad_u_dotdot;
360  }
361  else
362  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
363  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
364  "`u_dotdot`.");
365 }

◆ hasDofValues()

template<typename OutputType>
void MooseVariableData< OutputType >::hasDofValues ( bool  has_dof_values)
inline

setter of _has_dof_values

Parameters
has_dof_valuesThe boolean value we are setting _has_dof_values to

Definition at line 407 of file MooseVariableData.h.

407 { _has_dof_values = has_dof_values; }

◆ increment()

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

Increment getter.

Returns
The increment

Definition at line 468 of file MooseVariableData.h.

468 { return _increment; }

◆ insert() [1/2]

template<typename OutputType >
void MooseVariableData< OutputType >::insert ( NumericVector< Number > &  residual)

Set the current local DOF values to the input vector.

Definition at line 1630 of file MooseVariableData.C.

1631 {
1632  if (_has_dof_values)
1633  residual.insert(&_dof_values[0], _dof_indices);
1634 }

◆ insert() [2/2]

template<>
void MooseVariableData< RealEigenVector >::insert ( NumericVector< Number > &  residual)

Definition at line 1638 of file MooseVariableData.C.

1639 {
1640  if (_has_dof_values)
1641  {
1642  if (isNodal())
1643  {
1644  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
1645  for (unsigned int j = 0; j < _count; ++j)
1646  residual.set(_dof_indices[i] + j, _dof_values[i](j));
1647  }
1648  else
1649  {
1650  unsigned int n = 0;
1651  for (unsigned int j = 0; j < _count; ++j)
1652  {
1653  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
1654  residual.set(_dof_indices[i] + n, _dof_values[i](j));
1655  n += _dof_indices.size();
1656  }
1657  }
1658  }
1659 }

◆ insertNodalValue() [1/2]

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

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

Definition at line 1473 of file MooseVariableData.C.

1475 {
1476  residual.set(_nodal_dof_index, v);
1477 }

◆ insertNodalValue() [2/2]

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

Definition at line 1481 of file MooseVariableData.C.

1483 {
1484  for (unsigned int j = 0; j < _count; ++j)
1485  residual.set(_nodal_dof_index + j, v(j));
1486 }

◆ isNodal()

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

Definition at line 249 of file MooseVariableData.h.

249 { return _is_nodal; }

◆ isNodalDefined()

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

Definition at line 252 of file MooseVariableData.h.

252 { return _has_dof_indices; }

◆ matrixTagValue()

template<typename OutputType>
const FieldVariableValue& MooseVariableData< OutputType >::matrixTagValue ( TagID  tag)
inline

Definition at line 487 of file MooseVariableData.h.

488  {
489  _need_matrix_tag_u[tag] = true;
490  return _matrix_tag_u[tag];
491  }

◆ needsAD()

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

Returns whether this data structure needs automatic differentiation calculations.

Definition at line 116 of file MooseVariableData.h.

116 { return _need_ad; }

◆ nodalDofIndex()

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

Definition at line 251 of file MooseVariableData.h.

251 { return _nodal_dof_index; }

◆ nodalMatrixTagValue()

template<typename OutputType >
const MooseVariableData< OutputType >::DoFValue & MooseVariableData< OutputType >::nodalMatrixTagValue ( TagID  tag) const

Definition at line 2122 of file MooseVariableData.C.

2123 {
2124  if (isNodal())
2125  {
2126  _need_matrix_tag_dof_u[tag] = true;
2127 
2128  if (_sys.hasMatrix(tag) && tag < _matrix_tags_dof_u.size())
2129  return _matrix_tags_dof_u[tag];
2130  else
2131  mooseError("Tag is not associated with any matrix or there is no any data for tag ",
2132  tag,
2133  " for nodal variable ",
2134  _var.name());
2135  }
2136  else
2137  mooseError("Nodal values can be requested only on nodal variables, variable '",
2138  _var.name(),
2139  "' is not nodal.");
2140 }

◆ nodalValue()

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

Definition at line 1914 of file MooseVariableData.C.

1915 {
1916  if (isNodal())
1917  {
1918  switch (state)
1919  {
1920  case Moose::Current:
1921  {
1922  _need_dof_values = true;
1923  return _nodal_value;
1924  }
1925 
1926  case Moose::Old:
1927  {
1928  _need_dof_values_old = true;
1929  return _nodal_value_old;
1930  }
1931 
1932  case Moose::Older:
1933  {
1934  _need_dof_values_older = true;
1935  return _nodal_value_older;
1936  }
1937 
1938  case Moose::PreviousNL:
1939  {
1941  return _nodal_value_previous_nl;
1942  }
1943 
1944  default:
1945  // We should never get here but gcc requires that we have a default. See
1946  // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
1947  mooseError("Unknown SolutionState!");
1948  }
1949  }
1950  else
1951  mooseError("Nodal values can be requested only on nodal variables, variable '",
1952  _var.name(),
1953  "' is not nodal.");
1954 }

◆ nodalValueArray()

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

Definition at line 1958 of file MooseVariableData.C.

1959 {
1960  if (isNodal())
1961  {
1962  switch (state)
1963  {
1964  case Moose::Current:
1965  {
1966  _need_dof_values = true;
1967  return _nodal_value_array;
1968  }
1969 
1970  case Moose::Old:
1971  {
1972  _need_dof_values_old = true;
1973  return _nodal_value_old_array;
1974  }
1975 
1976  case Moose::Older:
1977  {
1978  _need_dof_values_older = true;
1979  return _nodal_value_older_array;
1980  }
1981 
1982  default:
1983  mooseError("No current support for PreviousNL for nodal value array");
1984  }
1985  }
1986  else
1987  mooseError("Nodal values can be requested only on nodal variables, variable '",
1988  _var.name(),
1989  "' is not nodal.");
1990 }

◆ nodalValueDot()

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

Definition at line 1994 of file MooseVariableData.C.

1995 {
1996  if (isNodal())
1997  {
1998  if (_sys.solutionUDot())
1999  {
2000  _need_dof_values_dot = true;
2001  return _nodal_value_dot;
2002  }
2003  else
2004  mooseError(
2005  "MooseVariableData: Time derivative of solution (`u_dot`) is not stored. Please set "
2006  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
2007  }
2008  else
2009  mooseError("Nodal values can be requested only on nodal variables, variable '",
2010  _var.name(),
2011  "' is not nodal.");
2012 }

◆ nodalValueDotDot()

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

Definition at line 2016 of file MooseVariableData.C.

2017 {
2018  if (isNodal())
2019  {
2020  if (_sys.solutionUDotDot())
2021  {
2022  _need_dof_values_dotdot = true;
2023  return _nodal_value_dotdot;
2024  }
2025  else
2026  mooseError(
2027  "MooseVariableData: Second time derivative of solution (`u_dotdot`) is not stored. "
2028  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
2029  "`u_dotdot`.");
2030  }
2031  else
2032  mooseError("Nodal values can be requested only on nodal variables, variable '",
2033  _var.name(),
2034  "' is not nodal.");
2035 }

◆ nodalValueDotDotOld()

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

Definition at line 2061 of file MooseVariableData.C.

2062 {
2063  if (isNodal())
2064  {
2065  if (_sys.solutionUDotDotOld())
2066  {
2068  return _nodal_value_dotdot_old;
2069  }
2070  else
2071  mooseError(
2072  "MooseVariableData: Old second time derivative of solution (`u_dotdot_old`) is not "
2073  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
2074  "requesting `u_dotdot_old`.");
2075  }
2076  else
2077  mooseError("Nodal values can be requested only on nodal variables, variable '",
2078  _var.name(),
2079  "' is not nodal.");
2080 }

◆ nodalValueDotOld()

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

Definition at line 2039 of file MooseVariableData.C.

2040 {
2041  if (isNodal())
2042  {
2043  if (_sys.solutionUDotOld())
2044  {
2045  _need_dof_values_dot_old = true;
2046  return _nodal_value_dot_old;
2047  }
2048  else
2049  mooseError("MooseVariableData: Old time derivative of solution (`u_dot_old`) is not stored. "
2050  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
2051  "`u_dot_old`.");
2052  }
2053  else
2054  mooseError("Nodal values can be requested only on nodal variables, variable '",
2055  _var.name(),
2056  "' is not nodal.");
2057 }

◆ 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 MooseVariableData< OutputType >::DoFValue & MooseVariableData< OutputType >::nodalVectorTagValue ( TagID  tag) const

Definition at line 2100 of file MooseVariableData.C.

2101 {
2102  if (isNodal())
2103  {
2104  _need_vector_tag_dof_u[tag] = true;
2105 
2106  if (_sys.hasVector(tag) && tag < _vector_tags_dof_u.size())
2107  return _vector_tags_dof_u[tag];
2108  else
2109  mooseError("Tag is not associated with any vector or there is no any data for tag ",
2110  tag,
2111  " for nodal variable ",
2112  _var.name());
2113  }
2114  else
2115  mooseError("Nodal values can be requested only on nodal variables, variable '",
2116  _var.name(),
2117  "' is not nodal.");
2118 }

◆ node()

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

Definition at line 250 of file MooseVariableData.h.

250 { return _node; }

◆ numberOfDofs()

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

Definition at line 395 of file MooseVariableData.h.

395 { return _dof_indices.size(); }

◆ phi()

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

phi getter

Definition at line 151 of file MooseVariableData.h.

151 { return *_phi; }

◆ phiFace()

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

phi_face getter

Definition at line 156 of file MooseVariableData.h.

156 { return *_phi_face; }

◆ phiFaceSize()

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

Return phiFace size.

Definition at line 232 of file MooseVariableData.h.

232 { return _phi_face->size(); }

◆ phiSize()

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

Return phi size.

Definition at line 227 of file MooseVariableData.h.

227 { return _phi->size(); }

◆ prepare()

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

Get the dof indices corresponding to the current element.

Definition at line 2519 of file MooseVariableData.C.

2520 {
2521  _dof_map.dof_indices(_elem, _dof_indices, _var_num);
2522  _has_dof_values = false;
2523 
2524  // FIXME: remove this when the Richard's module is migrated to use the new NodalCoupleable
2525  // interface.
2526  if (_dof_indices.size() > 0)
2527  _has_dof_indices = true;
2528  else
2529  _has_dof_indices = false;
2530 }

◆ prepareAux()

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

Prepare dof indices and solution values for elemental auxiliary variables.

Definition at line 2534 of file MooseVariableData.C.

2535 {
2536  _has_dof_values = false;
2537 }

◆ prepareIC()

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

prepare the initial condition

Definition at line 2508 of file MooseVariableData.C.

2509 {
2510  _dof_map.dof_indices(_elem, _dof_indices, _var_num);
2512 
2513  unsigned int nqp = _qrule->n_points();
2514  _u.resize(nqp);
2515 }

◆ reinitAux()

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

Prepare dof indices and solution values for elemental auxiliary variables.

Definition at line 2562 of file MooseVariableData.C.

2563 {
2564  /* FIXME: this method is only for elemental auxiliary variables, so
2565  * we may want to rename it */
2566  if (_elem)
2567  {
2568  _dof_map.dof_indices(_elem, _dof_indices, _var_num);
2569  if (_elem->n_dofs(_sys.number(), _var_num) > 0)
2570  {
2571  // FIXME: check if the following is equivalent with '_nodal_dof_index = _dof_indices[0];'?
2572  _nodal_dof_index = _elem->dof_number(_sys.number(), _var_num, 0);
2573 
2574  fetchDoFValues();
2575 
2576  for (auto & dof_u : _vector_tags_dof_u)
2577  dof_u.resize(_dof_indices.size());
2578 
2579  for (auto & dof_u : _matrix_tags_dof_u)
2580  dof_u.resize(_dof_indices.size());
2581 
2582  _has_dof_indices = true;
2583  }
2584  else
2585  _has_dof_indices = false;
2586  }
2587  else
2588  _has_dof_indices = false;
2589 }

◆ reinitNode()

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

Prepare degrees of freedom for the current node.

Definition at line 2541 of file MooseVariableData.C.

2542 {
2543  if (size_t n_dofs = _node->n_dofs(_sys.number(), _var_num))
2544  {
2545  _dof_indices.resize(n_dofs);
2546  for (size_t i = 0; i < n_dofs; ++i)
2547  _dof_indices[i] = _node->dof_number(_sys.number(), _var_num, i);
2548  // For standard variables. _nodal_dof_index is retrieved by nodalDofIndex() which is used in
2549  // NodalBC for example
2551  _has_dof_indices = true;
2552  }
2553  else
2554  {
2555  _dof_indices.clear(); // Clear these so Assembly doesn't think there's dofs here
2556  _has_dof_indices = false;
2557  }
2558 }

◆ 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 2593 of file MooseVariableData.C.

2594 {
2595  _dof_indices.clear();
2596  for (const auto & node_id : nodes)
2597  {
2598  auto && nd = _subproblem.mesh().getMesh().query_node_ptr(node_id);
2599  if (nd && (_subproblem.mesh().isSemiLocal(const_cast<Node *>(nd))))
2600  {
2601  if (nd->n_dofs(_sys.number(), _var_num) > 0)
2602  {
2603  dof_id_type dof = nd->dof_number(_sys.number(), _var_num, 0);
2604  _dof_indices.push_back(dof);
2605  }
2606  }
2607  }
2608 
2609  if (_dof_indices.size() > 0)
2610  _has_dof_indices = true;
2611  else
2612  _has_dof_indices = false;
2613 }

◆ secondPhi()

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

second_phi getter

Definition at line 439 of file MooseVariableData.C.

440 {
442  return *_second_phi;
443 }

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

◆ secondPhiFace()

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

second_phi_face getter

Definition at line 447 of file MooseVariableData.C.

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 369 of file MooseVariableData.C.

370 {
371  secondPhi();
372  secondPhiFace();
373  switch (state)
374  {
375  case Moose::Current:
376  {
377  _need_second = true;
378  return _second_u;
379  }
380 
381  case Moose::Old:
382  {
383  _need_second_old = true;
384  return _second_u_old;
385  }
386 
387  case Moose::Older:
388  {
389  _need_second_older = true;
390  return _second_u_older;
391  }
392 
393  case Moose::PreviousNL:
394  {
396  return _second_u_previous_nl;
397  }
398 
399  default:
400  // We should never get here but gcc requires that we have a default. See
401  // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
402  mooseError("Unknown SolutionState!");
403  }
404 }

◆ setDofValue()

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

Definition at line 1442 of file MooseVariableData.C.

1443 {
1444  _dof_values[index] = value;
1445  _has_dof_values = true;
1446  for (unsigned int qp = 0; qp < _u.size(); qp++)
1447  {
1448  _u[qp] = (*_phi)[0][qp] * _dof_values[0];
1449  for (unsigned int i = 1; i < _dof_values.size(); i++)
1450  _u[qp] += (*_phi)[i][qp] * _dof_values[i];
1451  }
1452 }

◆ setDofValues()

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

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

Definition at line 1456 of file MooseVariableData.C.

1457 {
1458  for (unsigned int i = 0; i < values.size(); i++)
1459  _dof_values[i] = values(i);
1460 
1461  _has_dof_values = true;
1462 
1463  for (unsigned int qp = 0; qp < _u.size(); qp++)
1464  {
1465  _u[qp] = (*_phi)[0][qp] * _dof_values[0];
1466  for (unsigned int i = 1; i < _dof_values.size(); i++)
1467  _u[qp] += (*_phi)[i][qp] * _dof_values[i];
1468  }
1469 }

◆ 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 184 of file MooseVariableData.C.

185 {
186  switch (gm_type)
187  {
188  case Moose::Volume:
189  {
191  _current_phi = _phi;
196  break;
197  }
198  case Moose::Face:
199  {
206  break;
207  }
208  }
209 }

◆ setNodalValue() [1/2]

template<typename OutputType>
void MooseVariableData< OutputType >::setNodalValue ( const OutputType &  value,
unsigned int  idx = 0 
)

Set nodal value.

Definition at line 1418 of file MooseVariableData.C.

1419 {
1420  _dof_values[idx] = value; // update variable nodal value
1421  _has_dof_values = true;
1422  _nodal_value = value;
1423 
1424  // Update the qp values as well
1425  for (unsigned int qp = 0; qp < _u.size(); qp++)
1426  _u[qp] = value;
1427 }

◆ setNodalValue() [2/2]

template<>
void MooseVariableData< RealVectorValue >::setNodalValue ( const RealVectorValue &  value,
unsigned int  idx 
)

Definition at line 1431 of file MooseVariableData.C.

1432 {
1433  for (decltype(idx) i = 0; i < _dof_values.size(); ++i, ++idx)
1434  _dof_values[idx] = value(i);
1435 
1436  _has_dof_values = true;
1437  _nodal_value = value;
1438 }

◆ sln()

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

Local solution getter.

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

Definition at line 213 of file MooseVariableData.C.

214 {
215  switch (state)
216  {
217  case Moose::Current:
218  return _u;
219 
220  case Moose::Old:
221  {
222  _need_u_old = true;
223  return _u_old;
224  }
225 
226  case Moose::Older:
227  {
228  _need_u_older = true;
229  return _u_older;
230  }
231 
232  case Moose::PreviousNL:
233  {
234  _need_u_previous_nl = true;
235  return _u_previous_nl;
236  }
237 
238  default:
239  // We should never get here but gcc requires that we have a default. See
240  // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
241  mooseError("Unknown SolutionState!");
242  }
243 }

◆ uDot()

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

Definition at line 247 of file MooseVariableData.C.

248 {
249  if (_sys.solutionUDot())
250  {
251  _need_u_dot = true;
252  return _u_dot;
253  }
254  else
255  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
256  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
257 }

◆ uDotDot()

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

Definition at line 261 of file MooseVariableData.C.

262 {
263  if (_sys.solutionUDotDot())
264  {
265  _need_u_dotdot = true;
266  return _u_dotdot;
267  }
268  else
269  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
270  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
271  "`u_dotdot`.");
272 }

◆ uDotDotOld()

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

Definition at line 291 of file MooseVariableData.C.

292 {
293  if (_sys.solutionUDotDotOld())
294  {
295  _need_u_dotdot_old = true;
296  return _u_dotdot_old;
297  }
298  else
299  mooseError("MooseVariableFE: Old second time derivative of solution (`u_dotdot_old`) is not "
300  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
301  "requesting `u_dotdot_old`");
302 }

◆ uDotOld()

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

Definition at line 276 of file MooseVariableData.C.

277 {
278  if (_sys.solutionUDotOld())
279  {
280  _need_u_dot_old = true;
281  return _u_dot_old;
282  }
283  else
284  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
285  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
286  "`u_dot_old`.");
287 }

◆ usesSecondPhi()

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

Whether or not this variable is computing any second derivatives.

Definition at line 237 of file MooseVariableData.h.

◆ vectorTagValue()

template<typename OutputType>
const FieldVariableValue& MooseVariableData< OutputType >::vectorTagValue ( TagID  tag)
inline

Definition at line 482 of file MooseVariableData.h.

483  {
484  _need_vector_tag_u[tag] = true;
485  return _vector_tag_u[tag];
486  }

◆ zeroSizeDofValues()

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

Definition at line 2367 of file MooseVariableData.C.

2368 {
2369  _dof_values.resize(0);
2372  if (_subproblem.isTransient())
2373  {
2382  }
2383 }

Member Data Documentation

◆ _ad_dof_values

template<typename OutputType>
MooseArray<DualReal> MooseVariableData< OutputType >::_ad_dof_values
private

Definition at line 690 of file MooseVariableData.h.

◆ _ad_dofs_dot

template<typename OutputType>
MooseArray<DualReal> MooseVariableData< OutputType >::_ad_dofs_dot
private

Definition at line 691 of file MooseVariableData.h.

◆ _ad_grad_phi

template<typename OutputType>
const VariableTestGradientType<OutputShape, JACOBIAN>::type* MooseVariableData< OutputType >::_ad_grad_phi
private

◆ _ad_grad_phi_assembly_method

template<typename OutputType>
std::function<const typename VariableTestGradientType<OutputType, ComputeStage::JACOBIAN>::type &( const Assembly &, FEType)> MooseVariableData< OutputType >::_ad_grad_phi_assembly_method
private

◆ _ad_grad_phi_face

template<typename OutputType>
const VariableTestGradientType<OutputShape, JACOBIAN>::type* MooseVariableData< OutputType >::_ad_grad_phi_face
private

◆ _ad_grad_phi_face_assembly_method

template<typename OutputType>
std::function<const typename VariableTestGradientType<OutputType, ComputeStage::JACOBIAN>::type &( const Assembly &, FEType)> MooseVariableData< OutputType >::_ad_grad_phi_face_assembly_method
private

◆ _ad_grad_u

template<typename OutputType>
VariableGradientType<OutputShape, JACOBIAN>::type MooseVariableData< OutputType >::_ad_grad_u
private

Definition at line 688 of file MooseVariableData.h.

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

◆ _ad_nodal_value

template<typename OutputType>
Moose::ValueType<OutputType, JACOBIAN>::type MooseVariableData< OutputType >::_ad_nodal_value
private

AD nodal value.

Definition at line 580 of file MooseVariableData.h.

◆ _ad_second_u

template<typename OutputType>
VariableSecondType<OutputShape, JACOBIAN>::type MooseVariableData< OutputType >::_ad_second_u
private

Definition at line 689 of file MooseVariableData.h.

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

◆ _ad_u

template<typename OutputType>
VariableValueType<OutputShape, JACOBIAN>::type MooseVariableData< OutputType >::_ad_u
private

AD u.

Definition at line 687 of file MooseVariableData.h.

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

◆ _ad_u_dot

template<typename OutputType>
VariableValueType<OutputShape, JACOBIAN>::type MooseVariableData< OutputType >::_ad_u_dot
private

Definition at line 692 of file MooseVariableData.h.

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

◆ _ad_zero

template<typename OutputType>
const DualReal MooseVariableData< OutputType >::_ad_zero
private

A zero AD variable.

Definition at line 583 of file MooseVariableData.h.

◆ _assembly

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

◆ _continuity

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

Continuity type of the variable.

Definition at line 554 of file MooseVariableData.h.

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

◆ _count

template<typename OutputType>
unsigned int MooseVariableData< OutputType >::_count
private

Number of components of the associated variable.

Definition at line 529 of file MooseVariableData.h.

◆ _curl_phi

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

Definition at line 724 of file MooseVariableData.h.

◆ _curl_phi_assembly_method

template<typename OutputType>
std::function<const typename OutputTools<OutputType>::VariablePhiCurl &(const Assembly &, 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 736 of file MooseVariableData.h.

◆ _curl_phi_face_assembly_method

template<typename OutputType>
std::function<const typename OutputTools<OutputType>::VariablePhiCurl &(const Assembly &, 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 682 of file MooseVariableData.h.

◆ _curl_u_old

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

Definition at line 683 of file MooseVariableData.h.

◆ _curl_u_older

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

Definition at line 684 of file MooseVariableData.h.

◆ _current_ad_grad_phi

template<typename OutputType>
const VariableTestGradientType<OutputShape, JACOBIAN>::type* MooseVariableData< OutputType >::_current_ad_grad_phi
private

Definition at line 746 of file MooseVariableData.h.

◆ _current_curl_phi

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

Definition at line 745 of file MooseVariableData.h.

◆ _current_grad_phi

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

Definition at line 743 of file MooseVariableData.h.

◆ _current_phi

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

Definition at line 742 of file MooseVariableData.h.

◆ _current_qrule

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

Definition at line 741 of file MooseVariableData.h.

◆ _current_second_phi

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

Definition at line 744 of file MooseVariableData.h.

◆ _current_side

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

The current element side.

Definition at line 798 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 795 of file MooseVariableData.h.

◆ _dof_du_dot_du

template<typename OutputType>
MooseArray<Number> MooseVariableData< OutputType >::_dof_du_dot_du
private

nodal values of derivative of u_dot wrt u

Definition at line 655 of file MooseVariableData.h.

◆ _dof_du_dotdot_du

template<typename OutputType>
MooseArray<Number> MooseVariableData< OutputType >::_dof_du_dotdot_du
private

nodal values of derivative of u_dotdot wrt u

Definition at line 657 of file MooseVariableData.h.

◆ _dof_indices

template<typename OutputType>
std::vector<dof_id_type> MooseVariableData< OutputType >::_dof_indices
private

◆ _dof_map

template<typename OutputType>
const DofMap& MooseVariableData< OutputType >::_dof_map
private

Definition at line 523 of file MooseVariableData.h.

◆ _dof_values

template<typename OutputType>
DoFValue MooseVariableData< OutputType >::_dof_values
private

local solution values

Definition at line 641 of file MooseVariableData.h.

◆ _dof_values_dot

template<typename OutputType>
DoFValue MooseVariableData< OutputType >::_dof_values_dot
private

nodal values of u_dot

Definition at line 647 of file MooseVariableData.h.

◆ _dof_values_dot_old

template<typename OutputType>
DoFValue MooseVariableData< OutputType >::_dof_values_dot_old
private

nodal values of u_dot_old

Definition at line 651 of file MooseVariableData.h.

◆ _dof_values_dotdot

template<typename OutputType>
DoFValue MooseVariableData< OutputType >::_dof_values_dotdot
private

nodal values of u_dotdot

Definition at line 649 of file MooseVariableData.h.

◆ _dof_values_dotdot_old

template<typename OutputType>
DoFValue MooseVariableData< OutputType >::_dof_values_dotdot_old
private

nodal values of u_dotdot_old

Definition at line 653 of file MooseVariableData.h.

◆ _dof_values_old

template<typename OutputType>
DoFValue MooseVariableData< OutputType >::_dof_values_old
private

Definition at line 642 of file MooseVariableData.h.

◆ _dof_values_older

template<typename OutputType>
DoFValue MooseVariableData< OutputType >::_dof_values_older
private

Definition at line 643 of file MooseVariableData.h.

◆ _dof_values_previous_nl

template<typename OutputType>
DoFValue MooseVariableData< OutputType >::_dof_values_previous_nl
private

Definition at line 644 of file MooseVariableData.h.

◆ _du_dot_du

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

derivative of u_dot wrt u

Definition at line 709 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 712 of file MooseVariableData.h.

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

◆ _du_dotdot_du_bak

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

Definition at line 712 of file MooseVariableData.h.

◆ _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 792 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 526 of file MooseVariableData.h.

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

◆ _fe_type

template<typename OutputType>
const 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<OutputType>::VariablePhiGradient &(const Assembly &, 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<OutputType>::VariablePhiGradient &(const Assembly &, FEType)> MooseVariableData< OutputType >::_grad_phi_face_assembly_method
private

◆ _grad_u

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

grad_u

Definition at line 666 of file MooseVariableData.h.

◆ _grad_u_dot

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

grad_u dots

Definition at line 672 of file MooseVariableData.h.

◆ _grad_u_dotdot

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

Definition at line 673 of file MooseVariableData.h.

◆ _grad_u_old

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

Definition at line 667 of file MooseVariableData.h.

◆ _grad_u_older

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

Definition at line 668 of file MooseVariableData.h.

◆ _grad_u_previous_nl

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

Definition at line 669 of file MooseVariableData.h.

◆ _has_dof_indices

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

◆ _has_dof_values

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

Definition at line 638 of file MooseVariableData.h.

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

◆ _increment

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

Increment in the variable used in dampers.

Definition at line 557 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 727 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 730 of file MooseVariableData.h.

◆ _mapped_grad_phi_neighbor

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

Definition at line 729 of file MooseVariableData.h.

◆ _matrix_tag_u

template<typename OutputType>
std::vector<FieldVariableValue> MooseVariableData< OutputType >::_matrix_tag_u
private

◆ _matrix_tags_dof_u

template<typename OutputType>
std::vector<DoFValue> MooseVariableData< OutputType >::_matrix_tags_dof_u
private

◆ _need_ad

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

◆ _need_ad_grad_u

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

Definition at line 622 of file MooseVariableData.h.

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

◆ _need_ad_second_u

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

Definition at line 623 of file MooseVariableData.h.

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

◆ _need_ad_u

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

Definition at line 621 of file MooseVariableData.h.

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

◆ _need_ad_u_dot

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

Definition at line 592 of file MooseVariableData.h.

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

◆ _need_curl

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

curl flags

Definition at line 615 of file MooseVariableData.h.

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

◆ _need_curl_old

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

Definition at line 616 of file MooseVariableData.h.

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

◆ _need_curl_older

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

Definition at line 617 of file MooseVariableData.h.

◆ _need_dof_du_dot_du

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_du_dot_du
mutableprivate

Definition at line 634 of file MooseVariableData.h.

◆ _need_dof_du_dotdot_du

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_du_dotdot_du
mutableprivate

Definition at line 635 of file MooseVariableData.h.

◆ _need_dof_values

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_values
mutableprivate

local solution flags

Definition at line 626 of file MooseVariableData.h.

◆ _need_dof_values_dot

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_values_dot
mutableprivate

Definition at line 630 of file MooseVariableData.h.

◆ _need_dof_values_dot_old

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_values_dot_old
mutableprivate

Definition at line 632 of file MooseVariableData.h.

◆ _need_dof_values_dotdot

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_values_dotdot
mutableprivate

Definition at line 631 of file MooseVariableData.h.

◆ _need_dof_values_dotdot_old

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_values_dotdot_old
mutableprivate

Definition at line 633 of file MooseVariableData.h.

◆ _need_dof_values_old

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_values_old
mutableprivate

Definition at line 627 of file MooseVariableData.h.

◆ _need_dof_values_older

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_values_older
mutableprivate

Definition at line 628 of file MooseVariableData.h.

◆ _need_dof_values_previous_nl

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_dof_values_previous_nl
mutableprivate

Definition at line 629 of file MooseVariableData.h.

◆ _need_du_dot_du

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_du_dot_du
mutableprivate

Definition at line 596 of file MooseVariableData.h.

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

◆ _need_du_dotdot_du

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_du_dotdot_du
mutableprivate

Definition at line 597 of file MooseVariableData.h.

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

◆ _need_grad_dot

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_grad_dot
mutableprivate

gradient dot flags

Definition at line 605 of file MooseVariableData.h.

◆ _need_grad_dotdot

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_grad_dotdot
mutableprivate

Definition at line 606 of file MooseVariableData.h.

◆ _need_grad_old

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_grad_old
mutableprivate

gradient flags

Definition at line 600 of file MooseVariableData.h.

◆ _need_grad_older

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_grad_older
mutableprivate

Definition at line 601 of file MooseVariableData.h.

◆ _need_grad_previous_nl

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_grad_previous_nl
mutableprivate

Definition at line 602 of file MooseVariableData.h.

◆ _need_matrix_tag_dof_u

template<typename OutputType>
std::vector<bool> MooseVariableData< OutputType >::_need_matrix_tag_dof_u
mutableprivate

◆ _need_matrix_tag_u

template<typename OutputType>
std::vector<bool> MooseVariableData< OutputType >::_need_matrix_tag_u
mutableprivate

◆ _need_second

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

SolutionState second_u flags.

Definition at line 609 of file MooseVariableData.h.

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

◆ _need_second_old

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

Definition at line 610 of file MooseVariableData.h.

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

◆ _need_second_older

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

Definition at line 611 of file MooseVariableData.h.

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

◆ _need_second_previous_nl

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

Definition at line 612 of file MooseVariableData.h.

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

◆ _need_u_dot

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_u_dot
mutableprivate

u dot flags

Definition at line 591 of file MooseVariableData.h.

◆ _need_u_dot_old

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_u_dot_old
mutableprivate

Definition at line 594 of file MooseVariableData.h.

◆ _need_u_dotdot

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_u_dotdot
mutableprivate

Definition at line 593 of file MooseVariableData.h.

◆ _need_u_dotdot_old

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_u_dotdot_old
mutableprivate

Definition at line 595 of file MooseVariableData.h.

◆ _need_u_old

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_u_old
mutableprivate

u flags

Definition at line 586 of file MooseVariableData.h.

◆ _need_u_older

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_u_older
mutableprivate

Definition at line 587 of file MooseVariableData.h.

◆ _need_u_previous_nl

template<typename OutputType>
bool MooseVariableData< OutputType >::_need_u_previous_nl
mutableprivate

Definition at line 588 of file MooseVariableData.h.

◆ _need_vector_tag_dof_u

template<typename OutputType>
std::vector<bool> MooseVariableData< OutputType >::_need_vector_tag_dof_u
mutableprivate

◆ _need_vector_tag_u

template<typename OutputType>
std::vector<bool> MooseVariableData< OutputType >::_need_vector_tag_u
mutableprivate

◆ _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 541 of file MooseVariableData.h.

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

◆ _nodal_value

template<typename OutputType>
OutputType MooseVariableData< OutputType >::_nodal_value
private

Nodal values.

Definition at line 560 of file MooseVariableData.h.

◆ _nodal_value_array

template<typename OutputType>
MooseArray<OutputType> MooseVariableData< OutputType >::_nodal_value_array
private

Nodal values as MooseArrays for use with AuxKernels.

Definition at line 575 of file MooseVariableData.h.

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

◆ _nodal_value_dot

template<typename OutputType>
OutputType MooseVariableData< OutputType >::_nodal_value_dot
private

nodal values of u_dot

Definition at line 566 of file MooseVariableData.h.

◆ _nodal_value_dot_old

template<typename OutputType>
OutputType MooseVariableData< OutputType >::_nodal_value_dot_old
private

nodal values of u_dot_old

Definition at line 570 of file MooseVariableData.h.

◆ _nodal_value_dotdot

template<typename OutputType>
OutputType MooseVariableData< OutputType >::_nodal_value_dotdot
private

nodal values of u_dotdot

Definition at line 568 of file MooseVariableData.h.

◆ _nodal_value_dotdot_old

template<typename OutputType>
OutputType MooseVariableData< OutputType >::_nodal_value_dotdot_old
private

nodal values of u_dotdot_old

Definition at line 572 of file MooseVariableData.h.

◆ _nodal_value_old

template<typename OutputType>
OutputType MooseVariableData< OutputType >::_nodal_value_old
private

Definition at line 561 of file MooseVariableData.h.

◆ _nodal_value_old_array

template<typename OutputType>
MooseArray<OutputType> MooseVariableData< OutputType >::_nodal_value_old_array
private

◆ _nodal_value_older

template<typename OutputType>
OutputType MooseVariableData< OutputType >::_nodal_value_older
private

Definition at line 562 of file MooseVariableData.h.

◆ _nodal_value_older_array

template<typename OutputType>
MooseArray<OutputType> MooseVariableData< OutputType >::_nodal_value_older_array
private

◆ _nodal_value_previous_nl

template<typename OutputType>
OutputType MooseVariableData< OutputType >::_nodal_value_previous_nl
private

Definition at line 563 of file MooseVariableData.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 787 of file MooseVariableData.h.

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

◆ _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 &, 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<OutputType>::VariablePhiValue &(const Assembly &, FEType)> MooseVariableData< OutputType >::_phi_face_assembly_method
private

◆ _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 717 of file MooseVariableData.h.

◆ _qrule_face

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

Definition at line 718 of file MooseVariableData.h.

◆ _second_phi

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

Definition at line 723 of file MooseVariableData.h.

◆ _second_phi_assembly_method

template<typename OutputType>
std::function<const typename OutputTools<OutputType>::VariablePhiSecond &(const Assembly &, 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 735 of file MooseVariableData.h.

◆ _second_phi_face_assembly_method

template<typename OutputType>
std::function<const typename OutputTools<OutputType>::VariablePhiSecond &(const Assembly &, 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 676 of file MooseVariableData.h.

◆ _second_u_old

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

Definition at line 677 of file MooseVariableData.h.

◆ _second_u_older

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

Definition at line 678 of file MooseVariableData.h.

◆ _second_u_previous_nl

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

Definition at line 679 of file MooseVariableData.h.

◆ _subproblem

template<typename OutputType>
const SubProblem& MooseVariableData< OutputType >::_subproblem
private

Definition at line 517 of file MooseVariableData.h.

◆ _sys

template<typename OutputType>
const SystemBase& MooseVariableData< OutputType >::_sys
private

◆ _tid

template<typename OutputType>
THREAD_ID MooseVariableData< OutputType >::_tid
private

Definition at line 519 of file MooseVariableData.h.

◆ _time_integrator

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

Pointer to time integrator.

Definition at line 782 of file MooseVariableData.h.

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

◆ _u

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

u

Definition at line 660 of file MooseVariableData.h.

◆ _u_dot

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

u_dot (time derivative)

Definition at line 697 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 703 of file MooseVariableData.h.

◆ _u_dot_old_bak

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

Definition at line 703 of file MooseVariableData.h.

◆ _u_dotdot

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

u_dotdot (second time derivative)

Definition at line 700 of file MooseVariableData.h.

◆ _u_dotdot_bak

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

Definition at line 700 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 706 of file MooseVariableData.h.

◆ _u_dotdot_old_bak

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

Definition at line 706 of file MooseVariableData.h.

◆ _u_old

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

Definition at line 661 of file MooseVariableData.h.

◆ _u_older

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

Definition at line 662 of file MooseVariableData.h.

◆ _u_previous_nl

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

Definition at line 663 of file MooseVariableData.h.

◆ _var

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

A const reference to the owning MooseVariableFE object.

Definition at line 509 of file MooseVariableData.h.

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

◆ _var_num

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

Definition at line 513 of file MooseVariableData.h.

◆ _vector_tag_u

template<typename OutputType>
std::vector<FieldVariableValue> MooseVariableData< OutputType >::_vector_tag_u
private

◆ _vector_tags_dof_u

template<typename OutputType>
std::vector<DoFValue> MooseVariableData< OutputType >::_vector_tags_dof_u
private

The documentation for this class was generated from the following files:
MooseVariableData::_grad_u_older
FieldVariableGradient _grad_u_older
Definition: MooseVariableData.h:668
MooseVariableData::_nodal_dof_index
dof_id_type _nodal_dof_index
The dof index for the current node.
Definition: MooseVariableData.h:541
MooseVariableData::_need_matrix_tag_dof_u
std::vector< bool > _need_matrix_tag_dof_u
Definition: MooseVariableData.h:535
TimeIntegrator::computeADTimeDerivatives
virtual void computeADTimeDerivatives(DualReal &ad_u_dot, const dof_id_type &dof) const =0
method for computing local automatic differentiation time derivatives
MooseVariableData::uDot
const FieldVariableValue & uDot() const
Definition: MooseVariableData.C:247
SystemBase::getMatrix
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:858
MooseVariableData::_need_u_dotdot
bool _need_u_dotdot
Definition: MooseVariableData.h:593
Moose::Current
Definition: MooseVariableData.h:49
MooseVariableData::_need_curl_older
bool _need_curl_older
Definition: MooseVariableData.h:617
MooseVariableData::_need_dof_values_previous_nl
bool _need_dof_values_previous_nl
Definition: MooseVariableData.h:629
MooseVariableData::_qrule
const QBase *const & _qrule
The current qrule.
Definition: MooseVariableData.h:717
MooseVariableData::_has_dof_indices
bool _has_dof_indices
Definition: MooseVariableData.h:637
MooseVariableData::_u_previous_nl
FieldVariableValue _u_previous_nl
Definition: MooseVariableData.h:663
MooseVariableData::_ad_dofs_dot
MooseArray< DualReal > _ad_dofs_dot
Definition: MooseVariableData.h:691
SystemBase::mesh
virtual MooseMesh & mesh()
Definition: SystemBase.h:106
MooseVariableData::_second_u_older
FieldVariableSecond _second_u_older
Definition: MooseVariableData.h:678
MooseVariableData::_grad_u_previous_nl
FieldVariableGradient _grad_u_previous_nl
Definition: MooseVariableData.h:669
type
MatType type
Definition: PetscDMMoose.C:1477
MooseVariableData::_second_u_previous_nl
FieldVariableSecond _second_u_previous_nl
Definition: MooseVariableData.h:679
MooseVariableData::_need_ad_grad_u
bool _need_ad_grad_u
Definition: MooseVariableData.h:622
MooseVariableData::_ad_grad_phi_face_assembly_method
std::function< const typename VariableTestGradientType< OutputType, ComputeStage::JACOBIAN >::type &(const Assembly &, FEType)> _ad_grad_phi_face_assembly_method
Definition: MooseVariableData.h:779
MooseVariableData::_dof_values_previous_nl
DoFValue _dof_values_previous_nl
Definition: MooseVariableData.h:644
MooseVariableData::_grad_phi_face
const FieldVariablePhiGradient * _grad_phi_face
Definition: MooseVariableData.h:734
Moose::ElementType::Neighbor
Assembly::getFE
const FEBase *const & getFE(FEType type, unsigned int dim) const
Get a reference to a pointer that will contain the current volume FE.
Definition: Assembly.h:74
MooseVariableData::_ad_grad_phi
const VariableTestGradientType< OutputShape, JACOBIAN >::type * _ad_grad_phi
Definition: MooseVariableData.h:738
MooseVariableData::_curl_u_older
FieldVariableCurl _curl_u_older
Definition: MooseVariableData.h:684
MooseVariableData::OutputShapeGradient
TensorTools::IncrementRank< OutputShape >::type OutputShapeGradient
Definition: MooseVariableData.h:81
SystemBase::solutionPreviousNewton
virtual NumericVector< Number > * solutionPreviousNewton()=0
MooseMesh::isSemiLocal
bool isSemiLocal(Node *const node) const
Returns true if the node is semi-local.
Definition: MooseMesh.C:617
Assembly::side
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:336
MooseVariableData::_is_nodal
bool _is_nodal
if variable is nodal
Definition: MooseVariableData.h:538
MooseVariableData::_nodal_value_dot
OutputType _nodal_value_dot
nodal values of u_dot
Definition: MooseVariableData.h:566
OutputTools::OutputSecond
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:267
MooseVariableData::_du_dotdot_du
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u
Definition: MooseVariableData.h:712
MooseVariableData::_ad_grad_phi_assembly_method
std::function< const typename VariableTestGradientType< OutputType, ComputeStage::JACOBIAN >::type &(const Assembly &, FEType)> _ad_grad_phi_assembly_method
Definition: MooseVariableData.h:776
SystemBase::hasVector
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:748
MooseVariableData::_current_phi
const FieldVariablePhiValue * _current_phi
Definition: MooseVariableData.h:742
MooseVariableData::_curl_phi_face
const FieldVariablePhiCurl * _curl_phi_face
Definition: MooseVariableData.h:736
Moose::Volume
Definition: MooseVariableData.h:56
MooseVariableData::_need_vector_tag_u
std::vector< bool > _need_vector_tag_u
Definition: MooseVariableData.h:549
SubProblem::isTransient
virtual bool isTransient() const =0
MooseVariableData::_grad_phi_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiGradient &(const Assembly &, FEType)> _grad_phi_assembly_method
Definition: MooseVariableData.h:757
SubProblem::currentlyComputingJacobian
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:592
MooseVariableData::assignNodalValue
void assignNodalValue()
Definition: MooseVariableData.C:2419
MooseVariableData::_need_du_dotdot_du
bool _need_du_dotdot_du
Definition: MooseVariableData.h:597
MooseVariableData::_dof_du_dotdot_du
MooseArray< Number > _dof_du_dotdot_du
nodal values of derivative of u_dotdot wrt u
Definition: MooseVariableData.h:657
SystemBase::dofMap
virtual DofMap & dofMap()
Gets writeable reference to the dof map.
Definition: SystemBase.C:979
MooseVariableData::_var_num
const unsigned int _var_num
Definition: MooseVariableData.h:513
MooseVariableData::phi
const FieldVariablePhiValue & phi() const
phi getter
Definition: MooseVariableData.h:151
MooseVariableData::_need_dof_values_dotdot
bool _need_dof_values_dotdot
Definition: MooseVariableData.h:631
MooseVariableData::_need_vector_tag_dof_u
std::vector< bool > _need_vector_tag_dof_u
Definition: MooseVariableData.h:534
MooseVariableData::_grad_phi
const FieldVariablePhiGradient * _grad_phi
Definition: MooseVariableData.h:722
SystemBase::duDotDotDu
virtual Number & duDotDotDu()
Definition: SystemBase.h:205
MooseVariableData::_current_ad_grad_phi
const VariableTestGradientType< OutputShape, JACOBIAN >::type * _current_ad_grad_phi
Definition: MooseVariableData.h:746
MooseVariableData::_matrix_tag_u
std::vector< FieldVariableValue > _matrix_tag_u
Definition: MooseVariableData.h:550
SystemBase::system
virtual System & system()=0
Get the reference to the libMesh system.
MooseVariableData::_nodal_value_dotdot
OutputType _nodal_value_dotdot
nodal values of u_dotdot
Definition: MooseVariableData.h:568
SystemBase::solutionUDotDotOld
virtual NumericVector< Number > * solutionUDotDotOld()=0
MooseVariableData::_need_du_dot_du
bool _need_du_dot_du
Definition: MooseVariableData.h:596
SystemBase::matrixTagActive
virtual bool matrixTagActive(TagID tag) const
If or not a matrix tag is active.
Definition: SystemBase.C:958
MooseVariableData::_need_dof_values_dot
bool _need_dof_values_dot
Definition: MooseVariableData.h:630
MooseVariableData::_second_phi_face_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiSecond &(const Assembly &, FEType)> _second_phi_face_assembly_method
Definition: MooseVariableData.h:767
SystemBase::hasMatrix
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:852
MooseVariableData::_qrule_face
const QBase *const & _qrule_face
Definition: MooseVariableData.h:718
MooseVariableData::_second_phi
const FieldVariablePhiSecond * _second_phi
Definition: MooseVariableData.h:723
MooseVariableData::_need_dof_du_dot_du
bool _need_dof_du_dot_du
Definition: MooseVariableData.h:634
MooseVariableData::_need_matrix_tag_u
std::vector< bool > _need_matrix_tag_u
Definition: MooseVariableData.h:551
SubProblem::numMatrixTags
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition: SubProblem.h:162
Moose::Old
Definition: MooseVariableData.h:50
MooseVariableData::_curl_phi_face_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiCurl &(const Assembly &, FEType)> _curl_phi_face_assembly_method
Definition: MooseVariableData.h:772
Moose::ElementType::Lower
MooseVariableData::_need_dof_values
bool _need_dof_values
local solution flags
Definition: MooseVariableData.h:626
MooseVariableData::curlPhi
const FieldVariablePhiCurl & curlPhi() const
curl_phi getter
Definition: MooseVariableData.C:455
MooseVariableData::_ad_dof_values
MooseArray< DualReal > _ad_dof_values
Definition: MooseVariableData.h:690
MooseVariableData::_increment
FieldVariableValue _increment
Increment in the variable used in dampers.
Definition: MooseVariableData.h:557
MooseVariableData::_nodal_value_array
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
Definition: MooseVariableData.h:575
SubProblem::mesh
virtual MooseMesh & mesh()=0
Moose::Older
Definition: MooseVariableData.h:51
MooseVariableData::_need_curl
bool _need_curl
curl flags
Definition: MooseVariableData.h:615
MooseVariableData::_grad_u_dotdot
FieldVariableGradient _grad_u_dotdot
Definition: MooseVariableData.h:673
MooseVariableData::_need_second
bool _need_second
SolutionState second_u flags.
Definition: MooseVariableData.h:609
MooseVariableData::_u_old
FieldVariableValue _u_old
Definition: MooseVariableData.h:661
MooseVariableData::_need_second_older
bool _need_second_older
Definition: MooseVariableData.h:611
MooseVariableData::getArrayDoFValues
void getArrayDoFValues(const NumericVector< Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
Definition: MooseVariableData.C:2387
MooseVariableData::_mapped_grad_phi_face
MappedArrayVariablePhiGradient _mapped_grad_phi_face
Definition: MooseVariableData.h:728
MooseVariableData::_need_u_older
bool _need_u_older
Definition: MooseVariableData.h:587
mooseError
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition: MooseError.h:210
MooseVariableData::_dof_values
DoFValue _dof_values
local solution values
Definition: MooseVariableData.h:641
MooseVariableData::_dof_map
const DofMap & _dof_map
Definition: MooseVariableData.h:523
OutputTools::OutputGradient
TensorTools::IncrementRank< OutputType >::type OutputGradient
Definition: MooseTypes.h:266
MooseVariableData::_vector_tag_u
std::vector< FieldVariableValue > _vector_tag_u
Definition: MooseVariableData.h:548
MooseVariableData::_need_ad_u
bool _need_ad_u
Definition: MooseVariableData.h:621
SystemBase::solutionOlder
virtual NumericVector< Number > & solutionOlder()=0
SystemBase::solutionOld
virtual NumericVector< Number > & solutionOld()=0
MooseVariableData::_continuity
FEContinuity _continuity
Continuity type of the variable.
Definition: MooseVariableData.h:554
MooseVariableData::_need_grad_dot
bool _need_grad_dot
gradient dot flags
Definition: MooseVariableData.h:605
MooseVariableData::_u
FieldVariableValue _u
u
Definition: MooseVariableData.h:660
MooseVariableData::_need_second_old
bool _need_second_old
Definition: MooseVariableData.h:610
SystemBase::subproblem
virtual SubProblem & subproblem()
Definition: SystemBase.h:108
MooseVariableData::_need_second_previous_nl
bool _need_second_previous_nl
Definition: MooseVariableData.h:612
MooseVariableData::_current_qrule
const QBase * _current_qrule
Definition: MooseVariableData.h:741
MooseVariableData::_nodal_value_previous_nl
OutputType _nodal_value_previous_nl
Definition: MooseVariableData.h:563
MooseVariableData::_u_dotdot_old
FieldVariableValue _u_dotdot_old
u_dotdot_old (second time derivative)
Definition: MooseVariableData.h:706
MooseVariableData::_need_u_dot
bool _need_u_dot
u dot flags
Definition: MooseVariableData.h:591
MooseVariableBase::count
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one.
Definition: MooseVariableBase.h:98
SystemBase::solutionUDotDot
virtual NumericVector< Number > * solutionUDotDot()=0
MooseVariableData::_dof_values_dot
DoFValue _dof_values_dot
nodal values of u_dot
Definition: MooseVariableData.h:647
MooseVariableData::_u_dot_old
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
Definition: MooseVariableData.h:703
MooseVariableData::_need_grad_older
bool _need_grad_older
Definition: MooseVariableData.h:601
MooseVariableData::_has_dof_values
bool _has_dof_values
Definition: MooseVariableData.h:638
MooseVariableData::_second_phi_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiSecond &(const Assembly &, FEType)> _second_phi_assembly_method
Definition: MooseVariableData.h:764
Moose::PreviousNL
Definition: MooseVariableData.h:52
MooseVariableData::_tid
THREAD_ID _tid
Definition: MooseVariableData.h:519
MooseVariableData::_current_curl_phi
const FieldVariablePhiCurl * _current_curl_phi
Definition: MooseVariableData.h:745
MooseVariableData::_u_dotdot
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
Definition: MooseVariableData.h:700
Assembly::getVectorFE
const FEVectorBase *const & getVectorFE(FEType type, unsigned int dim) const
Get a reference to a pointer that will contain the current volume FEVector.
Definition: Assembly.h:122
SubProblem::safeAccessTaggedVectors
bool safeAccessTaggedVectors() const
Is it safe to access the tagged vectors.
Definition: SubProblem.h:612
MooseMesh::getMesh
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2599
MooseVariableData::_ad_grad_phi_face
const VariableTestGradientType< OutputShape, JACOBIAN >::type * _ad_grad_phi_face
Definition: MooseVariableData.h:739
MooseVariableData::_grad_phi_face_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiGradient &(const Assembly &, FEType)> _grad_phi_face_assembly_method
Definition: MooseVariableData.h:760
MooseVariableData::_need_curl_old
bool _need_curl_old
Definition: MooseVariableData.h:616
MooseVariableData::_grad_u_dot
FieldVariableGradient _grad_u_dot
grad_u dots
Definition: MooseVariableData.h:672
SystemBase::duDotDu
virtual Number & duDotDu()
Definition: SystemBase.h:204
MooseVariableData::_need_ad_second_u
bool _need_ad_second_u
Definition: MooseVariableData.h:623
MooseVariableData::_current_side
const unsigned int & _current_side
The current element side.
Definition: MooseVariableData.h:798
MooseVariableData::_du_dot_du
VariableValue _du_dot_du
derivative of u_dot wrt u
Definition: MooseVariableData.h:709
MooseVariableData::_nodal_value_old_array
MooseArray< OutputType > _nodal_value_old_array
Definition: MooseVariableData.h:576
MooseVariableData::zeroSizeDofValues
void zeroSizeDofValues()
Definition: MooseVariableData.C:2367
Moose::Face
Definition: MooseVariableData.h:57
SubProblem::assembly
virtual Assembly & assembly(THREAD_ID tid)=0
MooseVariableData::_curl_phi
const FieldVariablePhiCurl * _curl_phi
Definition: MooseVariableData.h:724
SystemBase::number
virtual unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:973
MooseVariableData::_count
unsigned int _count
Number of components of the associated variable.
Definition: MooseVariableData.h:529
SystemBase::getMaxVarNDofsPerNode
std::size_t getMaxVarNDofsPerNode() const
Gets the maximum number of dofs used by any one variable on any one node.
Definition: SystemBase.h:487
MooseVariableData::_matrix_tags_dof_u
std::vector< DoFValue > _matrix_tags_dof_u
Definition: MooseVariableData.h:546
MooseVariableData::_need_u_dotdot_old
bool _need_u_dotdot_old
Definition: MooseVariableData.h:595
Moose::VAR_FIELD_ARRAY
Definition: MooseTypes.h:618
SubProblem::getActiveFEVariableCoupleableVectorTags
const std::set< TagID > & getActiveFEVariableCoupleableVectorTags(THREAD_ID tid) const
Definition: SubProblem.C:198
MooseVariableData::_ad_second_u
VariableSecondType< OutputShape, JACOBIAN >::type _ad_second_u
Definition: MooseVariableData.h:689
MooseVariableData::secondPhi
const FieldVariablePhiSecond & secondPhi() const
second_phi getter
Definition: MooseVariableData.C:439
MooseVariableData::_nodal_value_older
OutputType _nodal_value_older
Definition: MooseVariableData.h:562
MooseVariableData::_need_u_old
bool _need_u_old
u flags
Definition: MooseVariableData.h:586
MooseVariableData::_need_ad_u_dot
bool _need_ad_u_dot
Definition: MooseVariableData.h:592
MooseVariableData::_sys
const SystemBase & _sys
Definition: MooseVariableData.h:515
SystemBase::getVector
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:798
SystemBase::getMaxVarNDofsPerElem
std::size_t getMaxVarNDofsPerElem() const
Gets the maximum number of dofs used by any one variable on any one element.
Definition: SystemBase.h:480
MooseMesh::dimension
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2148
MooseVariableData::_dof_indices
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
Definition: MooseVariableData.h:532
MooseVariableData::node
const Node *const & node() const
Definition: MooseVariableData.h:250
MooseVariableData::_need_grad_dotdot
bool _need_grad_dotdot
Definition: MooseVariableData.h:606
MooseVariableData::_nodal_value_dotdot_old
OutputType _nodal_value_dotdot_old
nodal values of u_dotdot_old
Definition: MooseVariableData.h:572
Moose::VAR_NONLINEAR
Definition: MooseTypes.h:608
MooseVariableData::_subproblem
const SubProblem & _subproblem
Definition: MooseVariableData.h:517
MooseVariableData::_ad_u_dot
VariableValueType< OutputShape, JACOBIAN >::type _ad_u_dot
Definition: MooseVariableData.h:692
MooseVariableData::_second_phi_face
const FieldVariablePhiSecond * _second_phi_face
Definition: MooseVariableData.h:735
MooseVariableData::_phi_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiValue &(const Assembly &, FEType)> _phi_assembly_method
Definition: MooseVariableData.h:750
MooseVariableData::_u_dot
FieldVariableValue _u_dot
u_dot (time derivative)
Definition: MooseVariableData.h:697
Moose::VAR_AUXILIARY
Definition: MooseTypes.h:609
MooseVariableData::_dof_values_dotdot
DoFValue _dof_values_dotdot
nodal values of u_dotdot
Definition: MooseVariableData.h:649
MooseVariableData::_need_dof_du_dotdot_du
bool _need_dof_du_dotdot_du
Definition: MooseVariableData.h:635
MooseVariableData::_need_grad_old
bool _need_grad_old
gradient flags
Definition: MooseVariableData.h:600
MooseVariableData::_nodal_value_dot_old
OutputType _nodal_value_dot_old
nodal values of u_dot_old
Definition: MooseVariableData.h:570
MooseVariableData::_nodal_value_older_array
MooseArray< OutputType > _nodal_value_older_array
Definition: MooseVariableData.h:577
MooseVariableData::_second_u
FieldVariableSecond _second_u
second_u
Definition: MooseVariableData.h:676
MooseVariableData::_node
const Node *const & _node
The current node.
Definition: MooseVariableData.h:787
MooseVariableData::_need_dof_values_old
bool _need_dof_values_old
Definition: MooseVariableData.h:627
MooseVariableData::_fe_type
const FEType & _fe_type
Definition: MooseVariableData.h:511
MooseVariableData::_phi_face_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiValue &(const Assembly &, FEType)> _phi_face_assembly_method
Definition: MooseVariableData.h:753
MooseVariableData::_curl_u
FieldVariableCurl _curl_u
curl_u
Definition: MooseVariableData.h:682
MooseVariableData::fetchDoFValues
void fetchDoFValues()
Definition: MooseVariableData.C:2144
MooseVariableData::_need_dof_values_older
bool _need_dof_values_older
Definition: MooseVariableData.h:628
MooseVariableData::secondPhiFace
const FieldVariablePhiSecond & secondPhiFace() const
second_phi_face getter
Definition: MooseVariableData.C:447
MooseVariableData::_need_dof_values_dotdot_old
bool _need_dof_values_dotdot_old
Definition: MooseVariableData.h:633
MooseVariableData::_time_integrator
const TimeIntegrator * _time_integrator
Pointer to time integrator.
Definition: MooseVariableData.h:782
MooseVariableData::_grad_u_old
FieldVariableGradient _grad_u_old
Definition: MooseVariableData.h:667
SubProblem::numVectorTags
virtual unsigned int numVectorTags() const
The total number of tags.
Definition: SubProblem.h:127
MooseVariableData::_dof_values_dot_old
DoFValue _dof_values_dot_old
nodal values of u_dot_old
Definition: MooseVariableData.h:651
MooseVariableData::_need_dof_values_dot_old
bool _need_dof_values_dot_old
Definition: MooseVariableData.h:632
MooseVariableData::_elem
const Elem *const & _elem
The current elem.
Definition: MooseVariableData.h:792
MooseVariableData::_u_older
FieldVariableValue _u_older
Definition: MooseVariableData.h:662
SubProblem::getActiveFEVariableCoupleableMatrixTags
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(THREAD_ID tid) const
Definition: SubProblem.C:192
MooseVariableData::_need_ad
bool _need_ad
AD flags.
Definition: MooseVariableData.h:620
MooseVariableData::_dof_values_dotdot_old
DoFValue _dof_values_dotdot_old
nodal values of u_dotdot_old
Definition: MooseVariableData.h:653
Moose::derivInsert
void derivInsert(NumberArray< N, Real > &derivs, unsigned int index, Real value)
Definition: NumberArrayOps.h:20
MooseArray::resize
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:218
Moose::ElementType::Element
MooseVariableData::_element_type
Moose::ElementType _element_type
The element type this object is storing data for. This is either Element, Neighbor,...
Definition: MooseVariableData.h:526
MooseVariableData::fetchADDoFValues
void fetchADDoFValues()
Definition: MooseVariableData.C:2342
MooseVariableData::_phi
const FieldVariablePhiValue * _phi
Definition: MooseVariableData.h:721
MooseVariableData::_grad_u
FieldVariableGradient _grad_u
grad_u
Definition: MooseVariableData.h:666
MooseVariableData::isNodal
bool isNodal() const
Definition: MooseVariableData.h:249
MooseVariableData::_need_grad_previous_nl
bool _need_grad_previous_nl
Definition: MooseVariableData.h:602
MooseVariableData::_curl_u_old
FieldVariableCurl _curl_u_old
Definition: MooseVariableData.h:683
libMesh::RealTensorValue
TensorValue< Real > RealTensorValue
Definition: MooseTypes.h:140
MooseVariableData::_assembly
const Assembly & _assembly
Definition: MooseVariableData.h:521
MooseVariableData::_dof_values_older
DoFValue _dof_values_older
Definition: MooseVariableData.h:643
MooseVariableData::_var
const MooseVariableFE< OutputType > & _var
A const reference to the owning MooseVariableFE object.
Definition: MooseVariableData.h:509
MooseVariableData::_mapped_grad_phi
MappedArrayVariablePhiGradient _mapped_grad_phi
Definition: MooseVariableData.h:727
MooseVariableData::_nodal_value_old
OutputType _nodal_value_old
Definition: MooseVariableData.h:561
MooseArray::size
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:259
SystemBase::currentSolution
virtual const NumericVector< Number > *const & currentSolution() const =0
The solution vector that is currently being operated on.
MooseVariableData::assignADNodalValue
void assignADNodalValue(const DualReal &value, const unsigned int &component)
Helper methods for assigning nodal values from their corresponding solution values (dof values as the...
libMesh::RealEigenVector
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:133
MooseVariableData::_vector_tags_dof_u
std::vector< DoFValue > _vector_tags_dof_u
Definition: MooseVariableData.h:544
MooseVariableData::_nodal_value
OutputType _nodal_value
Nodal values.
Definition: MooseVariableData.h:560
MooseVariableData::computeAD
void computeAD(const unsigned int num_dofs, const unsigned int nqp)
compute AD things
Definition: MooseVariableData.C:1282
MooseVariableData::_dof_values_old
DoFValue _dof_values_old
Definition: MooseVariableData.h:642
MooseVariableData::_second_u_old
FieldVariableSecond _second_u_old
Definition: MooseVariableData.h:677
MooseVariableData::OutputShape
Moose::ShapeType< OutputType >::type OutputShape
Definition: MooseVariableData.h:78
SubProblem::safeAccessTaggedMatrices
bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
Definition: SubProblem.h:609
MooseVariableData::_ad_nodal_value
Moose::ValueType< OutputType, JACOBIAN >::type _ad_nodal_value
AD nodal value.
Definition: MooseVariableData.h:580
MooseVariableData::computeValues
void computeValues()
compute the variable values
Definition: MooseVariableData.C:471
MooseVariableData::_need_u_dot_old
bool _need_u_dot_old
Definition: MooseVariableData.h:594
MooseVariableData::_need_u_previous_nl
bool _need_u_previous_nl
Definition: MooseVariableData.h:588
SystemBase::solutionUDot
virtual NumericVector< Number > * solutionUDot()=0
MooseVariableData::_curl_phi_assembly_method
std::function< const typename OutputTools< OutputType >::VariablePhiCurl &(const Assembly &, FEType)> _curl_phi_assembly_method
Definition: MooseVariableData.h:770
MooseVariableData::_phi_face
const FieldVariablePhiValue * _phi_face
Definition: MooseVariableData.h:733
SystemBase::solutionUDotOld
virtual NumericVector< Number > * solutionUDotOld()=0
MooseVariableData::_displaced
const bool _displaced
Whether this variable is being calculated on a displaced system.
Definition: MooseVariableData.h:795
MooseVariableData::_current_second_phi
const FieldVariablePhiSecond * _current_second_phi
Definition: MooseVariableData.h:744
MooseVariableData::_dof_du_dot_du
MooseArray< Number > _dof_du_dot_du
nodal values of derivative of u_dot wrt u
Definition: MooseVariableData.h:655
MooseVariableData::_ad_u
VariableValueType< OutputShape, JACOBIAN >::type _ad_u
AD u.
Definition: MooseVariableData.h:687
SystemBase::getTimeIntegrator
TimeIntegrator * getTimeIntegrator()
Definition: SystemBase.h:763
MooseVariableData::_ad_zero
const DualReal _ad_zero
A zero AD variable.
Definition: MooseVariableData.h:583
MooseVariableData::_current_grad_phi
const FieldVariablePhiGradient * _current_grad_phi
Definition: MooseVariableData.h:743
MooseVariableData::_ad_grad_u
VariableGradientType< OutputShape, JACOBIAN >::type _ad_grad_u
Definition: MooseVariableData.h:688
MooseVariableData::curlPhiFace
const FieldVariablePhiCurl & curlPhiFace() const
curl_phi_face getter
Definition: MooseVariableData.C:463
n
PetscInt n
Definition: PetscDMMoose.C:1504