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

Class for stuff related to variables. More...

#include <Adaptivity.h>

Inheritance diagram for MooseVariableFE< OutputType >:
[legend]

Public Member Functions

 MooseVariableFE (unsigned int var_num, const FEType &fe_type, SystemBase &sys, Assembly &assembly, Moose::VarKindType var_kind, THREAD_ID tid)
 
virtual ~MooseVariableFE ()
 
void clearDofIndices () override
 Clear out the dof indices. More...
 
void prepare () override
 
void prepareNeighbor () override
 
void prepareAux () override
 
void reinitNode () override
 
void reinitAux () override
 
void reinitAuxNeighbor () override
 
void reinitNodes (const std::vector< dof_id_type > &nodes) override
 
void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes) override
 
bool usesPhi ()
 Whether or not this variable is actually using the shape function value. More...
 
bool usesGradPhi ()
 Whether or not this variable is actually using the shape function gradient. More...
 
bool usesPhiNeighbor ()
 Whether or not this variable is actually using the shape function value. More...
 
bool usesGradPhiNeighbor ()
 Whether or not this variable is actually using the shape function gradient. More...
 
bool usesSecondPhi ()
 Whether or not this variable is computing any second derivatives. More...
 
bool usesSecondPhiNeighbor ()
 Whether or not this variable is actually using the shape function second derivative on a neighbor. More...
 
bool computingSecond ()
 Whether or not this variable is computing any second derivatives. More...
 
bool computingCurl ()
 Whether or not this variable is computing the curl. More...
 
const std::set< SubdomainID > & activeSubdomains () const override
 The subdomains the variable is active on. More...
 
bool activeOnSubdomain (SubdomainID subdomain) const override
 Is the variable active on the subdomain? More...
 
bool isNodal () const override
 Is this variable nodal. More...
 
bool isVector () const override
 
const Node *& node () const
 
virtual dof_id_type & nodalDofIndex () override
 
bool isNodalDefined () const
 
const Node *& nodeNeighbor () const
 
virtual dof_id_type & nodalDofIndexNeighbor () override
 
bool isNodalNeighborDefined () const
 
const Elem *& currentElem () const override
 Current element this variable is evaluated at. More...
 
unsigned int & currentSide () const
 Current side this variable is being evaluated on. More...
 
const Elem *& neighbor () const
 Current neighboring element. More...
 
const MooseArray< Point > & normals () const override
 
virtual void prepareIC () override
 Prepare the initial condition. More...
 
const FieldVariablePhiValuephi ()
 
const FieldVariablePhiGradientgradPhi ()
 
const FieldVariablePhiSecondsecondPhi ()
 
const FieldVariablePhiCurlcurlPhi ()
 
const FieldVariablePhiValuephiFace ()
 
const FieldVariablePhiGradientgradPhiFace ()
 
const FieldVariablePhiSecondsecondPhiFace ()
 
const FieldVariablePhiCurlcurlPhiFace ()
 
const FieldVariablePhiValuephiNeighbor ()
 
const FieldVariablePhiGradientgradPhiNeighbor ()
 
const FieldVariablePhiSecondsecondPhiNeighbor ()
 
const FieldVariablePhiCurlcurlPhiNeighbor ()
 
const FieldVariablePhiValuephiFaceNeighbor ()
 
const FieldVariablePhiGradientgradPhiFaceNeighbor ()
 
const FieldVariablePhiSecondsecondPhiFaceNeighbor ()
 
const FieldVariablePhiCurlcurlPhiFaceNeighbor ()
 
template<ComputeStage compute_stage>
const VariableTestGradientType< OutputType, compute_stage >::typeadGradPhi ()
 
template<ComputeStage compute_stage>
const VariableTestGradientType< OutputType, compute_stage >::typeadGradPhiFace ()
 
FieldVariableValueincrement ()
 
const FieldVariableValuevectorTagValue (TagID tag)
 
const FieldVariableValuematrixTagValue (TagID tag)
 
const FieldVariableValuesln ()
 
const FieldVariableValueslnOld ()
 
const FieldVariableValueslnOlder ()
 
const FieldVariableValueslnPreviousNL ()
 
const FieldVariableGradientgradSln ()
 
const FieldVariableGradientgradSlnOld ()
 
const FieldVariableGradientgradSlnOlder ()
 
const FieldVariableGradientgradSlnPreviousNL ()
 
const FieldVariableGradientgradSlnDot ()
 
const FieldVariableGradientgradSlnDotDot ()
 
const FieldVariableSecondsecondSln ()
 
const FieldVariableSecondsecondSlnOld ()
 
const FieldVariableSecondsecondSlnOlder ()
 
const FieldVariableSecondsecondSlnPreviousNL ()
 
const FieldVariableCurlcurlSln ()
 
const FieldVariableCurlcurlSlnOld ()
 
const FieldVariableCurlcurlSlnOlder ()
 
template<ComputeStage compute_stage>
const VariableValueType< OutputType, compute_stage >::typeadSln ()
 
template<ComputeStage compute_stage>
const VariableGradientType< OutputType, compute_stage >::typeadGradSln ()
 
template<ComputeStage compute_stage>
const VariableSecondType< OutputType, compute_stage >::typeadSecondSln ()
 
template<ComputeStage compute_stage>
const VariableValueType< OutputType, compute_stage >::typeadUDot ()
 
template<ComputeStage compute_stage>
const VariableValueType< OutputType, compute_stage >::typeadSlnNeighbor ()
 
template<ComputeStage compute_stage>
const VariableGradientType< OutputType, compute_stage >::typeadGradSlnNeighbor ()
 
template<ComputeStage compute_stage>
const VariableSecondType< OutputType, compute_stage >::typeadSecondSlnNeighbor ()
 
const FieldVariableValueuDot ()
 
const FieldVariableValueuDotDot ()
 
const FieldVariableValueuDotOld ()
 
const FieldVariableValueuDotDotOld ()
 
const VariableValueduDotDu ()
 
const VariableValueduDotDotDu ()
 
template<ComputeStage compute_stage>
const VariableValueType< OutputType, compute_stage >::typeadUDotNeighbor ()
 
const FieldVariableValueslnNeighbor ()
 
const FieldVariableValueslnOldNeighbor ()
 
const FieldVariableValueslnOlderNeighbor ()
 
const FieldVariableValueslnPreviousNLNeighbor ()
 
const FieldVariableGradientgradSlnNeighbor ()
 
const FieldVariableGradientgradSlnOldNeighbor ()
 
const FieldVariableGradientgradSlnOlderNeighbor ()
 
const FieldVariableGradientgradSlnPreviousNLNeighbor ()
 
const FieldVariableGradientgradSlnNeighborDot ()
 
const FieldVariableGradientgradSlnNeighborDotDot ()
 
const FieldVariableSecondsecondSlnNeighbor ()
 
const FieldVariableSecondsecondSlnOldNeighbor ()
 
const FieldVariableSecondsecondSlnOlderNeighbor ()
 
const FieldVariableSecondsecondSlnPreviousNLNeighbor ()
 
const FieldVariableCurlcurlSlnNeighbor ()
 
const FieldVariableCurlcurlSlnOldNeighbor ()
 
const FieldVariableCurlcurlSlnOlderNeighbor ()
 
const FieldVariableValueuDotNeighbor ()
 
const FieldVariableValueuDotDotNeighbor ()
 
const FieldVariableValueuDotOldNeighbor ()
 
const FieldVariableValueuDotDotOldNeighbor ()
 
const VariableValueduDotDuNeighbor ()
 
const VariableValueduDotDotDuNeighbor ()
 
virtual void computeValuesHelper (QBase *&qrule, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi, const FieldVariablePhiCurl *&curl_phi, const typename VariableTestGradientType< OutputType, JACOBIAN >::type &ad_grad_phi)
 Helper function for computing values. More...
 
virtual void computeNeighborValuesHelper (QBase *&qrule, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi)
 Helper function for computing values. More...
 
virtual void computeElemValues () override
 Compute values at interior quadrature points. More...
 
virtual void computeElemValuesFace () override
 Compute values at facial quadrature points. More...
 
virtual void computeNeighborValuesFace () override
 Compute values at facial quadrature points for the neighbor. More...
 
virtual void computeNeighborValues () override
 Compute values at quadrature points for the neighbor. More...
 
void setNodalValue (OutputType value, unsigned int idx=0)
 
void setDofValues (const DenseVector< Number > &value) override
 Set values for this variable to keep everything up to date. More...
 
Number getNodalValue (const Node &node) override
 Get the value of this variable at given node. More...
 
Number getNodalValueOld (const Node &node) override
 Get the old value of this variable at given node. More...
 
Number getNodalValueOlder (const Node &node) override
 Get the t-2 value of this variable at given node. More...
 
Number getElementalValue (const Elem *elem, unsigned int idx=0) const override
 Get the current value of this variable on an element. More...
 
Number getElementalValueOld (const Elem *elem, unsigned int idx=0) const override
 Get the old value of this variable on an element. More...
 
Number getElementalValueOlder (const Elem *elem, unsigned int idx=0) const override
 Get the older value of this variable on an element. More...
 
void getDofIndices (const Elem *elem, std::vector< dof_id_type > &dof_indices) override
 
std::vector< dof_id_type > & dofIndicesNeighbor () override
 Get neighbor DOF indices for currently selected element. More...
 
unsigned int numberOfDofsNeighbor () override
 
void insert (NumericVector< Number > &residual) override
 
void add (NumericVector< Number > &residual) override
 
const MooseArray< Number > & dofValue () override
 Deprecated method. More...
 
const MooseArray< Number > & dofValues () override
 Returns dof solution on element. More...
 
const MooseArray< Number > & dofValuesOld () override
 Returns old dof solution on element. More...
 
const MooseArray< Number > & dofValuesOlder () override
 Returns older dof solution on element. More...
 
const MooseArray< Number > & dofValuesPreviousNL () override
 Returns previous nl solution on element. More...
 
const MooseArray< Number > & dofValuesNeighbor () override
 Returns dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesOldNeighbor () override
 Returns old dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesOlderNeighbor () override
 Returns older dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesPreviousNLNeighbor () override
 Returns previous nl solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesDot () override
 Returns time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotNeighbor () override
 Returns time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotOld () override
 Returns old time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotOldNeighbor () override
 Returns old time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDot () override
 Returns second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotNeighbor () override
 Returns second time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotOld () override
 Returns old second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotOldNeighbor () override
 Returns old second time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDu () override
 Returns derivative of time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDuNeighbor () override
 Returns derivative of time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDotDu () override
 Returns derivative of second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDotDuNeighbor () override
 Returns derivative of second time derivative of neighboring degrees of freedom. More...
 
template<ComputeStage compute_stage>
const MooseArray< typename Moose::RealType< compute_stage >::type > & adDofValues ()
 Return the AD dof values. 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...
 
OutputType getValue (const Elem *elem, const std::vector< std::vector< OutputType >> &phi) const
 Compute the variable value at a point on an element. More...
 
OutputTools< OutputType >::OutputGradient getGradient (const Elem *elem, const std::vector< std::vector< typename OutputTools< OutputType >::OutputGradient >> &grad_phi) const
 Compute the variable gradient value at a point on an element. More...
 
virtual size_t phiSize () override
 Return phi size. More...
 
virtual size_t phiFaceSize () override
 Return phiFace size. More...
 
virtual size_t phiNeighborSize () override
 Return phiNeighbor size. More...
 
virtual size_t phiFaceNeighborSize () override
 Return phiFaceNeighbor size. More...
 
const OutputType & nodalValue ()
 Methods for retrieving values of variables at the nodes. More...
 
const OutputType & nodalValueOld ()
 
const OutputType & nodalValueOlder ()
 
const OutputType & nodalValuePreviousNL ()
 
const OutputType & nodalValueDot ()
 
const OutputType & nodalValueDotDot ()
 
const OutputType & nodalValueDotOld ()
 
const OutputType & nodalValueDotDotOld ()
 
const OutputType & nodalValueDuDotDu ()
 
const OutputType & nodalValueDuDotDotDu ()
 
const OutputType & nodalValueNeighbor ()
 
const OutputType & nodalValueOldNeighbor ()
 
const OutputType & nodalValueOlderNeighbor ()
 
const OutputType & nodalValuePreviousNLNeighbor ()
 
const OutputType & nodalValueDotNeighbor ()
 
const OutputType & nodalValueDotDotNeighbor ()
 
const OutputType & nodalValueDotOldNeighbor ()
 
const OutputType & nodalValueDotDotOldNeighbor ()
 
const OutputType & nodalValueDuDotDuNeighbor ()
 
const OutputType & nodalValueDuDotDotDuNeighbor ()
 
const MooseArray< OutputType > & nodalValueArray ()
 Methods for retrieving values of variables at the nodes in a MooseArray for AuxKernelBase. More...
 
const MooseArray< OutputType > & nodalValueOldArray ()
 
const MooseArray< OutputType > & nodalValueOlderArray ()
 
const MooseArray< Real > & nodalVectorTagValue (TagID tag)
 
const MooseArray< Real > & nodalMatrixTagValue (TagID tag)
 
template<ComputeStage compute_stage>
const Moose::ValueType< OutputType, compute_stage >::typeadNodalValue ()
 
virtual void computeNodalValues () override
 Compute nodal values of this variable. More...
 
virtual void computeNodalNeighborValues () override
 Compute nodal values of this variable in the neighbor. More...
 
void computeAD (const unsigned int num_dofs, const unsigned int nqp, const bool is_transient, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi, const typename VariableTestGradientType< OutputType, JACOBIAN >::type &ad_grad_phi)
 
void computeADNeighbor (const unsigned int num_dofs, const unsigned int nqp, const bool is_transient, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi)
 
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 assignNodalValueNeighbor ()
 
void fetchDoFValuesNeighbor ()
 
void zeroSizeDofValuesNeighbor ()
 
unsigned int number () const
 Get variable number coming from libMesh. More...
 
const FEType & feType () const
 Get the type of finite element object. More...
 
SystemBasesys ()
 Get the system this variable is part of. More...
 
const std::string & name () const
 Get the variable name. More...
 
const std::vector< dof_id_type > & allDofIndices () const
 Get all global dofindices for the variable. More...
 
unsigned int totalVarDofs ()
 
Moose::VarKindType kind () const
 Kind of the variable (Nonlinear, Auxiliary, ...) More...
 
void scalingFactor (Real factor)
 Set the scaling factor for this variable. More...
 
Real scalingFactor () const
 Get the scaling factor for this variable. More...
 
Order order () const
 Get the order of this variable Note: Order enum can be implicitly converted to unsigned int. More...
 
const DofMap & dofMap () const
 The DofMap associated with the system this variable is in. More...
 
std::vector< dof_id_type > & dofIndices ()
 Get a writable reference of local DoF indices. More...
 
