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

Class for stuff related to variables. More...

#include <Adaptivity.h>

Inheritance diagram for MooseVariableFE< OutputType >:
[legend]

Public Member Functions

 MooseVariableFE (unsigned int var_num, const FEType &fe_type, SystemBase &sys, Assembly &assembly, Moose::VarKindType var_kind, THREAD_ID tid)
 
virtual ~MooseVariableFE ()
 
void clearDofIndices () override
 Clear out the dof indices. More...
 
void prepare () override
 
void prepareNeighbor () override
 
void prepareAux () override
 
void reinitNode () override
 
void reinitAux () override
 
void reinitAuxNeighbor () override
 
void reinitNodes (const std::vector< dof_id_type > &nodes) override
 
void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes) override
 
bool usesPhi ()
 Whether or not this variable is actually using the shape function value. More...
 
bool usesGradPhi ()
 Whether or not this variable is actually using the shape function gradient. More...
 
bool usesPhiNeighbor ()
 Whether or not this variable is actually using the shape function value. More...
 
bool usesGradPhiNeighbor ()
 Whether or not this variable is actually using the shape function gradient. More...
 
bool usesSecondPhi ()
 Whether or not this variable is computing any second derivatives. More...
 
bool usesSecondPhiNeighbor ()
 Whether or not this variable is actually using the shape function second derivative on a neighbor. More...
 
bool computingSecond ()
 Whether or not this variable is computing any second derivatives. More...
 
bool computingCurl ()
 Whether or not this variable is computing the curl. More...
 
const std::set< SubdomainID > & activeSubdomains () const override
 The subdomains the variable is active on. More...
 
bool activeOnSubdomain (SubdomainID subdomain) const override
 Is the variable active on the subdomain? More...
 
bool isNodal () const override
 Is this variable nodal. More...
 
bool isVector () const override
 
const Node *& node () const
 
virtual dof_id_type & nodalDofIndex () override
 
bool isNodalDefined () const
 
const Node *& nodeNeighbor () const
 
virtual dof_id_type & nodalDofIndexNeighbor () override
 
bool isNodalNeighborDefined () const
 
const Elem *& currentElem () const override
 Current element this variable is evaluated at. More...
 
unsigned int & currentSide () const
 Current side this variable is being evaluated on. More...
 
const Elem *& neighbor () const
 Current neighboring element. More...
 
const MooseArray< Point > & normals () const override
 
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 ()
 
template<ComputeStage compute_stage>
const VariableValueType< compute_stage >::typeadSln ()
 
template<ComputeStage compute_stage>
const VariableGradientType< compute_stage >::typeadGradSln ()
 
template<ComputeStage compute_stage>
const VariableSecondType< compute_stage >::typeadSecondSln ()
 
template<ComputeStage compute_stage>
const VariableValueType< compute_stage >::typeadSlnNeighbor ()
 
template<ComputeStage compute_stage>
const VariableGradientType< compute_stage >::typeadGradSlnNeighbor ()
 
template<ComputeStage compute_stage>
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...
 
virtual void computeElemValues () override
 Compute values at interior quadrature points. More...
 
virtual void computeElemValuesFace () override
 Compute values at facial quadrature points. More...
 
virtual void computeNeighborValuesFace () override
 Compute values at facial quadrature points for the neighbor. More...
 
virtual void computeNeighborValues () override
 Compute values at quadrature points for the neighbor. More...
 
void setNodalValue (OutputType value, unsigned int idx=0)
 
void 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...
 
OutputType getValue (const Elem *elem, const std::vector< std::vector< OutputType >> &phi) const
 Compute the variable value at a point on an element. More...
 
OutputTools< OutputType >::OutputGradient getGradient (const Elem *elem, const std::vector< std::vector< typename OutputTools< OutputType >::OutputGradient >> &grad_phi) const
 Compute the variable gradient value at a point on an element. More...
 
virtual size_t phiSize () override
 Return phi size. More...
 
virtual size_t phiFaceSize () override
 Return phiFace size. More...
 
virtual size_t phiNeighborSize () override
 Return phiNeighbor size. More...
 
virtual size_t phiFaceNeighborSize () override
 Return phiFaceNeighbor size. More...
 
const OutputType & nodalValue ()
 
const OutputType & nodalValueOld ()
 
const OutputType & nodalValueOlder ()
 
const OutputType & nodalValuePreviousNL ()
 
const OutputType & nodalValueDot ()
 
const OutputType & nodalValueDotDot ()
 
const OutputType & nodalValueDotOld ()
 
const OutputType & nodalValueDotDotOld ()
 
const OutputType & nodalValueDuDotDu ()
 
const OutputType & nodalValueDuDotDotDu ()
 
const OutputType & nodalValueNeighbor ()
 
const OutputType & nodalValueOldNeighbor ()
 
const OutputType & nodalValueOlderNeighbor ()
 
const OutputType & nodalValuePreviousNLNeighbor ()
 
const OutputType & nodalValueDotNeighbor ()
 
