www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
MooseVariableConstMonomial Class Reference

#include <MooseVariableConstMonomial.h>

Inheritance diagram for MooseVariableConstMonomial:
[legend]

Public Member Functions

 MooseVariableConstMonomial (unsigned int var_num, const FEType &fe_type, SystemBase &sys, Assembly &assembly, Moose::VarKindType var_kind, THREAD_ID tid)
 
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...
 
virtual void computeMonomialValuesHelper (const unsigned &nqp, const Real &phi)
 
virtual void computeMonomialNeighborValuesHelper (const unsigned &nqp, const Real &phi)
 
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 ()
 
const VariableTestGradientType< Real, compute_stage >::typeadGradPhi ()
 
const VariableTestGradientType< Real, 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 FieldVariableValuecurlSln ()
 
const FieldVariableValuecurlSlnOld ()
 
const FieldVariableValuecurlSlnOlder ()
 
const VariableValueType< Real, compute_stage >::typeadSln ()
 
const VariableGradientType< Real, compute_stage >::typeadGradSln ()
 
const VariableSecondType< Real, compute_stage >::typeadSecondSln ()
 
const VariableValueType< Real, compute_stage >::typeadUDot ()
 
const VariableValueType< Real, compute_stage >::typeadSlnNeighbor ()
 
const VariableGradientType< Real, compute_stage >::typeadGradSlnNeighbor ()
 
const VariableSecondType< Real, compute_stage >::typeadSecondSlnNeighbor ()
 
const FieldVariableValueuDot ()
 
const FieldVariableValueuDotDot ()
 
const FieldVariableValueuDotOld ()
 
const FieldVariableValueuDotDotOld ()
 
const VariableValueduDotDu ()
 
const VariableValueduDotDotDu ()
 
const VariableValueType< Real, 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< Real, 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...
 
void setNodalValue (Real 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)
 
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...
 
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...
 
Real getValue (const Elem *elem, const std::vector< std::vector< Real >> &phi) const
 Compute the variable value at a point on an element. More...
 