const std::vector< dof_id_type > & dofIndices () const
 Get local DoF indices. More...
 
unsigned int numberOfDofs ()
 Get the number of local DoFs. More...
 

Protected Attributes

const bool _displaced
 Whether this variable is on the displaced system. More...
 
Assembly_assembly
 Our assembly. More...
 
QBase *& _qrule
 Quadrature rule for interior. More...
 
QBase *& _qrule_face
 Quadrature rule for the face. More...
 
QBase *& _qrule_neighbor
 Quadrature rule for the neighbor. More...
 
const Elem *& _elem
 current element More...
 
unsigned int & _current_side
 the side of the current element (valid when doing face assembly) More...
 
const Elem *& _neighbor
 neighboring element More...
 
std::vector< dof_id_type > _dof_indices_neighbor
 DOF indices (neighbor) More...
 
bool _need_u_old
 
bool _need_u_older
 
bool _need_u_previous_nl
 
bool _need_u_dot
 
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
 
bool _need_grad_older
 
bool _need_grad_previous_nl
 
bool _need_grad_dot
 
bool _need_grad_dotdot
 
bool _need_second
 
bool _need_second_old
 
bool _need_second_older
 
bool _need_second_previous_nl
 
bool _need_curl
 
bool _need_curl_old
 
bool _need_curl_older
 
bool _need_ad
 
bool _need_ad_u
 
bool _need_ad_grad_u
 
bool _need_ad_second_u
 
bool _need_neighbor_ad
 
bool _need_neighbor_ad_u
 
bool _need_neighbor_ad_grad_u
 
bool _need_neighbor_ad_second_u
 
bool _need_u_old_neighbor
 
bool _need_u_older_neighbor
 
bool _need_u_previous_nl_neighbor
 
bool _need_u_dot_neighbor
 
bool _need_neighbor_ad_u_dot
 
bool _need_u_dotdot_neighbor
 
bool _need_u_dot_old_neighbor
 
bool _need_u_dotdot_old_neighbor
 
bool _need_du_dot_du_neighbor
 
bool _need_du_dotdot_du_neighbor
 
bool _need_grad_old_neighbor
 
bool _need_grad_older_neighbor
 
bool _need_grad_previous_nl_neighbor
 
bool _need_grad_neighbor_dot
 
bool _need_grad_neighbor_dotdot
 
bool _need_second_neighbor
 
bool _need_second_old_neighbor
 
bool _need_second_older_neighbor
 
bool _need_second_previous_nl_neighbor
 
bool _need_curl_neighbor
 
bool _need_curl_old_neighbor
 
bool _need_curl_older_neighbor
 
bool _need_dof_values
 
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 _need_dof_values_neighbor
 
bool _need_dof_values_old_neighbor
 
bool _need_dof_values_older_neighbor
 
bool _need_dof_values_previous_nl_neighbor
 
bool _need_dof_values_dot_neighbor
 
bool _need_dof_values_dotdot_neighbor
 
bool _need_dof_values_dot_old_neighbor
 
bool _need_dof_values_dotdot_old_neighbor
 
bool _need_dof_du_dot_du_neighbor
 
bool _need_dof_du_dotdot_du_neighbor
 
std::vector< bool > _need_vector_tag_dof_u
 
std::vector< bool > _need_matrix_tag_dof_u
 
const MooseArray< Point > & _normals
 Normals at QPs on faces. More...
 
bool _is_nodal
 if variable is nodal More...
 
bool _has_dof_indices
 If we have dofs. More...
 
bool _neighbor_has_dof_indices
 If the neighor has dofs. More...
 
bool _has_dof_values
 If true, the dof values get inserted on calling insert() More...
 
bool _has_dof_values_neighbor
 
const Node *& _node
 
const Node *& _node_neighbor
 
dof_id_type _nodal_dof_index
 
dof_id_type _nodal_dof_index_neighbor
 
MooseArray< Real > _dof_values
 
MooseArray< Real > _dof_values_old
 
MooseArray< Real > _dof_values_older
 
MooseArray< Real > _dof_values_previous_nl
 
std::vector< MooseArray< Real > > _vector_tags_dof_u
 
std::vector< MooseArray< Real > > _matrix_tags_dof_u
 
MooseArray< Real > _dof_values_dot
 nodal values of u_dot More...
 
MooseArray< Real > _dof_values_dotdot
 nodal values of u_dotdot More...
 
MooseArray< Real > _dof_values_dot_old
 nodal values of u_dot_old More...
 
MooseArray< Real > _dof_values_dotdot_old
 nodal values of u_dotdot_old More...
 
MooseArray< Real > _dof_du_dot_du
 nodal values of derivative of u_dot wrt u More...
 
MooseArray< Real > _dof_du_dotdot_du
 nodal values of derivative of u_dotdot wrt u More...
 
MooseArray< Real > _dof_values_neighbor
 
MooseArray< Real > _dof_values_old_neighbor
 
MooseArray< Real > _dof_values_older_neighbor
 
MooseArray< Real > _dof_values_previous_nl_neighbor
 
MooseArray< Real > _dof_values_dot_neighbor
 
MooseArray< Real > _dof_values_dotdot_neighbor
 
MooseArray< Real > _dof_values_dot_old_neighbor
 
MooseArray< Real > _dof_values_dotdot_old_neighbor
 
MooseArray< Real > _dof_du_dot_du_neighbor
 
MooseArray< Real > _dof_du_dotdot_du_neighbor
 
const FieldVariablePhiValue_phi
 
const FieldVariablePhiGradient_grad_phi
 
const FieldVariablePhiSecond_second_phi
 
const FieldVariablePhiCurl_curl_phi
 
const FieldVariablePhiValue_phi_face
 
const FieldVariablePhiGradient_grad_phi_face
 
const FieldVariablePhiSecond_second_phi_face
 
const FieldVariablePhiCurl_curl_phi_face
 
const FieldVariablePhiValue_phi_neighbor
 
const FieldVariablePhiGradient_grad_phi_neighbor
 
const FieldVariablePhiSecond_second_phi_neighbor
 
const FieldVariablePhiCurl_curl_phi_neighbor
 
const FieldVariablePhiValue_phi_face_neighbor
 
const FieldVariablePhiGradient_grad_phi_face_neighbor
 
const FieldVariablePhiSecond_second_phi_face_neighbor
 
const FieldVariablePhiCurl_curl_phi_face_neighbor
 
const VariableTestGradientType< OutputShape, JACOBIAN >::type_ad_grad_phi
 
const VariableTestGradientType< OutputShape, JACOBIAN >::type_ad_grad_phi_face
 
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
 
FieldVariableValue _u
 
FieldVariableValue _u_old
 
FieldVariableValue _u_older
 
FieldVariableValue _u_previous_nl
 
FieldVariableGradient _grad_u
 
FieldVariableGradient _grad_u_old
 
FieldVariableGradient _grad_u_older
 
FieldVariableGradient _grad_u_previous_nl
 
FieldVariableGradient _grad_u_dot
 
FieldVariableGradient _grad_u_dotdot
 
FieldVariableSecond _second_u
 
FieldVariableSecond _second_u_old
 
FieldVariableSecond _second_u_older
 
FieldVariableSecond _second_u_previous_nl
 
FieldVariableCurl _curl_u
 
FieldVariableCurl _curl_u_old
 
FieldVariableCurl _curl_u_older
 
VariableValueType< OutputShape, JACOBIAN >::type _ad_u
 
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
 
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u
 
VariableGradientType< OutputShape, JACOBIAN >::type _neighbor_ad_grad_u
 
VariableSecondType< OutputShape, JACOBIAN >::type _neighbor_ad_second_u
 
MooseArray< DualReal_neighbor_ad_dof_values
 
MooseArray< DualReal_neighbor_ad_dofs_dot
 
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u_dot
 
FieldVariableValue _u_neighbor
 
FieldVariableValue _u_old_neighbor
 
FieldVariableValue _u_older_neighbor
 
FieldVariableValue _u_previous_nl_neighbor
 
FieldVariableGradient _grad_u_neighbor
 
FieldVariableGradient _grad_u_old_neighbor
 
FieldVariableGradient _grad_u_older_neighbor
 
FieldVariableGradient _grad_u_previous_nl_neighbor
 
FieldVariableGradient _grad_u_neighbor_dot
 
FieldVariableGradient _grad_u_neighbor_dotdot
 
FieldVariableSecond _second_u_neighbor
 
FieldVariableSecond _second_u_old_neighbor
 
FieldVariableSecond _second_u_older_neighbor
 
FieldVariableSecond _second_u_previous_nl_neighbor
 
FieldVariableCurl _curl_u_neighbor
 
FieldVariableCurl _curl_u_old_neighbor
 
FieldVariableCurl _curl_u_older_neighbor
 
FieldVariableValue _u_dot
 u_dot (time derivative) More...
 
FieldVariableValue _u_dot_neighbor
 
FieldVariableValue _u_dotdot
 u_dotdot (second time derivative) More...
 
FieldVariableValue _u_dotdot_bak
 
FieldVariableValue _u_dotdot_neighbor
 
FieldVariableValue _u_dotdot_bak_neighbor
 
FieldVariableValue _u_dot_old
 u_dot_old (time derivative) More...
 
FieldVariableValue _u_dot_old_bak
 
FieldVariableValue _u_dot_old_neighbor
 
FieldVariableValue _u_dot_old_bak_neighbor
 
FieldVariableValue _u_dotdot_old
 u_dotdot_old (second time derivative) More...
 
FieldVariableValue _u_dotdot_old_bak
 
FieldVariableValue _u_dotdot_old_neighbor
 
FieldVariableValue _u_dotdot_old_bak_neighbor
 
VariableValue _du_dot_du
 derivative of u_dot wrt u More...
 
VariableValue _du_dot_du_neighbor
 
VariableValue _du_dotdot_du
 derivative of u_dotdot wrt u More...
 
VariableValue _du_dotdot_du_bak
 
VariableValue _du_dotdot_du_neighbor
 
VariableValue _du_dotdot_du_bak_neighbor
 
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 _neighbor_nodal_value
 
OutputType _neighbor_nodal_value_old
 
OutputType _neighbor_nodal_value_older
 
OutputType _neighbor_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...
 
TimeIntegrator_time_integrator
 A pointer to TimeIntegrator. nullptr if _sys is not a NonlinearSystemBase. More...
 
unsigned int _var_num
 variable number (from libMesh) More...
 
FEType _fe_type
 The FEType associated with this variable. More...
 
unsigned int _index
 variable number within MOOSE More...
 
Moose::VarKindType _var_kind
 
SubProblem_subproblem
 Problem this variable is part of. More...
 
SystemBase_sys
 System this variable is part of. More...
 
const Variable & _variable
 libMesh variable object for this variable More...
 
const DofMap & _dof_map
 DOF map. More...
 
std::vector< dof_id_type > _dof_indices
 DOF indices. More...
 
MooseMesh_mesh
 mesh the variable is active in More...
 
Real _scaling_factor
 scaling factor for this variable More...
 
THREAD_ID _tid
 Thread ID. More...
 

Private Types

typedef OutputType OutputShape
 
typedef OutputType OutputValue
 
typedef TensorTools::IncrementRank< OutputShape >::type OutputGradient
 
typedef TensorTools::IncrementRank< OutputGradient >::type OutputSecond
 
typedef TensorTools::DecrementRank< OutputShape >::type OutputDivergence
 
typedef MooseArray< OutputShapeFieldVariableValue
 
typedef MooseArray< OutputGradientFieldVariableGradient
 
typedef MooseArray< OutputSecondFieldVariableSecond
 
typedef MooseArray< OutputShapeFieldVariableCurl
 
typedef MooseArray< OutputDivergenceFieldVariableDivergence
 
typedef MooseArray< std::vector< OutputShape > > FieldVariablePhiValue
 
typedef MooseArray< std::vector< OutputGradient > > FieldVariablePhiGradient
 
typedef MooseArray< std::vector< OutputSecond > > FieldVariablePhiSecond
 
typedef MooseArray< std::vector< OutputShape > > FieldVariablePhiCurl
 
typedef MooseArray< std::vector< OutputDivergence > > FieldVariablePhiDivergence
 
typedef MooseArray< std::vector< OutputShape > > FieldVariableTestValue
 
typedef MooseArray< std::vector< OutputGradient > > FieldVariableTestGradient
 
typedef MooseArray< std::vector< OutputSecond > > FieldVariableTestSecond
 
typedef MooseArray< std::vector< OutputShape > > FieldVariableTestCurl
 
typedef MooseArray< std::vector< OutputDivergence > > FieldVariableTestDivergence
 

Friends

class NodeFaceConstraint
 
class NodeElemConstraint
 
class ValueThresholdMarker
 
class ValueRangeMarker
 

Detailed Description

template<typename OutputType>
class MooseVariableFE< OutputType >

Class for stuff related to variables.

Each variable can compute nodal or elemental (at QPs) values.

Definition at line 30 of file Adaptivity.h.

Member Typedef Documentation

◆ FieldVariableCurl

template<typename OutputType>
typedef MooseArray<OutputShape> MooseVariableFE< OutputType >::FieldVariableCurl
private

Definition at line 49 of file MooseVariableFE.h.

◆ FieldVariableDivergence

template<typename OutputType>
typedef MooseArray<OutputDivergence> MooseVariableFE< OutputType >::FieldVariableDivergence
private

Definition at line 50 of file MooseVariableFE.h.

◆ FieldVariableGradient

template<typename OutputType>
typedef MooseArray<OutputGradient> MooseVariableFE< OutputType >::FieldVariableGradient
private

Definition at line 47 of file MooseVariableFE.h.

◆ FieldVariablePhiCurl

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

Definition at line 55 of file MooseVariableFE.h.

◆ FieldVariablePhiDivergence

template<typename OutputType>
typedef MooseArray<std::vector<OutputDivergence> > MooseVariableFE< OutputType >::FieldVariablePhiDivergence
private

Definition at line 56 of file MooseVariableFE.h.

◆ FieldVariablePhiGradient

template<typename OutputType>
typedef MooseArray<std::vector<OutputGradient> > MooseVariableFE< OutputType >::FieldVariablePhiGradient
private

Definition at line 53 of file MooseVariableFE.h.

◆ FieldVariablePhiSecond

template<typename OutputType>
typedef MooseArray<std::vector<OutputSecond> > MooseVariableFE< OutputType >::FieldVariablePhiSecond
private

Definition at line 54 of file MooseVariableFE.h.

◆ FieldVariablePhiValue

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

Definition at line 52 of file MooseVariableFE.h.

◆ FieldVariableSecond

template<typename OutputType>
typedef MooseArray<OutputSecond> MooseVariableFE< OutputType >::FieldVariableSecond
private

Definition at line 48 of file MooseVariableFE.h.

◆ FieldVariableTestCurl

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

Definition at line 61 of file MooseVariableFE.h.

◆ FieldVariableTestDivergence