const OutputType & nodalValueDotDotNeighbor ()
 
const OutputType & nodalValueDotOldNeighbor ()
 
const OutputType & nodalValueDotDotOldNeighbor ()
 
const OutputType & nodalValueDuDotDuNeighbor ()
 
const OutputType & nodalValueDuDotDotDuNeighbor ()
 
const MooseArray< 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...
 
OutputType _nodal_value
 Nodal values. More...
 
OutputType _nodal_value_old
 
OutputType _nodal_value_older
 
OutputType _nodal_value_previous_nl
 
OutputType _nodal_value_dot
 nodal values of u_dot More...
 
OutputType _nodal_value_dotdot
 nodal values of u_dotdot More...
 
OutputType _nodal_value_dot_old
 nodal values of u_dot_old More...
 
OutputType _nodal_value_dotdot_old
 nodal values of u_dotdot_old More...
 
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...
 

Private Types

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

Friends

class NodeFaceConstraint
 
class NodeElemConstraint
 
class ValueThresholdMarker
 
class ValueRangeMarker
 

Detailed Description

template<typename OutputType>
class MooseVariableFE< OutputType >

Class for stuff related to variables.

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

Definition at line 30 of file Adaptivity.h.

Member Typedef Documentation

◆ FieldVariableCurl

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

Definition at line 45 of file MooseVariableFE.h.

◆ FieldVariableDivergence

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

Definition at line 46 of file MooseVariableFE.h.

◆ FieldVariableGradient

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

Definition at line 43 of file MooseVariableFE.h.

◆ FieldVariablePhiCurl

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

Definition at line 51 of file MooseVariableFE.h.

◆ FieldVariablePhiDivergence

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

Definition at line 52 of file MooseVariableFE.h.

◆ FieldVariablePhiGradient

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

Definition at line 49 of file MooseVariableFE.h.

◆ FieldVariablePhiSecond

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

Definition at line 50 of file MooseVariableFE.h.

◆ FieldVariablePhiValue

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

Definition at line 48 of file MooseVariableFE.h.

◆ FieldVariableSecond

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

Definition at line 44 of file MooseVariableFE.h.

◆ FieldVariableTestCurl

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

Definition at line 57 of file MooseVariableFE.h.

◆ FieldVariableTestDivergence

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

Definition at line 58 of file MooseVariableFE.h.

◆ FieldVariableTestGradient

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

Definition at line 55 of file MooseVariableFE.h.

◆ FieldVariableTestSecond

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

Definition at line 56 of file MooseVariableFE.h.

◆ FieldVariableTestValue

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

Definition at line 54 of file MooseVariableFE.h.

◆ FieldVariableValue

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

Definition at line 42 of file MooseVariableFE.h.

◆ OutputDivergence

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

Definition at line 40 of file MooseVariableFE.h.

◆ OutputGradient

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

Definition at line 38 of file MooseVariableFE.h.

◆ OutputSecond

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

Definition at line 39 of file MooseVariableFE.h.

◆ OutputShape

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

Definition at line 36 of file MooseVariableFE.h.

◆ OutputValue

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

Definition at line 37 of file MooseVariableFE.h.

Constructor & Destructor Documentation

◆ MooseVariableFE()

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

Definition at line 14 of file MooseVariableFE.C.