OutputTools< Real >::OutputGradient getGradient (const Elem *elem, const std::vector< std::vector< typename OutputTools< Real >::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 Real & nodalValue ()
 Methods for retrieving values of variables at the nodes. More...
 
const Real & nodalValueOld ()
 
const Real & nodalValueOlder ()
 
const Real & nodalValuePreviousNL ()
 
const Real & nodalValueDot ()
 
const Real & nodalValueDotDot ()
 
const Real & nodalValueDotOld ()
 
const Real & nodalValueDotDotOld ()
 
const Real & nodalValueDuDotDu ()
 
const Real & nodalValueDuDotDotDu ()
 
const Real & nodalValueNeighbor ()
 
const Real & nodalValueOldNeighbor ()
 
const Real & nodalValueOlderNeighbor ()
 
const Real & nodalValuePreviousNLNeighbor ()
 
const Real & nodalValueDotNeighbor ()
 
const Real & nodalValueDotDotNeighbor ()
 
const Real & nodalValueDotOldNeighbor ()
 
const Real & nodalValueDotDotOldNeighbor ()
 
const Real & nodalValueDuDotDuNeighbor ()
 
const Real & nodalValueDuDotDotDuNeighbor ()
 
const MooseArray< Real > & nodalVectorTagValue (TagID tag)
 
const MooseArray< Real > & nodalMatrixTagValue (TagID tag)
 
const Moose::ValueType< Real, 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< Real, 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 assignNodalValue (const Real &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 assignADNodalValue (const DualReal &value, const unsigned int &component)
 
void assignNodalValueOld (const Real &value, const unsigned int &component)
 
void assignNodalValueOlder (const Real &value, const unsigned int &component)
 
void assignNodalValuePreviousNL (const Real &value, const unsigned int &component)
 
void assignNodalValueDot (const Real &value, const unsigned int &component)
 
void assignNodalValueDotOld (const Real &value, const unsigned int &component)
 
void assignNodalValueDotDot (const Real &value, const unsigned int &component)
 
void assignNodalValueDotDotOld (const Real &value, const unsigned int &component)
 
void assignNeighborNodalValue (const Real &value, const unsigned int &component)
 
void assignNeighborNodalValueOld (const Real &value, const unsigned int &component)
 
void assignNeighborNodalValueOlder (const Real &value, const unsigned int &component)
 
void assignNeighborNodalValuePreviousNL (const Real &value, const unsigned int &component)
 
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 ()
 
const std::vector< dof_id_type > & dofIndices () const
 
unsigned int numberOfDofs ()
 

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_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_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...
 
Real _nodal_value
 Nodal values. More...
 
Real _nodal_value_old
 
Real _nodal_value_older
 
Real _nodal_value_previous_nl
 
Real _neighbor_nodal_value
 
Real _neighbor_nodal_value_old
 
Real _neighbor_nodal_value_older
 
Real _neighbor_nodal_value_previous_nl
 
Real _nodal_value_dot
 nodal values of u_dot More...
 
Real _nodal_value_dotdot
 nodal values of u_dotdot More...
 
Real _nodal_value_dot_old
 nodal values of u_dot_old More...
 
Real _nodal_value_dotdot_old
 nodal values of u_dotdot_old More...
 
Moose::ValueType< Real, 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...
 

Detailed Description

Definition at line 18 of file MooseVariableConstMonomial.h.

Constructor & Destructor Documentation

◆ MooseVariableConstMonomial()

MooseVariableConstMonomial::MooseVariableConstMonomial ( unsigned int  var_num,
const FEType &  fe_type,
SystemBase sys,
Assembly assembly,
Moose::VarKindType  var_kind,
THREAD_ID  tid 
)

Definition at line 17 of file MooseVariableConstMonomial.C.

23  : MooseVariable(var_num, fe_type, sys, assembly, var_kind, tid)
24 {
25 }
MooseVariableFE< Real > MooseVariable
Definition: Adaptivity.h:30
SystemBase & sys()
Get the system this variable is part of.

Member Function Documentation

◆ activeOnSubdomain()

bool MooseVariableFE< Real >::activeOnSubdomain ( SubdomainID  subdomain) const
overridevirtualinherited

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 304 of file MooseVariableFE.C.

305 {
306  return _sys.system().variable(_var_num).active_on_subdomain(subdomain);
307 }
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()

const std::set< SubdomainID > & MooseVariableFE< Real >::activeSubdomains ( ) const
overridevirtualinherited

The subdomains the variable is active on.

Implements MooseVariableFEBase.

Definition at line 297 of file MooseVariableFE.C.

298 {
299  return _sys.system().variable(_var_num).active_subdomains();
300 }
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()

void MooseVariableFE< Real >::add ( NumericVector< Number > &  residual)
inherited

Definition at line 569 of file MooseVariableFE.C.

570 {
571  if (_has_dof_values)
572  residual.add_vector(&_dof_values[0], _dof_indices);
573 }
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()

const MooseArray< typename Moose::RealType< compute_stage >::type > & MooseVariableFE< Real >::adDofValues ( )
inherited

Return the AD dof values.

Definition at line 2641 of file MooseVariableFE.C.

2642 {
2643  _need_ad = true;
2644  return _ad_dof_values;
2645 }
MooseArray< DualReal > _ad_dof_values

◆ adGradPhi()

const VariableTestGradientType<Real , compute_stage>::type& MooseVariableFE< Real >::adGradPhi ( )
inlineinherited

Definition at line 185 of file MooseVariableFE.h.

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

◆ adGradPhiFace()

const VariableTestGradientType<Real , compute_stage>::type& MooseVariableFE< Real >::adGradPhiFace ( )
inlineinherited

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()

const VariableGradientType<Real , compute_stage>::type& MooseVariableFE< Real >::adGradSln ( )
inlineinherited

Definition at line 322 of file MooseVariableFE.h.

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

◆ adGradSlnNeighbor()

const VariableGradientType<Real , compute_stage>::type& MooseVariableFE< Real >::adGradSlnNeighbor ( )
inlineinherited

Definition at line 352 of file MooseVariableFE.h.

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

◆ adNodalValue()

const Moose::ValueType< Real , compute_stage >::type & MooseVariableFE< Real >::adNodalValue ( )
inherited

Definition at line 2666 of file MooseVariableFE.C.

2667 {
2668  _need_ad = true;
2669  return _ad_nodal_value;
2670 }
Moose::ValueType< Real, JACOBIAN >::type _ad_nodal_value
AD nodal value.

◆ adSecondSln()

const VariableSecondType<Real , compute_stage>::type& MooseVariableFE< Real >::adSecondSln ( )
inlineinherited

Definition at line 329 of file MooseVariableFE.h.

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()

const VariableSecondType<Real , compute_stage>::type& MooseVariableFE< Real >::adSecondSlnNeighbor ( )
inlineinherited

Definition at line 359 of file MooseVariableFE.h.

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

◆ adSln()

const VariableValueType<Real , compute_stage>::type& MooseVariableFE< Real >::adSln ( )
inlineinherited

Definition at line 315 of file MooseVariableFE.h.

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

◆ adSlnNeighbor()

const VariableValueType<Real , compute_stage>::type& MooseVariableFE< Real >::adSlnNeighbor ( )
inlineinherited

Definition at line 345 of file MooseVariableFE.h.

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

◆ adUDot()

const VariableValueType<Real , compute_stage>::type& MooseVariableFE< Real >::adUDot ( )
inlineinherited

Definition at line 338 of file MooseVariableFE.h.

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

◆ adUDotNeighbor()

const VariableValueType<Real , compute_stage>::type& MooseVariableFE< Real >::adUDotNeighbor ( )
inlineinherited

Definition at line 430 of file MooseVariableFE.h.

431  {
432  _need_neighbor_ad = true;
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:502
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()

void MooseVariableFE< Real >::assignADNodalValue ( const DualReal value,
const unsigned int &  component 
)
inherited

Definition at line 2268 of file MooseVariableFE.C.

2269 {
2270  _ad_nodal_value = value;
2271 }
Moose::ValueType< Real, JACOBIAN >::type _ad_nodal_value
AD nodal value.

◆ assignNeighborNodalValue()

void MooseVariableFE< Real >::assignNeighborNodalValue ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2388 of file MooseVariableFE.C.

2389 {
2390  _neighbor_nodal_value = value;
2391 }

◆ assignNeighborNodalValueOld()

void MooseVariableFE< Real >::assignNeighborNodalValueOld ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2403 of file MooseVariableFE.C.

2404 {
2405  _neighbor_nodal_value_old = value;
2406 }

◆ assignNeighborNodalValueOlder()

void MooseVariableFE< Real >::assignNeighborNodalValueOlder ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2418 of file MooseVariableFE.C.

2419 {
2421 }

◆ assignNeighborNodalValuePreviousNL()

void MooseVariableFE< Real >::assignNeighborNodalValuePreviousNL ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2433 of file MooseVariableFE.C.

2435 {
2437 }

◆ assignNodalValue()

void MooseVariableFE< Real >::assignNodalValue ( const Real &  value,
const unsigned int &  component 
)
inherited

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

Definition at line 2253 of file MooseVariableFE.C.

2254 {
2255  _nodal_value = value;
2256 }
Real _nodal_value
Nodal values.

◆ assignNodalValueDot()

void MooseVariableFE< Real >::assignNodalValueDot ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2328 of file MooseVariableFE.C.

2329 {
2330  _nodal_value_dot = value;
2331 }
Real _nodal_value_dot
nodal values of u_dot

◆ assignNodalValueDotDot()

void MooseVariableFE< Real >::assignNodalValueDotDot ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2358 of file MooseVariableFE.C.

2359 {
2360  _nodal_value_dotdot = value;
2361 }
Real _nodal_value_dotdot
nodal values of u_dotdot

◆ assignNodalValueDotDotOld()

void MooseVariableFE< Real >::assignNodalValueDotDotOld ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2373 of file MooseVariableFE.C.

2374 {
2375  _nodal_value_dotdot_old = value;
2376 }
Real _nodal_value_dotdot_old
nodal values of u_dotdot_old

◆ assignNodalValueDotOld()

void MooseVariableFE< Real >::assignNodalValueDotOld ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2343 of file MooseVariableFE.C.

2344 {
2345  _nodal_value_dot_old = value;
2346 }
Real _nodal_value_dot_old
nodal values of u_dot_old

◆ assignNodalValueOld()

void MooseVariableFE< Real >::assignNodalValueOld ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2283 of file MooseVariableFE.C.

2284 {
2285  _nodal_value_old = value;
2286 }

◆ assignNodalValueOlder()

void MooseVariableFE< Real >::assignNodalValueOlder ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2298 of file MooseVariableFE.C.

2299 {
2300  _nodal_value_older = value;
2301 }

◆ assignNodalValuePreviousNL()

void MooseVariableFE< Real >::assignNodalValuePreviousNL ( const Real &  value,
const unsigned int &  component 
)
inherited

Definition at line 2313 of file MooseVariableFE.C.

2314 {
2315  _nodal_value_previous_nl = value;
2316 }

◆ clearDofIndices()

void MooseVariableFE< Real >::clearDofIndices ( )
overridevirtualinherited

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 311 of file MooseVariableFE.C.

312 {
313  _dof_indices.clear();
314 }
std::vector< dof_id_type > _dof_indices
DOF indices.

◆ computeAD()

void MooseVariableFE< Real >::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< Real , JACOBIAN >::type ad_grad_phi 
)
inherited

Definition at line 1324 of file MooseVariableFE.C.

1332 {
1333  _ad_dof_values.resize(num_dofs);
1334  if (_need_ad_u)
1335  _ad_u.resize(nqp);
1336 
1337  if (_need_ad_grad_u)
1338  _ad_grad_u.resize(nqp);
1339 
1340  if (_need_ad_second_u)
1341  _ad_second_u.resize(nqp);
1342 
1343  if (is_transient)
1344  {
1345  _ad_dofs_dot.resize(num_dofs);
1346  _ad_u_dot.resize(nqp);
1347  }
1348 
1349  // Derivatives are offset by the variable number
1350  size_t ad_offset = _var_num * _sys.getMaxVarNDofsPerElem();
1351 
1352  // Hopefully this problem can go away at some point
1353  if (ad_offset + num_dofs > AD_MAX_DOFS_PER_ELEM)
1354  mooseError("Current number of dofs per element is greater than AD_MAX_DOFS_PER_ELEM of ",
1355  AD_MAX_DOFS_PER_ELEM);
1356 
1357  for (unsigned int qp = 0; qp < nqp; qp++)
1358  {
1359  if (_need_ad_u)
1360  _ad_u[qp] = _ad_zero;
1361 
1362  if (_need_ad_grad_u)
1363  _ad_grad_u[qp] = _ad_zero;
1364 
1365  if (_need_ad_second_u)
1366  _ad_second_u[qp] = _ad_zero;
1367 
1368  if (is_transient)
1369  _ad_u_dot[qp] = _ad_zero;
1370  }
1371 
1372  for (unsigned int i = 0; i < num_dofs; i++)
1373  {
1375 
1376  // NOTE! You have to do this AFTER setting the value!
1378  _ad_dof_values[i].derivatives()[ad_offset + i] = 1.0;
1379 
1380  if (is_transient && _time_integrator)
1381  {
1382  _ad_dofs_dot[i] = _ad_dof_values[i];
1384  }
1385  }
1386 
1387  // Now build up the solution at each quadrature point:
1388  for (unsigned int i = 0; i < num_dofs; i++)
1389  {
1390  for (unsigned int qp = 0; qp < nqp; qp++)
1391  {
1392  if (_need_ad_u)
1393  _ad_u[qp] += _ad_dof_values[i] * phi[i][qp];
1394 
1395  if (_need_ad_grad_u)
1396  {
1397  if (_displaced)
1398  _ad_grad_u[qp] += _ad_dof_values[i] * ad_grad_phi[i][qp];
1399  else
1400  _ad_grad_u[qp] += _ad_dof_values[i] * grad_phi[i][qp];
1401  }
1402 
1403  if (_need_ad_second_u)
1404  _ad_second_u[qp] += _ad_dof_values[i] * (*second_phi)[i][qp];
1405 
1406  if (is_transient)
1407  _ad_u_dot[qp] += phi[i][qp] * _ad_dofs_dot[i];
1408  }
1409  }
1410 }
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(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:205
VariableSecondType< OutputShape, JACOBIAN >::type _ad_second_u
VariableGradientType< OutputShape, JACOBIAN >::type _ad_grad_u
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()

void MooseVariableFE< Real >::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 
)
inherited

Definition at line 1414 of file MooseVariableFE.C.

1421 {
1422  _neighbor_ad_dof_values.resize(num_dofs);
1423  if (_need_neighbor_ad_u)
1424  _neighbor_ad_u.resize(nqp);
1425 
1427  _neighbor_ad_grad_u.resize(nqp);
1428 
1430  _neighbor_ad_second_u.resize(nqp);
1431 
1432  // Derivatives are offset by the variable number
1433  size_t ad_offset = _var_num * _sys.getMaxVarNDofsPerElem();
1434 
1435  // Hopefully this problem can go away at some point
1436  if (ad_offset + num_dofs > AD_MAX_DOFS_PER_ELEM)
1437  mooseError("Current number of dofs per element is greater than AD_MAX_DOFS_PER_ELEM of ",
1438  AD_MAX_DOFS_PER_ELEM);
1439 
1440  for (unsigned int qp = 0; qp < nqp; qp++)
1441  {
1442  if (_need_neighbor_ad_u)
1443  _neighbor_ad_u[qp] = _ad_zero;
1444 
1447 
1450 
1451  if (is_transient)
1452  {
1455  }
1456  }
1457 
1458  for (unsigned int i = 0; i < num_dofs; i++)
1459  {
1461 
1462  // NOTE! You have to do this AFTER setting the value!
1464  _neighbor_ad_dof_values[i].derivatives()[ad_offset + i] = 1.0;
1465 
1466  if (is_transient && _time_integrator)
1467  {
1471  }
1472  }
1473 
1474  // Now build up the solution at each quadrature point:
1475  for (unsigned int i = 0; i < num_dofs; i++)
1476  {
1477  for (unsigned int qp = 0; qp < nqp; qp++)
1478  {
1479  if (_need_neighbor_ad_u)
1480  _neighbor_ad_u[qp] += _neighbor_ad_dof_values[i] * phi[i][qp];
1481 
1483  _neighbor_ad_grad_u[qp] += _neighbor_ad_dof_values[i] * grad_phi[i][qp];
1484 
1486  _neighbor_ad_second_u[qp] += _neighbor_ad_dof_values[i] * (*second_phi)[i][qp];
1487 
1488  if (is_transient)
1489  _neighbor_ad_u_dot[qp] += phi[i][qp] * _neighbor_ad_dofs_dot[i];
1490  }
1491  }
1492 }
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
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(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:205
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
unsigned int _var_num
variable number (from libMesh)
MooseArray< DualReal > _neighbor_ad_dofs_dot
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u_dot
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeElemValues()

void MooseVariableConstMonomial::computeElemValues ( )
overridevirtual

Compute values at interior quadrature points.

Reimplemented from MooseVariableFE< Real >.

Definition at line 411 of file MooseVariableConstMonomial.C.

412 {
413  if (_dof_indices.size() == 0)
414  return;
415 
416  computeMonomialValuesHelper(_qrule->n_points(), _phi[0][0]);
417 }
const FieldVariablePhiValue & _phi
std::vector< dof_id_type > _dof_indices
DOF indices.
QBase *& _qrule
Quadrature rule for interior.
virtual void computeMonomialValuesHelper(const unsigned &nqp, const Real &phi)

◆ computeElemValuesFace()

void MooseVariableConstMonomial::computeElemValuesFace ( )
overridevirtual

Compute values at facial quadrature points.

Reimplemented from MooseVariableFE< Real >.

Definition at line 420 of file MooseVariableConstMonomial.C.

421 {
422  if (_dof_indices.size() == 0)
423  return;
424 
426 }
std::vector< dof_id_type > _dof_indices
DOF indices.
const FieldVariablePhiValue & _phi_face
QBase *& _qrule_face
Quadrature rule for the face.
virtual void computeMonomialValuesHelper(const unsigned &nqp, const Real &phi)

◆ computeIncrementAtNode()

void MooseVariableFE< Real >::computeIncrementAtNode ( const NumericVector< Number > &  increment_vec)
inherited

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

Definition at line 858 of file MooseVariableFE.C.

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

◆ computeIncrementAtQps()

void MooseVariableFE< Real >::computeIncrementAtQps ( const NumericVector< Number > &  increment_vec)
inherited

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

Definition at line 841 of file MooseVariableFE.C.

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

◆ computeMonomialNeighborValuesHelper()

void MooseVariableConstMonomial::computeMonomialNeighborValuesHelper ( const unsigned &  nqp,
const Real &  phi 
)
virtual

Definition at line 229 of file MooseVariableConstMonomial.C.

Referenced by computeNeighborValues(), and computeNeighborValuesFace().

231 {
232  bool is_transient = _subproblem.isTransient();
233 
234  _u_neighbor.resize(nqp);
236 
239 
240  if (is_transient)
241  {
243  _u_dot_neighbor.resize(nqp);
244 
247 
250 
253 
256 
259 
261  _u_old_neighbor.resize(nqp);
262 
265 
268 
271 
274 
277  }
278 
281  if (is_transient)
282  {
295  }
296 
297  const dof_id_type & idx = _dof_indices_neighbor[0];
298  const Real & soln = (*_sys.currentSolution())(idx);
299  Real soln_old = 0;
300  Real soln_older = 0;
301  Real u_dot = 0;
302  Real u_dotdot = 0;
303  Real u_dot_old = 0;
304  Real u_dotdot_old = 0;
305  const Real & du_dot_du = _sys.duDotDu();
306  const Real & du_dotdot_du = _sys.duDotDotDu();
307 
309  _dof_values_neighbor[0] = soln;
310 
311  if (is_transient)
312  {
315  soln_old = _sys.solutionOld()(idx);
316 
319  soln_older = _sys.solutionOlder()(idx);
320 
322  _dof_values_old_neighbor[0] = soln_old;
324  _dof_values_older_neighbor[0] = soln_older;
325 
326  if (_sys.solutionUDot())
327  u_dot = (*_sys.solutionUDot())(idx);
328  if (_sys.solutionUDotDot())
329  u_dotdot = (*_sys.solutionUDotDot())(idx);
330  if (_sys.solutionUDotOld())
331  u_dot_old = (*_sys.solutionUDotOld())(idx);
332  if (_sys.solutionUDotDotOld())
333  u_dotdot_old = (*_sys.solutionUDotDotOld())(idx);
334 
336  _dof_values_dot_neighbor[0] = u_dot;
337 
339  _dof_values_dotdot_neighbor[0] = u_dotdot;
340 
342  _dof_values_dot_old_neighbor[0] = u_dot_old;
343 
345  _dof_values_dotdot_old_neighbor[0] = u_dotdot_old;
346  }
347 
348  _u_neighbor[0] = phi * soln;
349 
350  if (is_transient)
351  {
353  _u_dot_neighbor[0] = phi * u_dot;
354 
356  _u_dotdot_neighbor[0] = phi * u_dotdot;
357 
359  _u_dot_old_neighbor[0] = phi * u_dot_old;
360 
362  _u_dotdot_old_neighbor[0] = phi * u_dotdot_old;
363 
365  _du_dot_du_neighbor[0] = du_dot_du;
366 
368  _du_dotdot_du_neighbor[0] = du_dotdot_du;
369 
371  _u_old_neighbor[0] = phi * soln_old;
372 
374  _u_older_neighbor[0] = phi * soln_older;
375  }
376 
377  for (unsigned qp = 1; qp < nqp; ++qp)
378  {
379  _u_neighbor[qp] = _u_neighbor[0];
380 
381  if (is_transient)
382  {
385 
388 
391 
394 
397 
400 
403 
406  }
407  }
408 }
FieldVariableValue _u_old_neighbor
virtual NumericVector< Number > * solutionUDot()=0
FieldVariableGradient _grad_u_older_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
FieldVariableValue _u_dot_neighbor
MooseArray< Real > _dof_values_older_neighbor
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:205
virtual NumericVector< Number > & solutionOld()=0
virtual NumericVector< Number > * solutionUDotDotOld()=0
FieldVariableValue _u_neighbor
VariableValue _du_dot_du_neighbor
MooseArray< Real > _dof_values_dotdot_old_neighbor
const FieldVariablePhiValue & phi()
virtual Number & duDotDu()
Definition: SystemBase.h:158
virtual Number & duDotDotDu()
Definition: SystemBase.h:159
FieldVariableGradient _grad_u_neighbor
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
FieldVariableValue _u_dot_old_neighbor
virtual bool isTransient() const =0
FieldVariableSecond _second_u_neighbor
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
FieldVariableSecond _second_u_old_neighbor
VariableValue _du_dotdot_du_neighbor
virtual NumericVector< Number > & solutionOlder()=0
FieldVariableValue _u_dotdot_neighbor
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
FieldVariableValue _u_older_neighbor
FieldVariableGradient _grad_u_old_neighbor
FieldVariableSecond _second_u_older_neighbor
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeMonomialValuesHelper()

void MooseVariableConstMonomial::computeMonomialValuesHelper ( const unsigned &  nqp,
const Real &  phi 
)
virtual

Definition at line 28 of file MooseVariableConstMonomial.C.

Referenced by computeElemValues(), and computeElemValuesFace().

29 {
30  bool is_transient = _subproblem.isTransient();
31 
32  _u.resize(nqp);
33  _grad_u.resize(nqp);
34 
35  if (_need_second)
36  _second_u.resize(nqp);
37 
40 
43 
46 
47  if (is_transient)
48  {
49  if (_need_u_dot)
50  _u_dot.resize(nqp);
51 
52  if (_need_u_dotdot)
53  _u_dotdot.resize(nqp);
54 
55  if (_need_u_dot_old)
56  _u_dot_old.resize(nqp);
57 
59  _u_dotdot_old.resize(nqp);
60 
61  if (_need_du_dot_du)
62  _du_dot_du.resize(nqp);
63 
65  _du_dotdot_du.resize(nqp);
66 
67  if (_need_u_old)
68  _u_old.resize(nqp);
69 
70  if (_need_u_older)
71  _u_older.resize(nqp);
72 
73  if (_need_grad_old)
74  _grad_u_old.resize(nqp);
75 
76  if (_need_grad_older)
77  _grad_u_older.resize(nqp);
78 
79  if (_need_second_old)
80  _second_u_old.resize(nqp);
81 
84  }
85 
86  if (_need_dof_values)
88 
91 
92  if (is_transient)
93  {
106  }
107 
108  const dof_id_type & idx = _dof_indices[0];
109  const Real & soln = (*_sys.currentSolution())(idx);
110  Real soln_old = 0;
111  Real soln_older = 0;
112  Real soln_previous_nl = 0;
113  Real u_dot = 0;
114  Real u_dotdot = 0;
115  Real u_dot_old = 0;
116  Real u_dotdot_old = 0;
117  const Real & du_dot_du = _sys.duDotDu();
118  const Real & du_dotdot_du = _sys.duDotDotDu();
119 
120  if (_need_dof_values)
121  _dof_values[0] = soln;
122 
125  soln_previous_nl = (*_sys.solutionPreviousNewton())(idx);
126 
128  _dof_values_previous_nl[0] = soln_previous_nl;
129 
130  if (is_transient)
131  {
133  soln_old = _sys.solutionOld()(idx);
134 
136  soln_older = _sys.solutionOlder()(idx);
137 
139  _dof_values_old[0] = soln_old;
140 
142  _dof_values_older[0] = soln_older;
143 
144  if (_sys.solutionUDot())
145  u_dot = (*_sys.solutionUDot())(idx);
146  if (_sys.solutionUDotDot())
147  u_dotdot = (*_sys.solutionUDotDot())(idx);
148  if (_sys.solutionUDotOld())
149  u_dot_old = (*_sys.solutionUDotOld())(idx);
150  if (_sys.solutionUDotDotOld())
151  u_dotdot_old = (*_sys.solutionUDotDotOld())(idx);
152 
154  _dof_values_dot[0] = u_dot;
155 
157  _dof_values_dotdot[0] = u_dotdot;
158  }
159 
160  _u[0] = phi * soln;
161 
163  _u_previous_nl[0] = phi * soln_previous_nl;
164 
165  if (is_transient)
166  {
167  if (_need_u_dot)
168  _u_dot[0] = phi * u_dot;
169 
170  if (_need_u_dotdot)
171  _u_dotdot[0] = phi * u_dotdot;
172 
173  if (_need_u_dot_old)
174  _u_dot_old[0] = phi * u_dot_old;
175 
176  if (_need_u_dotdot_old)
177  _u_dotdot_old[0] = phi * u_dotdot_old;
178 
179  if (_need_du_dot_du)
180  _du_dot_du[0] = du_dot_du;
181 
182  if (_need_du_dotdot_du)
183  _du_dotdot_du[0] = du_dotdot_du;
184 
185  if (_need_u_old)
186  _u_old[0] = phi * soln_old;
187 
188  if (_need_u_older)
189  _u_older[0] = phi * soln_older;
190  }
191 
192  for (unsigned qp = 1; qp < nqp; ++qp)
193  {
194  _u[qp] = _u[0];
195 
198 
199  if (is_transient)
200  {
201  if (_need_u_dot)
202  _u_dot[qp] = _u_dot[0];
203 
204  if (_need_u_dotdot)
205  _u_dotdot[qp] = _u_dotdot[0];
206 
207  if (_need_u_dot_old)
208  _u_dot_old[qp] = _u_dot_old[0];
209 
210  if (_need_u_dotdot_old)
211  _u_dotdot_old[qp] = _u_dotdot_old[0];
212 
213  if (_need_du_dot_du)
214  _du_dot_du[qp] = _du_dot_du[0];
215 
216  if (_need_du_dotdot_du)
217  _du_dotdot_du[qp] = _du_dotdot_du[0];
218 
219  if (_need_u_old)
220  _u_old[qp] = _u_old[0];
221 
222  if (_need_u_older)
223  _u_older[qp] = _u_older[qp];
224  }
225  }
226 }
FieldVariableGradient _grad_u_old
MooseArray< Real > _dof_values_old
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
virtual NumericVector< Number > * solutionUDot()=0
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:205
FieldVariableValue _u
virtual NumericVector< Number > & solutionOld()=0
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
FieldVariableValue _u_dot
u_dot (time derivative)
MooseArray< Real > _dof_values_previous_nl
FieldVariableSecond _second_u
virtual NumericVector< Number > * solutionUDotDotOld()=0
MooseArray< Real > _dof_values_dotdot_old
nodal values of u_dotdot_old
FieldVariableSecond _second_u_old
MooseArray< Real > _dof_values_dot
nodal values of u_dot
virtual NumericVector< Number > * solutionPreviousNewton()=0
std::vector< dof_id_type > _dof_indices
DOF indices.
const FieldVariablePhiValue & phi()
virtual Number & duDotDu()
Definition: SystemBase.h:158
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
FieldVariableGradient _grad_u
FieldVariableSecond _second_u_older
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
MooseArray< Real > _dof_values
virtual NumericVector< Number > & solutionOlder()=0
FieldVariableValue _u_older
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
FieldVariableGradient _grad_u_previous_nl
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
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeNeighborValues()

void MooseVariableConstMonomial::computeNeighborValues ( )
overridevirtual

Compute values at quadrature points for the neighbor.

Reimplemented from MooseVariableFE< Real >.

Definition at line 429 of file MooseVariableConstMonomial.C.

430 {
431  if (_dof_indices_neighbor.size() == 0)
432  return;
433 
435 }
QBase *& _qrule_neighbor
Quadrature rule for the neighbor.
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
virtual void computeMonomialNeighborValuesHelper(const unsigned &nqp, const Real &phi)
const FieldVariablePhiValue & _phi_neighbor

◆ computeNeighborValuesFace()

void MooseVariableConstMonomial::computeNeighborValuesFace ( )
overridevirtual

Compute values at facial quadrature points for the neighbor.

Reimplemented from MooseVariableFE< Real >.

Definition at line 438 of file MooseVariableConstMonomial.C.

439 {
440  if (_dof_indices_neighbor.size() == 0)
441  return;
442 
444 }
QBase *& _qrule_neighbor
Quadrature rule for the neighbor.
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
virtual void computeMonomialNeighborValuesHelper(const unsigned &nqp, const Real &phi)
const FieldVariablePhiValue & _phi_face_neighbor

◆ computeNeighborValuesHelper()

void MooseVariableFE< Real >::computeNeighborValuesHelper ( QBase *&  qrule,
const FieldVariablePhiValue phi,
const FieldVariablePhiGradient grad_phi,
const FieldVariablePhiSecond *&  second_phi 
)
virtualinherited

Helper function for computing values.

Definition at line 1496 of file MooseVariableFE.C.

1500 {
1501  bool is_transient = _subproblem.isTransient();
1502  unsigned int nqp = qrule->n_points();
1503 
1504  _u_neighbor.resize(nqp);
1505  _grad_u_neighbor.resize(nqp);
1506 
1509 
1510  if (is_transient)
1511  {
1513  _u_dot_neighbor.resize(nqp);
1514 
1517 
1520 
1523 
1526 
1529 
1532 
1535 
1537  _u_old_neighbor.resize(nqp);
1538 
1541 
1544 
1547 
1550 
1553  }
1554 
1555  for (unsigned int i = 0; i < nqp; ++i)
1556  {
1557  _u_neighbor[i] = 0;
1558  _grad_u_neighbor[i] = 0;
1559 
1561  _second_u_neighbor[i] = 0;
1562 
1563  if (_need_grad_dot)
1564  _grad_u_neighbor_dot[i] = 0;
1565  if (_need_grad_dotdot)
1566  _grad_u_neighbor_dotdot[i] = 0;
1567 
1568  if (is_transient)
1569  {
1571  _u_dot_neighbor[i] = 0;
1572 
1574  _u_dotdot_neighbor[i] = 0;
1575 
1577  _u_dot_old_neighbor[i] = 0;
1578 
1580  _u_dotdot_old_neighbor[i] = 0;
1581 
1583  _du_dot_du_neighbor[i] = 0;
1584 
1586  _du_dotdot_du_neighbor[i] = 0;
1587 
1589  _u_old_neighbor[i] = 0;
1590 
1592  _u_older_neighbor[i] = 0;
1593 
1595  _grad_u_old_neighbor[i] = 0;
1596 
1598  _grad_u_older_neighbor[i] = 0;
1599 
1601  _second_u_old_neighbor[i] = 0;
1602 
1604  _second_u_older_neighbor[i] = 0;
1605  }
1606  }
1607 
1608  unsigned int num_dofs = _dof_indices_neighbor.size();
1609 
1611  _dof_values_neighbor.resize(num_dofs);
1612  if (is_transient)
1613  {
1615  _dof_values_old_neighbor.resize(num_dofs);
1619  _dof_values_dot_neighbor.resize(num_dofs);
1626  }
1627 
1628  const NumericVector<Real> & current_solution = *_sys.currentSolution();
1629  const NumericVector<Real> & solution_old = _sys.solutionOld();
1630  const NumericVector<Real> & solution_older = _sys.solutionOlder();
1631  const NumericVector<Real> * u_dot = _sys.solutionUDot();
1632  const NumericVector<Real> * u_dotdot = _sys.solutionUDotDot();
1633  const NumericVector<Real> * u_dot_old = _sys.solutionUDotOld();
1634  const NumericVector<Real> * u_dotdot_old = _sys.solutionUDotDotOld();
1635  const Real & du_dot_du = _sys.duDotDu();
1636  const Real & du_dotdot_du = _sys.duDotDotDu();
1637 
1638  dof_id_type idx;
1639  Real soln_local;
1640  Real soln_old_local = 0;
1641  Real soln_older_local = 0;
1642  Real u_dot_local = 0;
1643  Real u_dotdot_local = 0;
1644  Real u_dot_old_local = 0;
1645  Real u_dotdot_old_local = 0;
1646 
1647  OutputType phi_local;
1648  typename OutputTools<OutputType>::OutputGradient dphi_local;
1649  typename OutputTools<OutputType>::OutputSecond d2phi_local;
1650 
1651  for (unsigned int i = 0; i < num_dofs; ++i)
1652  {
1653  idx = _dof_indices_neighbor[i];
1654  soln_local = current_solution(idx);
1655 
1657  _dof_values_neighbor[i] = soln_local;
1658 
1659  if (is_transient)
1660  {
1662  soln_old_local = solution_old(idx);
1663 
1665  soln_older_local = solution_older(idx);
1666 
1668  _dof_values_old_neighbor[i] = soln_old_local;
1670  _dof_values_older_neighbor[i] = soln_older_local;
1671 
1672  if (u_dot)
1673  {
1674  u_dot_local = (*u_dot)(idx);
1676  _dof_values_dot_neighbor[i] = u_dot_local;
1677  }
1678 
1679  if (u_dotdot)
1680  {
1681  u_dotdot_local = (*u_dotdot)(idx);
1683  _dof_values_dotdot_neighbor[i] = u_dotdot_local;
1684  }
1685 
1686  if (u_dot_old)
1687  {
1688  u_dot_old_local = (*u_dot_old)(idx);
1690  _dof_values_dot_old_neighbor[i] = u_dot_old_local;
1691  }
1692 
1693  if (u_dotdot_old)
1694  {
1695  u_dotdot_old_local = (*u_dotdot_old)(idx);
1697  _dof_values_dotdot_old_neighbor[i] = u_dotdot_old_local;
1698  }
1699  }
1700 
1701  for (unsigned int qp = 0; qp < nqp; ++qp)
1702  {
1703  phi_local = phi[i][qp];
1704  dphi_local = grad_phi[i][qp];
1705 
1707  d2phi_local = (*second_phi)[i][qp];
1708 
1709  _u_neighbor[qp] += phi_local * soln_local;
1710  _grad_u_neighbor[qp] += dphi_local * soln_local;
1711 
1713  _second_u_neighbor[qp] += d2phi_local * soln_local;
1714 
1715  if (is_transient)
1716  {
1718  _u_dot_neighbor[qp] += phi_local * u_dot_local;
1719 
1721  _u_dotdot_neighbor[qp] += phi_local * u_dotdot_local;
1722 
1724  _u_dot_old_neighbor[qp] += phi_local * u_dot_old_local;
1725 
1727  _u_dotdot_old_neighbor[qp] += phi_local * u_dotdot_old_local;
1728 
1730  _du_dot_du_neighbor[qp] = du_dot_du;
1731 
1733  _du_dotdot_du_neighbor[qp] = du_dotdot_du;
1734 
1736  _grad_u_neighbor_dot[qp].add_scaled(dphi_local, u_dot_local);
1737 
1739  _grad_u_neighbor_dotdot[qp].add_scaled(dphi_local, u_dotdot_local);
1740 
1742  _u_old_neighbor[qp] += phi_local * soln_old_local;
1743 
1745  _u_older_neighbor[qp] += phi_local * soln_older_local;
1746 
1748  _grad_u_old_neighbor[qp] += dphi_local * soln_old_local;
1749 
1751  _grad_u_older_neighbor[qp] += dphi_local * soln_older_local;
1752 
1754  _second_u_old_neighbor[qp] += d2phi_local * soln_old_local;
1755 
1757  _second_u_older_neighbor[qp] += d2phi_local * soln_older_local;
1758  }
1759  }
1760  }
1761 
1762  // Automatic differentiation
1764  computeADNeighbor(num_dofs, nqp, is_transient, phi, grad_phi, second_phi);
1765 }
FieldVariableValue _u_old_neighbor
virtual NumericVector< Number > * solutionUDot()=0
FieldVariableGradient _grad_u_older_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
FieldVariableValue _u_dot_neighbor
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)
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:139
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:508
MooseArray< Real > _dof_values_older_neighbor
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:205
virtual NumericVector< Number > & solutionOld()=0
FieldVariableGradient _grad_u_neighbor_dot
virtual NumericVector< Number > * solutionUDotDotOld()=0
FieldVariableValue _u_neighbor
VariableValue _du_dot_du_neighbor
MooseArray< Real > _dof_values_dotdot_old_neighbor
const FieldVariablePhiValue & phi()
virtual Number & duDotDu()
Definition: SystemBase.h:158
virtual Number & duDotDotDu()
Definition: SystemBase.h:159
FieldVariableGradient _grad_u_neighbor
SubProblem & _subproblem
Problem this variable is part of.
FieldVariableGradient _grad_u_neighbor_dotdot
SystemBase & _sys
System this variable is part of.
FieldVariableValue _u_dot_old_neighbor
virtual bool isTransient() const =0
FieldVariableSecond _second_u_neighbor
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
FieldVariableSecond _second_u_old_neighbor
VariableValue _du_dotdot_du_neighbor
virtual NumericVector< Number > & solutionOlder()=0
FieldVariableValue _u_dotdot_neighbor
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
FieldVariableValue _u_older_neighbor
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:138
FieldVariableGradient _grad_u_old_neighbor
FieldVariableSecond _second_u_older_neighbor
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeNodalNeighborValues()

void MooseVariableFE< Real >::computeNodalNeighborValues ( )
overridevirtualinherited

Compute nodal values of this variable in the neighbor.

Implements MooseVariableFEBase.

Definition at line 2179 of file MooseVariableFE.C.

2180 {
2182  {
2183  const unsigned int n = _dof_indices_neighbor.size();
2184  mooseAssert(n, "There must be a non-zero number of degrees of freedom");
2187  for (unsigned int i = 0; i < n; ++i)
2189 
2191  {
2195  for (unsigned int i = 0; i < n; ++i)
2197  }
2198  if (_subproblem.isTransient())
2199  {
2204  for (unsigned int i = 0; i < n; ++i)
2205  {
2208  }
2209 
2216  for (unsigned int i = 0; i < n; i++)
2217  {
2218  if (_sys.solutionUDot())
2220  if (_sys.solutionUDotDot())
2222  if (_sys.solutionUDotOld())
2224  if (_sys.solutionUDotDotOld())
2229  }
2230  }
2231  }
2232  else
2233  {
2237  if (_subproblem.isTransient())
2238  {
2247  }
2248  }
2249 }
virtual NumericVector< Number > * solutionUDot()=0
MooseArray< Real > _dof_du_dot_du_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
void assignNeighborNodalValuePreviousNL(const Real &value, const unsigned int &component)
MooseArray< Real > _dof_values_older_neighbor
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:205
virtual NumericVector< Number > & solutionOld()=0
MooseArray< Real > _dof_du_dotdot_du_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
virtual Number & duDotDu()
Definition: SystemBase.h:158
virtual Number & duDotDotDu()
Definition: SystemBase.h:159
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
void assignNeighborNodalValueOld(const Real &value, const unsigned int &component)
virtual bool isTransient() const =0
MooseArray< Real > _dof_values_old_neighbor
MooseArray< Real > _dof_values_dot_old_neighbor
MooseArray< Real > _dof_values_dot_neighbor
MooseArray< Real > _dof_values_dotdot_neighbor
void assignNeighborNodalValueOlder(const Real &value, const unsigned int &component)
PetscInt n
virtual NumericVector< Number > & solutionOlder()=0
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
bool _neighbor_has_dof_indices
If the neighor has dofs.
void assignNeighborNodalValue(const Real &value, const unsigned int &component)
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeNodalValues()

void MooseVariableFE< Real >::computeNodalValues ( )
overridevirtualinherited

Compute nodal values of this variable.

Implements MooseVariableFEBase.

Definition at line 2048 of file MooseVariableFE.C.

2049 {
2050  auto safe_access_tagged_vectors = _sys.subproblem().safeAccessTaggedVectors();
2051  auto safe_access_tagged_matrices = _sys.subproblem().safeAccessTaggedMatrices();
2052  auto & active_coupleable_matrix_tags =
2054  auto & active_coupleable_vector_tags =
2056 
2057  if (_has_dof_indices)
2058  {
2059  auto n = _dof_indices.size();
2060  mooseAssert(n, "There must be a non-zero number of degrees of freedom");
2061  _dof_values.resize(n);
2062 
2064  for (decltype(n) i = 0; i < n; ++i)
2066 
2067  for (auto tag : active_coupleable_vector_tags)
2068  _vector_tags_dof_u[tag].resize(n);
2069 
2070  for (auto tag : active_coupleable_matrix_tags)
2071  _matrix_tags_dof_u[tag].resize(n);
2072 
2073  if (safe_access_tagged_vectors)
2074  {
2075  for (auto tag : active_coupleable_vector_tags)
2076  if (_need_vector_tag_dof_u[tag] && _sys.hasVector(tag) && _sys.getVector(tag).closed())
2077  {
2078  auto & vec = _sys.getVector(tag);
2079  vec.get(_dof_indices, &_vector_tags_dof_u[tag][0]);
2080  }
2081  }
2082 
2083  if (safe_access_tagged_matrices)
2084  {
2085  for (auto tag : active_coupleable_matrix_tags)
2086  if (_need_matrix_tag_dof_u[tag] && _sys.hasMatrix(tag) && _sys.matrixTagActive(tag) &&
2087  _sys.getMatrix(tag).closed())
2088  {
2089  auto & mat = _sys.getMatrix(tag);
2090  for (unsigned i = 0; i < _dof_indices.size(); i++)
2091  {
2092  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2093  _matrix_tags_dof_u[tag][i] = mat(_dof_indices[i], _dof_indices[i]);
2094  }
2095  }
2096  }
2097 
2099  {
2102  for (decltype(n) i = 0; i < n; ++i)
2104  }
2105  if (_subproblem.isTransient())
2106  {
2111  for (decltype(n) i = 0; i < n; ++i)
2112  {
2115  }
2116 
2123 
2124  if (_sys.solutionUDot())
2126  if (_sys.solutionUDotDot())
2128  if (_sys.solutionUDotOld())
2130  if (_sys.solutionUDotDotOld())
2132  _dof_du_dot_du[0] = _sys.duDotDu();
2134 
2135  for (decltype(n) i = 0; i < n; ++i)
2136  {
2141  }
2142  }
2143 
2145  {
2147  auto ad_offset = _var_num * _sys.getMaxVarNDofsPerNode();
2148 
2149  for (decltype(n) i = 0; i < n; ++i)
2150  {
2151  _ad_dof_values[i] = _dof_values[i];
2153  _ad_dof_values[i].derivatives()[ad_offset + i] = 1.;
2155  }
2156  }
2157  }
2158  else
2159  {
2160  _dof_values.resize(0);
2163  if (_subproblem.isTransient())
2164  {
2173  }
2174  }
2175 }
std::vector< bool > _need_vector_tag_dof_u
MooseArray< Real > _dof_values_old
bool _has_dof_indices
If we have dofs.
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
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:508
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:205
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
void assignNodalValueDotDotOld(const Real &value, const unsigned int &component)
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
void assignNodalValue(const Real &value, const unsigned int &component)
Helper methods for assigning nodal values from their corresponding solution values (dof values as the...
MooseArray< Real > _dof_values_dot
nodal values of u_dot
THREAD_ID _tid
Thread ID.
virtual NumericVector< Number > * solutionPreviousNewton()=0
void assignNodalValueOlder(const Real &value, const unsigned int &component)
std::vector< dof_id_type > _dof_indices
DOF indices.
virtual Number & duDotDu()
Definition: SystemBase.h:158
std::set< TagID > & getActiveFEVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:184
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
Moose::VarKindType _var_kind
virtual SubProblem & subproblem()
Definition: SystemBase.h:105
void assignNodalValueDotDot(const Real &value, const unsigned int &component)
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
void assignNodalValueDotOld(const Real &value, const unsigned int &component)
bool safeAccessTaggedMatrices()
Is it safe to access the tagged matrices.
Definition: SubProblem.h:519
PetscInt n
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:787
MooseArray< Real > _dof_values
unsigned int _var_num
variable number (from libMesh)
MooseArray< Real > _dof_du_dot_du
nodal values of derivative of u_dot wrt u
virtual NumericVector< Number > & solutionOlder()=0
void assignADNodalValue(const DualReal &value, const unsigned int &component)
std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:178
std::vector< MooseArray< Real > > _matrix_tags_dof_u
MooseArray< DualReal > _ad_dof_values
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
void assignNodalValueOld(const Real &value, const unsigned int &component)
size_t getMaxVarNDofsPerNode()
Gets the maximum number of dofs used by any one variable on any one node.
Definition: SystemBase.h:420
void assignNodalValueDot(const Real &value, const unsigned int &component)
bool safeAccessTaggedVectors()
Is it safe to access the tagged vectors.
Definition: SubProblem.h:522
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
void assignNodalValuePreviousNL(const Real &value, const unsigned int &component)
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeValuesHelper()

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

Helper function for computing values.

Definition at line 897 of file MooseVariableFE.C.

905 {
906  bool is_transient = _subproblem.isTransient();
907  unsigned int nqp = qrule->n_points();
908  auto safe_access_tagged_vectors = _sys.subproblem().safeAccessTaggedVectors();
909  auto safe_access_tagged_matrices = _sys.subproblem().safeAccessTaggedMatrices();
910  auto & active_coupleable_matrix_tags =
912  auto & active_coupleable_vector_tags =
914 
915  _u.resize(nqp);
916  _grad_u.resize(nqp);
917 
918  for (auto tag : active_coupleable_vector_tags)
919  if (_need_vector_tag_u[tag])
920  _vector_tag_u[tag].resize(nqp);
921 
922  for (auto tag : active_coupleable_matrix_tags)
923  if (_need_matrix_tag_u[tag])
924  _matrix_tag_u[tag].resize(nqp);
925 
926  if (_need_second)
927  _second_u.resize(nqp);
928 
929  if (_need_curl)
930  _curl_u.resize(nqp);
931 
933  _u_previous_nl.resize(nqp);
934 
937 
940 
941  if (is_transient)
942  {
943  if (_need_u_dot)
944  _u_dot.resize(nqp);
945 
946  if (_need_u_dotdot)
947  _u_dotdot.resize(nqp);
948 
949  if (_need_u_dot_old)
950  _u_dot_old.resize(nqp);
951 
952  if (_need_u_dotdot_old)
953  _u_dotdot_old.resize(nqp);
954 
955  if (_need_du_dot_du)
956  _du_dot_du.resize(nqp);
957 
958  if (_need_du_dotdot_du)
959  _du_dotdot_du.resize(nqp);
960 
961  if (_need_grad_dot)
962  _grad_u_dot.resize(nqp);
963 
964  if (_need_grad_dotdot)
965  _grad_u_dotdot.resize(nqp);
966 
967  if (_need_u_old)
968  _u_old.resize(nqp);
969 
970  if (_need_u_older)
971  _u_older.resize(nqp);
972 
973  if (_need_grad_old)
974  _grad_u_old.resize(nqp);
975 
976  if (_need_grad_older)
977  _grad_u_older.resize(nqp);
978 
979  if (_need_second_old)
980  _second_u_old.resize(nqp);
981 
982  if (_need_curl_old)
983  _curl_u_old.resize(nqp);
984 
985  if (_need_second_older)
986  _second_u_older.resize(nqp);
987  }
988 
989  for (unsigned int i = 0; i < nqp; ++i)
990  {
991  _u[i] = 0;
992  _grad_u[i] = 0;
993 
994  for (auto tag : active_coupleable_vector_tags)
995  if (_need_vector_tag_u[tag])
996  _vector_tag_u[tag][i] = 0;
997 
998  for (auto tag : active_coupleable_matrix_tags)
999  if (_need_matrix_tag_u[tag])
1000  _matrix_tag_u[tag][i] = 0;
1001 
1002  if (_need_second)
1003  _second_u[i] = 0;
1004 
1005  if (_need_curl)
1006  _curl_u[i] = 0;
1007 
1008  if (_need_u_previous_nl)
1009  _u_previous_nl[i] = 0;
1010 
1012  _grad_u_previous_nl[i] = 0;
1013 
1015  _second_u_previous_nl[i] = 0;
1016 
1017  if (is_transient)
1018  {
1019  if (_need_u_dot)
1020  _u_dot[i] = 0;
1021 
1022  if (_need_u_dotdot)
1023  _u_dotdot[i] = 0;
1024 
1025  if (_need_u_dot_old)
1026  _u_dot_old[i] = 0;
1027 
1028  if (_need_u_dotdot_old)
1029  _u_dotdot_old[i] = 0;
1030 
1031  if (_need_du_dot_du)
1032  _du_dot_du[i] = 0;
1033 
1034  if (_need_du_dotdot_du)
1035  _du_dotdot_du[i] = 0;
1036 
1037  if (_need_grad_dot)
1038  _grad_u_dot[i] = 0;
1039 
1040  if (_need_grad_dotdot)
1041  _grad_u_dotdot[i] = 0;
1042 
1043  if (_need_u_old)
1044  _u_old[i] = 0;
1045 
1046  if (_need_u_older)
1047  _u_older[i] = 0;
1048 
1049  if (_need_grad_old)
1050  _grad_u_old[i] = 0;
1051 
1052  if (_need_grad_older)
1053  _grad_u_older[i] = 0;
1054 
1055  if (_need_second_old)
1056  _second_u_old[i] = 0;
1057 
1058  if (_need_second_older)
1059  _second_u_older[i] = 0;
1060 
1061  if (_need_curl_old)
1062  _curl_u_old[i] = 0;
1063  }
1064  }
1065 
1066  unsigned int num_dofs = _dof_indices.size();
1067 
1068  if (_need_dof_values)
1069  _dof_values.resize(num_dofs);
1070 
1072  _dof_values_previous_nl.resize(num_dofs);
1073 
1074  if (is_transient)
1075  {
1077  _dof_values_old.resize(num_dofs);
1079  _dof_values_older.resize(num_dofs);
1081  _dof_values_dot.resize(num_dofs);
1083  _dof_values_dotdot.resize(num_dofs);
1085  _dof_values_dot_old.resize(num_dofs);
1087  _dof_values_dotdot_old.resize(num_dofs);
1088  }
1089 
1090  const NumericVector<Real> & current_solution = *_sys.currentSolution();
1091  const NumericVector<Real> & solution_old = _sys.solutionOld();
1092  const NumericVector<Real> & solution_older = _sys.solutionOlder();
1093  const NumericVector<Real> * solution_prev_nl = _sys.solutionPreviousNewton();
1094  const NumericVector<Real> * u_dot = _sys.solutionUDot();
1095  const NumericVector<Real> * u_dotdot = _sys.solutionUDotDot();
1096  const NumericVector<Real> * u_dot_old = _sys.solutionUDotOld();
1097  const NumericVector<Real> * u_dotdot_old = _sys.solutionUDotDotOld();
1098  const Real & du_dot_du = _sys.duDotDu();
1099  const Real & du_dotdot_du = _sys.duDotDotDu();
1100 
1101  dof_id_type idx = 0;
1102  Real soln_local = 0;
1103  Real tag_local_value = 0;
1104  Real soln_old_local = 0;
1105  Real soln_older_local = 0;
1106  Real soln_previous_nl_local = 0;
1107  Real u_dot_local = 0;
1108  Real u_dotdot_local = 0;
1109  Real u_dot_old_local = 0;
1110  Real u_dotdot_old_local = 0;
1111 
1112  const OutputType * phi_local = NULL;
1113  const typename OutputTools<OutputType>::OutputGradient * dphi_qp = NULL;
1114  const typename OutputTools<OutputType>::OutputSecond * d2phi_local = NULL;
1115  const OutputType * curl_phi_local = NULL;
1116 
1117  typename OutputTools<OutputType>::OutputGradient * grad_u_qp = NULL;
1118  typename OutputTools<OutputType>::OutputGradient * grad_u_old_qp = NULL;
1119  typename OutputTools<OutputType>::OutputGradient * grad_u_older_qp = NULL;
1120  typename OutputTools<OutputType>::OutputGradient * grad_u_previous_nl_qp = NULL;
1121 
1122  typename OutputTools<OutputType>::OutputSecond * second_u_qp = NULL;
1123  typename OutputTools<OutputType>::OutputSecond * second_u_old_qp = NULL;
1124  typename OutputTools<OutputType>::OutputSecond * second_u_older_qp = NULL;
1125  typename OutputTools<OutputType>::OutputSecond * second_u_previous_nl_qp = NULL;
1126 
1127  for (unsigned int i = 0; i < num_dofs; i++)
1128  {
1129  idx = _dof_indices[i];
1130  soln_local = current_solution(idx);
1131 
1132  if (_need_dof_values)
1133  _dof_values[i] = soln_local;
1134 
1137  soln_previous_nl_local = (*solution_prev_nl)(idx);
1138 
1140  _dof_values_previous_nl[i] = soln_previous_nl_local;
1141 
1142  if (is_transient)
1143  {
1145  soln_old_local = solution_old(idx);
1146 
1148  soln_older_local = solution_older(idx);
1149 
1151  _dof_values_old[i] = soln_old_local;
1153  _dof_values_older[i] = soln_older_local;
1154 
1155  if (u_dot)
1156  {
1157  u_dot_local = (*u_dot)(idx);
1159  _dof_values_dot[i] = u_dot_local;
1160  }
1161 
1162  if (u_dotdot)
1163  {
1164  u_dotdot_local = (*u_dotdot)(idx);
1166  _dof_values_dotdot[i] = u_dotdot_local;
1167  }
1168 
1169  if (u_dot_old)
1170  {
1171  u_dot_old_local = (*u_dot_old)(idx);
1173  _dof_values_dot_old[i] = u_dot_old_local;
1174  }
1175 
1176  if (u_dotdot_old)
1177  {
1178  u_dotdot_old_local = (*u_dotdot_old)(idx);
1180  _dof_values_dotdot_old[i] = u_dotdot_old_local;
1181  }
1182  }
1183 
1184  for (unsigned int qp = 0; qp < nqp; qp++)
1185  {
1186  phi_local = &phi[i][qp];
1187  dphi_qp = &grad_phi[i][qp];
1188 
1189  grad_u_qp = &_grad_u[qp];
1190 
1192  grad_u_previous_nl_qp = &_grad_u_previous_nl[qp];
1193 
1194  if (is_transient)
1195  {
1196  if (_need_grad_old)
1197  grad_u_old_qp = &_grad_u_old[qp];
1198 
1199  if (_need_grad_older)
1200  grad_u_older_qp = &_grad_u_older[qp];
1201  }
1202 
1204  {
1205  d2phi_local = &(*second_phi)[i][qp];
1206 
1207  if (_need_second)
1208  {
1209  second_u_qp = &_second_u[qp];
1210  second_u_qp->add_scaled(*d2phi_local, soln_local);
1211  }
1212 
1214  {
1215  second_u_previous_nl_qp = &_second_u_previous_nl[qp];
1216  second_u_previous_nl_qp->add_scaled(*d2phi_local, soln_previous_nl_local);
1217  }
1218 
1219  if (is_transient)
1220  {
1221  if (_need_second_old)
1222  second_u_old_qp = &_second_u_old[qp];
1223 
1224  if (_need_second_older)
1225  second_u_older_qp = &_second_u_older[qp];
1226  }
1227  }
1228 
1229  if (_need_curl || _need_curl_old)
1230  {
1231  curl_phi_local = &(*curl_phi)[i][qp];
1232 
1233  if (_need_curl)
1234  _curl_u[qp] += *curl_phi_local * soln_local;
1235 
1236  if (is_transient && _need_curl_old)
1237  _curl_u_old[qp] += *curl_phi_local * soln_old_local;
1238  }
1239 
1240  _u[qp] += *phi_local * soln_local;
1241 
1242  if (safe_access_tagged_vectors)
1243  {
1244  for (auto tag : active_coupleable_vector_tags)
1245  if (_need_vector_tag_u[tag] && _sys.hasVector(tag) && _sys.getVector(tag).closed())
1246  {
1247  tag_local_value = _sys.getVector(tag)(idx);
1248  _vector_tag_u[tag][qp] += *phi_local * tag_local_value;
1249  }
1250  }
1251 
1252  if (safe_access_tagged_matrices)
1253  {
1254  for (auto tag : active_coupleable_matrix_tags)
1255  if (_need_matrix_tag_u[tag] && _sys.hasMatrix(tag) && _sys.getMatrix(tag).closed())
1256  {
1257  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1258  tag_local_value = _sys.getMatrix(tag)(idx, idx);
1259  _matrix_tag_u[tag][qp] += *phi_local * tag_local_value;
1260  }
1261  }
1262 
1263  grad_u_qp->add_scaled(*dphi_qp, soln_local);
1264 
1265  if (_need_u_previous_nl)
1266  _u_previous_nl[qp] += *phi_local * soln_previous_nl_local;
1268  grad_u_previous_nl_qp->add_scaled(*dphi_qp, soln_previous_nl_local);
1269 
1270  if (is_transient)
1271  {
1272  if (_need_u_dot)
1273  _u_dot[qp] += *phi_local * u_dot_local;
1274 
1275  if (_need_u_dotdot)
1276  _u_dotdot[qp] += *phi_local * u_dotdot_local;
1277 
1278  if (_need_u_dot_old)
1279  _u_dot_old[qp] += *phi_local * u_dot_old_local;
1280 
1281  if (_need_u_dotdot_old)
1282  _u_dotdot_old[qp] += *phi_local * u_dotdot_old_local;
1283 
1284  if (_need_du_dot_du)
1285  _du_dot_du[qp] = du_dot_du;
1286 
1287  if (_need_du_dotdot_du)
1288  _du_dotdot_du[qp] = du_dotdot_du;
1289 
1290  if (_need_grad_dot)
1291  _grad_u_dot[qp].add_scaled(*dphi_qp, u_dot_local);
1292 
1293  if (_need_grad_dotdot)
1294  _grad_u_dotdot[qp].add_scaled(*dphi_qp, u_dotdot_local);
1295 
1296  if (_need_u_old)
1297  _u_old[qp] += *phi_local * soln_old_local;
1298 
1299  if (_need_u_older)
1300  _u_older[qp] += *phi_local * soln_older_local;
1301 
1302  if (_need_grad_old)
1303  grad_u_old_qp->add_scaled(*dphi_qp, soln_old_local);
1304 
1305  if (_need_grad_older)
1306  grad_u_older_qp->add_scaled(*dphi_qp, soln_older_local);
1307 
1308  if (_need_second_old)
1309  second_u_old_qp->add_scaled(*d2phi_local, soln_old_local);
1310 
1311  if (_need_second_older)
1312  second_u_older_qp->add_scaled(*d2phi_local, soln_older_local);
1313  }
1314  }
1315  }
1316 
1317  // Automatic differentiation
1319  computeAD(num_dofs, nqp, is_transient, phi, grad_phi, second_phi, ad_grad_phi);
1320 }
FieldVariableGradient _grad_u_old
MooseArray< Real > _dof_values_old
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
virtual NumericVector< Number > * solutionUDot()=0
std::vector< FieldVariableValue > _vector_tag_u
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:139
FieldVariableGradient _grad_u_dot
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:508
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:205
FieldVariableValue _u
virtual NumericVector< Number > & solutionOld()=0
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
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< Real, JACOBIAN >::type &ad_grad_phi)
FieldVariableValue _u_dot
u_dot (time derivative)
MooseArray< Real > _dof_values_previous_nl
FieldVariableSecond _second_u
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
FieldVariableSecond _second_u_old
FieldVariableCurl _curl_u_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
const FieldVariablePhiValue & phi()
virtual Number & duDotDu()
Definition: SystemBase.h:158
std::set< TagID > & getActiveFEVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:184
virtual Number & duDotDotDu()
Definition: SystemBase.h:159
SubProblem & _subproblem
Problem this variable is part of.
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
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
bool safeAccessTaggedMatrices()
Is it safe to access the tagged matrices.
Definition: SubProblem.h:519
std::vector< bool > _need_matrix_tag_u
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:787
MooseArray< Real > _dof_values
virtual NumericVector< Number > & solutionOlder()=0
std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:178
FieldVariableValue _u_older
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
FieldVariableGradient _grad_u_previous_nl
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:138
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
bool safeAccessTaggedVectors()
Is it safe to access the tagged vectors.
Definition: SubProblem.h:522
FieldVariableSecond _second_u_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
FieldVariableValue _u_previous_nl
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computingCurl()

bool MooseVariableFE< Real >::computingCurl ( )
inlineinherited

Whether or not this variable is computing the curl.

Definition at line 133 of file MooseVariableFE.h.

◆ computingSecond()

bool MooseVariableFE< Real >::computingSecond ( )
inlineinherited

Whether or not this variable is computing any second derivatives.

Definition at line 129 of file MooseVariableFE.h.

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

◆ curlPhi()

const MooseVariableFE< Real >::FieldVariablePhiCurl & MooseVariableFE< Real >::curlPhi ( )
inherited

Definition at line 2698 of file MooseVariableFE.C.

2699 {
2700  _curl_phi = &_assembly.feCurlPhi<OutputType>(_fe_type);
2701  return *_curl_phi;
2702 }
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()

const MooseVariableFE< Real >::FieldVariablePhiCurl & MooseVariableFE< Real >::curlPhiFace ( )
inherited

Definition at line 2714 of file MooseVariableFE.C.

2715 {
2717  return *_curl_phi_face;
2718 }
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()

const MooseVariableFE< Real >::FieldVariablePhiCurl & MooseVariableFE< Real >::curlPhiFaceNeighbor ( )
inherited

Definition at line 2746 of file MooseVariableFE.C.

2747 {
2749  return *_curl_phi_face_neighbor;
2750 }
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()

const MooseVariableFE< Real >::FieldVariablePhiCurl & MooseVariableFE< Real >::curlPhiNeighbor ( )
inherited

Definition at line 2730 of file MooseVariableFE.C.

2731 {
2733  return *_curl_phi_neighbor;
2734 }
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()

const FieldVariableValue& MooseVariableFE< Real >::curlSln ( )
inlineinherited

Definition at line 292 of file MooseVariableFE.h.

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

◆ curlSlnNeighbor()

const FieldVariableCurl& MooseVariableFE< Real >::curlSlnNeighbor ( )
inlineinherited

Definition at line 516 of file MooseVariableFE.h.

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

◆ curlSlnOld()

const FieldVariableValue& MooseVariableFE< Real >::curlSlnOld ( )
inlineinherited

Definition at line 299 of file MooseVariableFE.h.

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()

const FieldVariableValue& MooseVariableFE< Real >::curlSlnOlder ( )
inlineinherited

Definition at line 306 of file MooseVariableFE.h.

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()

const FieldVariableCurl& MooseVariableFE< Real >::curlSlnOlderNeighbor ( )
inlineinherited

Definition at line 528 of file MooseVariableFE.h.

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

◆ curlSlnOldNeighbor()

const FieldVariableCurl& MooseVariableFE< Real >::curlSlnOldNeighbor ( )
inlineinherited

Definition at line 522 of file MooseVariableFE.h.

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

◆ currentElem()

const Elem*& MooseVariableFE< Real >::currentElem ( ) const
inlineoverridevirtualinherited

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()

unsigned int& MooseVariableFE< Real >::currentSide ( ) const
inlineinherited

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

Definition at line 94 of file MooseVariableBase.h.

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

◆ dofIndicesNeighbor()

std::vector<dof_id_type>& MooseVariableFE< Real >::dofIndicesNeighbor ( )
inlineoverridevirtualinherited

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.

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()

const MooseArray< Number > & MooseVariableFE< Real >::dofValue ( )
overridevirtualinherited

Deprecated method.

Use dofValues

Implements MooseVariableFEBase.

Definition at line 577 of file MooseVariableFE.C.

578 {
579  mooseDeprecated("Use dofValues instead of dofValue");
580  return dofValues();
581 }
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

◆ dofValues()

const MooseArray< Number > & MooseVariableFE< Real >::dofValues ( )
overridevirtualinherited

Returns dof solution on element.

Implements MooseVariableFEBase.

Definition at line 585 of file MooseVariableFE.C.

586 {
587  _need_dof_values = true;
588  return _dof_values;
589 }
MooseArray< Real > _dof_values

◆ dofValuesDot()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDot ( )
overridevirtualinherited

Returns time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 649 of file MooseVariableFE.C.

650 {
651  if (_sys.solutionUDot())
652  {
653  _need_dof_values_dot = true;
654  return _dof_values_dot;
655  }
656  else
657  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
658  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
659 }
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()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDotDot ( )
overridevirtualinherited

Returns second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 663 of file MooseVariableFE.C.

664 {
665  if (_sys.solutionUDotDot())
666  {
668  return _dof_values_dotdot;
669  }
670  else
671  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
672  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
673  "`u_dotdot`.");
674 }
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()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDotDotNeighbor ( )
overridevirtualinherited

Returns second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 722 of file MooseVariableFE.C.

723 {
724  if (_sys.solutionUDotDot())
725  {
728  }
729  else
730  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
731  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
732  "`u_dotdot`.");
733 }
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()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDotDotOld ( )
overridevirtualinherited

