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
 
const DenseVector< Number > & solutionDoFs () override
 
const DenseVector< Number > & solutionDoFsOld () override
 
const DenseVector< Number > & solutionDoFsOlder () override
 
const DenseVector< Number > & solutionDoFsNeighbor () override
 
const DenseVector< Number > & solutionDoFsOldNeighbor () override
 
const DenseVector< Number > & solutionDoFsOlderNeighbor () 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 ()
 
FieldVariableValueincrement ()
 
const FieldVariableValuevectorTagValue (TagID tag)
 
const FieldVariableValuematrixTagValue (TagID tag)
 
const FieldVariableValuesln ()
 
const FieldVariableValueslnOld ()
 
const FieldVariableValueslnOlder ()
 
const FieldVariableValueslnPreviousNL ()
 
const FieldVariableGradientgradSln ()
 
const FieldVariableGradientgradSlnOld ()
 
const FieldVariableGradientgradSlnOlder ()
 
const FieldVariableGradientgradSlnPreviousNL ()
 
const FieldVariableGradientgradSlnDot ()
 
const FieldVariableGradientgradSlnDotDot ()
 
const FieldVariableSecondsecondSln ()
 
const FieldVariableSecondsecondSlnOld ()
 
const FieldVariableSecondsecondSlnOlder ()
 
const FieldVariableSecondsecondSlnPreviousNL ()
 
const FieldVariableValuecurlSln ()
 
const FieldVariableValuecurlSlnOld ()
 
const FieldVariableValuecurlSlnOlder ()
 
const VariableValueType< compute_stage >::typeadSln ()
 
const VariableGradientType< compute_stage >::typeadGradSln ()
 
const VariableSecondType< compute_stage >::typeadSecondSln ()
 
const VariableValueType< compute_stage >::typeadSlnNeighbor ()
 
const VariableGradientType< compute_stage >::typeadGradSlnNeighbor ()
 
const VariableSecondType< compute_stage >::typeadSecondSlnNeighbor ()
 
const FieldVariableValueuDot ()
 
const FieldVariableValueuDotDot ()
 
const FieldVariableValueuDotOld ()
 
const FieldVariableValueuDotDotOld ()
 
const VariableValueduDotDu ()
 
const VariableValueduDotDotDu ()
 
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)
 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 setNodalValue (const DenseVector< Number > &value) override
 Set values for this variable to keep everything up to date. More...
 
Number getNodalValue (const Node &node) override
 Get the value of this variable at given node. More...
 
Number getNodalValueOld (const Node &node) override
 Get the old value of this variable at given node. More...
 
Number getNodalValueOlder (const Node &node) override
 Get the t-2 value of this variable at given node. More...
 
Number getElementalValue (const Elem *elem, unsigned int idx=0) const override
 Get the current value of this variable on an element. More...
 
Number getElementalValueOld (const Elem *elem, unsigned int idx=0) const override
 Get the old value of this variable on an element. More...
 
Number getElementalValueOlder (const Elem *elem, unsigned int idx=0) const override
 Get the older value of this variable on an element. More...
 
void getDofIndices (const Elem *elem, std::vector< dof_id_type > &dof_indices) override
 
std::vector< dof_id_type > & dofIndicesNeighbor () override
 Get neighbor DOF indices for currently selected element. More...
 
unsigned int numberOfDofsNeighbor () override
 
void insert (NumericVector< Number > &residual) override
 
void add (NumericVector< Number > &residual)
 
const MooseArray< Number > & dofValue () override
 Deprecated method. More...
 
const MooseArray< Number > & dofValues () override
 Returns dof solution on element. More...
 
const MooseArray< Number > & dofValuesOld () override
 Returns old dof solution on element. More...
 
const MooseArray< Number > & dofValuesOlder () override
 Returns older dof solution on element. More...
 
const MooseArray< Number > & dofValuesPreviousNL () override
 Returns previous nl solution on element. More...
 
const MooseArray< Number > & dofValuesNeighbor () override
 Returns dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesOldNeighbor () override
 Returns old dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesOlderNeighbor () override
 Returns older dof solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesPreviousNLNeighbor () override
 Returns previous nl solution on neighbor element. More...
 
const MooseArray< Number > & dofValuesDot () override
 Returns time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotNeighbor () override
 Returns time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotOld () override
 Returns old time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotOldNeighbor () override
 Returns old time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDot () override
 Returns second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotNeighbor () override
 Returns second time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotOld () override
 Returns old second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDotDotOldNeighbor () override
 Returns old second time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDu () override
 Returns derivative of time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDuNeighbor () override
 Returns derivative of time derivative of neighboring degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDotDu () override
 Returns derivative of second time derivative of degrees of freedom. More...
 
const MooseArray< Number > & dofValuesDuDotDotDuNeighbor () override
 Returns derivative of second time derivative of neighboring degrees of freedom. More...
 
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 ()
 
const Real & nodalValueOld ()
 
const Real & nodalValueOlder ()
 
const Real & nodalValuePreviousNL ()
 
const Real & nodalValueDot ()
 
const Real & nodalValueDotDot ()
 
const Real & nodalValueDotOld ()
 
const Real & nodalValueDotDotOld ()
 
const Real & nodalValueDuDotDu ()
 
const Real & nodalValueDuDotDotDu ()
 
const Real & nodalValueNeighbor ()
 
const Real & nodalValueOldNeighbor ()
 
const Real & nodalValueOlderNeighbor ()
 
const Real & nodalValuePreviousNLNeighbor ()
 
const Real & nodalValueDotNeighbor ()
 
const Real & nodalValueDotDotNeighbor ()
 
const Real & nodalValueDotOldNeighbor ()
 
const Real & nodalValueDotDotOldNeighbor ()
 
const Real & nodalValueDuDotDuNeighbor ()
 
const Real & nodalValueDuDotDotDuNeighbor ()
 
const MooseArray< Real > & nodalVectorTagValue (TagID tag)
 
const MooseArray< Real > & nodalMatrixTagValue (TagID tag)
 
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)
 
void computeADNeighbor (const unsigned int &num_dofs, const unsigned int &nqp)
 
unsigned int number () const
 Get variable number coming from libMesh. More...
 
const FEType & feType () const
 Get the type of finite element object. More...
 
SystemBasesys ()
 Get the system this variable is part of. More...
 
const std::string & name () const
 Get the variable name. More...
 
const std::vector< dof_id_type > & allDofIndices () const
 Get all global dofindices for the variable. More...
 
unsigned int totalVarDofs ()
 
Moose::VarKindType kind () const
 Kind of the variable (Nonlinear, Auxiliary, ...) More...
 
void scalingFactor (Real factor)
 Set the scaling factor for this variable. More...
 
Real scalingFactor () const
 Get the scaling factor for this variable. More...
 
Order order () const
 Get the order of this variable Note: Order enum can be implicitly converted to unsigned int. More...
 
const DofMap & dofMap () const
 The DofMap associated with the system this variable is in. More...
 
std::vector< dof_id_type > & dofIndices ()
 
const std::vector< dof_id_type > & dofIndices () const
 
unsigned int numberOfDofs ()
 
void computingJacobian (bool computing_jacobian)
 

Protected Attributes

Assembly_assembly
 Our assembly. More...
 
QBase *& _qrule
 Quadrature rule for interior. More...
 
QBase *& _qrule_face
 Quadrature rule for the face. More...
 
QBase *& _qrule_neighbor
 Quadrature rule for the neighbor. More...
 
const Elem *& _elem
 current element More...
 
unsigned int & _current_side
 the side of the current element (valid when doing face assembly) More...
 
const Elem *& _neighbor
 neighboring element More...
 
std::vector< dof_id_type > _dof_indices_neighbor
 DOF indices (neighbor) More...
 
bool _need_u_old
 
bool _need_u_older
 
bool _need_u_previous_nl
 
bool _need_u_dot
 
bool _need_u_dotdot
 
bool _need_u_dot_old
 
bool _need_u_dotdot_old
 
bool _need_du_dot_du
 
bool _need_du_dotdot_du
 
bool _need_grad_old
 
bool _need_grad_older
 
bool _need_grad_previous_nl
 
bool _need_grad_dot
 
bool _need_grad_dotdot
 
bool _need_second
 
bool _need_second_old
 
bool _need_second_older
 
bool _need_second_previous_nl
 
bool _need_curl
 
bool _need_curl_old
 
bool _need_curl_older
 
bool _need_ad_u
 
bool _need_ad_grad_u
 
bool _need_ad_second_u
 
bool _need_neighbor_ad_u
 
bool _need_neighbor_ad_grad_u
 
bool _need_neighbor_ad_second_u
 
bool _need_u_old_neighbor
 
bool _need_u_older_neighbor
 
bool _need_u_previous_nl_neighbor
 
bool _need_u_dot_neighbor
 
bool _need_u_dotdot_neighbor
 
bool _need_u_dot_old_neighbor
 
bool _need_u_dotdot_old_neighbor
 
bool _need_du_dot_du_neighbor
 
bool _need_du_dotdot_du_neighbor
 
bool _need_grad_old_neighbor
 
bool _need_grad_older_neighbor
 
bool _need_grad_previous_nl_neighbor
 
bool _need_grad_neighbor_dot
 
bool _need_grad_neighbor_dotdot
 
bool _need_second_neighbor
 
bool _need_second_old_neighbor
 
bool _need_second_older_neighbor
 
bool _need_second_previous_nl_neighbor
 
bool _need_curl_neighbor
 
bool _need_curl_old_neighbor
 
bool _need_curl_older_neighbor
 
bool _need_solution_dofs
 
bool _need_solution_dofs_old
 
bool _need_solution_dofs_older
 
bool _need_solution_dofs_neighbor
 
bool _need_solution_dofs_old_neighbor
 
bool _need_solution_dofs_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_dofs
 If we have dofs. More...
 
bool _neighbor_has_dofs
 If the neighor has dofs. More...
 
bool _has_nodal_value
 If true, the nodal value gets inserted on calling insert() More...
 
bool _has_nodal_value_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
 
DenseVector< Number > _solution_dofs
 local elemental DoFs More...
 
DenseVector< Number > _solution_dofs_old
 
DenseVector< Number > _solution_dofs_older
 
DenseVector< Number > _solution_dofs_neighbor
 