20  : MooseVariableFEBase(var_num, fe_type, sys, var_kind, tid),
21  _assembly(assembly),
25  _elem(_assembly.elem()),
28  _need_u_old(false),
29  _need_u_older(false),
30  _need_u_previous_nl(false),
31  _need_u_dot(false),
32  _need_u_dotdot(false),
33  _need_u_dot_old(false),
34  _need_u_dotdot_old(false),
35  _need_du_dot_du(false),
36  _need_du_dotdot_du(false),
37  _need_grad_old(false),
38  _need_grad_older(false),
40  _need_grad_dot(false),
41  _need_grad_dotdot(false),
42  _need_second(false),
43  _need_second_old(false),
44  _need_second_older(false),
46  _need_curl(false),
47  _need_curl_old(false),
48  _need_curl_older(false),
49  _need_ad_u(false),
50  _need_ad_grad_u(false),
51  _need_ad_second_u(false),
52  _need_neighbor_ad_u(false),
55  _need_u_old_neighbor(false),
58  _need_u_dot_neighbor(false),
69  _need_second_neighbor(false),
73  _need_curl_neighbor(false),
76  _need_solution_dofs(false),
82  _need_dof_values(false),
83  _need_dof_values_old(false),
86  _need_dof_values_dot(false),
90  _need_dof_du_dot_du(false),
103  _is_nodal(true),
104  _has_dofs(false),
105  _neighbor_has_dofs(false),
106  _has_nodal_value(false),
108  _node(_assembly.node()),
110  _phi(_assembly.fePhi<OutputType>(_fe_type)),
111  _grad_phi(_assembly.feGradPhi<OutputType>(_fe_type)),
112  _phi_face(_assembly.fePhiFace<OutputType>(_fe_type)),
118 {
119  // FIXME: continuity of FE type seems equivalent with the definition of nodal variables.
120  // Continuity does not depend on the FE dimension, so we just pass in a valid dimension.
121  if (_fe_type.family == NEDELEC_ONE || _fe_type.family == LAGRANGE_VEC)
122  _continuity = _assembly.getVectorFE(_fe_type, _sys.mesh().dimension())->get_continuity();
123  else
124  _continuity = _assembly.getFE(_fe_type, _sys.mesh().dimension())->get_continuity();
125 
126  _is_nodal = (_continuity == C_ZERO || _continuity == C_ONE);
127 
128  auto num_vector_tags = _sys.subproblem().numVectorTags();
129 
130  _vector_tags_dof_u.resize(num_vector_tags);
131  _need_vector_tag_dof_u.resize(num_vector_tags);
132 
133  _need_vector_tag_u.resize(num_vector_tags);
134  _vector_tag_u.resize(num_vector_tags);
135 
136  auto num_matrix_tags = _sys.subproblem().numMatrixTags();
137 
138  _matrix_tags_dof_u.resize(num_matrix_tags);
139  _need_matrix_tag_dof_u.resize(num_matrix_tags);
140 
141  _need_matrix_tag_u.resize(num_matrix_tags);
142  _matrix_tag_u.resize(num_matrix_tags);
143 }
const FieldVariablePhiValue & _phi
std::vector< bool > _need_vector_tag_dof_u
QBase *& qRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:246
QBase *& _qrule_neighbor
Quadrature rule for the neighbor.
bool _need_second_old_neighbor
FEType _fe_type
The FEType associated with this variable.
bool _need_solution_dofs_neighbor
std::vector< bool > _need_matrix_tag_dof_u
std::vector< FieldVariableValue > _vector_tag_u
const MooseArray< Point > & _normals
Normals at QPs on faces.
bool _need_dof_values_dotdot_neighbor
bool _need_dof_values_previous_nl_neighbor
const Node *& _node
bool _need_dof_values_dot_neighbor
bool _need_second_previous_nl_neighbor
bool _need_u_previous_nl_neighbor
bool _neighbor_has_dofs
If the neighor has dofs.
Assembly & _assembly
Our assembly.
bool _is_nodal
if variable is nodal
const Elem *& neighbor()
Return the neighbor element.
Definition: Assembly.h:316
const MooseArray< Point > & normals()
Returns the array of normals for quadrature points on a current side.
Definition: Assembly.h:264
const FieldVariablePhiGradient & _grad_phi_face
virtual unsigned int numVectorTags()
The total number of tags.
Definition: SubProblem.h:110
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiFaceNeighbor(FEType type)
Definition: Assembly.h:869
const OutputTools< OutputType >::VariablePhiValue & fePhiNeighbor(FEType type)
Definition: Assembly.h:840
QBase *& qRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:210
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiFace(FEType type)
Definition: Assembly.h:825
bool _has_nodal_value
If true, the nodal value gets inserted on calling insert()
bool _need_grad_older_neighbor
bool _need_dof_values_neighbor
QBase *& _qrule
Quadrature rule for interior.
std::vector< bool > _need_vector_tag_u
bool _need_dof_du_dot_du_neighbor
unsigned int & side()
Returns the current side.
Definition: Assembly.h:292
const OutputTools< OutputType >::VariablePhiValue & fePhiFace(FEType type)
Definition: Assembly.h:818
const Node *& node()
Returns the reference to the node.
Definition: Assembly.h:350
bool _need_grad_neighbor_dotdot
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2099
SystemBase & _sys
System this variable is part of.
bool _need_du_dotdot_du_neighbor
MooseVariableFEBase(unsigned int var_num, const FEType &fe_type, SystemBase &sys, Moose::VarKindType var_kind, THREAD_ID tid)
virtual SubProblem & subproblem()
Definition: SystemBase.h:103
bool _need_grad_previous_nl_neighbor
FEContinuity _continuity
Continuity type of the variable.
const Elem *& _neighbor
neighboring element
const FieldVariablePhiValue & _phi_face
const FieldVariablePhiValue & _phi_neighbor
const OutputTools< OutputType >::VariablePhiGradient & feGradPhi(FEType type)
Definition: Assembly.h:803
std::vector< MooseArray< Real > > _vector_tags_dof_u
bool _need_dof_values_dotdot_old_neighbor
const Node *& nodeNeighbor()
Returns the reference to the neighboring node.
Definition: Assembly.h:356
bool _need_u_dotdot_old_neighbor
std::vector< FieldVariableValue > _matrix_tag_u
bool _need_dof_values_older_neighbor
const Elem *& elem()
Return the current element.
Definition: Assembly.h:270
unsigned int & _current_side
the side of the current element (valid when doing face assembly)
std::vector< bool > _need_matrix_tag_u
const FieldVariablePhiValue & _phi_face_neighbor
FEBase *& getFE(FEType type, unsigned int dim)
Get a reference to a pointer that will contain the current volume FE.
Definition: Assembly.h:116
QBase *& qRuleNeighbor()
Returns the reference to the current quadrature being used on a current neighbor. ...
Definition: Assembly.h:338
bool _has_dofs
If we have dofs.
virtual MooseMesh & mesh()
Definition: SystemBase.h:102
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiNeighbor(FEType type)
Definition: Assembly.h:847
bool _need_solution_dofs_old_neighbor
const Elem *& _elem
current element
const FieldVariablePhiGradient & _grad_phi_neighbor
bool _need_solution_dofs_older_neighbor
bool _has_nodal_value_neighbor
std::vector< MooseArray< Real > > _matrix_tags_dof_u
bool _need_dof_du_dotdot_du_neighbor
QBase *& _qrule_face
Quadrature rule for the face.
const Node *& _node_neighbor
bool _need_dof_values_dot_old_neighbor
const FieldVariablePhiGradient & _grad_phi_face_neighbor
bool _need_neighbor_ad_second_u
bool _need_second_older_neighbor
const FieldVariablePhiGradient & _grad_phi
const OutputTools< OutputType >::VariablePhiValue & fePhiFaceNeighbor(FEType type)
Definition: Assembly.h:862
bool _need_solution_dofs_older
bool _need_dof_values_previous_nl
SystemBase & sys()
Get the system this variable is part of.
virtual unsigned int numMatrixTags()
The total number of tags.
Definition: SubProblem.h:145
bool _need_dof_values_dotdot_old
const OutputTools< OutputType >::VariablePhiValue & fePhi(FEType type)
Definition: Assembly.h:796
bool _need_curl_older_neighbor
bool _need_dof_values_old_neighbor
FEVectorBase *& getVectorFE(FEType type, unsigned int dim)
Get a reference to a pointer that will contain the current volume FEVector.
Definition: Assembly.h:164