Returns old second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 693 of file MooseVariableFE.C.

694 {
695  if (_sys.solutionUDotDotOld())
696  {
698  return _dof_values_dotdot_old;
699  }
700  else
701  mooseError("MooseVariableFE: Old second time derivative of solution (`u_dotdot_old`) is not "
702  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
703  "requesting `u_dotdot_old`.");
704 }
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.

◆ dofValuesDotDotOldNeighbor()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDotDotOldNeighbor ( )
overridevirtualinherited

Returns old second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 752 of file MooseVariableFE.C.

753 {
754  if (_sys.solutionUDotDotOld())
755  {
758  }
759  else
760  mooseError("MooseVariableFE: Old second time derivative of solution (`u_dotdot_old`) is not "
761  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
762  "requesting `u_dotdot_old`.");
763 }
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.

◆ dofValuesDotNeighbor()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDotNeighbor ( )
overridevirtualinherited

Returns time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 708 of file MooseVariableFE.C.

709 {
710  if (_sys.solutionUDot())
711  {
714  }
715  else
716  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
717  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
718 }
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
SystemBase & _sys
System this variable is part of.
MooseArray< Real > _dof_values_dot_neighbor

◆ dofValuesDotOld()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDotOld ( )
overridevirtualinherited

Returns old time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 678 of file MooseVariableFE.C.

