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 FieldVariableCurlcurlSln ()
 
const FieldVariableCurlcurlSlnOld ()
 
const FieldVariableCurlcurlSlnOlder ()
 
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) override
 
const MooseArray< Number > & dofValue () override
 Deprecated method. More...
 
const MooseArray< Number > & dofValues () override
 Returns dof solution on element. More...
 
const MooseArray< Number > & dofValuesOld () override
 Returns old dof solution on element. More...
 
const MooseArray< Number > & dofValuesOlder () override
 Returns older dof solution on element. More...
 
const MooseArray< Number > & dofValuesPreviousNL () override
 Returns previous nl solution on element. More...
 
const MooseArray< Number > & dofValuesNeighbor () override
 Returns dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesOldNeighbor () override
 Returns old dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesOlderNeighbor () override
 Returns older dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesPreviousNLNeighbor () override
 Returns previous nl solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesDot () override
 Returns time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotNeighbor () override
 Returns time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotOld () override
 Returns old time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotOldNeighbor () override
 Returns old time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDot () override
 Returns second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotNeighbor () override
 Returns second time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotOld () override
 Returns old second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotOldNeighbor () override
 Returns old second time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDu () override
 Returns derivative of time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDuNeighbor () override
 Returns derivative of time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDotDu () override
 Returns derivative of second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDotDuNeighbor () override
 Returns derivative of second time derivative of neighboring degrees of freedom. More...
 
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 > & nodalValueArray ()
 Methods for retrieving values of variables at the nodes in a MooseArray for AuxKernelBase. More...
 
const MooseArray< Real > & nodalValueOldArray ()
 