◆ ~MooseVariableFE()

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

Definition at line 146 of file MooseVariableFE.C.

147 {
158 
169 
170  for (auto & dof_u : _vector_tags_dof_u)
171  dof_u.release();
172 
173  _vector_tags_dof_u.clear();
174 
175  for (auto & dof_u : _matrix_tags_dof_u)
176  dof_u.release();
177 
178  _matrix_tags_dof_u.clear();
179 
180  for (auto & tag_u : _vector_tag_u)
181  tag_u.release();
182 
183  _vector_tag_u.clear();
184 
185  for (auto & tag_u : _matrix_tag_u)
186  tag_u.release();
187 
188  _matrix_tag_u.clear();
189 
190  _u.release();
191  _u_bak.release();
192  _u_old.release();
194  _u_older.release();
197 
198  _grad_u.release();
207 
208  _second_u.release();
215 
216  _curl_u.release();
221 
222  _ad_u.release();
225 
226  _u_dot.release();
230 
231  _u_dotdot.release();
235 
240 
245 
250 
255 
257 
262 
269 
274 
278 }
FieldVariableGradient _grad_u_old
MooseArray< Real > _dof_values_old
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
FieldVariableValue _u_old_neighbor
FieldVariableSecond _second_u_previous_nl_neighbor
FieldVariableGradient _grad_u_older_neighbor
MooseArray< Real > _dof_du_dot_du_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< FieldVariableValue > _vector_tag_u
FieldVariableValue _u_dot_neighbor
FieldVariableValue _u_old_bak
FieldVariableGradient _grad_u_dot
MooseArray< Real > _dof_values_older_neighbor
FieldVariableValue _u
FieldVariableValue _u_dot_bak_neighbor
MooseArray< Real > _dof_values_older
FieldVariableValue _u_old
FieldVariableSecond _second_u_old_bak
FieldVariableCurl _curl_u_neighbor
MooseArray< Real > _dof_du_dotdot_du_neighbor
FieldVariableValue _u_dotdot_old
u_dotdot_old (second time derivative)
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u
FieldVariableGradient _grad_u_neighbor_dot
MooseArray< Real > _dof_du_dotdot_du
nodal values of derivative of u_dotdot wrt u
FieldVariableValue _u_dot
u_dot (time derivative)
MooseArray< Real > _dof_values_previous_nl
FieldVariableSecond _second_u
MooseArray< Real > _dof_values_dotdot_old
nodal values of u_dotdot_old
FieldVariableValue _u_dotdot_old_bak
FieldVariableSecond _second_u_old
FieldVariableCurl _curl_u_old
FieldVariableValue _u_neighbor
VariableValue _du_dotdot_du_bak_neighbor
VariableValue _du_dot_du_neighbor
FieldVariableValue _u_dot_old_bak_neighbor
MooseArray< Real > _dof_values_previous_nl_neighbor
MooseArray< Real > _dof_values_dotdot_old_neighbor
MooseArray< Real > _dof_values_dot
nodal values of u_dot
FieldVariableValue _u_dot_bak
MooseArray< ADRealTensor > _ad_second_u
FieldVariableGradient _grad_u_bak
FieldVariableCurl _curl_u_old_bak
FieldVariableGradient _grad_u_neighbor
FieldVariableValue _increment
Increment in the variable used in dampers.
FieldVariableGradient _grad_u_neighbor_dotdot
MooseArray< ADRealGradient > _ad_grad_u
FieldVariableCurl _curl_u
FieldVariableSecond _second_u_bak
FieldVariableValue _u_dot_old_neighbor
VariableValue _du_dot_du_bak
FieldVariableGradient _grad_u
FieldVariableValue _u_dotdot_bak_neighbor
FieldVariableSecond _second_u_neighbor
FieldVariableValue _u_dotdot_bak
FieldVariableValue _u_previous_nl_neighbor
FieldVariableCurl _curl_u_bak
FieldVariableGradient _grad_u_dotdot
FieldVariableGradient _grad_u_previous_nl_neighbor
FieldVariableSecond _second_u_older
std::vector< MooseArray< Real > > _vector_tags_dof_u
VariableValue _du_dot_du
derivative of u_dot wrt u
MooseArray< Real > _dof_values_dot_old
nodal values of u_dot_old
MooseArray< Real > _dof_values_old_neighbor
MooseArray< Real > _dof_values_dot_old_neighbor
FieldVariableValue _u_dotdot_old_bak_neighbor
MooseArray< Real > _dof_values_dot_neighbor
FieldVariableValue _u_dotdot_old_neighbor
MooseArray< Real > _dof_values_dotdot_neighbor
FieldVariableGradient _grad_u_older
FieldVariableValue _u_bak
std::vector< FieldVariableValue > _matrix_tag_u
FieldVariableCurl _curl_u_older
FieldVariableCurl _curl_u_older_neighbor
FieldVariableGradient _grad_u_old_bak
FieldVariableSecond _second_u_old_neighbor
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:51
VariableValue _du_dot_du_bak_neighbor
MooseArray< Real > _dof_values
MooseArray< Real > _dof_du_dot_du
nodal values of derivative of u_dot wrt u
VariableValue _du_dotdot_du_neighbor
FieldVariableValue _u_dotdot_neighbor
std::vector< MooseArray< Real > > _matrix_tags_dof_u
FieldVariableValue _u_older
VariableValue _du_dotdot_du_bak
FieldVariableGradient _grad_u_previous_nl
MooseArray< ADReal > _ad_u
FieldVariableValue _u_older_bak
FieldVariableValue _u_older_neighbor
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
FieldVariableSecond _second_u_previous_nl
MooseArray< Real > _dof_values_dotdot
nodal values of u_dotdot
FieldVariableValue _u_previous_nl
FieldVariableGradient _grad_u_old_neighbor
FieldVariableSecond _second_u_older_bak
FieldVariableValue _u_dot_old_bak
FieldVariableSecond _second_u_older_neighbor
FieldVariableCurl _curl_u_old_neighbor