template<typename OutputType>
typedef MooseArray<std::vector<OutputDivergence> > MooseVariableFE< OutputType >::FieldVariableTestDivergence
private

Definition at line 62 of file MooseVariableFE.h.

◆ FieldVariableTestGradient

template<typename OutputType>
typedef MooseArray<std::vector<OutputGradient> > MooseVariableFE< OutputType >::FieldVariableTestGradient
private

Definition at line 59 of file MooseVariableFE.h.

◆ FieldVariableTestSecond

template<typename OutputType>
typedef MooseArray<std::vector<OutputSecond> > MooseVariableFE< OutputType >::FieldVariableTestSecond
private

Definition at line 60 of file MooseVariableFE.h.

◆ FieldVariableTestValue

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

Definition at line 58 of file MooseVariableFE.h.

◆ FieldVariableValue

template<typename OutputType>
typedef MooseArray<OutputShape> MooseVariableFE< OutputType >::FieldVariableValue
private

Definition at line 46 of file MooseVariableFE.h.

◆ OutputDivergence

template<typename OutputType>
typedef TensorTools::DecrementRank<OutputShape>::type MooseVariableFE< OutputType >::OutputDivergence
private

Definition at line 44 of file MooseVariableFE.h.

◆ OutputGradient

template<typename OutputType>
typedef TensorTools::IncrementRank<OutputShape>::type MooseVariableFE< OutputType >::OutputGradient
private

Definition at line 42 of file MooseVariableFE.h.

◆ OutputSecond

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

Definition at line 43 of file MooseVariableFE.h.

◆ OutputShape

template<typename OutputType>
typedef OutputType MooseVariableFE< OutputType >::OutputShape
private

Definition at line 40 of file MooseVariableFE.h.

◆ OutputValue

template<typename OutputType>
typedef OutputType MooseVariableFE< OutputType >::OutputValue
private

Definition at line 41 of file MooseVariableFE.h.

Constructor & Destructor Documentation

◆ MooseVariableFE()

template<typename OutputType >
MooseVariableFE< OutputType >::MooseVariableFE ( unsigned int  var_num,
const FEType &  fe_type,
SystemBase sys,
Assembly assembly,
Moose::VarKindType  var_kind,
THREAD_ID  tid 
)

Definition at line 18 of file MooseVariableFE.C.

24  : MooseVariableFEBase(var_num, fe_type, sys, var_kind, tid),
25  _displaced(dynamic_cast<DisplacedSystem *>(&sys) ? true : false),
26  _assembly(assembly),
30  _elem(_assembly.elem()),
33  _need_u_old(false),
34  _need_u_older(false),
35  _need_u_previous_nl(false),
36  _need_u_dot(false),
37  _need_ad_u_dot(false),
38  _need_u_dotdot(false),
39  _need_u_dot_old(false),
40  _need_u_dotdot_old(false),
41  _need_du_dot_du(false),
42  _need_du_dotdot_du(false),
43  _need_grad_old(false),
44  _need_grad_older(false),
46  _need_grad_dot(false),
47  _need_grad_dotdot(false),
48  _need_second(false),
49  _need_second_old(false),
50  _need_second_older(false),
52  _need_curl(false),
53  _need_curl_old(false),
54  _need_curl_older(false),
55  _need_ad(false),
56  _need_ad_u(false),
57  _need_ad_grad_u(false),
58  _need_ad_second_u(false),
59  _need_neighbor_ad(false),
60  _need_neighbor_ad_u(false),
63  _need_u_old_neighbor(false),
66  _need_u_dot_neighbor(false),
78  _need_second_neighbor(false),
82  _need_curl_neighbor(false),
85  _need_dof_values(false),
86  _need_dof_values_old(false),
89  _need_dof_values_dot(false),
93  _need_dof_du_dot_du(false),
106  _is_nodal(true),
107  _has_dof_indices(false),
109  _has_dof_values(false),
111  _node(_assembly.node()),
113  _phi(_assembly.fePhi<OutputType>(_fe_type)),
114  _grad_phi(_assembly.feGradPhi<OutputType>(_fe_type)),
115  _phi_face(_assembly.fePhiFace<OutputType>(_fe_type)),
123  _ad_u(),
124  _ad_grad_u(),
125  _ad_second_u(),
126  _ad_dof_values(),
127  _neighbor_ad_u(),
131  _ad_zero(0),
132  _time_integrator(nullptr)
133 {
134  // FIXME: continuity of FE type seems equivalent with the definition of nodal variables.
135  // Continuity does not depend on the FE dimension, so we just pass in a valid dimension.
136  if (_fe_type.family == NEDELEC_ONE || _fe_type.family == LAGRANGE_VEC)
137  _continuity = _assembly.getVectorFE(_fe_type, _sys.mesh().dimension())->get_continuity();
138  else
139  _continuity = _assembly.getFE(_fe_type, _sys.mesh().dimension())->get_continuity();
140 
141  _is_nodal = (_continuity == C_ZERO || _continuity == C_ONE);
142 
143  auto num_vector_tags = _sys.subproblem().numVectorTags();
144 
145  _vector_tags_dof_u.resize(num_vector_tags);
146  _need_vector_tag_dof_u.resize(num_vector_tags);
147 
148  _need_vector_tag_u.resize(num_vector_tags);
149  _vector_tag_u.resize(num_vector_tags);
150 
151  auto num_matrix_tags = _sys.subproblem().numMatrixTags();
152 
153  _matrix_tags_dof_u.resize(num_matrix_tags);
154  _need_matrix_tag_dof_u.resize(num_matrix_tags);
155 
156  _need_matrix_tag_u.resize(num_matrix_tags);
157  _matrix_tag_u.resize(num_matrix_tags);
158 
160 
161  // These MooseArray objects are used by AuxKernelBase for nodal AuxKernel objects, hence the size
162  // size is always 1 (i.e, nodal kernels work with _qp=0 only).
166 }
const FieldVariablePhiValue & _phi
std::vector< bool > _need_vector_tag_dof_u
QBase *& qRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:278
bool _has_dof_indices
If we have dofs.
QBase *& _qrule_neighbor
Quadrature rule for the neighbor.
bool _need_second_old_neighbor
FEType _fe_type
The FEType associated with this variable.
std::vector< bool > _need_matrix_tag_dof_u
std::vector< FieldVariableValue > _vector_tag_u
const MooseArray< Point > & _normals
Normals at QPs on faces.
bool _need_dof_values_dotdot_neighbor
VariableSecondType< OutputShape, JACOBIAN >::type _neighbor_ad_second_u
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
const VariableTestGradientType< OutputShape, JACOBIAN >::type & _ad_grad_phi
bool _need_dof_values_previous_nl_neighbor
VariableSecondType< OutputShape, JACOBIAN >::type _ad_second_u
const Node *& _node
bool _need_dof_values_dot_neighbor
bool _need_second_previous_nl_neighbor
bool _need_u_previous_nl_neighbor
Assembly & _assembly
Our assembly.
TimeIntegrator * getTimeIntegrator()
Definition: SystemBase.h:689
bool _is_nodal
if variable is nodal
VariableGradientType< OutputShape, JACOBIAN >::type _ad_grad_u
const Elem *& neighbor()
Return the neighbor element.
Definition: Assembly.h:366
const MooseArray< Point > & normals()
Returns the array of normals for quadrature points on a current side.
Definition: Assembly.h:296
const FieldVariablePhiGradient & _grad_phi_face
virtual unsigned int numVectorTags()
The total number of tags.
Definition: SubProblem.h:122
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiFaceNeighbor(FEType type)
Definition: Assembly.h:963
MooseArray< OutputType > _nodal_value_old_array
MooseArray< DualReal > _neighbor_ad_dof_values
const OutputTools< OutputType >::VariablePhiValue & fePhiNeighbor(FEType type)
Definition: Assembly.h:934
QBase *& qRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:217
const VariableTestGradientType< OutputType, ComputeStage::JACOBIAN >::type & feADGradPhi(FEType type)
Definition: Assembly.h:891
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiFace(FEType type)
Definition: Assembly.h:912
bool _need_grad_older_neighbor
bool _need_dof_values_neighbor
QBase *& _qrule
Quadrature rule for interior.
std::vector< bool > _need_vector_tag_u
bool _need_dof_du_dot_du_neighbor
unsigned int & side()
Returns the current side.
Definition: Assembly.h:342
const OutputTools< OutputType >::VariablePhiValue & fePhiFace(FEType type)
Definition: Assembly.h:905
const Node *& node()
Returns the reference to the node.
Definition: Assembly.h:400
bool _need_grad_neighbor_dotdot
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2135
SystemBase & _sys
System this variable is part of.
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
bool _need_du_dotdot_du_neighbor
MooseVariableFEBase(unsigned int var_num, const FEType &fe_type, SystemBase &sys, Moose::VarKindType var_kind, THREAD_ID tid)
TimeIntegrator * _time_integrator
A pointer to TimeIntegrator. nullptr if _sys is not a NonlinearSystemBase.
const DualReal _ad_zero
A zero AD variable.
VariableGradientType< OutputShape, JACOBIAN >::type _neighbor_ad_grad_u
const VariableTestGradientType< OutputShape, JACOBIAN >::type & _ad_grad_phi_face
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u
virtual SubProblem & subproblem()
Definition: SystemBase.h:105
bool _need_grad_previous_nl_neighbor
FEContinuity _continuity
Continuity type of the variable.
const Elem *& _neighbor
neighboring element
const FieldVariablePhiValue & _phi_face
const FieldVariablePhiValue & _phi_neighbor
const OutputTools< OutputType >::VariablePhiGradient & feGradPhi(FEType type)
Definition: Assembly.h:883
std::vector< MooseArray< Real > > _vector_tags_dof_u
bool _need_dof_values_dotdot_old_neighbor
const Node *& nodeNeighbor()
Returns the reference to the neighboring node.
Definition: Assembly.h:406
VariableValueType< OutputShape, JACOBIAN >::type _ad_u
bool _need_u_dotdot_old_neighbor
std::vector< FieldVariableValue > _matrix_tag_u
bool _need_dof_values_older_neighbor
MooseArray< OutputType > _nodal_value_older_array
const Elem *& elem()
Return the current element.
Definition: Assembly.h:320
unsigned int & _current_side
the side of the current element (valid when doing face assembly)
bool _has_dof_values
If true, the dof values get inserted on calling insert()
std::vector< bool > _need_matrix_tag_u
const FieldVariablePhiValue & _phi_face_neighbor
FEBase *& getFE(FEType type, unsigned int dim)
Get a reference to a pointer that will contain the current volume FE.
Definition: Assembly.h:123
QBase *& qRuleNeighbor()
Returns the reference to the current quadrature being used on a current neighbor. ...
Definition: Assembly.h:388
const bool _displaced
Whether this variable is on the displaced system.
virtual MooseMesh & mesh()
Definition: SystemBase.h:104
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiNeighbor(FEType type)
Definition: Assembly.h:941
const Elem *& _elem
current element
const FieldVariablePhiGradient & _grad_phi_neighbor
std::vector< MooseArray< Real > > _matrix_tags_dof_u
bool _need_dof_du_dotdot_du_neighbor
QBase *& _qrule_face
Quadrature rule for the face.
MooseArray< DualReal > _ad_dof_values
const VariableTestGradientType< OutputType, ComputeStage::JACOBIAN >::type & feADGradPhiFace(FEType type)
Definition: Assembly.h:920
const Node *& _node_neighbor
bool _neighbor_has_dof_indices
If the neighor has dofs.
bool _need_dof_values_dot_old_neighbor
const FieldVariablePhiGradient & _grad_phi_face_neighbor
bool _need_neighbor_ad_second_u
bool _need_second_older_neighbor
const FieldVariablePhiGradient & _grad_phi
const OutputTools< OutputType >::VariablePhiValue & fePhiFaceNeighbor(FEType type)
Definition: Assembly.h:956
bool _need_dof_values_previous_nl
SystemBase & sys()
Get the system this variable is part of.
virtual unsigned int numMatrixTags()
The total number of tags.
Definition: SubProblem.h:157
bool _need_dof_values_dotdot_old
const OutputTools< OutputType >::VariablePhiValue & fePhi(FEType type)
Definition: Assembly.h:876
bool _need_curl_older_neighbor
bool _need_dof_values_old_neighbor
FEVectorBase *& getVectorFE(FEType type, unsigned int dim)
Get a reference to a pointer that will contain the current volume FEVector.
Definition: Assembly.h:171

◆ ~MooseVariableFE()

template<typename OutputType >
MooseVariableFE< OutputType >::~MooseVariableFE ( )
virtual

Definition at line 169 of file MooseVariableFE.C.