const MooseArray< Real > & nodalValueOlderArray ()
 
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 assignADNodalValue (const DualReal &value, const unsigned int &component)
 Helper methods for assigning nodal values from their corresponding solution values (dof values as they're referred to here in this class). More...
 
void assignNodalValue ()
 
void fetchDoFValues ()
 
void fetchADDoFValues ()
 
void zeroSizeDofValues ()
 
void assignNodalValueNeighbor ()
 
void fetchDoFValuesNeighbor ()
 
void zeroSizeDofValuesNeighbor ()
 
unsigned int number () const
 Get variable number coming from libMesh. More...
 
const FEType & feType () const
 Get the type of finite element object. More...
 
SystemBasesys ()
 Get the system this variable is part of. More...
 
const std::string & name () const
 Get the variable name. More...
 
const std::vector< dof_id_type > & allDofIndices () const
 Get all global dofindices for the variable. More...
 
unsigned int totalVarDofs ()
 
Moose::VarKindType kind () const
 Kind of the variable (Nonlinear, Auxiliary, ...) More...
 
void scalingFactor (Real factor)
 Set the scaling factor for this variable. More...
 
Real scalingFactor () const
 Get the scaling factor for this variable. More...
 
Order order () const
 Get the order of this variable Note: Order enum can be implicitly converted to unsigned int. More...
 
const DofMap & dofMap () const
 The DofMap associated with the system this variable is in. More...
 
std::vector< dof_id_type > & dofIndices ()
 Get a writable reference of local DoF indices. More...
 
const std::vector< dof_id_type > & dofIndices () const
 Get local DoF indices. More...
 
unsigned int numberOfDofs ()
 Get the number of local DoFs. More...
 

Protected Attributes

const bool _displaced
 Whether this variable is on the displaced system. More...
 
Assembly_assembly
 Our assembly. More...
 
QBase *& _qrule
 Quadrature rule for interior. More...
 
QBase *& _qrule_face
 Quadrature rule for the face. More...
 
QBase *& _qrule_neighbor
 Quadrature rule for the neighbor. More...
 
const Elem *& _elem
 current element More...
 
unsigned int & _current_side
 the side of the current element (valid when doing face assembly) More...
 
const Elem *& _neighbor
 neighboring element More...
 
std::vector< dof_id_type > _dof_indices_neighbor
 DOF indices (neighbor) More...
 
bool _need_u_old
 
bool _need_u_older
 
bool _need_u_previous_nl
 
bool _need_u_dot
 
bool _need_ad_u_dot
 
bool _need_u_dotdot
 
bool _need_u_dot_old
 
bool _need_u_dotdot_old
 
bool _need_du_dot_du
 
bool _need_du_dotdot_du
 
bool _need_grad_old
 
bool _need_grad_older
 
bool _need_grad_previous_nl
 
bool _need_grad_dot
 
bool _need_grad_dotdot
 
bool _need_second
 
bool _need_second_old
 
bool _need_second_older
 
bool _need_second_previous_nl
 
bool _need_curl
 
bool _need_curl_old
 
bool _need_curl_older
 
bool _need_ad
 
bool _need_ad_u
 
bool _need_ad_grad_u
 
bool _need_ad_second_u
 
bool _need_neighbor_ad
 
bool _need_neighbor_ad_u
 
bool _need_neighbor_ad_grad_u
 
bool _need_neighbor_ad_second_u
 
bool _need_u_old_neighbor
 
bool _need_u_older_neighbor
 
bool _need_u_previous_nl_neighbor
 
bool _need_u_dot_neighbor
 
bool _need_neighbor_ad_u_dot
 
bool _need_u_dotdot_neighbor
 
bool _need_u_dot_old_neighbor
 
bool _need_u_dotdot_old_neighbor
 
bool _need_du_dot_du_neighbor
 
bool _need_du_dotdot_du_neighbor
 
bool _need_grad_old_neighbor
 
bool _need_grad_older_neighbor
 
bool _need_grad_previous_nl_neighbor
 
bool _need_grad_neighbor_dot
 
bool _need_grad_neighbor_dotdot
 
bool _need_second_neighbor
 
bool _need_second_old_neighbor
 
bool _need_second_older_neighbor
 
bool _need_second_previous_nl_neighbor
 
bool _need_curl_neighbor
 
bool _need_curl_old_neighbor
 
bool _need_curl_older_neighbor
 
bool _need_dof_values
 
bool _need_dof_values_old
 
bool _need_dof_values_older
 
bool _need_dof_values_previous_nl
 
bool _need_dof_values_dot
 
bool _need_dof_values_dotdot
 
bool _need_dof_values_dot_old
 
bool _need_dof_values_dotdot_old
 
bool _need_dof_du_dot_du
 
bool _need_dof_du_dotdot_du
 
bool _need_dof_values_neighbor
 
bool _need_dof_values_old_neighbor
 
bool _need_dof_values_older_neighbor
 
bool _need_dof_values_previous_nl_neighbor
 
bool _need_dof_values_dot_neighbor
 
bool _need_dof_values_dotdot_neighbor
 
bool _need_dof_values_dot_old_neighbor
 
bool _need_dof_values_dotdot_old_neighbor
 
bool _need_dof_du_dot_du_neighbor
 
bool _need_dof_du_dotdot_du_neighbor
 
std::vector< bool > _need_vector_tag_dof_u
 
std::vector< bool > _need_matrix_tag_dof_u
 
const MooseArray< Point > & _normals
 Normals at QPs on faces. More...
 
bool _is_nodal
 if variable is nodal More...
 
bool _has_dof_indices
 If we have dofs. More...
 
bool _neighbor_has_dof_indices
 If the neighor has dofs. More...
 
bool _has_dof_values
 If true, the dof values get inserted on calling insert() More...
 
bool _has_dof_values_neighbor
 
const Node *& _node
 
const Node *& _node_neighbor
 
dof_id_type _nodal_dof_index
 
dof_id_type _nodal_dof_index_neighbor
 
MooseArray< Real > _dof_values
 
MooseArray< Real > _dof_values_old
 
MooseArray< Real > _dof_values_older
 
MooseArray< Real > _dof_values_previous_nl
 
std::vector< MooseArray< Real > > _vector_tags_dof_u
 
std::vector< MooseArray< Real > > _matrix_tags_dof_u
 
MooseArray< Real > _dof_values_dot
 nodal values of u_dot More...
 
MooseArray< Real > _dof_values_dotdot
 nodal values of u_dotdot More...
 
MooseArray< Real > _dof_values_dot_old
 nodal values of u_dot_old More...
 
MooseArray< Real > _dof_values_dotdot_old
 nodal values of u_dotdot_old More...
 
MooseArray< Real > _dof_du_dot_du
 nodal values of derivative of u_dot wrt u More...
 
MooseArray< Real > _dof_du_dotdot_du
 nodal values of derivative of u_dotdot wrt u More...
 
MooseArray< Real > _dof_values_neighbor
 
MooseArray< Real > _dof_values_old_neighbor
 
MooseArray< Real > _dof_values_older_neighbor
 
MooseArray< Real > _dof_values_previous_nl_neighbor
 
MooseArray< Real > _dof_values_dot_neighbor
 
MooseArray< Real > _dof_values_dotdot_neighbor
 
MooseArray< Real > _dof_values_dot_old_neighbor
 
MooseArray< Real > _dof_values_dotdot_old_neighbor
 
MooseArray< Real > _dof_du_dot_du_neighbor
 
MooseArray< Real > _dof_du_dotdot_du_neighbor
 
const FieldVariablePhiValue_phi
 
const FieldVariablePhiGradient_grad_phi
 
const FieldVariablePhiSecond_second_phi
 
const FieldVariablePhiCurl_curl_phi
 
const FieldVariablePhiValue_phi_face
 
const FieldVariablePhiGradient_grad_phi_face
 
const FieldVariablePhiSecond_second_phi_face
 
const FieldVariablePhiCurl_curl_phi_face
 
const FieldVariablePhiValue_phi_neighbor
 
const FieldVariablePhiGradient_grad_phi_neighbor
 
const FieldVariablePhiSecond_second_phi_neighbor
 
const FieldVariablePhiCurl_curl_phi_neighbor
 
const FieldVariablePhiValue_phi_face_neighbor
 
const FieldVariablePhiGradient_grad_phi_face_neighbor
 
const FieldVariablePhiSecond_second_phi_face_neighbor
 
const FieldVariablePhiCurl_curl_phi_face_neighbor
 
const VariableTestGradientType< OutputShape, JACOBIAN >::type_ad_grad_phi
 
const VariableTestGradientType< OutputShape, JACOBIAN >::type_ad_grad_phi_face
 
std::vector< FieldVariableValue_vector_tag_u
 
std::vector< bool > _need_vector_tag_u
 
std::vector< FieldVariableValue_matrix_tag_u
 
std::vector< bool > _need_matrix_tag_u
 
FieldVariableValue _u
 
FieldVariableValue _u_old
 
FieldVariableValue _u_older
 
FieldVariableValue _u_previous_nl
 
FieldVariableGradient _grad_u
 
FieldVariableGradient _grad_u_old
 
FieldVariableGradient _grad_u_older
 
FieldVariableGradient _grad_u_previous_nl
 
FieldVariableGradient _grad_u_dot
 
FieldVariableGradient _grad_u_dotdot
 
FieldVariableSecond _second_u
 
FieldVariableSecond _second_u_old
 
FieldVariableSecond _second_u_older
 
FieldVariableSecond _second_u_previous_nl
 
FieldVariableCurl _curl_u
 
FieldVariableCurl _curl_u_old
 
FieldVariableCurl _curl_u_older
 
VariableValueType< OutputShape, JACOBIAN >::type _ad_u
 
VariableGradientType< OutputShape, JACOBIAN >::type _ad_grad_u
 
VariableSecondType< OutputShape, JACOBIAN >::type _ad_second_u
 
MooseArray< DualReal_ad_dof_values
 
MooseArray< DualReal_ad_dofs_dot
 
VariableValueType< OutputShape, JACOBIAN >::type _ad_u_dot
 
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u
 
VariableGradientType< OutputShape, JACOBIAN >::type _neighbor_ad_grad_u
 
VariableSecondType< OutputShape, JACOBIAN >::type _neighbor_ad_second_u
 
MooseArray< DualReal_neighbor_ad_dof_values
 
MooseArray< DualReal_neighbor_ad_dofs_dot
 
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u_dot
 
FieldVariableValue _u_neighbor
 
FieldVariableValue _u_old_neighbor
 
FieldVariableValue _u_older_neighbor
 
FieldVariableValue _u_previous_nl_neighbor
 
FieldVariableGradient _grad_u_neighbor
 
FieldVariableGradient _grad_u_old_neighbor
 
FieldVariableGradient _grad_u_older_neighbor
 
FieldVariableGradient _grad_u_previous_nl_neighbor
 
FieldVariableGradient _grad_u_neighbor_dot
 
FieldVariableGradient _grad_u_neighbor_dotdot
 
FieldVariableSecond _second_u_neighbor
 
FieldVariableSecond _second_u_old_neighbor
 
FieldVariableSecond _second_u_older_neighbor
 
FieldVariableSecond _second_u_previous_nl_neighbor
 
FieldVariableCurl _curl_u_neighbor
 
FieldVariableCurl _curl_u_old_neighbor
 
FieldVariableCurl _curl_u_older_neighbor
 
FieldVariableValue _u_dot
 u_dot (time derivative) More...
 
FieldVariableValue _u_dot_neighbor
 
FieldVariableValue _u_dotdot
 u_dotdot (second time derivative) More...
 
FieldVariableValue _u_dotdot_bak
 
FieldVariableValue _u_dotdot_neighbor
 
FieldVariableValue _u_dotdot_bak_neighbor
 
FieldVariableValue _u_dot_old
 u_dot_old (time derivative) More...
 
FieldVariableValue _u_dot_old_bak
 
FieldVariableValue _u_dot_old_neighbor
 
FieldVariableValue _u_dot_old_bak_neighbor
 
FieldVariableValue _u_dotdot_old
 u_dotdot_old (second time derivative) More...
 
FieldVariableValue _u_dotdot_old_bak
 
FieldVariableValue _u_dotdot_old_neighbor
 
FieldVariableValue _u_dotdot_old_bak_neighbor
 
VariableValue _du_dot_du
 derivative of u_dot wrt u More...
 
VariableValue _du_dot_du_neighbor
 
VariableValue _du_dotdot_du
 derivative of u_dotdot wrt u More...
 
VariableValue _du_dotdot_du_bak
 
VariableValue _du_dotdot_du_neighbor
 
VariableValue _du_dotdot_du_bak_neighbor
 
FEContinuity _continuity
 Continuity type of the variable. More...
 
FieldVariableValue _increment
 Increment in the variable used in dampers. More...
 
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...
 
MooseArray< Real > _nodal_value_array
 Nodal values as MooseArrays for use with AuxKernels. More...
 
MooseArray< Real > _nodal_value_old_array
 
MooseArray< Real > _nodal_value_older_array
 
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 312 of file MooseVariableFE.C.

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

◆ activeSubdomains()

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

The subdomains the variable is active on.

Implements MooseVariableFEBase.

Definition at line 305 of file MooseVariableFE.C.

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

◆ add()

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

Implements MooseVariableFEBase.

Definition at line 574 of file MooseVariableFE.C.

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

◆ adDofValues()

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

Return the AD dof values.

Definition at line 2490 of file MooseVariableFE.C.

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

◆ adGradPhi()

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

2516 {
2517  _need_ad = true;
2518  return _ad_nodal_value;
2519 }
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 = _need_ad_u_dot = 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  {
433  return _neighbor_ad_u_dot;
434  }
VariableValueType< OutputShape, JACOBIAN >::type _neighbor_ad_u_dot

◆ allDofIndices()

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

Get all global dofindices for the variable.

Definition at line 46 of file MooseVariableBase.C.

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

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

◆ assignADNodalValue()

void MooseVariableFE< Real >::assignADNodalValue ( const DualReal 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

◆ assignNodalValue()

void MooseVariableFE< Real >::assignNodalValue ( )
inherited

Definition at line 2064 of file MooseVariableFE.C.

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

◆ assignNodalValueNeighbor()

void MooseVariableFE< Real >::assignNodalValueNeighbor ( )
inherited

Definition at line 2229 of file MooseVariableFE.C.

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

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

320 {
321  _dof_indices.clear();
322 }
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 1184 of file MooseVariableFE.C.

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

◆ computeADNeighbor()

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

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

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

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

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

◆ 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 
255  _du_dot_du_neighbor.resize(nqp);
256 
258  _du_dotdot_du_neighbor.resize(nqp);
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(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
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(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
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 1371 of file MooseVariableFE.C.

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

◆ computeNodalNeighborValues()

void MooseVariableFE< Real >::computeNodalNeighborValues ( )
overridevirtualinherited

Compute nodal values of this variable in the neighbor.

Implements MooseVariableFEBase.

Definition at line 1908 of file MooseVariableFE.C.

1909 {
1911  {
1914  }
1915  else
1917 }
bool _neighbor_has_dof_indices
If the neighor has dofs.

◆ computeNodalValues()

void MooseVariableFE< Real >::computeNodalValues ( )
overridevirtualinherited

Compute nodal values of this variable.

Implements MooseVariableFEBase.

Definition at line 1892 of file MooseVariableFE.C.

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

◆ computeValuesHelper()

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

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

◆ computingCurl()

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

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

◆ curlPhiFace()

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

Definition at line 2563 of file MooseVariableFE.C.

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

◆ curlPhiFaceNeighbor()

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

Definition at line 2595 of file MooseVariableFE.C.

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

◆ curlPhiNeighbor()

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

Definition at line 2579 of file MooseVariableFE.C.

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

◆ curlSln()

const FieldVariableCurl& 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 FieldVariableCurl& 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 FieldVariableCurl& 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

Get local DoF indices.

Definition at line 96 of file MooseVariableBase.h.

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

◆ dofIndicesNeighbor()

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

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

◆ dofValues()

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

Returns dof solution on element.

Implements MooseVariableFEBase.

Definition at line 590 of file MooseVariableFE.C.

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

◆ dofValuesDot()

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

Returns time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 654 of file MooseVariableFE.C.

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

◆ dofValuesDotDot()

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

Returns second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 668 of file MooseVariableFE.C.

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

◆ dofValuesDotDotNeighbor()

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

Returns second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 727 of file MooseVariableFE.C.

728 {
729  if (_sys.solutionUDotDot())
730  {
733  }
734  else
735  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
736  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
737  "`u_dotdot`.");
738 }
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 698 of file MooseVariableFE.C.

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

◆ dofValuesDotDotOldNeighbor()

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

Returns old second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 757 of file MooseVariableFE.C.

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

◆ dofValuesDotNeighbor()

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

Returns time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 713 of file MooseVariableFE.C.

714 {
715  if (_sys.solutionUDot())
716  {
719  }
720  else
721  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
722  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
723 }
virtual NumericVector< Number > * solutionUDot()=0
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
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 683 of file MooseVariableFE.C.

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

◆ dofValuesDotOldNeighbor()

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

Returns old time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 742 of file MooseVariableFE.C.

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

◆ dofValuesDuDotDotDu()

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

Returns derivative of second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 780 of file MooseVariableFE.C.

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

◆ dofValuesDuDotDotDuNeighbor()

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

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

Implements MooseVariableFEBase.

Definition at line 796 of file MooseVariableFE.C.

797 {
800 }
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 772 of file MooseVariableFE.C.

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

◆ dofValuesDuDotDuNeighbor()

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

Returns derivative of time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 788 of file MooseVariableFE.C.

789 {
792 }
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 622 of file MooseVariableFE.C.

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

◆ dofValuesOld()

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

Returns old dof solution on element.

Implements MooseVariableFEBase.

Definition at line 598 of file MooseVariableFE.C.

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

◆ dofValuesOlder()

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

Returns older dof solution on element.

Implements MooseVariableFEBase.

Definition at line 606 of file MooseVariableFE.C.

607 {
608  _need_dof_values_older = true;
609  return _dof_values_older;
610 }
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 638 of file MooseVariableFE.C.

639 {
642 }
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 630 of file MooseVariableFE.C.

631 {
634 }
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 614 of file MooseVariableFE.C.

615 {
618 }
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 646 of file MooseVariableFE.C.

647 {
650 }
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

◆ fetchADDoFValues()

void MooseVariableFE< Real >::fetchADDoFValues ( )
inherited

Definition at line 2026 of file MooseVariableFE.C.

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

◆ fetchDoFValues()

void MooseVariableFE< Real >::fetchDoFValues ( )
inherited

Definition at line 1921 of file MooseVariableFE.C.

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

◆ fetchDoFValuesNeighbor()

void MooseVariableFE< Real >::fetchDoFValuesNeighbor ( )
inherited

Definition at line 2153 of file MooseVariableFE.C.

2154 {
2155  bool is_transient = _subproblem.isTransient();
2156 
2157  auto n = _dof_indices_neighbor.size();
2158  libmesh_assert(n);
2159 
2162 
2165  {
2168  }
2169 
2170  if (is_transient)
2171  {
2174  {
2177  }
2180  {
2183  }
2185  {
2187  libmesh_assert(_sys.solutionUDot());
2188  for (unsigned int i = 0; i < n; i++)
2190  }
2192  {
2194  libmesh_assert(_sys.solutionUDotDot());
2195  for (unsigned int i = 0; i < n; i++)
2197  }
2199  {
2201  libmesh_assert(_sys.solutionUDotOld());
2202  for (unsigned int i = 0; i < n; i++)
2204  }
2206  {
2208  libmesh_assert(_sys.solutionUDotDotOld());
2209  for (unsigned int i = 0; i < n; i++)
2211  }
2212  }
2214  {
2216  for (decltype(n) i = 0; i < n; ++i)
2218  }
2220  {
2222  for (decltype(n) i = 0; i < n; ++i)
2224  }
2225 }
virtual NumericVector< Number > * solutionUDot()=0
MooseArray< Real > _dof_du_dot_du_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
MooseArray< Real > _dof_values_older_neighbor
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:219
virtual NumericVector< Number > & solutionOld()=0
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.
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
PetscInt n
virtual NumericVector< Number > & solutionOlder()=0
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

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

478 {
479  _dof_map.dof_indices(elem, dof_indices, _var_num);
480 }
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 536 of file MooseVariableFE.C.

537 {
538  std::vector<dof_id_type> dof_indices;
539  _dof_map.dof_indices(elem, dof_indices, _var_num);
540 
541  return (*_sys.currentSolution())(dof_indices[idx]);
542 }
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 546 of file MooseVariableFE.C.

547 {
548  std::vector<dof_id_type> dof_indices;
549  _dof_map.dof_indices(elem, dof_indices, _var_num);
550 
551  return _sys.solutionOld()(dof_indices[idx]);
552 }
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 556 of file MooseVariableFE.C.

557 {
558  std::vector<dof_id_type> dof_indices;
559  _dof_map.dof_indices(elem, dof_indices, _var_num);
560 
561  return _sys.solutionOlder()(dof_indices[idx]);
562 }
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 1568 of file MooseVariableFE.C.

1572 {
1573  std::vector<dof_id_type> dof_indices;
1574  _dof_map.dof_indices(elem, dof_indices, _var_num);
1575 
1577  if (isNodal())
1578  {
1579  for (unsigned int i = 0; i < dof_indices.size(); ++i)
1580  {
1581  // The zero index is because we only have one point that the phis are evaluated at
1582  value += grad_phi[i][0] * (*_sys.currentSolution())(dof_indices[i]);
1583  }
1584  }
1585  else
1586  {
1587  mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
1588  value = 0.0;
1589  }
1590 
1591  return value;
1592 }
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:174
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 484 of file MooseVariableFE.C.

485 {
486  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
487 
488  // Make sure that the node has DOFs
489  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
490  * produce a better error (see misc/check_error.node_value_off_block) */
491  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
492  "Node " << node.id() << " does not contain any dofs for the "
493  << _sys.system().variable_name(_var_num) << " variable");
494 
495  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
496 
497  return (*_sys.currentSolution())(dof);
498 }
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:602
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 502 of file MooseVariableFE.C.

503 {
504  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
505 
506  // Make sure that the node has DOFs
507  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
508  * produce a better error (see misc/check_error.node_value_off_block) */
509  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
510  "Node " << node.id() << " does not contain any dofs for the "
511  << _sys.system().variable_name(_var_num) << " variable");
512 
513  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
514  return _sys.solutionOld()(dof);
515 }
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:602
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 519 of file MooseVariableFE.C.

520 {
521  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
522 
523  // Make sure that the node has DOFs
524  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
525  * produce a better error (see misc/check_error.node_value_off_block) */
526  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
527  "Node " << node.id() << " does not contain any dofs for the "
528  << _sys.system().variable_name(_var_num) << " variable");
529 
530  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
531  return _sys.solutionOlder()(dof);
532 }
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:602
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 876 of file MooseVariableFE.C.