Member Function Documentation

◆ activeOnSubdomain()

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

Is the variable active on the subdomain?

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

Implements MooseVariableFEBase.

Definition at line 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()

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

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

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

Definition at line 554 of file MooseVariableFE.C.

Referenced by ComputeIndicatorThread::onElement().

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

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

Definition at line 369 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledGradientTemplate().

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

◆ adGradSlnNeighbor()

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

Definition at line 392 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledGradientTemplate().

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

◆ adSecondSln()

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

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

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

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

◆ adSln()

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

Definition at line 362 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledValueTemplate().

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

◆ adSlnNeighbor()

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

Definition at line 385 of file MooseVariableFE.h.

Referenced by Coupleable::adCoupledValueTemplate().

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

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

Clear out the dof indices.

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

Implements MooseVariableFEBase.

Definition at line 296 of file MooseVariableFE.C.

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

◆ computeAD()

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

Definition at line 1365 of file MooseVariableFE.C.

1367 {
1368 }

◆ computeADNeighbor()

template<typename OutputType >
void MooseVariableFE< OutputType >::computeADNeighbor ( const unsigned int &  num_dofs,
const unsigned int &  nqp 
)

Definition at line 1428 of file MooseVariableFE.C.

1430 {
1431 }

◆ computeElemValues()

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

Compute values at interior quadrature points.

Implements MooseVariableFEBase.

Reimplemented in MooseVariableConstMonomial.

Definition at line 795 of file MooseVariableFE.C.

Referenced by AuxiliarySystem::reinitElem().

796 {
798 }
const FieldVariablePhiValue & _phi
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.
QBase *& _qrule
Quadrature rule for interior.
const FieldVariablePhiCurl * _curl_phi
const FieldVariablePhiGradient & _grad_phi
const FieldVariablePhiSecond * _second_phi

◆ computeElemValuesFace()

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

Compute values at facial quadrature points.

Implements MooseVariableFEBase.

Reimplemented in MooseVariableConstMonomial.

Definition at line 802 of file MooseVariableFE.C.

Referenced by AuxiliarySystem::reinitElemFace().