DenseVector< Number > _solution_dofs_old_neighbor
 
DenseVector< Number > _solution_dofs_older_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
 
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_bak
 
FieldVariableValue _u_old
 
FieldVariableValue _u_old_bak
 
FieldVariableValue _u_older
 
FieldVariableValue _u_older_bak
 
FieldVariableValue _u_previous_nl
 
FieldVariableGradient _grad_u
 
FieldVariableGradient _grad_u_bak
 
FieldVariableGradient _grad_u_old
 
FieldVariableGradient _grad_u_old_bak
 
FieldVariableGradient _grad_u_older
 
FieldVariableGradient _grad_u_older_bak
 
FieldVariableGradient _grad_u_previous_nl
 
FieldVariableGradient _grad_u_dot
 
FieldVariableGradient _grad_u_dotdot
 
FieldVariableSecond _second_u
 
FieldVariableSecond _second_u_bak
 
FieldVariableSecond _second_u_old
 
FieldVariableSecond _second_u_old_bak
 
FieldVariableSecond _second_u_older
 
FieldVariableSecond _second_u_older_bak
 
FieldVariableSecond _second_u_previous_nl
 
FieldVariableCurl _curl_u
 
FieldVariableCurl _curl_u_bak
 
FieldVariableCurl _curl_u_old
 
FieldVariableCurl _curl_u_old_bak
 
FieldVariableCurl _curl_u_older
 
MooseArray< ADReal_ad_u
 
MooseArray< ADRealGradient_ad_grad_u
 
MooseArray< ADRealTensor_ad_second_u
 
std::vector< ADReal_ad_dofs
 
MooseArray< ADReal_neighbor_ad_u
 
MooseArray< ADRealGradient_neighbor_ad_grad_u
 
MooseArray< ADRealTensor_neighbor_ad_second_u
 
std::vector< ADReal_neighbor_ad_dofs
 
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_bak
 
FieldVariableValue _u_dot_neighbor
 
FieldVariableValue _u_dot_bak_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_bak
 
VariableValue _du_dot_du_neighbor
 
VariableValue _du_dot_du_bak_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 _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...
 
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...
 
bool _computing_jacobian
 
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 289 of file MooseVariableFE.C.

290 {
291  return _sys.system().variable(_var_num).active_on_subdomain(subdomain);
292 }
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 282 of file MooseVariableFE.C.

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

◆ add()

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

Definition at line 554 of file MooseVariableFE.C.

555 {
556  if (_has_nodal_value)
557  residual.add_vector(&_dof_values[0], _dof_indices);
558 }
std::vector< dof_id_type > _dof_indices
DOF indices.
bool _has_nodal_value
If true, the nodal value gets inserted on calling insert()
MooseArray< Real > _dof_values

◆ adGradSln()

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

Definition at line 369 of file MooseVariableFE.h.

370  {
371  _need_ad_grad_u = true;
372  return _ad_grad_u;
373  }
MooseArray< ADRealGradient > _ad_grad_u

◆ adGradSlnNeighbor()

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

Definition at line 392 of file MooseVariableFE.h.

393  {
395  return _neighbor_ad_grad_u;
396  }
MooseArray< ADRealGradient > _neighbor_ad_grad_u

◆ adSecondSln()

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

Definition at line 376 of file MooseVariableFE.h.

377  {
378  _need_ad_second_u = true;
379  secondPhi();
380  secondPhiFace();
381  return _ad_second_u;
382  }
const FieldVariablePhiSecond & secondPhi()
MooseArray< ADRealTensor > _ad_second_u
const FieldVariablePhiSecond & secondPhiFace()

◆ adSecondSlnNeighbor()

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

Definition at line 399 of file MooseVariableFE.h.

400  {
403  return _neighbor_ad_second_u;
404  }
MooseArray< ADRealTensor > _neighbor_ad_second_u
const FieldVariablePhiSecond & secondPhiFaceNeighbor()

◆ adSln()

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

Definition at line 362 of file MooseVariableFE.h.

363  {
364  _need_ad_u = true;
365  return _ad_u;
366  }
MooseArray< ADReal > _ad_u

◆ adSlnNeighbor()

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

Definition at line 385 of file MooseVariableFE.h.

386  {
387  _need_neighbor_ad_u = true;
388  return _neighbor_ad_u;
389  }
MooseArray< ADReal > _neighbor_ad_u

◆ 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:495
SystemBase & _sys
System this variable is part of.
virtual SubProblem & subproblem()
Definition: SystemBase.h:103
const std::string & name() const
Get the variable name.

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

297 {
298  _dof_indices.clear();
299 }
std::vector< dof_id_type > _dof_indices
DOF indices.

◆ computeAD()

void MooseVariableFE< Real >::computeAD ( const unsigned int &  num_dofs,
const unsigned int &  nqp 
)
inherited

Definition at line 1365 of file MooseVariableFE.C.

1367 {
1368 }

◆ computeADNeighbor()

void MooseVariableFE< Real >::computeADNeighbor ( const unsigned int &  num_dofs,
const unsigned int &  nqp 
)
inherited

Definition at line 1428 of file MooseVariableFE.C.

1430 {
1431 }

◆ computeElemValues()

void MooseVariableConstMonomial::computeElemValues ( )
overridevirtual

Compute values at interior quadrature points.

Reimplemented from MooseVariableFE< Real >.

Definition at line 389 of file MooseVariableConstMonomial.C.

390 {
391  if (_dof_indices.size() == 0)
392  return;
393 
394  computeMonomialValuesHelper(_qrule->n_points(), _phi[0][0]);
395 }
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 398 of file MooseVariableConstMonomial.C.

399 {
400  if (_dof_indices.size() == 0)
401  return;
402 
404 }
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 883 of file MooseVariableFE.C.

884 {
885  if (!isNodal())
886  mooseError("computeIncrementAtNode can only be called for nodal variables");
887 
888  _increment.resize(1);
889 
890  // Compute the increment for the current DOF
891  _increment[0] = increment_vec(_dof_indices[0]);
892 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:200
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 866 of file MooseVariableFE.C.

867 {
868  unsigned int nqp = _qrule->n_points();
869 
870  _increment.resize(nqp);
871  // Compute the increment at each quadrature point
872  unsigned int num_dofs = _dof_indices.size();
873  for (unsigned int qp = 0; qp < nqp; qp++)
874  {
875  _increment[qp] = 0;
876  for (unsigned int i = 0; i < num_dofs; i++)
877  _increment[qp] += _phi[i][qp] * increment_vec(_dof_indices[i]);
878  }
879 }
const FieldVariablePhiValue & _phi
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:200
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 247 of file MooseVariableConstMonomial.C.

Referenced by computeNeighborValues(), and computeNeighborValuesFace().

249 {
250  bool is_transient = _subproblem.isTransient();
251 
252  _u_neighbor.resize(nqp);
254 
257 
258  if (is_transient)
259  {
261  _u_old_neighbor.resize(nqp);
262 
265 
268 
271 
274 
277  }
278 
281  if (is_transient)
282  {
295  }
296 
298  _solution_dofs_neighbor.resize(1);
299 
301  _solution_dofs_old_neighbor.resize(1);
302 
305 
306  const dof_id_type & idx = _dof_indices_neighbor[0];
307  const Real & soln = (*_sys.currentSolution())(idx);
308  Real soln_old = 0;
309  Real soln_older = 0;
310  Real u_dot = 0;
311  Real u_dotdot = 0;
312  Real u_dot_old = 0;
313  Real u_dotdot_old = 0;
314 
316  _dof_values_neighbor[0] = soln;
317 
319  _solution_dofs_neighbor(0) = soln;
320 
321  if (is_transient)
322  {
324  soln_old = _sys.solutionOld()(idx);
325 
327  soln_older = _sys.solutionOlder()(idx);
328 
330  _dof_values_old_neighbor[0] = soln_old;
332  _dof_values_older_neighbor[0] = soln_older;
333 
334  if (_sys.solutionUDot())
335  u_dot = (*_sys.solutionUDot())(idx);
336  if (_sys.solutionUDotDot())
337  u_dotdot = (*_sys.solutionUDotDot())(idx);
338  if (_sys.solutionUDotOld())
339  u_dot_old = (*_sys.solutionUDotOld())(idx);
340  if (_sys.solutionUDotDotOld())
341  u_dotdot_old = (*_sys.solutionUDotDotOld())(idx);
342 
344  _dof_values_dot_neighbor[0] = u_dot;
345 
347  _dof_values_dotdot_neighbor[0] = u_dotdot;
348 
350  _dof_values_dot_old_neighbor[0] = u_dot_old;
351 
353  _dof_values_dotdot_old_neighbor[0] = u_dotdot_old;
354 
356  _solution_dofs_old_neighbor(0) = soln_old;
357 
359  _solution_dofs_older_neighbor(0) = soln_older;
360  }
361 
362  _u_neighbor[0] = phi * soln;
363 
364  if (is_transient)
365  {
367  _u_old_neighbor[0] = phi * soln_old;
368 
370  _u_older_neighbor[0] = phi * soln_older;
371  }
372 
373  for (unsigned qp = 1; qp < nqp; ++qp)
374  {
375  _u_neighbor[qp] = _u_neighbor[0];
376 
377  if (is_transient)
378  {
381 
384  }
385  }
386 }
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)
MooseArray< Real > _dof_values_older_neighbor
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:200
virtual NumericVector< Number > & solutionOld()=0
virtual NumericVector< Number > * solutionUDotDotOld()=0
FieldVariableValue _u_neighbor
DenseVector< Number > _solution_dofs_old_neighbor
DenseVector< Number > _solution_dofs_neighbor
MooseArray< Real > _dof_values_dotdot_old_neighbor
const FieldVariablePhiValue & phi()
FieldVariableGradient _grad_u_neighbor
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
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
DenseVector< Number > _solution_dofs_older_neighbor
MooseArray< Real > _dof_values_dotdot_neighbor
FieldVariableSecond _second_u_old_neighbor
virtual NumericVector< Number > & solutionOlder()=0
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 
109  _solution_dofs.resize(1);
110 
112  _solution_dofs_old.resize(1);
113 
115  _solution_dofs_older.resize(1);
116 
117  const dof_id_type & idx = _dof_indices[0];
118  const Real & soln = (*_sys.currentSolution())(idx);
119  Real soln_old = 0;
120  Real soln_older = 0;
121  Real soln_previous_nl = 0;
122  Real u_dot = 0;
123  Real u_dotdot = 0;
124  Real u_dot_old = 0;
125  Real u_dotdot_old = 0;
126  const Real & du_dot_du = _sys.duDotDu();
127  const Real & du_dotdot_du = _sys.duDotDotDu();
128 
129  if (_need_dof_values)
130  _dof_values[0] = soln;
131 
134  soln_previous_nl = (*_sys.solutionPreviousNewton())(idx);
135 
137  _dof_values_previous_nl[0] = soln_previous_nl;
138 
140  _solution_dofs(0) = soln;
141 
142  if (is_transient)
143  {
145  soln_old = _sys.solutionOld()(idx);
146 
148  soln_older = _sys.solutionOlder()(idx);
149 
151  _dof_values_old[0] = soln_old;
152 
154  _dof_values_older[0] = soln_older;
155 
156  if (_sys.solutionUDot())
157  u_dot = (*_sys.solutionUDot())(idx);
158  if (_sys.solutionUDotDot())
159  u_dotdot = (*_sys.solutionUDotDot())(idx);
160  if (_sys.solutionUDotOld())
161  u_dot_old = (*_sys.solutionUDotOld())(idx);
162  if (_sys.solutionUDotDotOld())
163  u_dotdot_old = (*_sys.solutionUDotDotOld())(idx);
164 
166  _dof_values_dot[0] = u_dot;
167 
169  _dof_values_dotdot[0] = u_dotdot;
170 
172  _solution_dofs_old(0) = soln_old;
173 
175  _solution_dofs_older(0) = soln_older;
176  }
177 
178  _u[0] = phi * soln;
179 
181  _u_previous_nl[0] = phi * soln_previous_nl;
182 
183  if (is_transient)
184  {
185  if (_need_u_dot)
186  _u_dot[0] = phi * u_dot;
187 
188  if (_need_u_dotdot)
189  _u_dotdot[0] = phi * u_dotdot;
190 
191  if (_need_u_dot_old)
192  _u_dot_old[0] = phi * u_dot_old;
193 
194  if (_need_u_dotdot_old)
195  _u_dotdot_old[0] = phi * u_dotdot_old;
196 
197  if (_need_du_dot_du)
198  _du_dot_du[0] = du_dot_du;
199 
200  if (_need_du_dotdot_du)
201  _du_dotdot_du[0] = du_dotdot_du;
202 
203  if (_need_u_old)
204  _u_old[0] = phi * soln_old;
205 
206  if (_need_u_older)
207  _u_older[0] = phi * soln_older;
208  }
209 
210  for (unsigned qp = 1; qp < nqp; ++qp)
211  {
212  _u[qp] = _u[0];
213 
216 
217  if (is_transient)
218  {
219  if (_need_u_dot)
220  _u_dot[qp] = _u_dot[0];
221 
222  if (_need_u_dotdot)
223  _u_dotdot[qp] = _u_dotdot[0];
224 
225  if (_need_u_dot_old)
226  _u_dot_old[qp] = _u_dot_old[0];
227 
228  if (_need_u_dotdot_old)
229  _u_dotdot_old[qp] = _u_dotdot_old[0];
230 
231  if (_need_du_dot_du)
232  _du_dot_du[qp] = _du_dot_du[0];
233 
234  if (_need_du_dotdot_du)
235  _du_dotdot_du[qp] = _du_dotdot_du[0];
236 
237  if (_need_u_old)
238  _u_old[qp] = _u_old[0];
239 
240  if (_need_u_older)
241  _u_older[qp] = _u_older[qp];
242  }
243  }
244 }
FieldVariableGradient _grad_u_old
MooseArray< Real > _dof_values_old
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
virtual NumericVector< Number > * solutionUDot()=0
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:200
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
DenseVector< Number > _solution_dofs_older
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:156
virtual Number & duDotDotDu()
Definition: SystemBase.h:157
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
virtual bool isTransient() const =0
FieldVariableGradient _grad_u
DenseVector< Number > _solution_dofs
local elemental DoFs
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
DenseVector< Number > _solution_dofs_old
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 407 of file MooseVariableConstMonomial.C.