170 {
181 
192 
193  for (auto & dof_u : _vector_tags_dof_u)
194  dof_u.release();
195 
196  _vector_tags_dof_u.clear();
197 
198  for (auto & dof_u : _matrix_tags_dof_u)
199  dof_u.release();
200 
201  _matrix_tags_dof_u.clear();
202 
203  for (auto & tag_u : _vector_tag_u)
204  tag_u.release();
205 
206  _vector_tag_u.clear();
207 
208  for (auto & tag_u : _matrix_tag_u)
209  tag_u.release();
210 
211  _matrix_tag_u.clear();
212 
213  _u.release();
214  _u_old.release();
215  _u_older.release();
217 
218  _grad_u.release();
225 
226  _second_u.release();
230 
231  _curl_u.release();
234 
235  _ad_u.release();
236  _ad_grad_u.release();
237  _ad_second_u.release();
238 
239  _u_dot.release();
241 
242  _u_dotdot.release();
246 
251 
256 
257  _du_dot_du.release();
258  _du_dot_du_neighbor.release();
259 
260  _du_dotdot_du.release();
261  _du_dotdot_du_bak.release();
262  _du_dotdot_du_neighbor.release();
263  _du_dotdot_du_bak_neighbor.release();
264 
266 
271 
278 
283 
287 
288  _ad_u.release();
289  _ad_grad_u.release();
290  _ad_second_u.release();
293  _ad_u_dot.release();
294 
295  _neighbor_ad_u.release();
296  _neighbor_ad_grad_u.release();
297  _neighbor_ad_second_u.release();
300  _neighbor_ad_u_dot.release();
301 }
FieldVariableGradient _grad_u_old
MooseArray< Real > _dof_values_old
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
FieldVariableValue _u_old_neighbor
FieldVariableSecond _second_u_previous_nl_neighbor
FieldVariableGradient _grad_u_older_neighbor
MooseArray< Real > _dof_du_dot_du_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< FieldVariableValue > _vector_tag_u
FieldVariableValue _u_dot_neighbor
VariableValueType< OutputShape, JACOBIAN >::type _ad_u_dot
VariableSecondType< OutputShape, JACOBIAN >::type _neighbor_ad_second_u
FieldVariableGradient _grad_u_dot
MooseArray< Real > _dof_values_older_neighbor
FieldVariableValue _u
MooseArray< Real > _dof_values_older
FieldVariableValue _u_old
FieldVariableCurl _curl_u_neighbor
MooseArray< Real > _dof_du_dotdot_du_neighbor
FieldVariableValue _u_dotdot_old
u_dotdot_old (second time derivative)
VariableSecondType< OutputShape, JACOBIAN >::type _ad_second_u
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u
VariableGradientType< OutputShape, JACOBIAN >::type _ad_grad_u
FieldVariableGradient _grad_u_neighbor_dot
MooseArray< Real > _dof_du_dotdot_du
nodal values of derivative of u_dotdot wrt u
FieldVariableValue _u_dot
u_dot (time derivative)
MooseArray< Real > _dof_values_previous_nl
FieldVariableSecond _second_u
MooseArray< Real > _dof_values_dotdot_old
nodal values of u_dotdot_old
FieldVariableValue _u_dotdot_old_bak
FieldVariableSecond _second_u_old
FieldVariableCurl _curl_u_old
FieldVariableValue _u_neighbor
VariableValue _du_dotdot_du_bak_neighbor
VariableValue _du_dot_du_neighbor
MooseArray< DualReal > _neighbor_ad_dof_values
FieldVariableValue _u_dot_old_bak_neighbor
MooseArray< Real > _dof_values_previous_nl_neighbor
MooseArray< Real > _dof_values_dotdot_old_neighbor
MooseArray< Real > _dof_values_dot
nodal values of u_dot
MooseArray< DualReal > _ad_dofs_dot
FieldVariableGradient _grad_u_neighbor
FieldVariableValue _increment
Increment in the variable used in dampers.
FieldVariableGradient _grad_u_neighbor_dotdot
FieldVariableCurl _curl_u
FieldVariableValue _u_dot_old_neighbor
VariableGradientType< OutputShape, JACOBIAN >::type _neighbor_ad_grad_u
FieldVariableGradient _grad_u
FieldVariableValue _u_dotdot_bak_neighbor
FieldVariableSecond _second_u_neighbor
FieldVariableValue _u_dotdot_bak
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u
FieldVariableValue _u_previous_nl_neighbor
FieldVariableGradient _grad_u_dotdot
FieldVariableGradient _grad_u_previous_nl_neighbor
FieldVariableSecond _second_u_older
std::vector< MooseArray< Real > > _vector_tags_dof_u
VariableValue _du_dot_du
derivative of u_dot wrt u
MooseArray< Real > _dof_values_dot_old
nodal values of u_dot_old
MooseArray< Real > _dof_values_old_neighbor
MooseArray< Real > _dof_values_dot_old_neighbor
FieldVariableValue _u_dotdot_old_bak_neighbor
MooseArray< Real > _dof_values_dot_neighbor
FieldVariableValue _u_dotdot_old_neighbor
MooseArray< Real > _dof_values_dotdot_neighbor
VariableValueType< OutputShape, JACOBIAN >::type _ad_u
FieldVariableGradient _grad_u_older
std::vector< FieldVariableValue > _matrix_tag_u
FieldVariableCurl _curl_u_older
FieldVariableCurl _curl_u_older_neighbor
FieldVariableSecond _second_u_old_neighbor
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:62
MooseArray< Real > _dof_values
MooseArray< Real > _dof_du_dot_du
nodal values of derivative of u_dot wrt u
VariableValue _du_dotdot_du_neighbor
MooseArray< DualReal > _neighbor_ad_dofs_dot
FieldVariableValue _u_dotdot_neighbor
std::vector< MooseArray< Real > > _matrix_tags_dof_u
FieldVariableValue _u_older
VariableValue _du_dotdot_du_bak
MooseArray< DualReal > _ad_dof_values
FieldVariableGradient _grad_u_previous_nl
FieldVariableValue _u_older_neighbor
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u_dot
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
FieldVariableSecond _second_u_previous_nl
MooseArray< Real > _dof_values_dotdot
nodal values of u_dotdot
FieldVariableValue _u_previous_nl
FieldVariableGradient _grad_u_old_neighbor
FieldVariableValue _u_dot_old_bak
FieldVariableSecond _second_u_older_neighbor
FieldVariableCurl _curl_u_old_neighbor

Member Function Documentation

◆ activeOnSubdomain()

template<typename OutputType >
bool MooseVariableFE< OutputType >::activeOnSubdomain ( SubdomainID  subdomain) const
overridevirtual

Is the variable active on the subdomain?

Parameters
subdomainThe subdomain id in question
Returns
true if active on subdomain, false otherwise

Implements MooseVariableFEBase.

Definition at line 312 of file MooseVariableFE.C.

313 {
314  return _sys.system().variable(_var_num).active_on_subdomain(subdomain);
315 }
SystemBase & _sys
System this variable is part of.
virtual System & system()=0
Get the reference to the libMesh system.
unsigned int _var_num
variable number (from libMesh)

◆ activeSubdomains()

template<typename OutputType >
const std::set< SubdomainID > & MooseVariableFE< OutputType >::activeSubdomains ( ) const
overridevirtual

The subdomains the variable is active on.

Implements MooseVariableFEBase.

Definition at line 305 of file MooseVariableFE.C.

306 {
307  return _sys.system().variable(_var_num).active_subdomains();
308 }
SystemBase & _sys
System this variable is part of.
virtual System & system()=0
Get the reference to the libMesh system.
unsigned int _var_num
variable number (from libMesh)

◆ add()

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

Implements MooseVariableFEBase.

Definition at line 574 of file MooseVariableFE.C.

575 {
576  if (_has_dof_values)
577  residual.add_vector(&_dof_values[0], _dof_indices);
578 }
std::vector< dof_id_type > _dof_indices
DOF indices.
bool _has_dof_values
If true, the dof values get inserted on calling insert()
MooseArray< Real > _dof_values

◆ adDofValues()

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

Return the AD dof values.

Definition at line 2490 of file MooseVariableFE.C.

2491 {
2492  _need_ad = true;
2493  return _ad_dof_values;
2494 }
MooseArray< DualReal > _ad_dof_values

◆ adGradPhi()

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

Definition at line 185 of file MooseVariableFE.h.

186  {
187  return _ad_grad_phi;
188  }
const VariableTestGradientType< OutputShape, JACOBIAN >::type & _ad_grad_phi

◆ adGradPhiFace()

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

Definition at line 191 of file MooseVariableFE.h.

192  {
193  return _ad_grad_phi_face;
194  }
const VariableTestGradientType< OutputShape, JACOBIAN >::type & _ad_grad_phi_face

◆ adGradSln()

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

Definition at line 322 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledGradientTemplate(), and Coupleable::adCoupledVectorGradientTemplate().

323  {
324  _need_ad = _need_ad_grad_u = true;
325  return _ad_grad_u;
326  }
VariableGradientType< OutputShape, JACOBIAN >::type _ad_grad_u

◆ adGradSlnNeighbor()

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

Definition at line 352 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledGradientTemplate(), and Coupleable::adCoupledVectorGradientTemplate().

353  {
355  return _neighbor_ad_grad_u;
356  }
VariableGradientType< OutputShape, JACOBIAN >::type _neighbor_ad_grad_u

◆ adNodalValue()

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

Definition at line 2515 of file MooseVariableFE.C.

2516 {
2517  _need_ad = true;
2518  return _ad_nodal_value;
2519 }
Moose::ValueType< OutputType, JACOBIAN >::type _ad_nodal_value
AD nodal value.

◆ adSecondSln()

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

Definition at line 329 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledSecondTemplate().

330  {
331  _need_ad = _need_ad_second_u = true;
332  secondPhi();
333  secondPhiFace();
334  return _ad_second_u;
335  }
VariableSecondType< OutputShape, JACOBIAN >::type _ad_second_u
const FieldVariablePhiSecond & secondPhi()
const FieldVariablePhiSecond & secondPhiFace()

◆ adSecondSlnNeighbor()

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

Definition at line 359 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledSecondTemplate().

360  {
363  return _neighbor_ad_second_u;
364  }
VariableSecondType< OutputShape, JACOBIAN >::type _neighbor_ad_second_u
const FieldVariablePhiSecond & secondPhiFaceNeighbor()
bool _need_neighbor_ad_second_u

◆ adSln()

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

Definition at line 315 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledValueTemplate(), and Coupleable::adCoupledVectorValueTemplate().

316  {
317  _need_ad = _need_ad_u = true;
318  return _ad_u;
319  }
VariableValueType< OutputShape, JACOBIAN >::type _ad_u

◆ adSlnNeighbor()

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

Definition at line 345 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledValueTemplate(), and Coupleable::adCoupledVectorValueTemplate().

346  {
348  return _neighbor_ad_u;
349  }
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u

◆ adUDot()

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

Definition at line 338 of file MooseVariableFE.h.

339  {
340  _need_ad = _need_ad_u_dot = true;
341  return _ad_u_dot;
342  }
VariableValueType< OutputShape, JACOBIAN >::type _ad_u_dot

◆ adUDotNeighbor()

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

Definition at line 430 of file MooseVariableFE.h.

431  {
433  return _neighbor_ad_u_dot;
434  }
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u_dot

◆ allDofIndices()

const std::vector< dof_id_type > & MooseVariableBase::allDofIndices ( ) const
inherited

Get all global dofindices for the variable.

Definition at line 46 of file MooseVariableBase.C.

Referenced by FEProblemBase::addJacobianBlock(), NonlocalIntegratedBC::computeNonlocalJacobian(), NonlocalKernel::computeNonlocalJacobian(), NonlocalIntegratedBC::computeNonlocalOffDiagJacobian(), NonlocalKernel::computeNonlocalOffDiagJacobian(), FEProblemBase::prepare(), Assembly::prepareNonlocal(), Assembly::prepareVariableNonlocal(), and MooseVariableBase::totalVarDofs().

47 {
48  const auto it = _sys.subproblem()._var_dof_map.find(name());
49  if (it != _sys.subproblem()._var_dof_map.end())
50  return it->second;
51  else
52  mooseError("VariableAllDoFMap not prepared for ",
53  name(),
54  " . Check nonlocal coupling requirement for the variable.");
55 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition: SubProblem.h:507
SystemBase & _sys
System this variable is part of.
virtual SubProblem & subproblem()
Definition: SystemBase.h:105
const std::string & name() const
Get the variable name.

◆ assignADNodalValue()

template<typename OutputType>
void MooseVariableFE< OutputType >::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).

These methods are only truly meaningful for nodal basis families

◆ assignNodalValue()

template<typename OutputType >
void MooseVariableFE< OutputType >::assignNodalValue ( )

Definition at line 2064 of file MooseVariableFE.C.

2065 {
2066  bool is_transient = _subproblem.isTransient();
2067 
2068  libmesh_assert(_dof_indices.size());
2069 
2072 
2073  if (is_transient)
2074  {
2076  {
2079  }
2081  {
2084  }
2093  }
2096 }
MooseArray< Real > _dof_values_old
OutputType _nodal_value_dotdot_old
nodal values of u_dotdot_old
MooseArray< Real > _dof_values_older
OutputType _nodal_value_dot_old
nodal values of u_dot_old
OutputType _nodal_value_old
MooseArray< Real > _dof_values_previous_nl
MooseArray< Real > _dof_values_dotdot_old
nodal values of u_dotdot_old
MooseArray< OutputType > _nodal_value_old_array
MooseArray< Real > _dof_values_dot
nodal values of u_dot
std::vector< dof_id_type > _dof_indices
DOF indices.
OutputType _nodal_value_dot
nodal values of u_dot
SubProblem & _subproblem
Problem this variable is part of.
OutputType _nodal_value_previous_nl
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
virtual bool isTransient() const =0
MooseArray< Real > _dof_values_dot_old
nodal values of u_dot_old
MooseArray< OutputType > _nodal_value_older_array
OutputType _nodal_value
Nodal values.
MooseArray< Real > _dof_values
OutputType _nodal_value_older
bool _need_dof_values_previous_nl
OutputType _nodal_value_dotdot
nodal values of u_dotdot
MooseArray< Real > _dof_values_dotdot
nodal values of u_dotdot
bool _need_dof_values_dotdot_old

◆ assignNodalValueNeighbor()

template<typename OutputType >
void MooseVariableFE< OutputType >::assignNodalValueNeighbor ( )

Definition at line 2229 of file MooseVariableFE.C.

2230 {
2231  bool is_transient = _subproblem.isTransient();
2232 
2233  libmesh_assert(_dof_indices_neighbor.size());
2234 
2236 
2239 
2240  if (is_transient)
2241  {
2246  }
2247 }
MooseArray< Real > _dof_values_neighbor
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
OutputType _neighbor_nodal_value
MooseArray< Real > _dof_values_older_neighbor
bool _need_dof_values_previous_nl_neighbor
OutputType _neighbor_nodal_value_old
OutputType _neighbor_nodal_value_previous_nl
MooseArray< Real > _dof_values_previous_nl_neighbor
SubProblem & _subproblem
Problem this variable is part of.
virtual bool isTransient() const =0
OutputType _neighbor_nodal_value_older
MooseArray< Real > _dof_values_old_neighbor
bool _need_dof_values_older_neighbor
bool _need_dof_values_old_neighbor

◆ clearDofIndices()

template<typename OutputType >
void MooseVariableFE< OutputType >::clearDofIndices ( )
overridevirtual

Clear out the dof indices.

We do this in case this variable is not going to be prepared at all...

Implements MooseVariableFEBase.

Definition at line 319 of file MooseVariableFE.C.

320 {
321  _dof_indices.clear();
322 }
std::vector< dof_id_type > _dof_indices
DOF indices.

◆ computeAD()

template<typename OutputType>
void MooseVariableFE< OutputType >::computeAD ( const unsigned int  num_dofs,
const unsigned int  nqp,
const bool  is_transient,
const FieldVariablePhiValue phi,
const FieldVariablePhiGradient grad_phi,
const FieldVariablePhiSecond *&  second_phi,
const typename VariableTestGradientType< OutputType, JACOBIAN >::type ad_grad_phi 
)

Definition at line 1184 of file MooseVariableFE.C.