803 {
805 }
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.
const FieldVariablePhiGradient & _grad_phi_face
const FieldVariablePhiValue & _phi_face
QBase *& _qrule_face
Quadrature rule for the face.
const FieldVariablePhiSecond * _second_phi_face
const FieldVariablePhiCurl * _curl_phi_face

◆ computeIncrementAtNode()

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

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

Definition at line 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
Is this variable nodal.

◆ computeIncrementAtQps()

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

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

Definition at line 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.

◆ computeNeighborValues()

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

Compute values at quadrature points for the neighbor.

Implements MooseVariableFEBase.

Reimplemented in MooseVariableConstMonomial.

Definition at line 817 of file MooseVariableFE.C.

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

◆ computeNeighborValuesFace()

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

Compute values at facial quadrature points for the neighbor.

Implements MooseVariableFEBase.

Reimplemented in MooseVariableConstMonomial.

Definition at line 809 of file MooseVariableFE.C.

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

◆ computeNeighborValuesHelper()

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

Helper function for computing values.

Definition at line 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
bool _need_second_old_neighbor
FieldVariableGradient _grad_u_older_neighbor
MooseArray< Real > _dof_values_neighbor
std::vector< dof_id_type > _dof_indices_neighbor
DOF indices (neighbor)
bool _need_solution_dofs_neighbor
FieldVariableValue _u_dot_neighbor
bool _need_dof_values_dotdot_neighbor
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:110
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
bool _need_dof_values_dot_neighbor
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
bool _need_grad_older_neighbor
bool _need_dof_values_neighbor
const FieldVariablePhiValue & phi()
virtual Number & duDotDu()
Definition: SystemBase.h:156
bool _need_grad_neighbor_dotdot
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.
bool _need_du_dotdot_du_neighbor
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
bool _need_dof_values_dotdot_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
bool _need_u_dotdot_old_neighbor
bool _need_dof_values_older_neighbor
FieldVariableSecond _second_u_old_neighbor
bool _need_solution_dofs_old_neighbor
VariableValue _du_dotdot_du_neighbor
bool _need_solution_dofs_older_neighbor
virtual NumericVector< Number > & solutionOlder()=0
FieldVariableValue _u_dotdot_neighbor
virtual NumericVector< Number > * solutionUDotOld()=0
virtual NumericVector< Number > * solutionUDotDot()=0
bool _need_dof_values_dot_old_neighbor
FieldVariableValue _u_older_neighbor
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:109
bool _need_second_older_neighbor
FieldVariableGradient _grad_u_old_neighbor
bool _need_dof_values_old_neighbor
FieldVariableSecond _second_u_older_neighbor
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ computeNodalNeighborValues()

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

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

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

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
OutputType _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
OutputType _nodal_value_dot_old
nodal values of u_dot_old
OutputType _nodal_value_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.
OutputType _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.
OutputType _nodal_value_previous_nl
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
OutputType _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
OutputType _nodal_value_older
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
bool _need_dof_values_previous_nl
OutputType _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()

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

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:110
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:109
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
bool safeAccessTaggedVectors()
Is it safe to access the tagged vectors.
Definition: SubProblem.h:510
bool _need_solution_dofs_older
FieldVariableSecond _second_u_previous_nl
bool _need_dof_values_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
bool _need_dof_values_dotdot_old
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()

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

Whether or not this variable is computing the curl.

Definition at line 129 of file MooseVariableFE.h.

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

◆ computingJacobian()

void MooseVariableBase::computingJacobian ( bool  computing_jacobian)
inlineinherited

Definition at line 111 of file MooseVariableBase.h.

111 { _computing_jacobian = computing_jacobian; }

◆ computingSecond()

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

Whether or not this variable is computing any second derivatives.

Definition at line 125 of file MooseVariableFE.h.

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

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

◆ curlPhi()

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

Definition at line 198 of file MooseVariableFE.h.

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

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

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

Definition at line 211 of file MooseVariableFE.h.

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

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

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

Definition at line 237 of file MooseVariableFE.h.

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

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

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

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

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

Definition at line 339 of file MooseVariableFE.h.

Referenced by Coupleable::coupledCurl().

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

◆ curlSlnNeighbor()

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

Definition at line 549 of file MooseVariableFE.h.

Referenced by Coupleable::coupledCurl().

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

◆ curlSlnOld()

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

Definition at line 346 of file MooseVariableFE.h.

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

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

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

Definition at line 353 of file MooseVariableFE.h.

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

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

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

Definition at line 561 of file MooseVariableFE.h.

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

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

◆ curlSlnOldNeighbor()

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

Definition at line 555 of file MooseVariableFE.h.

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

556  {
559  return _curl_u_old_neighbor;
560  }
const FieldVariablePhiCurl & curlPhiFaceNeighbor()
FieldVariableCurl _curl_u_old_neighbor

◆ currentElem()

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

Current element this variable is evaluated at.

Implements MooseVariableFEBase.

Definition at line 144 of file MooseVariableFE.h.

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

◆ currentSide()

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

Current side this variable is being evaluated on.

Definition at line 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()

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

Get neighbor DOF indices for currently selected element.