679 {
680  if (_sys.solutionUDotOld())
681  {
683  return _dof_values_dot_old;
684  }
685  else
686  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
687  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
688  "`u_dot_old`.");
689 }
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()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDotOldNeighbor ( )
overridevirtualinherited

Returns old time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 737 of file MooseVariableFE.C.

738 {
739  if (_sys.solutionUDotOld())
740  {
743  }
744  else
745  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
746  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
747  "`u_dot_old`.");
748 }
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

◆ dofValuesDuDotDotDu()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDuDotDotDu ( )
overridevirtualinherited

Returns derivative of second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 775 of file MooseVariableFE.C.

776 {
777  _need_dof_du_dotdot_du = true;
778  return _dof_du_dotdot_du;
779 }
MooseArray< Real > _dof_du_dotdot_du
nodal values of derivative of u_dotdot wrt u

◆ dofValuesDuDotDotDuNeighbor()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDuDotDotDuNeighbor ( )
overridevirtualinherited

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

Implements MooseVariableFEBase.

Definition at line 791 of file MooseVariableFE.C.

792 {
795 }
MooseArray< Real > _dof_du_dotdot_du_neighbor

◆ dofValuesDuDotDu()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDuDotDu ( )
overridevirtualinherited

Returns derivative of time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 767 of file MooseVariableFE.C.