1192 {
1193  _ad_dof_values.resize(num_dofs);
1194  if (_need_ad_u)
1195  _ad_u.resize(nqp);
1196 
1197  if (_need_ad_grad_u)
1198  _ad_grad_u.resize(nqp);
1199 
1200  if (_need_ad_second_u)
1201  _ad_second_u.resize(nqp);
1202 
1203  if (_need_ad_u_dot)
1204  {
1205  _ad_dofs_dot.resize(num_dofs);
1206  _ad_u_dot.resize(nqp);
1207  }
1208 
1209  // Derivatives are offset by the variable number
1210  size_t ad_offset = _var_num * _sys.getMaxVarNDofsPerElem();
1211 
1212  // Hopefully this problem can go away at some point
1213  if (ad_offset + num_dofs > AD_MAX_DOFS_PER_ELEM)
1214  mooseError("Current number of dofs per element is greater than AD_MAX_DOFS_PER_ELEM of ",
1215  AD_MAX_DOFS_PER_ELEM);
1216 
1217  for (unsigned int qp = 0; qp < nqp; qp++)
1218  {
1219  if (_need_ad_u)
1220  _ad_u[qp] = _ad_zero;
1221 
1222  if (_need_ad_grad_u)
1223  _ad_grad_u[qp] = _ad_zero;
1224 
1225  if (_need_ad_second_u)
1226  _ad_second_u[qp] = _ad_zero;
1227 
1228  if (_need_ad_u_dot)
1229  _ad_u_dot[qp] = _ad_zero;
1230  }
1231 
1232  for (unsigned int i = 0; i < num_dofs; i++)
1233  {
1235 
1236  // NOTE! You have to do this AFTER setting the value!
1238  _ad_dof_values[i].derivatives()[ad_offset + i] = 1.0;
1239 
1241  {
1242  _ad_dofs_dot[i] = _ad_dof_values[i];
1244  }
1245  }
1246 
1247  // Now build up the solution at each quadrature point:
1248  for (unsigned int i = 0; i < num_dofs; i++)
1249  {
1250  for (unsigned int qp = 0; qp < nqp; qp++)
1251  {
1252  if (_need_ad_u)
1253  _ad_u[qp] += _ad_dof_values[i] * phi[i][qp];
1254 
1255  if (_need_ad_grad_u)
1256  {
1257  if (_displaced)
1258  _ad_grad_u[qp] += _ad_dof_values[i] * ad_grad_phi[i][qp];
1259  else
1260  _ad_grad_u[qp] += _ad_dof_values[i] * grad_phi[i][qp];
1261  }
1262 
1263  if (_need_ad_second_u)
1264  {
1265  if (_displaced)
1266  mooseError("Support for second order shape function derivatives on the displaced mesh "
1267  "has not been added yet!");
1268  else
1269  _ad_second_u[qp] += _ad_dof_values[i] * (*second_phi)[i][qp];
1270  }
1271 
1273  _ad_u_dot[qp] += phi[i][qp] * _ad_dofs_dot[i];
1274  }
1275  }
1276 
1278  for (MooseIndex(nqp) qp = 0; qp < nqp; ++qp)
1279  _ad_u_dot[qp] = _u_dot[qp];
1280 }
virtual void computeADTimeDerivatives(DualReal &ad_u_dot, const dof_id_type &dof)=0
method for computing local automatic differentiation time derivatives
VariableValueType< OutputShape, JACOBIAN >::type _ad_u_dot
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
VariableSecondType< OutputShape, JACOBIAN >::type _ad_second_u
VariableGradientType< OutputShape, JACOBIAN >::type _ad_grad_u
FieldVariableValue _u_dot
u_dot (time derivative)
size_t getMaxVarNDofsPerElem()
Gets the maximum number of dofs used by any one variable on any one element.
Definition: SystemBase.h:413
std::vector< dof_id_type > _dof_indices
DOF indices.
MooseArray< DualReal > _ad_dofs_dot
const FieldVariablePhiValue & phi()
SystemBase & _sys
System this variable is part of.
TimeIntegrator * _time_integrator
A pointer to TimeIntegrator. nullptr if _sys is not a NonlinearSystemBase.
const DualReal _ad_zero
A zero AD variable.
Moose::VarKindType _var_kind
VariableValueType< OutputShape, JACOBIAN >::type _ad_u
unsigned int _var_num
variable number (from libMesh)
const bool _displaced
Whether this variable is on the displaced system.
MooseArray< DualReal > _ad_dof_values
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeADNeighbor()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeADNeighbor ( const unsigned int  num_dofs,
const unsigned int  nqp,
const bool  is_transient,
const FieldVariablePhiValue phi,
const FieldVariablePhiGradient grad_phi,
const FieldVariablePhiSecond *&  second_phi 
)

Definition at line 1284 of file MooseVariableFE.C.

1291 {
1292  _neighbor_ad_dof_values.resize(num_dofs);
1293  if (_need_neighbor_ad_u)
1294  _neighbor_ad_u.resize(nqp);
1295 
1297  _neighbor_ad_grad_u.resize(nqp);
1298 
1300  _neighbor_ad_second_u.resize(nqp);
1301 
1303  _neighbor_ad_u_dot.resize(nqp);
1304 
1305  // Derivatives are offset by the variable number
1306  size_t ad_offset = _var_num * _sys.getMaxVarNDofsPerElem() +
1307  (_sys.system().n_vars() * _sys.getMaxVarNDofsPerElem());
1308 
1309  // Hopefully this problem can go away at some point
1310  if (ad_offset + num_dofs > AD_MAX_DOFS_PER_ELEM)
1311  mooseError("Current number of dofs per element is greater than AD_MAX_DOFS_PER_ELEM of ",
1312  AD_MAX_DOFS_PER_ELEM);
1313 
1314  for (unsigned int qp = 0; qp < nqp; qp++)
1315  {
1316  if (_need_neighbor_ad_u)
1317  _neighbor_ad_u[qp] = _ad_zero;
1318 
1321 
1324 
1327  }
1328 
1329  for (unsigned int i = 0; i < num_dofs; i++)
1330  {
1332 
1333  // NOTE! You have to do this AFTER setting the value!
1335  _neighbor_ad_dof_values[i].derivatives()[ad_offset + i] = 1.0;
1336 
1338  {
1342  }
1343  }
1344 
1345  // Now build up the solution at each quadrature point:
1346  for (unsigned int i = 0; i < num_dofs; i++)
1347  {
1348  for (unsigned int qp = 0; qp < nqp; qp++)
1349  {
1350  if (_need_neighbor_ad_u)
1351  _neighbor_ad_u[qp] += _neighbor_ad_dof_values[i] * phi[i][qp];
1352 
1354  _neighbor_ad_grad_u[qp] += _neighbor_ad_dof_values[i] * grad_phi[i][qp];
1355 
1357  _neighbor_ad_second_u[qp] += _neighbor_ad_dof_values[i] * (*second_phi)[i][qp];
1358 
1360  _neighbor_ad_u_dot[qp] += phi[i][qp] * _neighbor_ad_dofs_dot[i];
1361  }
1362  }
1363 
1365  for (MooseIndex(nqp) qp = 0; qp < nqp; ++qp)
1367 }
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
virtual void computeADTimeDerivatives(DualReal &ad_u_dot, const dof_id_type &dof)=0
method for computing local automatic differentiation time derivatives
FieldVariableValue _u_dot_neighbor
VariableSecondType< OutputShape, JACOBIAN >::type _neighbor_ad_second_u
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
MooseArray< DualReal > _neighbor_ad_dof_values
size_t getMaxVarNDofsPerElem()
Gets the maximum number of dofs used by any one variable on any one element.
Definition: SystemBase.h:413
const FieldVariablePhiValue & phi()
SystemBase & _sys
System this variable is part of.
TimeIntegrator * _time_integrator
A pointer to TimeIntegrator. nullptr if _sys is not a NonlinearSystemBase.
const DualReal _ad_zero
A zero AD variable.
VariableGradientType< OutputShape, JACOBIAN >::type _neighbor_ad_grad_u
Moose::VarKindType _var_kind
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u
virtual System & system()=0
Get the reference to the libMesh system.
unsigned int _var_num
variable number (from libMesh)
MooseArray< DualReal > _neighbor_ad_dofs_dot
bool _need_neighbor_ad_second_u
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u_dot
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeElemValues()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeElemValues ( )
overridevirtual

Compute values at interior quadrature points.

Implements MooseVariableFEBase.

Reimplemented in MooseVariableConstMonomial.

Definition at line 815 of file MooseVariableFE.C.

816 {
818 }
const FieldVariablePhiValue & _phi
const VariableTestGradientType< OutputShape, JACOBIAN >::type & _ad_grad_phi
virtual void computeValuesHelper(QBase *&qrule, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi, const FieldVariablePhiCurl *&curl_phi, const typename VariableTestGradientType< OutputType, JACOBIAN >::type &ad_grad_phi)
Helper function for computing values.
QBase *& _qrule
Quadrature rule for interior.
const FieldVariablePhiCurl * _curl_phi
const FieldVariablePhiGradient & _grad_phi
const FieldVariablePhiSecond * _second_phi

◆ computeElemValuesFace()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeElemValuesFace ( )
overridevirtual

Compute values at facial quadrature points.

Implements MooseVariableFEBase.

Reimplemented in MooseVariableConstMonomial.

Definition at line 822 of file MooseVariableFE.C.

823 {
826 }
const FieldVariablePhiGradient & _grad_phi_face
virtual void computeValuesHelper(QBase *&qrule, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi, const FieldVariablePhiCurl *&curl_phi, const typename VariableTestGradientType< OutputType, JACOBIAN >::type &ad_grad_phi)
Helper function for computing values.
const VariableTestGradientType< OutputShape, JACOBIAN >::type & _ad_grad_phi_face
const FieldVariablePhiValue & _phi_face
QBase *& _qrule_face
Quadrature rule for the face.
const FieldVariablePhiSecond * _second_phi_face
const FieldVariablePhiCurl * _curl_phi_face

◆ computeIncrementAtNode()

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

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

Definition at line 863 of file MooseVariableFE.C.