Returns
the neighbor degree of freedom indices

Implements MooseVariableFEBase.

Definition at line 662 of file MooseVariableFE.h.

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

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

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

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
Returns dof solution on element.

◆ dofValues()

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

Returns dof solution on element.

Implements MooseVariableFEBase.

Definition at line 570 of file MooseVariableFE.C.

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

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

◆ dofValuesDot()

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

Returns time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 634 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDot(), and Coupleable::coupledNodalDot().

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

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

Returns second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 648 of file MooseVariableFE.C.

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

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

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

Returns second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 707 of file MooseVariableFE.C.

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

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 }
bool _need_dof_values_dotdot_neighbor
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
SystemBase & _sys
System this variable is part of.
MooseArray< Real > _dof_values_dotdot_neighbor
virtual NumericVector< Number > * solutionUDotDot()=0

◆ dofValuesDotDotOld()

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

Returns old second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 678 of file MooseVariableFE.C.

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

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.
bool _need_dof_values_dotdot_old

◆ dofValuesDotDotOldNeighbor()

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

Returns old second time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 737 of file MooseVariableFE.C.

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

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.
bool _need_dof_values_dotdot_old_neighbor

◆ dofValuesDotNeighbor()

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

Returns time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 693 of file MooseVariableFE.C.

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

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
bool _need_dof_values_dot_neighbor
SystemBase & _sys
System this variable is part of.
MooseArray< Real > _dof_values_dot_neighbor

◆ dofValuesDotOld()

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

Returns old time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 663 of file MooseVariableFE.C.

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

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

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

Returns old time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 722 of file MooseVariableFE.C.

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

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
bool _need_dof_values_dot_old_neighbor

◆ dofValuesDuDotDotDu()

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

Returns derivative of second time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 760 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDotDu().

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

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

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

Implements MooseVariableFEBase.

Definition at line 776 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDotDu().

777 {
780 }
MooseArray< Real > _dof_du_dotdot_du_neighbor
bool _need_dof_du_dotdot_du_neighbor

◆ dofValuesDuDotDu()

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

Returns derivative of time derivative of degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 752 of file MooseVariableFE.C.

Referenced by Coupleable::coupledDotDu().

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

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

Returns derivative of time derivative of neighboring degrees of freedom.

Implements MooseVariableFEBase.

Definition at line 768 of file MooseVariableFE.C.

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

769 {
772 }
MooseArray< Real > _dof_du_dot_du_neighbor
bool _need_dof_du_dot_du_neighbor

◆ dofValuesNeighbor()

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

Returns dof solution on neighbor element.

Implements MooseVariableFEBase.

Definition at line 602 of file MooseVariableFE.C.

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

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

◆ dofValuesOld()

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

Returns old dof solution on element.

Implements MooseVariableFEBase.

Definition at line 578 of file MooseVariableFE.C.

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

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

◆ dofValuesOlder()

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

Returns older dof solution on element.

Implements MooseVariableFEBase.

Definition at line 586 of file MooseVariableFE.C.

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

587 {
588  _need_dof_values_older = true;
589  return _dof_values_older;
590 }
MooseArray< Real > _dof_values_older

◆ dofValuesOlderNeighbor()

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

◆ dofValuesOldNeighbor()

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

◆ dofValuesPreviousNL()

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

Returns previous nl solution on element.

Implements MooseVariableFEBase.

Definition at line 594 of file MooseVariableFE.C.

Referenced by Coupleable::coupledNodalValuePreviousNL(), and Coupleable::coupledValuePreviousNL().

595 {
598 }
MooseArray< Real > _dof_values_previous_nl
bool _need_dof_values_previous_nl

◆ dofValuesPreviousNLNeighbor()

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

Returns previous nl solution on neighbor element.

Implements MooseVariableFEBase.

Definition at line 626 of file MooseVariableFE.C.

Referenced by Coupleable::coupledNodalValuePreviousNL(), and Coupleable::coupledValuePreviousNL().

627 {
630 }
bool _need_dof_values_previous_nl_neighbor
MooseArray< Real > _dof_values_previous_nl_neighbor

◆ duDotDotDu()

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

Definition at line 463 of file MooseVariableFE.h.

Referenced by Coupleable::coupledDotDotDu().

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

◆ duDotDotDuNeighbor()

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

Definition at line 625 of file MooseVariableFE.h.

626  {
628  return _du_dotdot_du_neighbor;
629  }
bool _need_du_dotdot_du_neighbor
VariableValue _du_dotdot_du_neighbor

◆ duDotDu()

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

Definition at line 457 of file MooseVariableFE.h.

Referenced by Coupleable::coupledDotDu().

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

◆ duDotDuNeighbor()

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

Definition at line 619 of file MooseVariableFE.h.

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

620  {
622  return _du_dot_du_neighbor;
623  }
VariableValue _du_dot_du_neighbor

◆ feType()

const FEType& MooseVariableBase::feType ( ) const
inlineinherited

◆ getDofIndices()

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

Implements MooseVariableFEBase.