768 {
769  _need_dof_du_dot_du = true;
770  return _dof_du_dot_du;
771 }
MooseArray< Real > _dof_du_dot_du
nodal values of derivative of u_dot wrt u

◆ dofValuesDuDotDuNeighbor()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesDuDotDuNeighbor ( )
overridevirtualinherited

Returns derivative of time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 783 of file MooseVariableFE.C.

784 {
787 }
MooseArray< Real > _dof_du_dot_du_neighbor

◆ dofValuesNeighbor()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesNeighbor ( )
overridevirtualinherited

Returns dof solution on neighbor element.

Implements MooseVariableFEBase.

Definition at line 617 of file MooseVariableFE.C.

618 {
620  return _dof_values_neighbor;
621 }
MooseArray< Real > _dof_values_neighbor

◆ dofValuesOld()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesOld ( )
overridevirtualinherited

Returns old dof solution on element.

Implements MooseVariableFEBase.

Definition at line 593 of file MooseVariableFE.C.

594 {
595  _need_dof_values_old = true;
596  return _dof_values_old;
597 }
MooseArray< Real > _dof_values_old

◆ dofValuesOlder()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesOlder ( )
overridevirtualinherited

Returns older dof solution on element.

Implements MooseVariableFEBase.

Definition at line 601 of file MooseVariableFE.C.