408 {
409  if (_dof_indices_neighbor.size() == 0)
410  return;
411 
413 }
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 416 of file MooseVariableConstMonomial.C.

417 {
418  if (_dof_indices_neighbor.size() == 0)
419  return;
420 
422 }
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 1491 of file MooseVariableFE.C.

1495 {
1496  bool is_transient = _subproblem.isTransient();
1497  unsigned int nqp = qrule->n_points();
1498 
1499  _u_neighbor.resize(nqp);
1500  _grad_u_neighbor.resize(nqp);
1501 
1504 
1505  if (is_transient)
1506  {
1508  _u_dot_neighbor.resize(nqp);
1509 
1512 
1515 
1518 
1521 
1524 
1527 
1530 
1532  _u_old_neighbor.resize(nqp);
1533 
1536 
1539 
1542 
1545 
1548  }
1549 
1550  for (unsigned int i = 0; i < nqp; ++i)
1551  {
1552  _u_neighbor[i] = 0;
1553  _grad_u_neighbor[i] = 0;
1554 
1556  _second_u_neighbor[i] = 0;
1557 
1558  if (_need_grad_dot)
1559  _grad_u_neighbor_dot[i] = 0;
1560  if (_need_grad_dotdot)
1561  _grad_u_neighbor_dotdot[i] = 0;
1562 
1563  if (is_transient)
1564  {
1566  _u_dot_neighbor[i] = 0;
1567 
1569  _u_dotdot_neighbor[i] = 0;
1570 
1572  _u_dot_old_neighbor[i] = 0;
1573 
1575  _u_dotdot_old_neighbor[i] = 0;
1576 
1578  _du_dot_du_neighbor[i] = 0;
1579 
1581  _du_dotdot_du_neighbor[i] = 0;
1582 
1584  _u_old_neighbor[i] = 0;
1585 
1587  _u_older_neighbor[i] = 0;
1588 
1590  _grad_u_old_neighbor[i] = 0;
1591 
1593  _grad_u_older_neighbor[i] = 0;
1594 
1596  _second_u_old_neighbor[i] = 0;
1597 
1599  _second_u_older_neighbor[i] = 0;
1600  }
1601  }
1602 
1603  unsigned int num_dofs = _dof_indices_neighbor.size();
1604 
1606  _dof_values_neighbor.resize(num_dofs);
1607  if (is_transient)
1608  {
1610  _dof_values_old_neighbor.resize(num_dofs);
1614  _dof_values_dot_neighbor.resize(num_dofs);
1621  }
1622 
1624  _solution_dofs_neighbor.resize(num_dofs);
1625 
1627  _solution_dofs_old_neighbor.resize(num_dofs);
1628 
1630  _solution_dofs_older_neighbor.resize(num_dofs);
1631 
1632  const NumericVector<Real> & current_solution = *_sys.currentSolution();
1633  const NumericVector<Real> & solution_old = _sys.solutionOld();
1634  const NumericVector<Real> & solution_older = _sys.solutionOlder();
1635  const NumericVector<Real> * u_dot = _sys.solutionUDot();
1636  const NumericVector<Real> * u_dotdot = _sys.solutionUDotDot();
1637  const NumericVector<Real> * u_dot_old = _sys.solutionUDotOld();
1638  const NumericVector<Real> * u_dotdot_old = _sys.solutionUDotDotOld();
1639  const Real & du_dot_du = _sys.duDotDu();
1640  const Real & du_dotdot_du = _sys.duDotDotDu();
1641 
1642  dof_id_type idx;
1643  Real soln_local;
1644  Real soln_old_local = 0;
1645  Real soln_older_local = 0;
1646  Real u_dot_local = 0;
1647  Real u_dotdot_local = 0;
1648  Real u_dot_old_local = 0;
1649  Real u_dotdot_old_local = 0;
1650 
1651  OutputType phi_local;
1652  typename OutputTools<OutputType>::OutputGradient dphi_local;
1653  typename OutputTools<OutputType>::OutputSecond d2phi_local;
1654 
1655  for (unsigned int i = 0; i < num_dofs; ++i)
1656  {
1657  idx = _dof_indices_neighbor[i];
1658  soln_local = current_solution(idx);
1659 
1661  _dof_values_neighbor[i] = soln_local;
1662 
1664  _solution_dofs_neighbor(i) = soln_local;
1665 
1666  if (is_transient)
1667  {
1669  soln_old_local = solution_old(idx);
1670 
1672  soln_older_local = solution_older(idx);
1673 
1675  _dof_values_old_neighbor[i] = soln_old_local;
1677  _dof_values_older_neighbor[i] = soln_older_local;
1678 
1679  if (u_dot)
1680  {
1681  u_dot_local = (*u_dot)(idx);
1683  _dof_values_dot_neighbor[i] = u_dot_local;
1684  }
1685 
1686  if (u_dotdot)
1687  {
1688  u_dotdot_local = (*u_dotdot)(idx);
1690  _dof_values_dotdot_neighbor[i] = u_dotdot_local;
1691  }
1692 
1693  if (u_dot_old)
1694  {
1695  u_dot_old_local = (*u_dot_old)(idx);
1697  _dof_values_dot_old_neighbor[i] = u_dot_old_local;
1698  }
1699 
1700  if (u_dotdot_old)
1701  {
1702  u_dotdot_old_local = (*u_dotdot_old)(idx);
1704  _dof_values_dotdot_old_neighbor[i] = u_dotdot_old_local;
1705  }
1706 
1708  _solution_dofs_old_neighbor(i) = solution_old(idx);
1709 
1711  _solution_dofs_older_neighbor(i) = solution_older(idx);
1712  }
1713 
1714  for (unsigned int qp = 0; qp < nqp; ++qp)
1715  {
1716  phi_local = phi[i][qp];
1717  dphi_local = grad_phi[i][qp];
1718 
1720  d2phi_local = (*second_phi)[i][qp];
1721 
1722  _u_neighbor[qp] += phi_local * soln_local;
1723  _grad_u_neighbor[qp] += dphi_local * soln_local;
1724 
1726  _second_u_neighbor[qp] += d2phi_local * soln_local;
1727 
1728  if (is_transient)
1729  {
1731  _u_dot_neighbor[qp] += phi_local * u_dot_local;
1732 
1734  _u_dotdot_neighbor[qp] += phi_local * u_dotdot_local;
1735 
1737  _u_dot_old_neighbor[qp] += phi_local * u_dot_old_local;
1738 
1740  _u_dotdot_old_neighbor[qp] += phi_local * u_dotdot_old_local;
1741 
1743  _du_dot_du_neighbor[qp] = du_dot_du;
1744 
1746  _du_dotdot_du_neighbor[qp] = du_dotdot_du;
1747 
1749  _grad_u_neighbor_dot[qp].add_scaled(dphi_local, u_dot_local);
1750 
1752  _grad_u_neighbor_dotdot[qp].add_scaled(dphi_local, u_dotdot_local);
1753 
1755  _u_old_neighbor[qp] += phi_local * soln_old_local;
1756 
1758  _u_older_neighbor[qp] += phi_local * soln_older_local;
1759 
1761  _grad_u_old_neighbor[qp] += dphi_local * soln_old_local;
1762 
1764  _grad_u_older_neighbor[qp] += dphi_local * soln_older_local;
1765 
1767  _second_u_old_neighbor[qp] += d2phi_local * soln_old_local;
1768 
1770  _second_u_older_neighbor[qp] += d2phi_local * soln_older_local;
1771  }
1772  }
1773  }
1774 }
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
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:125
MooseArray< Real > _dof_values_older_neighbor
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:200
virtual NumericVector< Number > & solutionOld()=0
FieldVariableGradient _grad_u_neighbor_dot
virtual NumericVector< Number > * solutionUDotDotOld()=0
FieldVariableValue _u_neighbor
VariableValue _du_dot_du_neighbor
DenseVector< Number > _solution_dofs_old_neighbor
DenseVector< Number > _solution_dofs_neighbor
MooseArray< Real > _dof_values_dotdot_old_neighbor
const FieldVariablePhiValue & phi()
virtual Number & duDotDu()
Definition: SystemBase.h:156
virtual Number & duDotDotDu()
Definition: SystemBase.h:157
FieldVariableGradient _grad_u_neighbor
SubProblem & _subproblem
Problem this variable is part of.
FieldVariableGradient _grad_u_neighbor_dotdot
SystemBase & _sys
System this variable is part of.
FieldVariableValue _u_dot_old_neighbor
virtual bool isTransient() const =0
FieldVariableSecond _second_u_neighbor
MooseArray< Real > _dof_values_old_neighbor
MooseArray< Real > _dof_values_dot_old_neighbor
MooseArray< Real > _dof_values_dot_neighbor
FieldVariableValue _u_dotdot_old_neighbor
DenseVector< Number > _solution_dofs_older_neighbor
MooseArray< Real > _dof_values_dotdot_neighbor
FieldVariableSecond _second_u_old_neighbor
VariableValue _du_dotdot_du_neighbor
virtual NumericVector< Number > & solutionOlder()=0
FieldVariableValue _u_dotdot_neighbor
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
FieldVariableValue _u_older_neighbor
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:124
FieldVariableGradient _grad_u_old_neighbor
FieldVariableSecond _second_u_older_neighbor
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeNodalNeighborValues()