Definition at line 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()

template<typename OutputType >
Number MooseVariableFE< OutputType >::getElementalValue ( const Elem *  elem,
unsigned int  idx = 0 
) const
overridevirtual

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

template<typename OutputType >
Number MooseVariableFE< OutputType >::getElementalValueOld ( const Elem *  elem,
unsigned int  idx = 0 
) const
overridevirtual

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

template<typename OutputType >
Number MooseVariableFE< OutputType >::getElementalValueOlder ( const Elem *  elem,
unsigned int  idx = 0 
) const
overridevirtual

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

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

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

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.

Referenced by MortarConstraint::reinit().

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
Is this variable nodal.
unsigned int _var_num
variable number (from libMesh)
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: MooseTypes.h:109
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ getNodalValue()

template<typename OutputType >
Number MooseVariableFE< OutputType >::getNodalValue ( const Node &  node)
overridevirtual

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

template<typename OutputType >
Number MooseVariableFE< OutputType >::getNodalValueOld ( const Node &  node)
overridevirtual

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

template<typename OutputType >
Number MooseVariableFE< OutputType >::getNodalValueOlder ( const Node &  node)
overridevirtual

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

template<typename OutputType>
OutputType MooseVariableFE< OutputType >::getValue ( const Elem *  elem,
const std::vector< std::vector< OutputType >> &  phi 
) const

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.

Referenced by GapValueAux::computeValue(), MortarConstraint::reinit(), and PenetrationThread::smoothNormal().

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
Is this variable nodal.
unsigned int _var_num
variable number (from libMesh)
virtual const NumericVector< Number > *& currentSolution()=0
The solution vector that is currently being operated on.

◆ gradPhi()

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

Definition at line 192 of file MooseVariableFE.h.

Referenced by Assembly::copyShapes().

192 { return _grad_phi; }
const FieldVariablePhiGradient & _grad_phi

◆ gradPhiFace()

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

Definition at line 205 of file MooseVariableFE.h.

Referenced by Assembly::copyFaceShapes().

205 { return _grad_phi_face; }
const FieldVariablePhiGradient & _grad_phi_face

◆ gradPhiFaceNeighbor()

template<typename OutputType>
const FieldVariablePhiGradient& MooseVariableFE< OutputType >::gradPhiFaceNeighbor ( )
inline

Definition at line 231 of file MooseVariableFE.h.

Referenced by Assembly::copyNeighborShapes().

231 { return _grad_phi_face_neighbor; }
const FieldVariablePhiGradient & _grad_phi_face_neighbor

◆ gradPhiNeighbor()

template<typename OutputType>
const FieldVariablePhiGradient& MooseVariableFE< OutputType >::gradPhiNeighbor ( )
inline

Definition at line 218 of file MooseVariableFE.h.

Referenced by Assembly::copyNeighborShapes().

218 { return _grad_phi_neighbor; }
const FieldVariablePhiGradient & _grad_phi_neighbor

◆ gradSln()

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSln ( )
inline

Definition at line 272 of file MooseVariableFE.h.

Referenced by Coupleable::coupledGradient(), and Coupleable::coupledVectorGradient().

272 { return _grad_u; }
FieldVariableGradient _grad_u

◆ gradSlnDot()

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

Definition at line 288 of file MooseVariableFE.h.

Referenced by Coupleable::coupledGradientDot().

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

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

Definition at line 299 of file MooseVariableFE.h.

Referenced by Coupleable::coupledGradientDotDot().

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

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnNeighbor ( )
inline

◆ gradSlnNeighborDot()

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnNeighborDot ( )
inline

Definition at line 501 of file MooseVariableFE.h.

Referenced by Coupleable::coupledGradientDot().

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

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnNeighborDotDot ( )
inline

Definition at line 512 of file MooseVariableFE.h.

Referenced by Coupleable::coupledGradientDotDot().

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
bool _need_grad_neighbor_dotdot
FieldVariableGradient _grad_u_neighbor_dotdot
SystemBase & _sys
System this variable is part of.
virtual NumericVector< Number > * solutionUDotDot()=0

◆ gradSlnOld()

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnOld ( )
inline

◆ gradSlnOlder()

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnOlder ( )
inline

◆ gradSlnOlderNeighbor()

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnOlderNeighbor ( )
inline

◆ gradSlnOldNeighbor()

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnOldNeighbor ( )
inline

◆ gradSlnPreviousNL()

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnPreviousNL ( )
inline

Definition at line 283 of file MooseVariableFE.h.

Referenced by Coupleable::coupledGradientPreviousNL().

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

◆ gradSlnPreviousNLNeighbor()

template<typename OutputType>
const FieldVariableGradient& MooseVariableFE< OutputType >::gradSlnPreviousNLNeighbor ( )
inline

Definition at line 496 of file MooseVariableFE.h.

Referenced by Coupleable::coupledGradientPreviousNL().

497  {
500  }
bool _need_grad_previous_nl_neighbor
FieldVariableGradient _grad_u_previous_nl_neighbor