864 {
865  if (!isNodal())
866  mooseError("computeIncrementAtNode can only be called for nodal variables");
867 
868  _increment.resize(1);
869 
870  // Compute the increment for the current DOF
871  _increment[0] = increment_vec(_dof_indices[0]);
872 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
std::vector< dof_id_type > _dof_indices
DOF indices.
FieldVariableValue _increment
Increment in the variable used in dampers.
bool isNodal() const override
Is this variable nodal.

◆ computeIncrementAtQps()

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

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

Definition at line 846 of file MooseVariableFE.C.

847 {
848  unsigned int nqp = _qrule->n_points();
849 
850  _increment.resize(nqp);
851  // Compute the increment at each quadrature point
852  unsigned int num_dofs = _dof_indices.size();
853  for (unsigned int qp = 0; qp < nqp; qp++)
854  {
855  _increment[qp] = 0;
856  for (unsigned int i = 0; i < num_dofs; i++)
857  _increment[qp] += _phi[i][qp] * increment_vec(_dof_indices[i]);
858  }
859 }
const FieldVariablePhiValue & _phi
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
std::vector< dof_id_type > _dof_indices
DOF indices.
QBase *& _qrule
Quadrature rule for interior.
FieldVariableValue _increment
Increment in the variable used in dampers.

◆ computeNeighborValues()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeNeighborValues ( )
overridevirtual

Compute values at quadrature points for the neighbor.

Implements MooseVariableFEBase.

Reimplemented in MooseVariableConstMonomial.

Definition at line 838 of file MooseVariableFE.C.

839 {
842 }
QBase *& _qrule_neighbor
Quadrature rule for the neighbor.
const FieldVariablePhiValue & _phi_neighbor
virtual void computeNeighborValuesHelper(QBase *&qrule, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi)
Helper function for computing values.
const FieldVariablePhiGradient & _grad_phi_neighbor
const FieldVariablePhiSecond * _second_phi_neighbor

◆ computeNeighborValuesFace()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeNeighborValuesFace ( )
overridevirtual

Compute values at facial quadrature points for the neighbor.

Implements MooseVariableFEBase.

Reimplemented in MooseVariableConstMonomial.

Definition at line 830 of file MooseVariableFE.C.

831 {
834 }
QBase *& _qrule_neighbor
Quadrature rule for the neighbor.
const FieldVariablePhiSecond * _second_phi_face_neighbor
virtual void computeNeighborValuesHelper(QBase *&qrule, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi)
Helper function for computing values.
const FieldVariablePhiValue & _phi_face_neighbor
const FieldVariablePhiGradient & _grad_phi_face_neighbor

◆ computeNeighborValuesHelper()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeNeighborValuesHelper ( QBase *&  qrule,
const FieldVariablePhiValue phi,
const FieldVariablePhiGradient grad_phi,
const FieldVariablePhiSecond *&  second_phi 
)
virtual

Helper function for computing values.

Definition at line 1371 of file MooseVariableFE.C.

1375 {
1376  unsigned int num_dofs = _dof_indices_neighbor.size();
1377 
1378  if (num_dofs > 0)
1380 
1381  bool is_transient = _subproblem.isTransient();
1382  unsigned int nqp = qrule->n_points();
1383 
1384  _u_neighbor.resize(nqp);
1385  _grad_u_neighbor.resize(nqp);
1386 
1389 
1390  if (is_transient)
1391  {
1393  _u_dot_neighbor.resize(nqp);
1394 
1397 
1400 
1403 
1405  _du_dot_du_neighbor.resize(nqp);
1406 
1408  _du_dotdot_du_neighbor.resize(nqp);
1409 
1412 
1415 
1417  _u_old_neighbor.resize(nqp);
1418 
1421 
1424 
1427 
1430 
1433  }
1434 
1435  for (unsigned int i = 0; i < nqp; ++i)
1436  {
1437  _u_neighbor[i] = 0;
1438  _grad_u_neighbor[i] = 0;
1439 
1441  _second_u_neighbor[i] = 0;
1442 
1443  if (_need_grad_dot)
1444  _grad_u_neighbor_dot[i] = 0;
1445  if (_need_grad_dotdot)
1446  _grad_u_neighbor_dotdot[i] = 0;
1447 
1448  if (is_transient)
1449  {
1451  _u_dot_neighbor[i] = 0;
1452 
1454  _u_dotdot_neighbor[i] = 0;
1455 
1457  _u_dot_old_neighbor[i] = 0;
1458 
1460  _u_dotdot_old_neighbor[i] = 0;
1461 
1463  _du_dot_du_neighbor[i] = 0;
1464 
1466  _du_dotdot_du_neighbor[i] = 0;
1467 
1469  _u_old_neighbor[i] = 0;
1470 
1472  _u_older_neighbor[i] = 0;
1473 
1475  _grad_u_old_neighbor[i] = 0;
1476 
1478  _grad_u_older_neighbor[i] = 0;
1479 
1481  _second_u_old_neighbor[i] = 0;
1482 
1484  _second_u_older_neighbor[i] = 0;
1485  }
1486  }
1487 
1488  bool second_required =
1490 
1491  for (unsigned int i = 0; i < num_dofs; ++i)
1492  {
1493  for (unsigned int qp = 0; qp < nqp; ++qp)
1494  {
1495  OutputType phi_local = phi[i][qp];
1496  typename OutputTools<OutputType>::OutputGradient dphi_local = grad_phi[i][qp];
1497 
1498  _u_neighbor[qp] += phi_local * _dof_values_neighbor[i];
1499 
1500  _grad_u_neighbor[qp] += dphi_local * _dof_values_neighbor[i];
1501 
1502  if (is_transient)
1503  {
1505  _u_dot_neighbor[qp] += phi_local * _dof_values_dot_neighbor[i];
1506 
1508  _u_dotdot_neighbor[qp] += phi_local * _dof_values_dotdot_neighbor[i];
1509 
1511  _u_dot_old_neighbor[qp] += phi_local * _dof_values_dot_old_neighbor[i];
1512 
1515 
1518 
1521 
1523  _grad_u_neighbor_dot[qp].add_scaled(dphi_local, _dof_values_dot_neighbor[i]);
1524 
1526  _grad_u_neighbor_dotdot[qp].add_scaled(dphi_local, _dof_values_dotdot_neighbor[i]);
1527 
1529  _u_old_neighbor[qp] += phi_local * _dof_values_old_neighbor[i];
1530 
1532  _u_older_neighbor[qp] += phi_local * _dof_values_older_neighbor[i];
1533 
1535  _grad_u_old_neighbor[qp] += dphi_local * _dof_values_old_neighbor[i];
1536 
1538  _grad_u_older_neighbor[qp] += dphi_local * _dof_values_older_neighbor[i];
1539  }
1540 
1541  if (second_required)
1542  {
1543  libmesh_assert(second_phi);
1544  typename OutputTools<OutputType>::OutputSecond d2phi_local = (*second_phi)[i][qp];
1545 
1547  _second_u_neighbor[qp] += d2phi_local * _dof_values_neighbor[i];
1548 
1549  if (is_transient)
1550  {
1552  _second_u_old_neighbor[qp] += d2phi_local * _dof_values_old_neighbor[i];
1553 
1555  _second_u_older_neighbor[qp] += d2phi_local * _dof_values_older_neighbor[i];
1556  }
1557  }
1558  }
1559  }
1560 
1561  // Automatic differentiation
1563  computeADNeighbor(num_dofs, nqp, is_transient, phi, grad_phi, second_phi);
1564 }
FieldVariableValue _u_old_neighbor
bool _need_second_old_neighbor
FieldVariableGradient _grad_u_older_neighbor
MooseArray< Real > _dof_du_dot_du_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
FieldVariableValue _u_dot_neighbor
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:175
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:513
MooseArray< Real > _dof_values_older_neighbor
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
MooseArray< Real > _dof_du_dotdot_du_neighbor
FieldVariableGradient _grad_u_neighbor_dot
FieldVariableValue _u_neighbor
VariableValue _du_dot_du_neighbor
MooseArray< Real > _dof_values_dotdot_old_neighbor
bool _need_grad_older_neighbor
const FieldVariablePhiValue & phi()
bool _need_grad_neighbor_dotdot
FieldVariableGradient _grad_u_neighbor
SubProblem & _subproblem
Problem this variable is part of.
void computeADNeighbor(const unsigned int num_dofs, const unsigned int nqp, const bool is_transient, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi)
FieldVariableGradient _grad_u_neighbor_dotdot
bool _need_du_dotdot_du_neighbor
FieldVariableValue _u_dot_old_neighbor
virtual bool isTransient() const =0
FieldVariableSecond _second_u_neighbor
void fetchDoFValuesNeighbor()
MooseArray< Real > _dof_values_old_neighbor
MooseArray< Real > _dof_values_dot_old_neighbor
MooseArray< Real > _dof_values_dot_neighbor
FieldVariableValue _u_dotdot_old_neighbor
MooseArray< Real > _dof_values_dotdot_neighbor
bool _need_u_dotdot_old_neighbor
FieldVariableSecond _second_u_old_neighbor
VariableValue _du_dotdot_du_neighbor
FieldVariableValue _u_dotdot_neighbor
FieldVariableValue _u_older_neighbor
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:174
bool _need_second_older_neighbor
FieldVariableGradient _grad_u_old_neighbor
FieldVariableSecond _second_u_older_neighbor

◆ computeNodalNeighborValues()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeNodalNeighborValues ( )
overridevirtual

Compute nodal values of this variable in the neighbor.

Implements MooseVariableFEBase.

Definition at line 1908 of file MooseVariableFE.C.

1909 {
1911  {
1914  }
1915  else
1917 }
void assignNodalValueNeighbor()
void fetchDoFValuesNeighbor()
void zeroSizeDofValuesNeighbor()
bool _neighbor_has_dof_indices
If the neighor has dofs.

◆ computeNodalValues()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeNodalValues ( )
overridevirtual

Compute nodal values of this variable.

Implements MooseVariableFEBase.

Definition at line 1892 of file MooseVariableFE.C.

1893 {
1894  if (_has_dof_indices)
1895  {
1896  fetchDoFValues();
1897  assignNodalValue();
1898 
1900  fetchADDoFValues();
1901  }
1902  else
1904 }
bool _has_dof_indices
If we have dofs.
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:513
SubProblem & _subproblem
Problem this variable is part of.

◆ computeValuesHelper()

template<typename OutputType>
void MooseVariableFE< OutputType >::computeValuesHelper ( QBase *&  qrule,
const FieldVariablePhiValue phi,
const FieldVariablePhiGradient grad_phi,
const FieldVariablePhiSecond *&  second_phi,
const FieldVariablePhiCurl *&  curl_phi,
const typename VariableTestGradientType< OutputType, JACOBIAN >::type ad_grad_phi 
)
virtual

Helper function for computing values.

Definition at line 902 of file MooseVariableFE.C.

910 {
911  unsigned int num_dofs = _dof_indices.size();
912 
913  if (num_dofs > 0)
914  fetchDoFValues();
915 
916  bool is_transient = _subproblem.isTransient();
917  unsigned int nqp = qrule->n_points();
918  auto & active_coupleable_vector_tags =
920  auto & active_coupleable_matrix_tags =
922 
923  _u.resize(nqp);
924  _grad_u.resize(nqp);
925 
926  for (auto tag : active_coupleable_vector_tags)
927  if (_need_vector_tag_u[tag])
928  _vector_tag_u[tag].resize(nqp);
929 
930  for (auto tag : active_coupleable_matrix_tags)
931  if (_need_matrix_tag_u[tag])
932  _matrix_tag_u[tag].resize(nqp);
933 
934  if (_need_second)
935  _second_u.resize(nqp);
936 
937  if (_need_curl)
938  _curl_u.resize(nqp);
939 
941  _u_previous_nl.resize(nqp);
942 
945 
948 
949  if (is_transient)
950  {
951  if (_need_u_dot)
952  _u_dot.resize(nqp);
953 
954  if (_need_u_dotdot)
955  _u_dotdot.resize(nqp);
956 
957  if (_need_u_dot_old)
958  _u_dot_old.resize(nqp);
959 
960  if (_need_u_dotdot_old)
961  _u_dotdot_old.resize(nqp);
962 
963  if (_need_du_dot_du)
964  _du_dot_du.resize(nqp);
965 
966  if (_need_du_dotdot_du)
967  _du_dotdot_du.resize(nqp);
968 
969  if (_need_grad_dot)
970  _grad_u_dot.resize(nqp);
971 
972  if (_need_grad_dotdot)
973  _grad_u_dotdot.resize(nqp);
974 
975  if (_need_u_old)
976  _u_old.resize(nqp);
977 
978  if (_need_u_older)
979  _u_older.resize(nqp);
980 
981  if (_need_grad_old)
982  _grad_u_old.resize(nqp);
983 
984  if (_need_grad_older)
985  _grad_u_older.resize(nqp);
986 
987  if (_need_second_old)
988  _second_u_old.resize(nqp);
989 
990  if (_need_curl_old)
991  _curl_u_old.resize(nqp);
992 
993  if (_need_second_older)
994  _second_u_older.resize(nqp);
995  }
996 
997  for (unsigned int i = 0; i < nqp; ++i)
998  {
999  _u[i] = 0;
1000  _grad_u[i] = 0;
1001 
1002  for (auto tag : active_coupleable_vector_tags)
1003  if (_need_vector_tag_u[tag])
1004  _vector_tag_u[tag][i] = 0;
1005 
1006  for (auto tag : active_coupleable_matrix_tags)
1007  if (_need_matrix_tag_u[tag])
1008  _matrix_tag_u[tag][i] = 0;
1009 
1010  if (_need_second)
1011  _second_u[i] = 0;
1012 
1013  if (_need_curl)
1014  _curl_u[i] = 0;
1015 
1016  if (_need_u_previous_nl)
1017  _u_previous_nl[i] = 0;
1018 
1020  _grad_u_previous_nl[i] = 0;
1021 
1023  _second_u_previous_nl[i] = 0;
1024 
1025  if (is_transient)
1026  {
1027  if (_need_u_dot)
1028  _u_dot[i] = 0;
1029 
1030  if (_need_u_dotdot)
1031  _u_dotdot[i] = 0;
1032 
1033  if (_need_u_dot_old)
1034  _u_dot_old[i] = 0;
1035 
1036  if (_need_u_dotdot_old)
1037  _u_dotdot_old[i] = 0;
1038 
1039  if (_need_du_dot_du)
1040  _du_dot_du[i] = 0;
1041 
1042  if (_need_du_dotdot_du)
1043  _du_dotdot_du[i] = 0;
1044 
1045  if (_need_grad_dot)
1046  _grad_u_dot[i] = 0;
1047 
1048  if (_need_grad_dotdot)
1049  _grad_u_dotdot[i] = 0;
1050 
1051  if (_need_u_old)
1052  _u_old[i] = 0;
1053 
1054  if (_need_u_older)
1055  _u_older[i] = 0;
1056 
1057  if (_need_grad_old)
1058  _grad_u_old[i] = 0;
1059 
1060  if (_need_grad_older)
1061  _grad_u_older[i] = 0;
1062 
1063  if (_need_second_old)
1064  _second_u_old[i] = 0;
1065 
1066  if (_need_second_older)
1067  _second_u_older[i] = 0;
1068 
1069  if (_need_curl_old)
1070  _curl_u_old[i] = 0;
1071  }
1072  }
1073 
1074  bool second_required =
1076  bool curl_required = _need_curl || _need_curl_old;
1077 
1078  for (unsigned int i = 0; i < num_dofs; i++)
1079  {
1080  for (unsigned int qp = 0; qp < nqp; qp++)
1081  {
1082  const OutputType phi_local = phi[i][qp];
1083  const typename OutputTools<OutputType>::OutputGradient dphi_qp = grad_phi[i][qp];
1084 
1085  _u[qp] += phi_local * _dof_values[i];
1086 
1087  _grad_u[qp].add_scaled(dphi_qp, _dof_values[i]);
1088 
1089  if (is_transient)
1090  {
1091  if (_need_u_old)
1092  _u_old[qp] += phi_local * _dof_values_old[i];
1093 
1094  if (_need_u_older)
1095  _u_older[qp] += phi_local * _dof_values_older[i];
1096 
1097  if (_need_grad_old)
1098  _grad_u_old[qp].add_scaled(dphi_qp, _dof_values_old[i]);
1099 
1100  if (_need_grad_older)
1101  _grad_u_older[qp].add_scaled(dphi_qp, _dof_values_older[i]);
1102 
1103  if (_need_u_dot)
1104  _u_dot[qp] += phi_local * _dof_values_dot[i];
1105 
1106  if (_need_u_dotdot)
1107  _u_dotdot[qp] += phi_local * _dof_values_dotdot[i];
1108 
1109  if (_need_u_dot_old)
1110  _u_dot_old[qp] += phi_local * _dof_values_dot_old[i];
1111 
1112  if (_need_u_dotdot_old)
1113  _u_dotdot_old[qp] += phi_local * _dof_values_dotdot_old[i];
1114 
1115  if (_need_grad_dot)
1116  _grad_u_dot[qp].add_scaled(dphi_qp, _dof_values_dot[i]);
1117 
1118  if (_need_grad_dotdot)
1119  _grad_u_dotdot[qp].add_scaled(dphi_qp, _dof_values_dotdot[i]);
1120 
1121  if (_need_du_dot_du)
1122  _du_dot_du[qp] = _dof_du_dot_du[i];
1123 
1124  if (_need_du_dotdot_du)
1126  }
1127 
1128  if (second_required)
1129  {
1130  libmesh_assert(second_phi);
1131  const typename OutputTools<OutputType>::OutputSecond d2phi_local = (*second_phi)[i][qp];
1132 
1133  if (_need_second)
1134  _second_u[qp].add_scaled(d2phi_local, _dof_values[i]);
1135 
1137  _second_u_previous_nl[qp].add_scaled(d2phi_local, _dof_values_previous_nl[i]);
1138 
1139  if (is_transient)
1140  {
1141  if (_need_second_old)
1142  _second_u_old[qp].add_scaled(d2phi_local, _dof_values_old[i]);
1143 
1144  if (_need_second_older)
1145  _second_u_older[qp].add_scaled(d2phi_local, _dof_values_older[i]);
1146  }
1147  }
1148 
1149  if (curl_required)
1150  {
1151  libmesh_assert(curl_phi);
1152  const OutputType curl_phi_local = (*curl_phi)[i][qp];
1153 
1154  if (_need_curl)
1155  _curl_u[qp] += curl_phi_local * _dof_values[i];
1156 
1157  if (is_transient && _need_curl_old)
1158  _curl_u_old[qp] += curl_phi_local * _dof_values_old[i];
1159  }
1160 
1161  for (auto tag : active_coupleable_vector_tags)
1162  if (_need_vector_tag_u[tag])
1163  _vector_tag_u[tag][qp] += phi_local * _vector_tags_dof_u[tag][i];
1164 
1165  for (auto tag : active_coupleable_matrix_tags)
1166  if (_need_matrix_tag_u[tag])
1167  _matrix_tag_u[tag][qp] += phi_local * _matrix_tags_dof_u[tag][i];
1168 
1169  if (_need_u_previous_nl)
1170  _u_previous_nl[qp] += phi_local * _dof_values_previous_nl[i];
1171 
1173  _grad_u_previous_nl[qp].add_scaled(dphi_qp, _dof_values_previous_nl[i]);
1174  }
1175  }
1176 
1177  // Automatic differentiation
1179  computeAD(num_dofs, nqp, is_transient, phi, grad_phi, second_phi, ad_grad_phi);
1180 }
FieldVariableGradient _grad_u_old
MooseArray< Real > _dof_values_old
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
std::vector< FieldVariableValue > _vector_tag_u
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:175
FieldVariableGradient _grad_u_dot
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:513
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
FieldVariableValue _u
MooseArray< Real > _dof_values_older
FieldVariableValue _u_old
FieldVariableValue _u_dotdot_old
u_dotdot_old (second time derivative)
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u
MooseArray< Real > _dof_du_dotdot_du
nodal values of derivative of u_dotdot wrt u
FieldVariableValue _u_dot
u_dot (time derivative)
MooseArray< Real > _dof_values_previous_nl
FieldVariableSecond _second_u
MooseArray< Real > _dof_values_dotdot_old
nodal values of u_dotdot_old
FieldVariableSecond _second_u_old
FieldVariableCurl _curl_u_old
MooseArray< Real > _dof_values_dot
nodal values of u_dot
THREAD_ID _tid
Thread ID.
std::vector< dof_id_type > _dof_indices
DOF indices.
std::vector< bool > _need_vector_tag_u
const FieldVariablePhiValue & phi()
std::set< TagID > & getActiveFEVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:193
SubProblem & _subproblem
Problem this variable is part of.
void computeAD(const unsigned int num_dofs, const unsigned int nqp, const bool is_transient, const FieldVariablePhiValue &phi, const FieldVariablePhiGradient &grad_phi, const FieldVariablePhiSecond *&second_phi, const typename VariableTestGradientType< OutputType, JACOBIAN >::type &ad_grad_phi)
SystemBase & _sys
System this variable is part of.
FieldVariableCurl _curl_u
virtual bool isTransient() const =0
FieldVariableGradient _grad_u
virtual SubProblem & subproblem()
Definition: SystemBase.h:105
FieldVariableGradient _grad_u_dotdot
FieldVariableSecond _second_u_older
std::vector< MooseArray< Real > > _vector_tags_dof_u
VariableValue _du_dot_du
derivative of u_dot wrt u
MooseArray< Real > _dof_values_dot_old
nodal values of u_dot_old
FieldVariableGradient _grad_u_older
std::vector< FieldVariableValue > _matrix_tag_u
std::vector< bool > _need_matrix_tag_u
MooseArray< Real > _dof_values
MooseArray< Real > _dof_du_dot_du
nodal values of derivative of u_dot wrt u
std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:187
std::vector< MooseArray< Real > > _matrix_tags_dof_u
FieldVariableValue _u_older
FieldVariableGradient _grad_u_previous_nl
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:174
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
FieldVariableSecond _second_u_previous_nl
MooseArray< Real > _dof_values_dotdot
nodal values of u_dotdot
FieldVariableValue _u_previous_nl

◆ computingCurl()

template<typename OutputType>
bool MooseVariableFE< OutputType >::computingCurl ( )
inline

Whether or not this variable is computing the curl.

Definition at line 133 of file MooseVariableFE.h.

Referenced by Assembly::copyFaceShapes(), and Assembly::copyShapes().

◆ computingSecond()

template<typename OutputType>
bool MooseVariableFE< OutputType >::computingSecond ( )
inline

Whether or not this variable is computing any second derivatives.

Definition at line 129 of file MooseVariableFE.h.

Referenced by Assembly::copyFaceShapes(), and Assembly::copyShapes().

129 { return usesSecondPhi(); }
bool usesSecondPhi()
Whether or not this variable is computing any second derivatives.

◆ curlPhi()

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

Definition at line 2547 of file MooseVariableFE.C.

Referenced by Assembly::copyFaceShapes(), Assembly::copyShapes(), MooseVariableFE< Real >::curlSln(), MooseVariableFE< Real >::curlSlnOld(), and MooseVariableFE< Real >::curlSlnOlder().

2548 {
2549  _curl_phi = &_assembly.feCurlPhi<OutputType>(_fe_type);
2550  return *_curl_phi;
2551 }
FEType _fe_type
The FEType associated with this variable.
Assembly & _assembly
Our assembly.
const FieldVariablePhiCurl * _curl_phi
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhi(FEType type)
Definition: Assembly.h:978

◆ curlPhiFace()

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

Definition at line 2563 of file MooseVariableFE.C.

Referenced by MooseVariableFE< Real >::curlSln(), MooseVariableFE< Real >::curlSlnOld(), and MooseVariableFE< Real >::curlSlnOlder().

2564 {
2566  return *_curl_phi_face;
2567 }
FEType _fe_type
The FEType associated with this variable.
Assembly & _assembly
Our assembly.
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiFace(FEType type)
Definition: Assembly.h:986
const FieldVariablePhiCurl * _curl_phi_face

◆ curlPhiFaceNeighbor()

template<typename OutputType >
const MooseVariableFE< OutputType >::FieldVariablePhiCurl & MooseVariableFE< OutputType >::curlPhiFaceNeighbor ( )

Definition at line 2595 of file MooseVariableFE.C.

Referenced by MooseVariableFE< Real >::curlSlnNeighbor(), MooseVariableFE< Real >::curlSlnOlderNeighbor(), and MooseVariableFE< Real >::curlSlnOldNeighbor().

2596 {
2598  return *_curl_phi_face_neighbor;
2599 }
FEType _fe_type
The FEType associated with this variable.
Assembly & _assembly
Our assembly.
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiFaceNeighbor(FEType type)
Definition: Assembly.h:1002
const FieldVariablePhiCurl * _curl_phi_face_neighbor

◆ curlPhiNeighbor()

template<typename OutputType >
const MooseVariableFE< OutputType >::FieldVariablePhiCurl & MooseVariableFE< OutputType >::curlPhiNeighbor ( )

Definition at line 2579 of file MooseVariableFE.C.

2580 {
2582  return *_curl_phi_neighbor;
2583 }
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiNeighbor(FEType type)
Definition: Assembly.h:994
FEType _fe_type
The FEType associated with this variable.
Assembly & _assembly
Our assembly.
const FieldVariablePhiCurl * _curl_phi_neighbor

◆ curlSln()

template<typename OutputType>
const FieldVariableCurl& MooseVariableFE< OutputType >::curlSln ( )
inline

Definition at line 292 of file MooseVariableFE.h.

Referenced by Coupleable::coupledCurl().

293  {
294  _need_curl = true;
295  curlPhi();
296  curlPhiFace();
297  return _curl_u;
298  }
const FieldVariablePhiCurl & curlPhiFace()
const FieldVariablePhiCurl & curlPhi()
FieldVariableCurl _curl_u

◆ curlSlnNeighbor()

template<typename OutputType>
const FieldVariableCurl& MooseVariableFE< OutputType >::curlSlnNeighbor ( )
inline

Definition at line 516 of file MooseVariableFE.h.

Referenced by Coupleable::coupledCurl().

517  {
518  _need_curl_neighbor = true;
520  return _curl_u_neighbor;
521  }
const FieldVariablePhiCurl & curlPhiFaceNeighbor()
FieldVariableCurl _curl_u_neighbor

◆ curlSlnOld()

template<typename OutputType>
const FieldVariableCurl& MooseVariableFE< OutputType >::curlSlnOld ( )
inline

Definition at line 299 of file MooseVariableFE.h.

Referenced by Coupleable::coupledCurl(), and Coupleable::coupledCurlOld().

300  {
301  _need_curl_old = true;
302  curlPhi();
303  curlPhiFace();
304  return _curl_u_old;
305  }
const FieldVariablePhiCurl & curlPhiFace()
FieldVariableCurl _curl_u_old
const FieldVariablePhiCurl & curlPhi()

◆ curlSlnOlder()

template<typename OutputType>
const FieldVariableCurl& MooseVariableFE< OutputType >::curlSlnOlder ( )
inline

Definition at line 306 of file MooseVariableFE.h.

Referenced by Coupleable::coupledCurlOld(), and Coupleable::coupledCurlOlder().

307  {
308  _need_curl_older = true;
309  curlPhi();
310  curlPhiFace();
311  return _curl_u_older;
312  }
const FieldVariablePhiCurl & curlPhiFace()
const FieldVariablePhiCurl & curlPhi()
FieldVariableCurl _curl_u_older

◆ curlSlnOlderNeighbor()

template<typename OutputType>
const FieldVariableCurl& MooseVariableFE< OutputType >::curlSlnOlderNeighbor ( )
inline

Definition at line 528 of file MooseVariableFE.h.

Referenced by Coupleable::coupledCurlOld(), and Coupleable::coupledCurlOlder().

529  {
532  return _curl_u_older_neighbor;
533  }
const FieldVariablePhiCurl & curlPhiFaceNeighbor()
FieldVariableCurl _curl_u_older_neighbor
bool _need_curl_older_neighbor

◆ curlSlnOldNeighbor()

template<typename OutputType>
const FieldVariableCurl& MooseVariableFE< OutputType >::curlSlnOldNeighbor ( )
inline

Definition at line 522 of file MooseVariableFE.h.

Referenced by Coupleable::coupledCurl(), and Coupleable::coupledCurlOld().

523  {
526  return _curl_u_old_neighbor;
527  }
const FieldVariablePhiCurl & curlPhiFaceNeighbor()
FieldVariableCurl _curl_u_old_neighbor

◆ currentElem()

template<typename OutputType>
const Elem*& MooseVariableFE< OutputType >::currentElem ( ) const
inlineoverridevirtual

Current element this variable is evaluated at.

Implements MooseVariableFEBase.

Definition at line 148 of file MooseVariableFE.h.

148 { return _elem; }
const Elem *& _elem
current element

◆ currentSide()

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

Current side this variable is being evaluated on.

Definition at line 153 of file MooseVariableFE.h.

153 { return _current_side; }
unsigned int & _current_side
the side of the current element (valid when doing face assembly)

◆ dofIndices() [1/2]

std::vector<dof_id_type>& MooseVariableBase::dofIndices ( )
inlineinherited

◆ dofIndices() [2/2]

const std::vector<dof_id_type>& MooseVariableBase::dofIndices ( ) const
inlineinherited

Get local DoF indices.

Definition at line 96 of file MooseVariableBase.h.

96 { return _dof_indices; }
std::vector< dof_id_type > _dof_indices
DOF indices.

◆ dofIndicesNeighbor()

template<typename OutputType>
std::vector<dof_id_type>& MooseVariableFE< OutputType >::dofIndicesNeighbor ( )
inlineoverridevirtual

Get neighbor DOF indices for currently selected element.

Returns
the neighbor degree of freedom indices

Implements MooseVariableFEBase.

Definition at line 631 of file MooseVariableFE.h.

Referenced by NodalConstraint::computeJacobian(), and NodalConstraint::computeResidual().

631 { return _dof_indices_neighbor; }
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)