602 {
603  _need_dof_values_older = true;
604  return _dof_values_older;
605 }
MooseArray< Real > _dof_values_older

◆ dofValuesOlderNeighbor()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesOlderNeighbor ( )
overridevirtualinherited

Returns older dof solution on neighbor element.

Implements MooseVariableFEBase.

Definition at line 633 of file MooseVariableFE.C.

634 {
637 }
MooseArray< Real > _dof_values_older_neighbor

◆ dofValuesOldNeighbor()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesOldNeighbor ( )
overridevirtualinherited

Returns old dof solution on neighbor element.

Implements MooseVariableFEBase.

Definition at line 625 of file MooseVariableFE.C.

626 {
629 }
MooseArray< Real > _dof_values_old_neighbor

◆ dofValuesPreviousNL()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesPreviousNL ( )
overridevirtualinherited

Returns previous nl solution on element.

Implements MooseVariableFEBase.

Definition at line 609 of file MooseVariableFE.C.

610 {
613 }
MooseArray< Real > _dof_values_previous_nl

◆ dofValuesPreviousNLNeighbor()

const MooseArray< Number > & MooseVariableFE< Real >::dofValuesPreviousNLNeighbor ( )
overridevirtualinherited

Returns previous nl solution on neighbor element.

Implements MooseVariableFEBase.