void MooseVariableFE< Real >::computeNodalNeighborValues ( )
overridevirtualinherited

Compute nodal values of this variable in the neighbor.

Implements MooseVariableFEBase.

Definition at line 2179 of file MooseVariableFE.C.

2180 {
2181  if (_neighbor_has_dofs)
2182  {
2183  const unsigned int n = _dof_indices_neighbor.size();
2184  mooseAssert(n, "There must be a non-zero number of degrees of freedom");
2187 
2188  if (_subproblem.isTransient())
2189  {
2194 
2201  for (unsigned int i = 0; i < n; i++)
2202  {
2203  if (_sys.solutionUDot())
2205  if (_sys.solutionUDotDot())
2207  if (_sys.solutionUDotOld())
2209  if (_sys.solutionUDotDotOld())
2214  }
2215  }
2216  }
2217  else
2218  {
2220  if (_subproblem.isTransient())
2221  {
2230  }
2231  }
2232 }
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(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:200
virtual NumericVector< Number > & solutionOld()=0
MooseArray< Real > _dof_du_dotdot_du_neighbor
bool _neighbor_has_dofs
If the neighor has dofs.
virtual NumericVector< Number > * solutionUDotDotOld()=0
MooseArray< Real > _dof_values_dotdot_old_neighbor
virtual Number & duDotDu()
Definition: SystemBase.h:156
virtual Number & duDotDotDu()
Definition: SystemBase.h:157
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.

◆ computeNodalValues()

void MooseVariableFE< Real >::computeNodalValues ( )
overridevirtualinherited

Compute nodal values of this variable.

Implements MooseVariableFEBase.

Definition at line 1997 of file MooseVariableFE.C.

1998 {
1999  auto safe_access_tagged_vectors = _sys.subproblem().safeAccessTaggedVectors();
2000  auto safe_access_tagged_matrices = _sys.subproblem().safeAccessTaggedMatrices();
2001  auto & active_coupleable_matrix_tags =
2003  auto & active_coupleable_vector_tags =
2005 
2006  if (_has_dofs)
2007  {
2008  const size_t n = _dof_indices.size();
2009  mooseAssert(n, "There must be a non-zero number of degrees of freedom");
2010  _dof_values.resize(n);
2013 
2014  for (auto tag : active_coupleable_vector_tags)
2015  _vector_tags_dof_u[tag].resize(n);
2016 
2017  for (auto tag : active_coupleable_matrix_tags)
2018  _matrix_tags_dof_u[tag].resize(n);
2019 
2020  if (safe_access_tagged_vectors)
2021  {
2022  for (auto tag : active_coupleable_vector_tags)
2023  if (_need_vector_tag_dof_u[tag] && _sys.hasVector(tag) && _sys.getVector(tag).closed())
2024  {
2025  auto & vec = _sys.getVector(tag);
2026  vec.get(_dof_indices, &_vector_tags_dof_u[tag][0]);
2027  }
2028  }
2029 
2030  if (safe_access_tagged_matrices)
2031  {
2032  for (auto tag : active_coupleable_matrix_tags)
2033  if (_need_matrix_tag_dof_u[tag] && _sys.hasMatrix(tag) && _sys.matrixTagActive(tag) &&
2034  _sys.getMatrix(tag).closed())
2035  {
2036  auto & mat = _sys.getMatrix(tag);
2037  for (unsigned i = 0; i < _dof_indices.size(); i++)
2038  {
2039  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2040  _matrix_tags_dof_u[tag][i] = mat(_dof_indices[i], _dof_indices[i]);
2041  }
2042  }
2043  }
2044 
2046  {
2050  }
2051  if (_subproblem.isTransient())
2052  {
2059 
2066 
2067  if (_sys.solutionUDot())
2069  if (_sys.solutionUDotDot())
2071  if (_sys.solutionUDotOld())
2073  if (_sys.solutionUDotDotOld())
2075  _dof_du_dot_du[0] = _sys.duDotDu();
2081  }
2082  }
2083  else
2084  {
2085  _dof_values.resize(0);
2088  if (_subproblem.isTransient())
2089  {
2098  }
2099  }
2100 }
std::vector< bool > _need_vector_tag_dof_u
MooseArray< Real > _dof_values_old
virtual NumericVector< Number > * solutionUDot()=0
Real _nodal_value_dotdot_old
nodal values of u_dotdot_old
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:670
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:200
virtual NumericVector< Number > & solutionOld()=0
MooseArray< Real > _dof_values_older
Real _nodal_value_dot_old
nodal values of u_dot_old
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:766
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.
Real _nodal_value_dot
nodal values of u_dot
virtual Number & duDotDu()
Definition: SystemBase.h:156
std::set< TagID > & getActiveFEVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:183
virtual Number & duDotDotDu()
Definition: SystemBase.h:157
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:103
virtual bool matrixTagActive(TagID tag)
If or not a matrix tag is active.
Definition: SystemBase.C:864
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:507
Real _nodal_value
Nodal values.
PetscInt n
bool _has_dofs
If we have dofs.
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:772
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:177
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:510
Real _nodal_value_dotdot
nodal values of u_dotdot
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:720
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.

◆ computeValuesHelper()

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

Helper function for computing values.

Definition at line 922 of file MooseVariableFE.C.

928 {
929  bool is_transient = _subproblem.isTransient();
930  unsigned int nqp = qrule->n_points();
931  auto safe_access_tagged_vectors = _sys.subproblem().safeAccessTaggedVectors();
932  auto safe_access_tagged_matrices = _sys.subproblem().safeAccessTaggedMatrices();
933  auto & active_coupleable_matrix_tags =
935  auto & active_coupleable_vector_tags =
937 
938  _u.resize(nqp);
939  _grad_u.resize(nqp);
940 
941  for (auto tag : active_coupleable_vector_tags)
942  if (_need_vector_tag_u[tag])
943  _vector_tag_u[tag].resize(nqp);
944 
945  for (auto tag : active_coupleable_matrix_tags)
946  if (_need_matrix_tag_u[tag])
947  _matrix_tag_u[tag].resize(nqp);
948 
949  if (_need_second)
950  _second_u.resize(nqp);
951 
952  if (_need_curl)
953  _curl_u.resize(nqp);
954 
956  _u_previous_nl.resize(nqp);
957 
960 
963 
964  if (is_transient)
965  {
966  if (_need_u_dot)
967  _u_dot.resize(nqp);
968 
969  if (_need_u_dotdot)
970  _u_dotdot.resize(nqp);
971 
972  if (_need_u_dot_old)
973  _u_dot_old.resize(nqp);
974 
975  if (_need_u_dotdot_old)
976  _u_dotdot_old.resize(nqp);
977 
978  if (_need_du_dot_du)
979  _du_dot_du.resize(nqp);
980 
981  if (_need_du_dotdot_du)
982  _du_dotdot_du.resize(nqp);
983 
984  if (_need_grad_dot)
985  _grad_u_dot.resize(nqp);
986 
987  if (_need_grad_dotdot)
988  _grad_u_dotdot.resize(nqp);
989 
990  if (_need_u_old)
991  _u_old.resize(nqp);
992 
993  if (_need_u_older)
994  _u_older.resize(nqp);
995 
996  if (_need_grad_old)
997  _grad_u_old.resize(nqp);
998 
999  if (_need_grad_older)
1000  _grad_u_older.resize(nqp);
1001 
1002  if (_need_second_old)
1003  _second_u_old.resize(nqp);
1004 
1005  if (_need_curl_old)
1006  _curl_u_old.resize(nqp);
1007 
1008  if (_need_second_older)
1009  _second_u_older.resize(nqp);
1010  }
1011 
1012  for (unsigned int i = 0; i < nqp; ++i)
1013  {
1014  _u[i] = 0;
1015  _grad_u[i] = 0;
1016 
1017  for (auto tag : active_coupleable_vector_tags)
1018  if (_need_vector_tag_u[tag])
1019  _vector_tag_u[tag][i] = 0;
1020 
1021  for (auto tag : active_coupleable_matrix_tags)
1022  if (_need_matrix_tag_u[tag])
1023  _matrix_tag_u[tag][i] = 0;
1024 
1025  if (_need_second)
1026  _second_u[i] = 0;
1027 
1028  if (_need_curl)
1029  _curl_u[i] = 0;
1030 
1031  if (_need_u_previous_nl)
1032  _u_previous_nl[i] = 0;
1033 
1035  _grad_u_previous_nl[i] = 0;
1036 
1038  _second_u_previous_nl[i] = 0;
1039 
1040  if (is_transient)
1041  {
1042  if (_need_u_dot)
1043  _u_dot[i] = 0;
1044 
1045  if (_need_u_dotdot)
1046  _u_dotdot[i] = 0;
1047 
1048  if (_need_u_dot_old)
1049  _u_dot_old[i] = 0;
1050 
1051  if (_need_u_dotdot_old)
1052  _u_dotdot_old[i] = 0;
1053 
1054  if (_need_du_dot_du)
1055  _du_dot_du[i] = 0;
1056 
1057  if (_need_du_dotdot_du)
1058  _du_dotdot_du[i] = 0;
1059 
1060  if (_need_grad_dot)
1061  _grad_u_dot[i] = 0;
1062 
1063  if (_need_grad_dotdot)
1064  _grad_u_dotdot[i] = 0;
1065 
1066  if (_need_u_old)
1067  _u_old[i] = 0;
1068 
1069  if (_need_u_older)
1070  _u_older[i] = 0;
1071 
1072  if (_need_grad_old)
1073  _grad_u_old[i] = 0;
1074 
1075  if (_need_grad_older)
1076  _grad_u_older[i] = 0;
1077 
1078  if (_need_second_old)
1079  _second_u_old[i] = 0;
1080 
1081  if (_need_second_older)
1082  _second_u_older[i] = 0;
1083 
1084  if (_need_curl_old)
1085  _curl_u_old[i] = 0;
1086  }
1087  }
1088 
1089  unsigned int num_dofs = _dof_indices.size();
1090 
1091  if (_need_dof_values)
1092  _dof_values.resize(num_dofs);
1093 
1095  _dof_values_previous_nl.resize(num_dofs);
1096 
1097  if (is_transient)
1098  {
1100  _dof_values_old.resize(num_dofs);
1102  _dof_values_older.resize(num_dofs);
1104  _dof_values_dot.resize(num_dofs);
1106  _dof_values_dotdot.resize(num_dofs);
1108  _dof_values_dot_old.resize(num_dofs);
1110  _dof_values_dotdot_old.resize(num_dofs);
1111  }
1112 
1113  if (_need_solution_dofs)
1114  _solution_dofs.resize(num_dofs);
1115 
1117  _solution_dofs_old.resize(num_dofs);
1118 
1120  _solution_dofs_older.resize(num_dofs);
1121 
1122  const NumericVector<Real> & current_solution = *_sys.currentSolution();
1123  const NumericVector<Real> & solution_old = _sys.solutionOld();
1124  const NumericVector<Real> & solution_older = _sys.solutionOlder();
1125  const NumericVector<Real> * solution_prev_nl = _sys.solutionPreviousNewton();
1126  const NumericVector<Real> * u_dot = _sys.solutionUDot();
1127  const NumericVector<Real> * u_dotdot = _sys.solutionUDotDot();
1128  const NumericVector<Real> * u_dot_old = _sys.solutionUDotOld();
1129  const NumericVector<Real> * u_dotdot_old = _sys.solutionUDotDotOld();
1130  const Real & du_dot_du = _sys.duDotDu();
1131  const Real & du_dotdot_du = _sys.duDotDotDu();
1132 
1133  dof_id_type idx = 0;
1134  Real soln_local = 0;
1135  Real tag_local_value = 0;
1136  Real soln_old_local = 0;
1137  Real soln_older_local = 0;
1138  Real soln_previous_nl_local = 0;
1139  Real u_dot_local = 0;
1140  Real u_dotdot_local = 0;
1141  Real u_dot_old_local = 0;
1142  Real u_dotdot_old_local = 0;
1143 
1144  const OutputType * phi_local = NULL;
1145  const typename OutputTools<OutputType>::OutputGradient * dphi_qp = NULL;
1146  const typename OutputTools<OutputType>::OutputSecond * d2phi_local = NULL;
1147  const OutputType * curl_phi_local = NULL;
1148 
1149  typename OutputTools<OutputType>::OutputGradient * grad_u_qp = NULL;
1150  typename OutputTools<OutputType>::OutputGradient * grad_u_old_qp = NULL;
1151  typename OutputTools<OutputType>::OutputGradient * grad_u_older_qp = NULL;
1152  typename OutputTools<OutputType>::OutputGradient * grad_u_previous_nl_qp = NULL;
1153 
1154  typename OutputTools<OutputType>::OutputSecond * second_u_qp = NULL;
1155  typename OutputTools<OutputType>::OutputSecond * second_u_old_qp = NULL;
1156  typename OutputTools<OutputType>::OutputSecond * second_u_older_qp = NULL;
1157  typename OutputTools<OutputType>::OutputSecond * second_u_previous_nl_qp = NULL;
1158 
1159  for (unsigned int i = 0; i < num_dofs; i++)
1160  {
1161  idx = _dof_indices[i];
1162  soln_local = current_solution(idx);
1163 
1164  if (_need_dof_values)
1165  _dof_values[i] = soln_local;
1166 
1169  soln_previous_nl_local = (*solution_prev_nl)(idx);
1170 
1172  _dof_values_previous_nl[i] = soln_previous_nl_local;
1173 
1174  if (_need_solution_dofs)
1175  _solution_dofs(i) = soln_local;
1176 
1177  if (is_transient)
1178  {
1180  soln_old_local = solution_old(idx);
1181 
1183  soln_older_local = solution_older(idx);
1184 
1186  _dof_values_old[i] = soln_old_local;
1188  _dof_values_older[i] = soln_older_local;
1189 
1190  if (u_dot)
1191  {
1192  u_dot_local = (*u_dot)(idx);
1194  _dof_values_dot[i] = u_dot_local;
1195  }
1196 
1197  if (u_dotdot)
1198  {
1199  u_dotdot_local = (*u_dotdot)(idx);
1201  _dof_values_dotdot[i] = u_dotdot_local;
1202  }
1203 
1204  if (u_dot_old)
1205  {
1206  u_dot_old_local = (*u_dot_old)(idx);
1208  _dof_values_dot_old[i] = u_dot_old_local;
1209  }
1210 
1211  if (u_dotdot_old)
1212  {
1213  u_dotdot_old_local = (*u_dotdot_old)(idx);
1215  _dof_values_dotdot_old[i] = u_dotdot_old_local;
1216  }
1217 
1219  _solution_dofs_old(i) = solution_old(idx);
1220 
1222  _solution_dofs_older(i) = solution_older(idx);
1223  }
1224 
1225  for (unsigned int qp = 0; qp < nqp; qp++)
1226  {
1227  phi_local = &phi[i][qp];
1228  dphi_qp = &grad_phi[i][qp];
1229 
1230  grad_u_qp = &_grad_u[qp];
1231 
1233  grad_u_previous_nl_qp = &_grad_u_previous_nl[qp];
1234 
1235  if (is_transient)
1236  {
1237  if (_need_grad_old)
1238  grad_u_old_qp = &_grad_u_old[qp];
1239 
1240  if (_need_grad_older)
1241  grad_u_older_qp = &_grad_u_older[qp];
1242  }
1243 
1245  {
1246  d2phi_local = &(*second_phi)[i][qp];
1247 
1248  if (_need_second)
1249  {
1250  second_u_qp = &_second_u[qp];
1251  second_u_qp->add_scaled(*d2phi_local, soln_local);
1252  }
1253 
1255  {
1256  second_u_previous_nl_qp = &_second_u_previous_nl[qp];
1257  second_u_previous_nl_qp->add_scaled(*d2phi_local, soln_previous_nl_local);
1258  }
1259 
1260  if (is_transient)
1261  {
1262  if (_need_second_old)
1263  second_u_old_qp = &_second_u_old[qp];
1264 
1265  if (_need_second_older)
1266  second_u_older_qp = &_second_u_older[qp];
1267  }
1268  }
1269 
1270  if (_need_curl || _need_curl_old)
1271  {
1272  curl_phi_local = &(*curl_phi)[i][qp];
1273 
1274  if (_need_curl)
1275  _curl_u[qp] += *curl_phi_local * soln_local;
1276 
1277  if (is_transient && _need_curl_old)
1278  _curl_u_old[qp] += *curl_phi_local * soln_old_local;
1279  }
1280 
1281  _u[qp] += *phi_local * soln_local;
1282 
1283  if (safe_access_tagged_vectors)
1284  {
1285  for (auto tag : active_coupleable_vector_tags)
1286  if (_need_vector_tag_u[tag] && _sys.hasVector(tag) && _sys.getVector(tag).closed())
1287  {
1288  tag_local_value = _sys.getVector(tag)(idx);
1289  _vector_tag_u[tag][qp] += *phi_local * tag_local_value;
1290  }
1291  }
1292 
1293  if (safe_access_tagged_matrices)
1294  {
1295  for (auto tag : active_coupleable_matrix_tags)
1296  if (_need_matrix_tag_u[tag] && _sys.hasMatrix(tag) && _sys.getMatrix(tag).closed())
1297  {
1298  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1299  tag_local_value = _sys.getMatrix(tag)(idx, idx);
1300  _matrix_tag_u[tag][qp] += *phi_local * tag_local_value;
1301  }
1302  }
1303 
1304  grad_u_qp->add_scaled(*dphi_qp, soln_local);
1305 
1306  if (_need_u_previous_nl)
1307  _u_previous_nl[qp] += *phi_local * soln_previous_nl_local;
1309  grad_u_previous_nl_qp->add_scaled(*dphi_qp, soln_previous_nl_local);
1310 
1311  if (is_transient)
1312  {
1313  if (_need_u_dot)
1314  _u_dot[qp] += *phi_local * u_dot_local;
1315 
1316  if (_need_u_dotdot)
1317  _u_dotdot[qp] += *phi_local * u_dotdot_local;
1318 
1319  if (_need_u_dot_old)
1320  _u_dot_old[qp] += *phi_local * u_dot_old_local;
1321 
1322  if (_need_u_dotdot_old)
1323  _u_dotdot_old[qp] += *phi_local * u_dotdot_old_local;
1324 
1325  if (_need_du_dot_du)
1326  _du_dot_du[qp] = du_dot_du;
1327 
1328  if (_need_du_dotdot_du)
1329  _du_dotdot_du[qp] = du_dotdot_du;
1330 
1331  if (_need_grad_dot)
1332  _grad_u_dot[qp].add_scaled(*dphi_qp, u_dot_local);
1333 
1334  if (_need_grad_dotdot)
1335  _grad_u_dotdot[qp].add_scaled(*dphi_qp, u_dotdot_local);
1336 
1337  if (_need_u_old)
1338  _u_old[qp] += *phi_local * soln_old_local;
1339 
1340  if (_need_u_older)
1341  _u_older[qp] += *phi_local * soln_older_local;
1342 
1343  if (_need_grad_old)
1344  grad_u_old_qp->add_scaled(*dphi_qp, soln_old_local);
1345 
1346  if (_need_grad_older)
1347  grad_u_older_qp->add_scaled(*dphi_qp, soln_older_local);
1348 
1349  if (_need_second_old)
1350  second_u_old_qp->add_scaled(*d2phi_local, soln_old_local);
1351 
1352  if (_need_second_older)
1353  second_u_older_qp->add_scaled(*d2phi_local, soln_older_local);
1354  }
1355  }
1356  }
1357 
1358  // Automatic differentiation
1360  computeAD(num_dofs, nqp);
1361 }
FieldVariableGradient _grad_u_old
MooseArray< Real > _dof_values_old
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
virtual NumericVector< Number > * solutionUDot()=0
std::vector< FieldVariableValue > _vector_tag_u
void computeAD(const unsigned int &num_dofs, const unsigned int &nqp)
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:670
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:125
FieldVariableGradient _grad_u_dot
void resize(const unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:200
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
DenseVector< Number > _solution_dofs_older
FieldVariableValue _u_dot
u_dot (time derivative)
MooseArray< Real > _dof_values_previous_nl
FieldVariableSecond _second_u
virtual NumericVector< Number > * solutionUDotDotOld()=0
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
MooseArray< Real > _dof_values_dotdot_old
nodal values of u_dotdot_old
FieldVariableSecond _second_u_old
FieldVariableCurl _curl_u_old
MooseArray< Real > _dof_values_dot
nodal values of u_dot
THREAD_ID _tid
Thread ID.
virtual NumericVector< Number > * solutionPreviousNewton()=0
std::vector< dof_id_type > _dof_indices
DOF indices.
std::vector< bool > _need_vector_tag_u
const FieldVariablePhiValue & phi()
virtual Number & duDotDu()
Definition: SystemBase.h:156
std::set< TagID > & getActiveFEVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:183
virtual Number & duDotDotDu()
Definition: SystemBase.h:157
SubProblem & _subproblem
Problem this variable is part of.
SystemBase & _sys
System this variable is part of.
FieldVariableCurl _curl_u
virtual bool isTransient() const =0
FieldVariableGradient _grad_u
virtual SubProblem & subproblem()
Definition: SystemBase.h:103
DenseVector< Number > _solution_dofs
local elemental DoFs
FieldVariableGradient _grad_u_dotdot
FieldVariableSecond _second_u_older
VariableValue _du_dot_du
derivative of u_dot wrt u
MooseArray< Real > _dof_values_dot_old
nodal values of u_dot_old
FieldVariableGradient _grad_u_older
std::vector< FieldVariableValue > _matrix_tag_u
bool safeAccessTaggedMatrices()
Is it safe to access the tagged matrices.
Definition: SubProblem.h:507
std::vector< bool > _need_matrix_tag_u
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:772
MooseArray< Real > _dof_values
virtual NumericVector< Number > & solutionOlder()=0
std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:177
FieldVariableValue _u_older
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
FieldVariableGradient _grad_u_previous_nl
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:124
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
bool safeAccessTaggedVectors()
Is it safe to access the tagged vectors.
Definition: SubProblem.h:510
FieldVariableSecond _second_u_previous_nl
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:720
MooseArray< Real > _dof_values_dotdot
nodal values of u_dotdot
FieldVariableValue _u_previous_nl
DenseVector< Number > _solution_dofs_old
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computingCurl()

bool MooseVariableFE< Real >::computingCurl ( )
inlineinherited

Whether or not this variable is computing the curl.

Definition at line 129 of file MooseVariableFE.h.

◆ computingJacobian()

void MooseVariableBase::computingJacobian ( bool  computing_jacobian)
inlineinherited

Definition at line 111 of file MooseVariableBase.h.

111 { _computing_jacobian = computing_jacobian; }

◆ computingSecond()

bool MooseVariableFE< Real >::computingSecond ( )
inlineinherited

Whether or not this variable is computing any second derivatives.

Definition at line 125 of file MooseVariableFE.h.

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

◆ curlPhi()

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

Definition at line 198 of file MooseVariableFE.h.

199  {
200  _curl_phi = &_assembly.feCurlPhi<OutputType>(_fe_type);
201  return *_curl_phi;
202  }
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:884

◆ curlPhiFace()

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

Definition at line 211 of file MooseVariableFE.h.

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

◆ curlPhiFaceNeighbor()

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

Definition at line 237 of file MooseVariableFE.h.

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

◆ curlPhiNeighbor()

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

Definition at line 224 of file MooseVariableFE.h.

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

◆ curlSln()

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

Definition at line 339 of file MooseVariableFE.h.

340  {
341  _need_curl = true;
342  curlPhi();
343  curlPhiFace();
344  return _curl_u;
345  }
const FieldVariablePhiCurl & curlPhi()
const FieldVariablePhiCurl & curlPhiFace()
FieldVariableCurl _curl_u

◆ curlSlnNeighbor()

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

Definition at line 549 of file MooseVariableFE.h.

550  {
551  _need_curl_neighbor = true;
553  return _curl_u_neighbor;
554  }
FieldVariableCurl _curl_u_neighbor
const FieldVariablePhiCurl & curlPhiFaceNeighbor()

◆ curlSlnOld()

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

Definition at line 346 of file MooseVariableFE.h.

347  {
348  _need_curl_old = true;
349  curlPhi();
350  curlPhiFace();
351  return _curl_u_old;
352  }
FieldVariableCurl _curl_u_old
const FieldVariablePhiCurl & curlPhi()
const FieldVariablePhiCurl & curlPhiFace()

◆ curlSlnOlder()

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

Definition at line 353 of file MooseVariableFE.h.

354  {
355  _need_curl_older = true;
356  curlPhi();
357  curlPhiFace();
358  return _curl_u_older;
359  }
const FieldVariablePhiCurl & curlPhi()
const FieldVariablePhiCurl & curlPhiFace()
FieldVariableCurl _curl_u_older

◆ curlSlnOlderNeighbor()

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

Definition at line 561 of file MooseVariableFE.h.

562  {
565  return _curl_u_older_neighbor;
566  }
FieldVariableCurl _curl_u_older_neighbor
const FieldVariablePhiCurl & curlPhiFaceNeighbor()

◆ curlSlnOldNeighbor()

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

Definition at line 555 of file MooseVariableFE.h.

556  {
559  return _curl_u_old_neighbor;
560  }
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 144 of file MooseVariableFE.h.

144 { 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 149 of file MooseVariableFE.h.

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

◆ dofIndices() [1/2]

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

◆ dofIndices() [2/2]

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

Definition at line 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 662 of file MooseVariableFE.h.

662 { 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 92 of file MooseVariableBase.h.

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

92 { 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 562 of file MooseVariableFE.C.

563 {
564  mooseDeprecated("Use dofValues instead of dofValue");
565  return dofValues();
566 }
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 570 of file MooseVariableFE.C.

571 {
572  _need_dof_values = true;
573  return _dof_values;
574 }
MooseArray< Real > _dof_values

◆ dofValuesDot()

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

Returns time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 634 of file MooseVariableFE.C.

635 {
636  if (_sys.solutionUDot())
637  {
638  _need_dof_values_dot = true;
639  return _dof_values_dot;
640  }
641  else
642  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
643  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
644 }
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 648 of file MooseVariableFE.C.

649 {
650  if (_sys.solutionUDotDot())
651  {
653  return _dof_values_dotdot;
654  }
655  else
656  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
657  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
658  "`u_dotdot`.");
659 }
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 707 of file MooseVariableFE.C.

708 {
709  if (_sys.solutionUDotDot())
710  {
713  }
714  else
715  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
716  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
717  "`u_dotdot`.");
718 }
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 678 of file MooseVariableFE.C.

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

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

694 {
695  if (_sys.solutionUDot())
696  {
699  }
700  else
701  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
702  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
703 }
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 663 of file MooseVariableFE.C.

664 {
665  if (_sys.solutionUDotOld())
666  {
668  return _dof_values_dot_old;
669  }
670  else
671  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
672  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
673  "`u_dot_old`.");
674 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
SystemBase & _sys
System this variable is part of.
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 722 of file MooseVariableFE.C.

723 {
724  if (_sys.solutionUDotOld())
725  {
728  }
729  else
730  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
731  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
732  "`u_dot_old`.");
733 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
SystemBase & _sys
System this variable is part of.
MooseArray< Real > _dof_values_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 760 of file MooseVariableFE.C.

761 {
762  _need_dof_du_dotdot_du = true;
763  return _dof_du_dotdot_du;
764 }
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 776 of file MooseVariableFE.C.

777 {
780 }
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 752 of file MooseVariableFE.C.

753 {
754  _need_dof_du_dot_du = true;
755  return _dof_du_dot_du;
756 }
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 768 of file MooseVariableFE.C.

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

603 {
605  return _dof_values_neighbor;
606 }
MooseArray< Real > _dof_values_neighbor

◆ dofValuesOld()

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

Returns old dof solution on element.

Implements MooseVariableFEBase.

Definition at line 578 of file MooseVariableFE.C.

579 {
580  _need_dof_values_old = true;
581  return _dof_values_old;
582 }
MooseArray< Real > _dof_values_old

◆ dofValuesOlder()

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

Returns older dof solution on element.

Implements MooseVariableFEBase.

Definition at line 586 of file MooseVariableFE.C.

587 {
588  _need_dof_values_older = true;
589  return _dof_values_older;
590 }
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 618 of file MooseVariableFE.C.

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

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

595 {
598 }
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 626 of file MooseVariableFE.C.

627 {
630 }
MooseArray< Real > _dof_values_previous_nl_neighbor

◆ duDotDotDu()

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

Definition at line 463 of file MooseVariableFE.h.

464  {
465  _need_du_dotdot_du = true;
466  return _du_dotdot_du;
467  }
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u

◆ duDotDotDuNeighbor()

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

Definition at line 625 of file MooseVariableFE.h.

626  {
628  return _du_dotdot_du_neighbor;
629  }
VariableValue _du_dotdot_du_neighbor

◆ duDotDu()

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

Definition at line 457 of file MooseVariableFE.h.

458  {
459  _need_du_dot_du = true;
460  return _du_dot_du;
461  }
VariableValue _du_dot_du
derivative of u_dot wrt u

◆ duDotDuNeighbor()

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

Definition at line 619 of file MooseVariableFE.h.

620  {
622  return _du_dot_du_neighbor;
623  }
VariableValue _du_dot_du_neighbor

◆ feType()

const FEType& MooseVariableBase::feType ( ) const
inlineinherited

◆ getDofIndices()

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

Implements MooseVariableFEBase.

Definition at line 456 of file MooseVariableFE.C.

458 {
459  _dof_map.dof_indices(elem, dof_indices, _var_num);
460 }
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 516 of file MooseVariableFE.C.

517 {
518  std::vector<dof_id_type> dof_indices;
519  _dof_map.dof_indices(elem, dof_indices, _var_num);
520 
521  return (*_sys.currentSolution())(dof_indices[idx]);
522 }
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 526 of file MooseVariableFE.C.

527 {
528  std::vector<dof_id_type> dof_indices;
529  _dof_map.dof_indices(elem, dof_indices, _var_num);
530 
531  return _sys.solutionOld()(dof_indices[idx]);
532 }
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 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.solutionOlder()(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 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 1778 of file MooseVariableFE.C.

1782 {
1783  std::vector<dof_id_type> dof_indices;
1784  _dof_map.dof_indices(elem, dof_indices, _var_num);
1785 
1787  if (isNodal())
1788  {
1789  for (unsigned int i = 0; i < dof_indices.size(); ++i)
1790  {
1791  // The zero index is because we only have one point that the phis are evaluated at
1792  value += grad_phi[i][0] * (*_sys.currentSolution())(dof_indices[i]);
1793  }
1794  }
1795  else
1796  {
1797  mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
1798  value = 0.0;
1799  }
1800 
1801  return value;
1802 }
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:124
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 464 of file MooseVariableFE.C.

465 {
466  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
467 
468  // Make sure that the node has DOFs
469  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
470  * produce a better error (see misc/check_error.node_value_off_block) */
471  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
472  "Node " << node.id() << " does not contain any dofs for the "
473  << _sys.system().variable_name(_var_num) << " variable");
474 
475  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
476 
477  return (*_sys.currentSolution())(dof);
478 }
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:879
const Node *& node() const
bool isSemiLocal(Node *node)
Returns true if the node is semi-local.
Definition: MooseMesh.C:642
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 482 of file MooseVariableFE.C.

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

500 {
501  mooseAssert(_subproblem.mesh().isSemiLocal(const_cast<Node *>(&node)), "Node is not Semilocal");
502 
503  // Make sure that the node has DOFs
504  /* Note, this is a reproduction of an assert within libMesh::Node::dof_number, this is done to
505  * produce a better error (see misc/check_error.node_value_off_block) */
506  mooseAssert(node.n_dofs(_sys.number(), _var_num) > 0,
507  "Node " << node.id() << " does not contain any dofs for the "
508  << _sys.system().variable_name(_var_num) << " variable");
509 
510  dof_id_type dof = node.dof_number(_sys.number(), _var_num, 0);
511  return _sys.solutionOlder()(dof);
512 }
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:879
const Node *& node() const
bool isSemiLocal(Node *node)
Returns true if the node is semi-local.
Definition: MooseMesh.C:642
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 896 of file MooseVariableFE.C.

898 {
899  std::vector<dof_id_type> dof_indices;
900  _dof_map.dof_indices(elem, dof_indices, _var_num);
901 
902  OutputType value = 0;
903  if (isNodal())
904  {
905  for (unsigned int i = 0; i < dof_indices.size(); ++i)
906  {
907  // The zero index is because we only have one point that the phis are evaluated at
908  value += phi[i][0] * (*_sys.currentSolution())(dof_indices[i]);
909  }
910  }
911  else
912  {
913  mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
914  value = (*_sys.currentSolution())(dof_indices[0]);
915  }
916 
917  return value;
918 }
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 192 of file MooseVariableFE.h.

192 { return _grad_phi; }
const FieldVariablePhiGradient & _grad_phi

◆ gradPhiFace()

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

Definition at line 205 of file MooseVariableFE.h.

205 { return _grad_phi_face; }
const FieldVariablePhiGradient & _grad_phi_face

◆ gradPhiFaceNeighbor()

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

Definition at line 231 of file MooseVariableFE.h.

231 { return _grad_phi_face_neighbor; }
const FieldVariablePhiGradient & _grad_phi_face_neighbor

◆ gradPhiNeighbor()

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

Definition at line 218 of file MooseVariableFE.h.

218 { return _grad_phi_neighbor; }
const FieldVariablePhiGradient & _grad_phi_neighbor

◆ gradSln()

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

Definition at line 272 of file MooseVariableFE.h.

272 { return _grad_u; }
FieldVariableGradient _grad_u

◆ gradSlnDot()

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

Definition at line 288 of file MooseVariableFE.h.

289  {
290  if (_sys.solutionUDot())
291  {
292  _need_grad_dot = true;
293  return _grad_u_dot;
294  }
295  else
296  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
297  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
298  }
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 299 of file MooseVariableFE.h.

300  {
301  if (_sys.solutionUDotDot())
302  {
303  _need_grad_dotdot = true;
304  return _grad_u_dotdot;
305  }
306  else
307  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
308  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
309  "`u_dotdot`.");
310  }
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 485 of file MooseVariableFE.h.

485 { return _grad_u_neighbor; }
FieldVariableGradient _grad_u_neighbor

◆ gradSlnNeighborDot()

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

Definition at line 501 of file MooseVariableFE.h.

502  {
503  if (_sys.solutionUDot())
504  {
506  return _grad_u_neighbor_dot;
507  }
508  else
509  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
510  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
511  }
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 512 of file MooseVariableFE.h.

513  {
514  if (_sys.solutionUDotDot())
515  {
518  }
519  else
520  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
521  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
522  "`u_dotdot`.");
523  }
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 273 of file MooseVariableFE.h.

274  {
275  _need_grad_old = true;
276  return _grad_u_old;
277  }
FieldVariableGradient _grad_u_old

◆ gradSlnOlder()

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

Definition at line 278 of file MooseVariableFE.h.

279  {
280  _need_grad_older = true;
281  return _grad_u_older;
282  }
FieldVariableGradient _grad_u_older

◆ gradSlnOlderNeighbor()

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

Definition at line 491 of file MooseVariableFE.h.

492  {
494  return _grad_u_older_neighbor;
495  }
FieldVariableGradient _grad_u_older_neighbor

◆ gradSlnOldNeighbor()

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

Definition at line 486 of file MooseVariableFE.h.

487  {
489  return _grad_u_old_neighbor;
490  }
FieldVariableGradient _grad_u_old_neighbor

◆ gradSlnPreviousNL()

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

Definition at line 283 of file MooseVariableFE.h.

284  {
285  _need_grad_previous_nl = true;
286  return _grad_u_previous_nl;
287  }
FieldVariableGradient _grad_u_previous_nl

◆ gradSlnPreviousNLNeighbor()

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

Definition at line 496 of file MooseVariableFE.h.

497  {
500  }
FieldVariableGradient _grad_u_previous_nl_neighbor

◆ increment()

FieldVariableValue& MooseVariableFE< Real >::increment ( )
inlineinherited

Definition at line 244 of file MooseVariableFE.h.

244 { return _increment; }
FieldVariableValue _increment
Increment in the variable used in dampers.

◆ insert()

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

Implements MooseVariableFEBase.

Definition at line 546 of file MooseVariableFE.C.

547 {
548  if (_has_nodal_value)
549  residual.insert(&_dof_values[0], _dof_indices);
550 }
std::vector< dof_id_type > _dof_indices
DOF indices.
bool _has_nodal_value
If true, the nodal value gets inserted on calling insert()
MooseArray< Real > _dof_values

◆ isNodal()

bool MooseVariableFE< Real >::isNodal ( ) const
inlineoverridevirtualinherited

Is this variable nodal.

Returns
true if it nodal, otherwise false

Implements MooseVariableFEBase.

Definition at line 134 of file MooseVariableFE.h.

134 { return _is_nodal; }
bool _is_nodal
if variable is nodal

◆ isNodalDefined()

bool MooseVariableFE< Real >::isNodalDefined ( ) const
inlineinherited

Definition at line 138 of file MooseVariableFE.h.

138 { return _has_dofs; }
bool _has_dofs
If we have dofs.

◆ isNodalNeighborDefined()

bool MooseVariableFE< Real >::isNodalNeighborDefined ( ) const
inlineinherited

Definition at line 142 of file MooseVariableFE.h.

142 { return _neighbor_has_dofs; }
bool _neighbor_has_dofs
If the neighor has dofs.

◆ isVector()

bool MooseVariableFE< Real >::isVector ( ) const
overridevirtualinherited
Returns
true if this is a vector-valued element, false otherwise.

Implements MooseVariableBase.

Definition at line 2236 of file MooseVariableFE.C.

2237 {
2238  return std::is_same<OutputType, RealVectorValue>::value;
2239 }

◆ kind()

Moose::VarKindType MooseVariableBase::kind ( ) const
inlineinherited

Kind of the variable (Nonlinear, Auxiliary, ...)

Definition at line 71 of file MooseVariableBase.h.

Referenced by ShapeUserObject< SideUserObject >::coupled(), Coupleable::coupled(), AuxKernel::coupledDot(), and AuxKernel::coupledDotDu().

71 { return _var_kind; }
Moose::VarKindType _var_kind

◆ matrixTagValue()

const FieldVariableValue& MooseVariableFE< Real >::matrixTagValue ( TagID  tag)
inlineinherited

Definition at line 251 of file MooseVariableFE.h.

252  {
253  _need_matrix_tag_u[tag] = true;
254  return _matrix_tag_u[tag];
255  }
std::vector< FieldVariableValue > _matrix_tag_u
std::vector< bool > _need_matrix_tag_u

◆ name()

const std::string & MooseVariableBase::name ( ) const
inherited

◆ neighbor()

const Elem*& MooseVariableFE< Real >::neighbor ( ) const
inlineinherited

Current neighboring element.

Definition at line 154 of file MooseVariableFE.h.

154 { return _neighbor; }
const Elem *& _neighbor
neighboring element

◆ nodalDofIndex()

virtual dof_id_type& MooseVariableFE< Real >::nodalDofIndex ( )
inlineoverridevirtualinherited

Implements MooseVariableFEBase.

Definition at line 137 of file MooseVariableFE.h.

137 { return _nodal_dof_index; }

◆ nodalDofIndexNeighbor()

virtual dof_id_type& MooseVariableFE< Real >::nodalDofIndexNeighbor ( )
inlineoverridevirtualinherited

Implements MooseVariableFEBase.

Definition at line 141 of file MooseVariableFE.h.

141 { return _nodal_dof_index_neighbor; }
dof_id_type _nodal_dof_index_neighbor

◆ nodalMatrixTagValue()

const MooseArray< Real > & MooseVariableFE< Real >::nodalMatrixTagValue ( TagID  tag)
inherited

Definition at line 1843 of file MooseVariableFE.C.

1844 {
1845  if (isNodal())
1846  {
1847  _need_matrix_tag_dof_u[tag] = true;
1848 
1849  if (_sys.hasMatrix(tag) && tag < _matrix_tags_dof_u.size())
1850  return _matrix_tags_dof_u[tag];
1851  else
1852  mooseError("Tag is not associated with any matrix or there is no any data for tag ",
1853  tag,
1854  " for nodal variable ",
1855  name());
1856  }
1857  else
1858  mooseError("Nodal values can be requested only on nodal variables, variable '",
1859  name(),
1860  "' is not nodal.");
1861 }
std::vector< bool > _need_matrix_tag_dof_u
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
SystemBase & _sys
System this variable is part of.
bool isNodal() const override
const std::string & name() const
Get the variable name.
std::vector< MooseArray< Real > > _matrix_tags_dof_u

◆ nodalValue()

const Real & MooseVariableFE< Real >::nodalValue ( )
inherited

Definition at line 1806 of file MooseVariableFE.C.

1807 {
1808  if (isNodal())
1809  {
1810  _need_dof_values = true;
1811  return _nodal_value;
1812  }
1813  else
1814  mooseError("Nodal values can be requested only on nodal variables, variable '",
1815  name(),
1816  "' is not nodal.");
1817 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool isNodal() const override
Real _nodal_value
Nodal values.
const std::string & name() const
Get the variable name.

◆ nodalValueDot()

const Real & MooseVariableFE< Real >::nodalValueDot ( )
inherited

Definition at line 1910 of file MooseVariableFE.C.

1911 {
1912  if (isNodal())
1913  {
1914  if (_sys.solutionUDot())
1915  {
1916  _need_dof_values_dot = true;
1917  return _nodal_value_dot;
1918  }
1919  else
1920  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
1921  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
1922  }
1923  else
1924  mooseError("Nodal values can be requested only on nodal variables, variable '",
1925  name(),
1926  "' is not nodal.");
1927 }
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
Real _nodal_value_dot
nodal values of u_dot
SystemBase & _sys
System this variable is part of.
bool isNodal() const override
const std::string & name() const
Get the variable name.

◆ nodalValueDotDot()

const Real & MooseVariableFE< Real >::nodalValueDotDot ( )
inherited

Definition at line 1931 of file MooseVariableFE.C.

1932 {
1933  if (isNodal())
1934  {
1935  if (_sys.solutionUDotDot())
1936  {
1937  _need_dof_values_dotdot = true;
1938  return _nodal_value_dotdot;
1939  }
1940  else
1941  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
1942  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
1943  "`u_dotdot`.");
1944  }
1945  else
1946  mooseError("Nodal values can be requested only on nodal variables, variable '",
1947  name(),
1948  "' is not nodal.");
1949 }
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.
bool isNodal() const override
const std::string & name() const
Get the variable name.
virtual NumericVector< Number > * solutionUDotDot()=0
Real _nodal_value_dotdot
nodal values of u_dotdot

◆ nodalValueDotDotNeighbor()

const Real & MooseVariableFE< Real >::nodalValueDotDotNeighbor ( )
inherited

◆ nodalValueDotDotOld()

const Real & MooseVariableFE< Real >::nodalValueDotDotOld ( )
inherited

Definition at line 1975 of file MooseVariableFE.C.

1976 {
1977  if (isNodal())
1978  {
1979  if (_sys.solutionUDotDotOld())
1980  {
1982  return _nodal_value_dotdot_old;
1983  }
1984  else
1985  mooseError("MooseVariableFE: Old second time derivative of solution (`u_dotdot_old`) is not "
1986  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
1987  "requesting `u_dotdot_old`.");
1988  }
1989  else
1990  mooseError("Nodal values can be requested only on nodal variables, variable '",
1991  name(),
1992  "' is not nodal.");
1993 }
Real _nodal_value_dotdot_old
nodal values of u_dotdot_old
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
SystemBase & _sys
System this variable is part of.
bool isNodal() const override
const std::string & name() const
Get the variable name.

◆ nodalValueDotDotOldNeighbor()

const Real & MooseVariableFE< Real >::nodalValueDotDotOldNeighbor ( )
inherited

◆ nodalValueDotNeighbor()

const Real & MooseVariableFE< Real >::nodalValueDotNeighbor ( )
inherited

◆ nodalValueDotOld()

const Real & MooseVariableFE< Real >::nodalValueDotOld ( )
inherited

Definition at line 1953 of file MooseVariableFE.C.

1954 {
1955  if (isNodal())
1956  {
1957  if (_sys.solutionUDotOld())
1958  {
1959  _need_dof_values_dot_old = true;
1960  return _nodal_value_dot_old;
1961  }
1962  else
1963  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
1964  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
1965  "`u_dot_old`.");
1966  }
1967  else
1968  mooseError("Nodal values can be requested only on nodal variables, variable '",
1969  name(),
1970  "' is not nodal.");
1971 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
Real _nodal_value_dot_old
nodal values of u_dot_old
SystemBase & _sys
System this variable is part of.
bool isNodal() const override
const std::string & name() const
Get the variable name.
virtual NumericVector< Number > * solutionUDotOld()=0

◆ nodalValueDotOldNeighbor()

const Real & MooseVariableFE< Real >::nodalValueDotOldNeighbor ( )
inherited

◆ nodalValueDuDotDotDu()

const Real & MooseVariableFE< Real >::nodalValueDuDotDotDu ( )
inherited

◆ nodalValueDuDotDotDuNeighbor()

const Real & MooseVariableFE< Real >::nodalValueDuDotDotDuNeighbor ( )
inherited

◆ nodalValueDuDotDu()

const Real & MooseVariableFE< Real >::nodalValueDuDotDu ( )
inherited

◆ nodalValueDuDotDuNeighbor()

const Real & MooseVariableFE< Real >::nodalValueDuDotDuNeighbor ( )
inherited

◆ nodalValueNeighbor()

const Real & MooseVariableFE< Real >::nodalValueNeighbor ( )
inherited

◆ nodalValueOld()

const Real & MooseVariableFE< Real >::nodalValueOld ( )
inherited

Definition at line 1865 of file MooseVariableFE.C.

1866 {
1867  if (isNodal())
1868  {
1869  _need_dof_values_old = true;
1870  return _nodal_value_old;
1871  }
1872  else
1873  mooseError("Nodal values can be requested only on nodal variables, variable '",
1874  name(),
1875  "' is not nodal.");
1876 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool isNodal() const override
const std::string & name() const
Get the variable name.

◆ nodalValueOlder()

const Real & MooseVariableFE< Real >::nodalValueOlder ( )
inherited

Definition at line 1880 of file MooseVariableFE.C.

1881 {
1882  if (isNodal())
1883  {
1884  _need_dof_values_older = true;
1885  return _nodal_value_older;
1886  }
1887  else
1888  mooseError("Nodal values can be requested only on nodal variables, variable '",
1889  name(),
1890  "' is not nodal.");
1891 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool isNodal() const override
const std::string & name() const
Get the variable name.

◆ nodalValueOlderNeighbor()

const Real & MooseVariableFE< Real >::nodalValueOlderNeighbor ( )
inherited

◆ nodalValueOldNeighbor()

const Real & MooseVariableFE< Real >::nodalValueOldNeighbor ( )
inherited

◆ nodalValuePreviousNL()

const Real & MooseVariableFE< Real >::nodalValuePreviousNL ( )
inherited

Definition at line 1895 of file MooseVariableFE.C.

1896 {
1897  if (isNodal())
1898  {
1900  return _nodal_value_previous_nl;
1901  }
1902  else
1903  mooseError("Nodal values can be requested only on nodal variables, variable '",
1904  name(),
1905  "' is not nodal.");
1906 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool isNodal() const override
const std::string & name() const
Get the variable name.
Definition: M