◆ dofMap()

const DofMap& MooseVariableBase::dofMap ( ) const
inlineinherited

The DofMap associated with the system this variable is in.

Definition at line 90 of file MooseVariableBase.h.

Referenced by AuxScalarKernel::compute(), and ScalarVariable::getValue().

90 { return _dof_map; }
const DofMap & _dof_map
DOF map.

◆ dofValue()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValue ( )
overridevirtual

Deprecated method.

Use dofValues

Implements MooseVariableFEBase.

Definition at line 582 of file MooseVariableFE.C.

583 {
584  mooseDeprecated("Use dofValues instead of dofValue");
585  return dofValues();
586 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const MooseArray< Number > & dofValues() override
Returns dof solution on element.

◆ dofValues()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValues ( )
overridevirtual

Returns dof solution on element.

Implements MooseVariableFEBase.

Definition at line 590 of file MooseVariableFE.C.

Referenced by Coupleable::coupledValue(), and InternalSideIndicator::finalize().

591 {
592  _need_dof_values = true;
593  return _dof_values;
594 }
MooseArray< Real > _dof_values

◆ dofValuesDot()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDot ( )
overridevirtual

Returns time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 654 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDot().

655 {
656  if (_sys.solutionUDot())
657  {
658  _need_dof_values_dot = true;
659  return _dof_values_dot;
660  }
661  else
662  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
663  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
664 }
virtual NumericVector< Number > * solutionUDot()=0
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseArray< Real > _dof_values_dot
nodal values of u_dot
SystemBase & _sys
System this variable is part of.

◆ dofValuesDotDot()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDotDot ( )
overridevirtual

Returns second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 668 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDot(), and Coupleable::coupledNodalDotDot().

669 {
670  if (_sys.solutionUDotDot())
671  {
673  return _dof_values_dotdot;
674  }
675  else
676  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
677  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
678  "`u_dotdot`.");
679 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
SystemBase & _sys
System this variable is part of.
virtual NumericVector< Number > * solutionUDotDot()=0
MooseArray< Real > _dof_values_dotdot
nodal values of u_dotdot

◆ dofValuesDotDotNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDotDotNeighbor ( )
overridevirtual

Returns second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 727 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDot(), and Coupleable::coupledNodalDotDot().

728 {
729  if (_sys.solutionUDotDot())
730  {
733  }
734  else
735  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
736  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
737  "`u_dotdot`.");
738 }
bool _need_dof_values_dotdot_neighbor
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
SystemBase & _sys
System this variable is part of.
MooseArray< Real > _dof_values_dotdot_neighbor
virtual NumericVector< Number > * solutionUDotDot()=0

◆ dofValuesDotDotOld()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDotDotOld ( )
overridevirtual

Returns old second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 698 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDotOld(), and Coupleable::coupledNodalDotDotOld().