Definition at line 641 of file MooseVariableFE.C.

642 {
645 }
MooseArray< Real > _dof_values_previous_nl_neighbor

◆ duDotDotDu()

const VariableValue& MooseVariableFE< Real >::duDotDotDu ( )
inlineinherited

Definition at line 423 of file MooseVariableFE.h.

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

◆ duDotDotDuNeighbor()

const VariableValue& MooseVariableFE< Real >::duDotDotDuNeighbor ( )
inlineinherited

Definition at line 592 of file MooseVariableFE.h.

593  {
595  return _du_dotdot_du_neighbor;
596  }
VariableValue _du_dotdot_du_neighbor

◆ duDotDu()

const VariableValue& MooseVariableFE< Real >::duDotDu ( )
inlineinherited

Definition at line 417 of file MooseVariableFE.h.

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

◆ duDotDuNeighbor()

const VariableValue& MooseVariableFE< Real >::duDotDuNeighbor ( )
inlineinherited

Definition at line 586 of file MooseVariableFE.h.

587  {
589  return _du_dot_du_neighbor;
590  }
VariableValue _du_dot_du_neighbor

◆ feType()

const FEType& MooseVariableBase::feType ( ) const
inlineinherited

◆ getDofIndices()

void MooseVariableFE< Real >::getDofIndices ( const Elem *  elem,
std::vector< dof_id_type > &  dof_indices 
)
overridevirtualinherited