878 {
879  std::vector<dof_id_type> dof_indices;
880  _dof_map.dof_indices(elem, dof_indices, _var_num);
881 
882  OutputType value = 0;
883  if (isNodal())
884  {
885  for (unsigned int i = 0; i < dof_indices.size(); ++i)
886  {
887  // The zero index is because we only have one point that the phis are evaluated at
888  value += phi[i][0] * (*_sys.currentSolution())(dof_indices[i]);
889  }
890  }
891  else
892  {
893  mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
894  value = (*_sys.currentSolution())(dof_indices[0]);
895  }
896 
897  return value;
898 }
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 ( )
inlineinherited

Definition at line 452 of file MooseVariableFE.h.

452 { return _grad_u_neighbor; }
FieldVariableGradient _grad_u_neighbor

◆ gradSlnNeighborDot()

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

Definition at line 468 of file MooseVariableFE.h.

469  {
470  if (_sys.solutionUDot())
471  {
473  return _grad_u_neighbor_dot;
474  }
475  else
476  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
477  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
478  }
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
FieldVariableGradient _grad_u_neighbor_dot
SystemBase & _sys
System this variable is part of.

◆ gradSlnNeighborDotDot()

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

Definition at line 479 of file MooseVariableFE.h.

480  {
481  if (_sys.solutionUDotDot())
482  {
485  }
486  else
487  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
488  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
489  "`u_dotdot`.");
490  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
FieldVariableGradient _grad_u_neighbor_dotdot
SystemBase & _sys
System this variable is part of.
virtual NumericVector< Number > * solutionUDotDot()=0

◆ gradSlnOld()

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

Definition at line 226 of file MooseVariableFE.h.

227  {
228  _need_grad_old = true;
229  return _grad_u_old;
230  }
FieldVariableGradient _grad_u_old