699 {
700  if (_sys.solutionUDotDotOld())
701  {
703  return _dof_values_dotdot_old;
704  }
705  else
706  mooseError("MooseVariableFE: Old second time derivative of solution (`u_dotdot_old`) is not "
707  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
708  "requesting `u_dotdot_old`.");
709 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
virtual NumericVector< Number > * solutionUDotDotOld()=0
MooseArray< Real > _dof_values_dotdot_old
nodal values of u_dotdot_old
SystemBase & _sys
System this variable is part of.
bool _need_dof_values_dotdot_old

◆ dofValuesDotDotOldNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDotDotOldNeighbor ( )
overridevirtual

Returns old second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 757 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDotOld(), and Coupleable::coupledNodalDotDotOld().

758 {
759  if (_sys.solutionUDotDotOld())
760  {
763  }
764  else
765  mooseError("MooseVariableFE: Old second time derivative of solution (`u_dotdot_old`) is not "
766  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
767  "requesting `u_dotdot_old`.");
768 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
virtual NumericVector< Number > * solutionUDotDotOld()=0
MooseArray< Real > _dof_values_dotdot_old_neighbor
SystemBase & _sys
System this variable is part of.
bool _need_dof_values_dotdot_old_neighbor

◆ dofValuesDotNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDotNeighbor ( )
overridevirtual

Returns time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 713 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDot(), and NeighborCoupleable::coupledNeighborValueDot().

714 {
715  if (_sys.solutionUDot())
716  {
719  }
720  else
721  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
722  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
723 }
virtual NumericVector< Number > * solutionUDot()=0
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool _need_dof_values_dot_neighbor
SystemBase & _sys
System this variable is part of.
MooseArray< Real > _dof_values_dot_neighbor

◆ dofValuesDotOld()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDotOld ( )
overridevirtual

Returns old time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 683 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotOld(), and Coupleable::coupledNodalDotOld().

684 {
685  if (_sys.solutionUDotOld())
686  {
688  return _dof_values_dot_old;
689  }
690  else
691  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
692  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
693  "`u_dot_old`.");
694 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
SystemBase & _sys
System this variable is part of.
MooseArray< Real > _dof_values_dot_old
nodal values of u_dot_old
virtual NumericVector< Number > * solutionUDotOld()=0

◆ dofValuesDotOldNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDotOldNeighbor ( )
overridevirtual

Returns old time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 742 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotOld(), and Coupleable::coupledNodalDotOld().

743 {
744  if (_sys.solutionUDotOld())
745  {
748  }
749  else
750  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
751  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
752  "`u_dot_old`.");
753 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
SystemBase & _sys
System this variable is part of.
MooseArray< Real > _dof_values_dot_old_neighbor
virtual NumericVector< Number > * solutionUDotOld()=0
bool _need_dof_values_dot_old_neighbor

◆ dofValuesDuDotDotDu()

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

Returns derivative of second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 780 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDotDu().

781 {
782  _need_dof_du_dotdot_du = true;
783  return _dof_du_dotdot_du;
784 }
MooseArray< Real > _dof_du_dotdot_du
nodal values of derivative of u_dotdot wrt u

◆ dofValuesDuDotDotDuNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDuDotDotDuNeighbor ( )
overridevirtual

Returns derivative of second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 796 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDotDu().

797 {
800 }
MooseArray< Real > _dof_du_dotdot_du_neighbor
bool _need_dof_du_dotdot_du_neighbor

◆ dofValuesDuDotDu()

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

Returns derivative of time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 772 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDu().

773 {
774  _need_dof_du_dot_du = true;
775  return _dof_du_dot_du;
776 }
MooseArray< Real > _dof_du_dot_du
nodal values of derivative of u_dot wrt u

◆ dofValuesDuDotDuNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesDuDotDuNeighbor ( )
overridevirtual

Returns derivative of time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 788 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDu(), and NeighborCoupleable::coupledNeighborValueDotDu().

789 {
792 }
MooseArray< Real > _dof_du_dot_du_neighbor
bool _need_dof_du_dot_du_neighbor

◆ dofValuesNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesNeighbor ( )
overridevirtual

Returns dof solution on neighbor element.

Implements MooseVariableFEBase.

Definition at line 622 of file MooseVariableFE.C.

Referenced by NeighborCoupleable::coupledNeighborDofValues(), NeighborCoupleable::coupledNeighborValue(), and Coupleable::coupledValue().

623 {
625  return _dof_values_neighbor;
626 }
MooseArray< Real > _dof_values_neighbor
bool _need_dof_values_neighbor

◆ dofValuesOld()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesOld ( )
overridevirtual

Returns old dof solution on element.

Implements MooseVariableFEBase.

Definition at line 598 of file MooseVariableFE.C.

Referenced by Coupleable::coupledValue(), and Coupleable::coupledValueOld().

599 {
600  _need_dof_values_old = true;
601  return _dof_values_old;
602 }
MooseArray< Real > _dof_values_old

◆ dofValuesOlder()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesOlder ( )
overridevirtual

Returns older dof solution on element.

Implements MooseVariableFEBase.

Definition at line 606 of file MooseVariableFE.C.

Referenced by Coupleable::coupledValueOld(), and Coupleable::coupledValueOlder().

607 {
608  _need_dof_values_older = true;
609  return _dof_values_older;
610 }
MooseArray< Real > _dof_values_older

◆ dofValuesOlderNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesOlderNeighbor ( )
overridevirtual

◆ dofValuesOldNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesOldNeighbor ( )
overridevirtual

◆ dofValuesPreviousNL()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesPreviousNL ( )
overridevirtual

Returns previous nl solution on element.

Implements MooseVariableFEBase.

Definition at line 614 of file MooseVariableFE.C.

Referenced by Coupleable::coupledValuePreviousNL().

615 {
618 }
MooseArray< Real > _dof_values_previous_nl
bool _need_dof_values_previous_nl

◆ dofValuesPreviousNLNeighbor()

template<typename OutputType >
const MooseArray< Number > & MooseVariableFE< OutputType >::dofValuesPreviousNLNeighbor ( )
overridevirtual

Returns previous nl solution on neighbor element.

Implements MooseVariableFEBase.

Definition at line 646 of file MooseVariableFE.C.

Referenced by Coupleable::coupledValuePreviousNL().

647 {
650 }
bool _need_dof_values_previous_nl_neighbor
MooseArray< Real > _dof_values_previous_nl_neighbor

◆ duDotDotDu()

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

Definition at line 423 of file MooseVariableFE.h.

Referenced by Coupleable::coupledDotDotDu().

424  {
425  _need_du_dotdot_du = true;
426  return _du_dotdot_du;
427  }
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u

◆ duDotDotDuNeighbor()

template<typename OutputType>
const VariableValue& MooseVariableFE< OutputType >::duDotDotDuNeighbor ( )
inline

Definition at line 592 of file MooseVariableFE.h.

593  {
595  return _du_dotdot_du_neighbor;
596  }
bool _need_du_dotdot_du_neighbor
VariableValue _du_dotdot_du_neighbor

◆ duDotDu()

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

Definition at line 417 of file MooseVariableFE.h.

Referenced by Coupleable::coupledDotDu().

418  {
419  _need_du_dot_du = true;
420  return _du_dot_du;
421  }
VariableValue _du_dot_du
derivative of u_dot wrt u

◆ duDotDuNeighbor()

template<typename OutputType>
const VariableValue& MooseVariableFE< OutputType >::duDotDuNeighbor ( )
inline

Definition at line 586 of file MooseVariableFE.h.

Referenced by Coupleable::coupledDotDu(), and NeighborCoupleable::coupledNeighborValueDotDu().

587  {
589  return _du_dot_du_neighbor;
590  }
VariableValue _du_dot_du_neighbor

◆ fetchADDoFValues()

template<typename OutputType >
void MooseVariableFE< OutputType >::fetchADDoFValues ( )

Definition at line 2026 of file MooseVariableFE.C.

2027 {
2028  auto n = _dof_indices.size();
2029  libmesh_assert(n);
2031  auto ad_offset = _var_num * _sys.getMaxVarNDofsPerNode();
2032 
2033  for (decltype(n) i = 0; i < n; ++i)
2034  {
2035  _ad_dof_values[i] = _dof_values[i];
2037  _ad_dof_values[i].derivatives()[ad_offset + i] = 1.;
2039  }
2040 }
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
std::vector< dof_id_type > _dof_indices
DOF indices.
SystemBase & _sys
System this variable is part of.
Moose::VarKindType _var_kind
PetscInt n
MooseArray< Real > _dof_values
unsigned int _var_num
variable number (from libMesh)
void assignADNodalValue(const DualReal &value, const unsigned int &component)
Helper methods for assigning nodal values from their corresponding solution values (dof values as the...
MooseArray< DualReal > _ad_dof_values
size_t getMaxVarNDofsPerNode()
Gets the maximum number of dofs used by any one variable on any one node.
Definition: SystemBase.h:420

◆ fetchDoFValues()

template<typename OutputType >
void MooseVariableFE< OutputType >::fetchDoFValues ( )

Definition at line 1921 of file MooseVariableFE.C.

1922 {
1923  bool is_transient = _subproblem.isTransient();
1924 
1925  auto n = _dof_indices.size();
1926  libmesh_assert(n);
1927 
1928  _dof_values.resize(n);
1930 
1931  if (is_transient)
1932  {
1934  {
1937  }
1939  {
1942  }
1944  {
1945  libmesh_assert(_sys.solutionUDot());
1948  }
1950  {
1951  libmesh_assert(_sys.solutionUDotDot());
1954  }
1956  {
1957  libmesh_assert(_sys.solutionUDotOld());
1960  }
1962  {
1963  libmesh_assert(_sys.solutionUDotDotOld());
1966  }
1967  }
1968 
1971  {
1974  }
1975 
1977  {
1978  auto & active_coupleable_vector_tags =
1980  for (auto tag : active_coupleable_vector_tags)
1981  if (_need_vector_tag_u[tag] || _need_vector_tag_dof_u[tag])
1982  if (_sys.hasVector(tag) && _sys.getVector(tag).closed())
1983  {
1984  auto & vec = _sys.getVector(tag);
1985  _vector_tags_dof_u[tag].resize(n);
1986  vec.get(_dof_indices, &_vector_tags_dof_u[tag][0]);
1987  }
1988  }
1989 
1991  {
1992  auto & active_coupleable_matrix_tags =
1994  for (auto tag : active_coupleable_matrix_tags)
1995  {
1996  _matrix_tags_dof_u[tag].resize(n);
1997  if (_need_matrix_tag_dof_u[tag] || _need_matrix_tag_u[tag])
1998  if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag) && _sys.getMatrix(tag).closed())
1999  {
2000  auto & mat = _sys.getMatrix(tag);
2001  for (unsigned i = 0; i < _dof_indices.size(); i++)
2002  {
2003  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2004  _matrix_tags_dof_u[tag][i] = mat(_dof_indices[i], _dof_indices[i]);
2005  }
2006  }
2007  }
2008  }
2009 
2011  {
2013  for (decltype(n) i = 0; i < n; ++i)
2014  _dof_du_dot_du[i] = _sys.duDotDu();
2015  }
2017  {
2019  for (decltype(n) i = 0; i < n; ++i)
2021  }
2022 }
std::vector< bool > _need_vector_tag_dof_u
MooseArray< Real > _dof_values_old
virtual NumericVector< Number > * solutionUDot()=0
std::vector< bool > _need_matrix_tag_dof_u
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
virtual NumericVector< Number > & solutionOld()=0
MooseArray< Real > _dof_values_older
MooseArray< Real > _dof_du_dotdot_du
nodal values of derivative of u_dotdot wrt u
MooseArray< Real > _dof_values_previous_nl
virtual NumericVector< Number > * solutionUDotDotOld()=0
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
MooseArray< Real > _dof_values_dotdot_old
nodal values of u_dotdot_old
MooseArray< Real > _dof_values_dot
nodal values of u_dot
THREAD_ID _tid
Thread ID.
virtual NumericVector< Number > * solutionPreviousNewton()=0
std::vector< dof_id_type > _dof_indices
DOF indices.
std::vector< bool > _need_vector_tag_u
virtual Number & duDotDu()
Definition: SystemBase.h:158
std::set< TagID > & getActiveFEVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:193
virtual Number & duDotDotDu()
Definition: SystemBase.h:159
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
virtual bool isTransient() const =0
virtual SubProblem & subproblem()
Definition: SystemBase.h:105
virtual bool matrixTagActive(TagID tag)
If or not a matrix tag is active.
Definition: SystemBase.C:879
std::vector< MooseArray< Real > > _vector_tags_dof_u
MooseArray< Real > _dof_values_dot_old
nodal values of u_dot_old
bool safeAccessTaggedMatrices()
Is it safe to access the tagged matrices.
Definition: SubProblem.h:524
std::vector< bool > _need_matrix_tag_u
PetscInt n
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:787
MooseArray< Real > _dof_values
MooseArray< Real > _dof_du_dot_du
nodal values of derivative of u_dot wrt u
virtual NumericVector< Number > & solutionOlder()=0
std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:187
std::vector< MooseArray< Real > > _matrix_tags_dof_u
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
bool safeAccessTaggedVectors()
Is it safe to access the tagged vectors.
Definition: SubProblem.h:527
bool _need_dof_values_previous_nl
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:735
MooseArray< Real > _dof_values_dotdot
nodal values of u_dotdot
bool _need_dof_values_dotdot_old
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ fetchDoFValuesNeighbor()

template<typename OutputType >
void MooseVariableFE< OutputType >::fetchDoFValuesNeighbor ( )

Definition at line 2153 of file MooseVariableFE.C.

2154 {
2155  bool is_transient = _subproblem.isTransient();
2156 
2157  auto n = _dof_indices_neighbor.size();
2158  libmesh_assert(n);
2159 
2162 
2165  {
2168  }
2169 
2170  if (is_transient)
2171  {
2174  {
2177  }
2180  {
2183  }
2185  {
2187  libmesh_assert(_sys.solutionUDot());
2188  for (unsigned int i = 0; i < n; i++)
2190  }
2192  {
2194  libmesh_assert(_sys.solutionUDotDot());
2195  for (unsigned int i = 0; i < n; i++)
2197  }
2199  {
2201  libmesh_assert(_sys.solutionUDotOld());
2202  for (unsigned int i = 0; i < n; i++)
2204  }
2206  {
2208  libmesh_assert(_sys.solutionUDotDotOld());
2209  for (unsigned int i = 0; i < n; i++)
2211  }
2212  }
2214  {
2216  for (decltype(n) i = 0; i < n; ++i)
2218  }
2220  {
2222  for (decltype(n) i = 0; i < n; ++i)
2224  }
2225 }
virtual NumericVector< Number > * solutionUDot()=0
bool _need_second_old_neighbor
MooseArray< Real > _dof_du_dot_du_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
bool _need_dof_values_dotdot_neighbor
MooseArray< Real > _dof_values_older_neighbor
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
virtual NumericVector< Number > & solutionOld()=0
bool _need_dof_values_previous_nl_neighbor
MooseArray< Real > _dof_du_dotdot_du_neighbor
bool _need_dof_values_dot_neighbor
bool _need_second_previous_nl_neighbor
bool _need_u_previous_nl_neighbor
virtual NumericVector< Number > * solutionUDotDotOld()=0
MooseArray< Real > _dof_values_previous_nl_neighbor
MooseArray< Real > _dof_values_dotdot_old_neighbor
virtual NumericVector< Number > * solutionPreviousNewton()=0
bool _need_grad_older_neighbor
bool _need_dof_du_dot_du_neighbor
virtual Number & duDotDu()
Definition: SystemBase.h:158
bool _need_grad_neighbor_dotdot
virtual Number & duDotDotDu()
Definition: SystemBase.h:159
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
bool _need_du_dotdot_du_neighbor
virtual bool isTransient() const =0
bool _need_grad_previous_nl_neighbor
MooseArray< Real > _dof_values_old_neighbor
MooseArray< Real > _dof_values_dot_old_neighbor
bool _need_dof_values_dotdot_old_neighbor
MooseArray< Real > _dof_values_dot_neighbor
MooseArray< Real > _dof_values_dotdot_neighbor
bool _need_u_dotdot_old_neighbor
bool _need_dof_values_older_neighbor
PetscInt n
virtual NumericVector< Number > & solutionOlder()=0
bool _need_dof_du_dotdot_du_neighbor
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
bool _need_dof_values_dot_old_neighbor
bool _need_second_older_neighbor
bool _need_dof_values_old_neighbor
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ feType()

const FEType& MooseVariableBase::feType ( ) const
inlineinherited

◆ getDofIndices()

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

Implements MooseVariableFEBase.

Definition at line 476 of file MooseVariableFE.C.

478 {
479  _dof_map.dof_indices(elem, dof_indices, _var_num);
480 }