Implements MooseVariableFEBase.

Definition at line 471 of file MooseVariableFE.C.

473 {
474  _dof_map.dof_indices(elem, dof_indices, _var_num);
475 }
const DofMap & _dof_map
DOF map.
unsigned int _var_num
variable number (from libMesh)

◆ getElementalValue()

Number MooseVariableFE< Real >::getElementalValue ( const Elem *  elem,
unsigned int  idx = 0 
) const
overridevirtualinherited

Get the current value of this variable on an element.

Parameters
[in]elemElement at which to get value
[in]idxLocal index of this variable's element DoFs
Returns
Variable value

Implements MooseVariableFEBase.

Definition at line 531 of file MooseVariableFE.C.

532 {
533  std::vector<dof_id_type> dof_indices;
534  _dof_map.dof_indices(elem, dof_indices, _var_num);
535 
536  return (*_sys.currentSolution())(dof_indices[idx]);
537 }
const DofMap & _dof_map
DOF map.
SystemBase & _sys
System this variable is part of.
unsigned int _var_num
variable number (from libMesh)
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ getElementalValueOld()

Number MooseVariableFE< Real >::getElementalValueOld ( const Elem *  elem,
unsigned int  idx = 0 
) const
overridevirtualinherited

Get the old value of this variable on an element.

Parameters
[in]elemElement at which to get value
[in]idxLocal index of this variable's element DoFs
Returns
Variable value

Implements MooseVariableFEBase.

Definition at line 541 of file MooseVariableFE.C.

542 {
543  std::vector<dof_id_type> dof_indices;
544  _dof_map.dof_indices(elem, dof_indices, _var_num);
545 
546  return _sys.solutionOld()(dof_indices[idx]);
547 }
const DofMap & _dof_map
DOF map.
virtual NumericVector< Number > & solutionOld()=0
SystemBase & _sys
System this variable is part of.
unsigned int _var_num
variable number (from libMesh)

◆ getElementalValueOlder()

Number MooseVariableFE< Real >::getElementalValueOlder ( const Elem *  elem,
unsigned int  idx = 0 
) const
overridevirtualinherited

Get the older value of this variable on an element.

Parameters
[in]elemElement at which to get value
[in]idxLocal index of this variable's element DoFs
Returns
Variable value

Implements MooseVariableFEBase.

Definition at line 551 of file MooseVariableFE.C.

552 {
553  std::vector<dof_id_type> dof_indices;
554  _dof_map.dof_indices(elem, dof_indices, _var_num);
555 
556  return _sys.solutionOlder()(dof_indices[idx]);
557 }
const DofMap & _dof_map
DOF map.
SystemBase & _sys
System this variable is part of.
unsigned int _var_num
variable number (from libMesh)
virtual NumericVector< Number > & solutionOlder()=0

◆ getGradient()

OutputTools< Real >::OutputGradient MooseVariableFE< Real >::getGradient ( const Elem *  elem,
const std::vector< std::vector< typename OutputTools< Real >::OutputGradient >> &  grad_phi 
) const
inherited

Compute the variable gradient value at a point on an element.

Parameters
elemThe element we are computing on
phiEvaluated shape functions at a point
Returns
The variable gradient value

Definition at line 1769 of file MooseVariableFE.C.

1773 {
1774  std::vector<dof_id_type> dof_indices;
1775  _dof_map.dof_indices(elem, dof_indices, _var_num);
1776 
1778  if (isNodal())
1779  {
1780  for (unsigned int i = 0; i < dof_indices.size(); ++i)
1781  {
1782  // The zero index is because we only have one point that the phis are evaluated at
1783  value += grad_phi[i][0] * (*_sys.currentSolution())(dof_indices[i]);
1784  }
1785  }
1786  else
1787  {
1788  mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
1789  value = 0.0;
1790  }
1791 
1792  return value;
1793 }
const DofMap & _dof_map
DOF map.
SystemBase & _sys
System this variable is part of.
bool isNodal() const override
unsigned int _var_num
variable number (from libMesh)
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:138
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ getNodalValue()

Number MooseVariableFE< Real >::getNodalValue ( const Node &  node)
overridevirtualinherited

Get the value of this variable at given node.

Implements MooseVariableFEBase.

Definition at line 479 of file MooseVariableFE.C.

480 {
481  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
482 
483  // Make sure that the node has DOFs
484  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
485  * produce a better error (see misc/check_error.node_value_off_block) */
486  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
487  "Node " << node.id() << " does not contain any dofs for the "
488  << _sys.system().variable_name(_var_num) << " variable");
489 
490  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
491 
492  return (*_sys.currentSolution())(dof);
493 }
virtual MooseMesh & mesh()=0
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
virtual System & system()=0
Get the reference to the libMesh system.
virtual unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:894
const Node *& node() const
bool isSemiLocal(Node *node)
Returns true if the node is semi-local.
Definition: MooseMesh.C:601
unsigned int _var_num
variable number (from libMesh)
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ getNodalValueOld()

Number MooseVariableFE< Real >::getNodalValueOld ( const Node &  node)
overridevirtualinherited

Get the old value of this variable at given node.

Implements MooseVariableFEBase.

Definition at line 497 of file MooseVariableFE.C.

498 {
499  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
500 
501  // Make sure that the node has DOFs
502  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
503  * produce a better error (see misc/check_error.node_value_off_block) */
504  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
505  "Node " << node.id() << " does not contain any dofs for the "
506  << _sys.system().variable_name(_var_num) << " variable");
507 
508  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
509  return _sys.solutionOld()(dof);
510 }
virtual MooseMesh & mesh()=0
virtual NumericVector< Number > & solutionOld()=0
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
virtual System & system()=0
Get the reference to the libMesh system.
virtual unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:894
const Node *& node() const
bool isSemiLocal(Node *node)
Returns true if the node is semi-local.
Definition: MooseMesh.C:601
unsigned int _var_num
variable number (from libMesh)

◆ getNodalValueOlder()

Number MooseVariableFE< Real >::getNodalValueOlder ( const Node &  node)
overridevirtualinherited

Get the t-2 value of this variable at given node.

Implements MooseVariableFEBase.

Definition at line 514 of file MooseVariableFE.C.

515 {
516  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
517 
518  // Make sure that the node has DOFs
519  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
520  * produce a better error (see misc/check_error.node_value_off_block) */
521  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
522  "Node " << node.id() << " does not contain any dofs for the "
523  << _sys.system().variable_name(_var_num) << " variable");
524 
525  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
526  return _sys.solutionOlder()(dof);
527 }
virtual MooseMesh & mesh()=0
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
virtual System & system()=0
Get the reference to the libMesh system.
virtual unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:894
const Node *& node() const
bool isSemiLocal(Node *node)
Returns true if the node is semi-local.
Definition: MooseMesh.C:601
unsigned int _var_num
variable number (from libMesh)
virtual NumericVector< Number > & solutionOlder()=0

◆ getValue()

Real MooseVariableFE< Real >::getValue ( const Elem *  elem,
const std::vector< std::vector< Real >> &  phi 
) const
inherited

Compute the variable value at a point on an element.

Parameters
elemThe element we are computing on
phiEvaluated shape functions at a point
Returns
The variable value

Definition at line 871 of file MooseVariableFE.C.

873 {
874  std::vector<dof_id_type> dof_indices;
875  _dof_map.dof_indices(elem, dof_indices, _var_num);
876 
877  OutputType value = 0;
878  if (isNodal())
879  {
880  for (unsigned int i = 0; i < dof_indices.size(); ++i)
881  {
882  // The zero index is because we only have one point that the phis are evaluated at
883  value += phi[i][0] * (*_sys.currentSolution())(dof_indices[i]);
884  }
885  }
886  else
887  {
888  mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
889  value = (*_sys.currentSolution())(dof_indices[0]);
890  }
891 
892  return value;
893 }
const DofMap & _dof_map
DOF map.
const FieldVariablePhiValue & phi()
SystemBase & _sys
System this variable is part of.
bool isNodal() const override
unsigned int _var_num
variable number (from libMesh)
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ gradPhi()

const FieldVariablePhiGradient& MooseVariableFE< Real >::gradPhi ( )
inlineinherited

Definition at line 165 of file MooseVariableFE.h.

165 { return _grad_phi; }
const FieldVariablePhiGradient & _grad_phi

◆ gradPhiFace()

const FieldVariablePhiGradient& MooseVariableFE< Real >::gradPhiFace ( )
inlineinherited

Definition at line 170 of file MooseVariableFE.h.

170 { return _grad_phi_face; }
const FieldVariablePhiGradient & _grad_phi_face

◆ gradPhiFaceNeighbor()

const FieldVariablePhiGradient& MooseVariableFE< Real >::gradPhiFaceNeighbor ( )
inlineinherited

Definition at line 180 of file MooseVariableFE.h.

180 { return _grad_phi_face_neighbor; }
const FieldVariablePhiGradient & _grad_phi_face_neighbor

◆ gradPhiNeighbor()

const FieldVariablePhiGradient& MooseVariableFE< Real >::gradPhiNeighbor ( )
inlineinherited

Definition at line 175 of file MooseVariableFE.h.

175 { return _grad_phi_neighbor; }
const FieldVariablePhiGradient & _grad_phi_neighbor

◆ gradSln()

const FieldVariableGradient& MooseVariableFE< Real >::gradSln ( )
inlineinherited

Definition at line 225 of file MooseVariableFE.h.

225 { return _grad_u; }
FieldVariableGradient _grad_u

◆ gradSlnDot()

const FieldVariableGradient& MooseVariableFE< Real >::gradSlnDot ( )
inlineinherited

Definition at line 241 of file MooseVariableFE.h.

242  {
243  if (_sys.solutionUDot())
244  {
245  _need_grad_dot = true;
246  return _grad_u_dot;
247  }
248  else
249  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
250  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
251  }
virtual NumericVector< Number > * solutionUDot()=0
FieldVariableGradient _grad_u_dot
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.

◆ gradSlnDotDot()

const FieldVariableGradient& MooseVariableFE< Real >::gradSlnDotDot ( )
inlineinherited

Definition at line 252 of file MooseVariableFE.h.

253  {
254  if (_sys.solutionUDotDot())
255  {
256  _need_grad_dotdot = true;
257  return _grad_u_dotdot;
258  }
259  else
260  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
261  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
262  "`u_dotdot`.");
263  }
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.
FieldVariableGradient _grad_u_dotdot
virtual NumericVector< Number > * solutionUDotDot()=0

◆ gradSlnNeighbor()

const FieldVariableGradient& MooseVariableFE< Real >::gradSlnNeighbor (