Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
MooseVariableDataFV< OutputType > Class Template Reference

#include <MooseVariableDataFV.h>

Inheritance diagram for MooseVariableDataFV< OutputType >:
[legend]

Public Types

typedef libMesh::TensorTools::IncrementRank< OutputType >::type OutputGradient
 
typedef libMesh::TensorTools::IncrementRank< OutputGradient >::type OutputSecond
 
typedef libMesh::TensorTools::DecrementRank< OutputType >::type OutputDivergence
 
typedef MooseArray< OutputType > FieldVariableValue
 
typedef MooseArray< OutputGradientFieldVariableGradient
 
typedef MooseArray< OutputSecondFieldVariableSecond
 
typedef MooseArray< OutputType > FieldVariableCurl
 
typedef MooseArray< OutputDivergenceFieldVariableDivergence
 
typedef Moose::ShapeType< OutputType >::type OutputShape
 
typedef libMesh::TensorTools::IncrementRank< OutputShape >::type OutputShapeGradient
 
typedef libMesh::TensorTools::IncrementRank< OutputShapeGradient >::type OutputShapeSecond
 
typedef libMesh::TensorTools::DecrementRank< OutputShape >::type OutputShapeDivergence
 
typedef Moose::DOFType< OutputType >::type OutputData
 
typedef MooseArray< OutputDataDoFValue
 

Public Member Functions

 MooseVariableDataFV (const MooseVariableFV< OutputType > &var, SystemBase &sys, THREAD_ID tid, Moose::ElementType element_type, const Elem *const &elem)
 
bool isNodal () const override
 
bool hasDoFsOnNodes () const override
 Whether this data is associated with a variable that has DoFs on nodes. More...
 
libMesh::FEContinuity getContinuity () const override
 Return the variable continuity. More...
 
bool needsAD () const
 Returns whether this data structure needs automatic differentiation calculations. More...
 
void setGeometry (Moose::GeometryType gm_type)
 Set the geometry type before calculating variables values. More...
 
void computeValuesFace (const FaceInfo &fi)
 compute the variable values More...
 
void computeValues ()
 compute the variable values More...
 
void computeAD (const unsigned int num_dofs, const unsigned int nqp)
 compute AD things More...
 
const Elem *const & currentElem () const
 The current element. More...
 
void prepareIC ()
 prepare the initial condition More...
 
const FieldVariableValuesln (Moose::SolutionState state) const
 Local solution value. More...
 
const FieldVariableGradientgradSlnDot () const
 Local time derivative of solution gradient getter. More...
 
const FieldVariableGradientgradSlnDotDot () const
 Local second time derivative of solution gradient getter. More...
 
const FieldVariableSecondsecondSln (Moose::SolutionState state) const
 Local solution second spatial derivative getter. More...
 
const FieldVariableCurlcurlSln (Moose::SolutionState state) const
 Local solution curl getter. More...
 
const ADTemplateVariableValue< OutputType > & adSln () const
 
const ADTemplateVariableGradient< OutputType > & adGradSln () const
 
const ADTemplateVariableGradient< OutputType > & adGradSlnDot () const
 
const ADTemplateVariableSecond< OutputType > & adSecondSln () const
 
const ADTemplateVariableValue< OutputType > & adUDot () const
 
const ADTemplateVariableValue< OutputType > & adUDotDot () const
 
const FieldVariableValueuDot () const
 
const FieldVariableValueuDotDot () const
 
const FieldVariableValueuDotOld () const
 
const FieldVariableValueuDotDotOld () const
 
const VariableValueduDotDu () const
 
const VariableValueduDotDotDu () const
 
void setDofValues (const DenseVector< OutputData > &values)
 Set local DOF values and evaluate the values on quadrature points. More...
 
OutputData getElementalValue (const Elem *elem, Moose::SolutionState state, unsigned int idx=0) const
 
void getDofIndices (const Elem *elem, std::vector< dof_id_type > &dof_indices) const
 
const std::vector< dof_id_type > & dofIndices () const
 
unsigned int numberOfDofs () const
 
void clearDofIndices ()
 
const DoFValuedofValuesDot () const
 
const DoFValuedofValuesDotOld () const
 
const DoFValuedofValuesDotDot () const
 
const DoFValuedofValuesDotDotOld () const
 
const MooseArray< libMesh::Number > & dofValuesDuDotDu () const
 
const MooseArray< libMesh::Number > & dofValuesDuDotDotDu () const
 
const MooseArray< ADReal > & adDofValues () const
 Return the AD dof values. More...
 
const MooseArray< ADReal > & adDofValuesDot () const
 Return the AD dof time derivatives. More...
 
const FieldVariableValueincrement () const
 Increment getter. More...
 
void computeIncrementAtQps (const libMesh::NumericVector< libMesh::Number > &increment_vec)
 Compute and store incremental change in solution at QPs based on increment_vec. More...
 
bool hasDirichletBC () const
 checks if a Dirichlet BC exists on this face More...
 
void meshChanged () override
 Called on this object when the mesh changes. More...
 
const FieldVariableGradientgradSln (Moose::SolutionState state) const
 Local solution gradient getter. More...
 
unsigned int oldestSolutionStateRequested () const
 The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc). More...
 
void setNodalValue (const OutputType &value, unsigned int idx=0)
 Set nodal value. More...
 
template<>
void setNodalValue (const RealVectorValue &value, unsigned int idx)
 
void insert (libMesh::NumericVector< libMesh::Number > &residual)
 Set the current local DOF values to the input vector. More...
 
template<>
void insert (NumericVector< Number > &residual)
 
void add (libMesh::NumericVector< libMesh::Number > &residual)
 Add the current local DOF values to the input vector. More...
 
template<>
void add (NumericVector< Number > &residual)
 
const DoFValuedofValues () const
 
const DoFValuedofValuesOld () const
 
const DoFValuedofValuesOlder () const
 
const DoFValuedofValuesPreviousNL () const
 
const OutputType & nodalValue (Moose::SolutionState state) const
 
const MooseArray< OutputType > & nodalValueArray (Moose::SolutionState state) const
 
const FieldVariableValuevectorTagValue (TagID tag) const
 
const FieldVariableGradientvectorTagGradient (TagID tag) const
 
const FieldVariableValuematrixTagValue (TagID tag) const
 
const DoFValuenodalVectorTagValue (TagID tag) const
 
const DoFValuenodalMatrixTagValue (TagID tag) const
 
const DoFValuevectorTagDofValue (TagID tag) const
 
const DoFValuevectorTagDofValue (Moose::SolutionState state) const
 
void setActiveTags (const std::set< TagID > &vtags)
 Set the active vector tags. More...
 
void prepareAux ()
 Clear aux state. More...
 
void setDofValue (const OutputData &value, unsigned int index)
 dof value setters More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual const MooseVariableFV< OutputType > & var () const override
 
void insertSolutionTag (TagID tag_id)
 insert a solution tag into our tag containers More...
 
void needSolutionState (unsigned int state)
 Request that we have at least state number of older solution states/vectors. More...
 
void fetchDoFValues ()
 Helper methods for assigning dof values from their corresponding solution values. More...
 
template<>
void fetchDoFValues ()
 
template<>
void fetchDoFValues ()
 
void zeroSizeDofValues ()
 
void getArrayDoFValues (const libMesh::NumericVector< libMesh::Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
 
void assignNodalValue ()
 
template<>
void assignNodalValue ()
 
template<>
void assignNodalValue ()
 
template<typename ReturnType , typename Functor >
const ReturnType & stateToTagHelper (Moose::SolutionState state, Functor functor)
 Helper method that converts a SolutionState argument into a corresponding tag ID, potentially requesting necessary additional solution states and assigning tag id data members, and then calls the provided functor with the tag ID. More...
 
void resizeVectorTagData (TagID tag)
 resize the vector tag need flags and data containers to accomodate this tag index More...
 

Protected Attributes

SystemBase_sys
 The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data. More...
 
const SubProblem_subproblem
 The subproblem which we can query for information related to tagged vectors and matrices. More...
 
const THREAD_ID _tid
 The thread ID that this object is on. More...
 
const libMesh::DofMap_dof_map
 The degree of freedom map from libMesh. More...
 
unsigned int _count
 Number of components of the associated variable. More...
 
bool _has_dof_values
 Whether we currently have degree of freedom values stored in our local containers (corresponding to the current element) More...
 
unsigned int _max_state
 The maximum number of older solution states our variable needs. More...
 
TagID _solution_tag
 The vector tag ID corresponding to the solution vector. More...
 
TagID _old_solution_tag
 The vector tag ID corresponding to the old solution vector. More...
 
TagID _older_solution_tag
 The vector tag ID corresponding to the older solution vector. More...
 
TagID _previous_nl_solution_tag
 The vector tag ID corresponding to the previous nonlinear iteration's solution vector. More...
 
std::vector< dof_id_type_dof_indices
 The dof indices for the current element. More...
 
std::vector< bool > _need_vector_tag_dof_u
 
std::vector< bool > _need_matrix_tag_dof_u
 
std::vector< DoFValue_vector_tags_dof_u
 
std::vector< DoFValue_matrix_tags_dof_u
 
std::vector< FieldVariableValue_vector_tag_u
 
std::vector< bool > _need_vector_tag_u
 
std::vector< FieldVariableGradient_vector_tag_grad
 
std::vector< bool > _need_vector_tag_grad
 
std::vector< FieldVariableValue_matrix_tag_u
 
std::vector< bool > _need_matrix_tag_u
 
OutputType _nodal_value
 Nodal values. More...
 
OutputType _nodal_value_old
 
OutputType _nodal_value_older
 
OutputType _nodal_value_previous_nl
 
MooseArray< OutputType > _nodal_value_array
 Nodal values as MooseArrays for use with AuxKernels. More...
 
MooseArray< OutputType > _nodal_value_old_array
 
MooseArray< OutputType > _nodal_value_older_array
 
bool _need_u_dot
 u dot flags More...
 
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_dot
 gradient dot flags More...
 
bool _need_grad_dotdot
 
bool _need_dof_values_dot
 local solution flags More...
 
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
 
DoFValue _dof_values_dot
 time derivative of the solution values More...
 
DoFValue _dof_values_dotdot
 second time derivative of the solution values More...
 
DoFValue _dof_values_dot_old
 the previous time step's solution value time derivative More...
 
DoFValue _dof_values_dotdot_old
 the previous time step's solution value second time derivative More...
 
MooseArray< libMesh::Number_dof_du_dot_du
 derivatives of the solution value time derivative with respect to the degrees of freedom More...
 
MooseArray< libMesh::Number_dof_du_dotdot_du
 derivatives of the solution value second time derivative with respect to the degrees of freedom More...
 
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...
 
std::set< TagID_required_vector_tags
 The set of vector tags (residual + solution) we need to evaluate. More...
 
std::set< TagID_solution_tags
 The set of solution tags we need to evaluate. More...
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. More...
 

Private Member Functions

void initializeSolnVars ()
 
void fetchADDoFValues ()
 Helper methods for assigning nodal values from their corresponding solution values (dof values as they're referred to here in this class). More...
 
bool safeToComputeADUDot () const
 Helper method that tells us whether it's safe to compute _ad_u_dot. More...
 
const std::vector< dof_id_type > & initDofIndices ()
 

Private Attributes

const MooseVariableFV< OutputType > & _var
 A const reference to the owning MooseVariableFV object. More...
 
const libMesh::FEType_fe_type
 
const unsigned int _var_num
 
const Assembly_assembly
 
Moose::ElementType _element_type
 The element type this object is storing data for. This is either Element, Neighbor, or Lower. More...
 
libMesh::FEContinuity _continuity
 Continuity type of the variable. More...
 
FieldVariableValue _increment
 Increment in the variable used in dampers. More...
 
const ADReal _ad_zero
 A zero AD variable. More...
 
bool _need_second
 SolutionState second_u flags. More...
 
bool _need_second_old
 
bool _need_second_older
 
bool _need_second_previous_nl
 
bool _need_curl
 curl flags More...
 
bool _need_curl_old
 
bool _need_curl_older
 
bool _need_ad
 AD flags. More...
 
bool _need_ad_u
 
bool _need_ad_u_dot
 
bool _need_ad_u_dotdot
 
bool _need_ad_grad_u
 
bool _need_ad_grad_u_dot
 
bool _need_ad_second_u
 
FieldVariableGradient _grad_u_dot
 grad_u dots More...
 
FieldVariableGradient _grad_u_dotdot
 
FieldVariableSecond _second_u
 second_u More...
 
FieldVariableSecond _second_u_old
 
FieldVariableSecond _second_u_older
 
FieldVariableSecond _second_u_previous_nl
 
FieldVariableCurl _curl_u
 curl_u More...
 
FieldVariableCurl _curl_u_old
 
FieldVariableCurl _curl_u_older
 
ADTemplateVariableValue< OutputShape_ad_u
 AD u. More...
 
ADTemplateVariableGradient< OutputShape_ad_grad_u
 
ADTemplateVariableSecond< OutputShape_ad_second_u
 
MooseArray< ADReal_ad_dof_values
 
MooseArray< ADReal_ad_dofs_dot
 
MooseArray< ADReal_ad_dofs_dotdot
 
ADTemplateVariableValue< OutputShape_ad_u_dot
 
ADTemplateVariableValue< OutputShape_ad_u_dotdot
 
ADTemplateVariableGradient< OutputShape_ad_grad_u_dot
 
FieldVariableValue _u_dot
 u_dot (time derivative) More...
 
FieldVariableValue _u_dotdot
 u_dotdot (second time derivative) More...
 
FieldVariableValue _u_dot_old
 u_dot_old (time derivative) More...
 
FieldVariableValue _u_dotdot_old
 u_dotdot_old (second time derivative) More...
 
VariableValue _du_dot_du
 derivative of u_dot wrt u More...
 
VariableValue _du_dotdot_du
 derivative of u_dotdot wrt u More...
 
const TimeIntegrator *const _time_integrator
 Pointer to time integrator. More...
 
const Elem *const & _elem
 The current elem. More...
 
const Elem * _prev_elem = nullptr
 used to keep track of when dof indices are out of date More...
 
bool _has_dirichlet_bc
 if this variable has a dirichlet bc defined on a particular face More...
 
const bool _displaced
 Whether this variable is being calculated on a displaced system. More...
 
const libMesh::QBase_qrule
 The quadrature rule. More...
 
ADReal _ad_real_dummy = 0
 A dummy ADReal variable. More...
 
TheWarehouse::QueryCache _fv_elemental_kernel_query_cache
 Cached warehouse query for FVElementalKernels. More...
 
TheWarehouse::QueryCache _fv_flux_kernel_query_cache
 Cached warehouse query for FVFluxKernels. More...
 

Friends

void Moose::initDofIndices (MooseVariableDataFV< OutputType > &, const Elem &)
 

Detailed Description

template<typename OutputType>
class MooseVariableDataFV< OutputType >

Definition at line 69 of file MooseVariableDataFV.h.

Member Typedef Documentation

◆ DoFValue

template<typename OutputType>
typedef MooseArray<OutputData> MooseVariableDataFV< OutputType >::DoFValue

Definition at line 94 of file MooseVariableDataFV.h.

◆ FieldVariableCurl

template<typename OutputType>
typedef MooseArray<OutputType> MooseVariableDataFV< OutputType >::FieldVariableCurl

Definition at line 81 of file MooseVariableDataFV.h.

◆ FieldVariableDivergence

template<typename OutputType>
typedef MooseArray<OutputDivergence> MooseVariableDataFV< OutputType >::FieldVariableDivergence

Definition at line 82 of file MooseVariableDataFV.h.

◆ FieldVariableGradient

template<typename OutputType>
typedef MooseArray<OutputGradient> MooseVariableDataFV< OutputType >::FieldVariableGradient

Definition at line 79 of file MooseVariableDataFV.h.

◆ FieldVariableSecond

template<typename OutputType>
typedef MooseArray<OutputSecond> MooseVariableDataFV< OutputType >::FieldVariableSecond

Definition at line 80 of file MooseVariableDataFV.h.

◆ FieldVariableValue

template<typename OutputType>
typedef MooseArray<OutputType> MooseVariableDataFV< OutputType >::FieldVariableValue

Definition at line 78 of file MooseVariableDataFV.h.

◆ OutputData

template<typename OutputType>
typedef Moose::DOFType<OutputType>::type MooseVariableDataFV< OutputType >::OutputData

Definition at line 93 of file MooseVariableDataFV.h.

◆ OutputDivergence

template<typename OutputType>
typedef libMesh::TensorTools::DecrementRank<OutputType>::type MooseVariableDataFV< OutputType >::OutputDivergence

Definition at line 75 of file MooseVariableDataFV.h.

◆ OutputGradient

template<typename OutputType>
typedef libMesh::TensorTools::IncrementRank<OutputType>::type MooseVariableDataFV< OutputType >::OutputGradient

Definition at line 73 of file MooseVariableDataFV.h.

◆ OutputSecond

template<typename OutputType>
typedef libMesh::TensorTools::IncrementRank<OutputGradient>::type MooseVariableDataFV< OutputType >::OutputSecond

Definition at line 74 of file MooseVariableDataFV.h.

◆ OutputShape

template<typename OutputType>
typedef Moose::ShapeType<OutputType>::type MooseVariableDataFV< OutputType >::OutputShape

Definition at line 85 of file MooseVariableDataFV.h.

◆ OutputShapeDivergence

template<typename OutputType>
typedef libMesh::TensorTools::DecrementRank<OutputShape>::type MooseVariableDataFV< OutputType >::OutputShapeDivergence

Definition at line 90 of file MooseVariableDataFV.h.

◆ OutputShapeGradient

template<typename OutputType>
typedef libMesh::TensorTools::IncrementRank<OutputShape>::type MooseVariableDataFV< OutputType >::OutputShapeGradient

Definition at line 88 of file MooseVariableDataFV.h.

◆ OutputShapeSecond

template<typename OutputType>
typedef libMesh::TensorTools::IncrementRank<OutputShapeGradient>::type MooseVariableDataFV< OutputType >::OutputShapeSecond

Definition at line 89 of file MooseVariableDataFV.h.

Constructor & Destructor Documentation

◆ MooseVariableDataFV()

template<typename OutputType>
MooseVariableDataFV< OutputType >::MooseVariableDataFV ( const MooseVariableFV< OutputType > &  var,
SystemBase sys,
THREAD_ID  tid,
Moose::ElementType  element_type,
const Elem *const &  elem 
)

Definition at line 31 of file MooseVariableDataFV.C.

38  MeshChangedInterface(var.parameters()),
39  _var(var),
40  _fe_type(_var.feType()),
41  _var_num(_var.number()),
42  _assembly(_subproblem.assembly(_tid, var.kind() == Moose::VAR_SOLVER ? sys.number() : 0)),
43  _element_type(element_type),
44  _ad_zero(0),
45  _need_second(false),
46  _need_second_old(false),
47  _need_second_older(false),
49  _need_curl(false),
50  _need_curl_old(false),
51  _need_curl_older(false),
52  // for FV variables, they use each other's ad_u values to compute ghost cell
53  // values - we don't have any way to propagate these inter-variable-data
54  // dependencies. So if something needs an ad_u value, that need isn't
55  // propagated through to both the element and the neighbor
56  // data structures. So instead just set _need_ad+_need_ad_u values to true always.
57  _need_ad(true),
58  _need_ad_u(true),
59  _need_ad_u_dot(false),
60  _need_ad_u_dotdot(false),
61  _need_ad_grad_u(false),
62  _need_ad_grad_u_dot(false),
63  _need_ad_second_u(false),
65  _elem(elem),
66  _displaced(dynamic_cast<const DisplacedSystem *>(&_sys) ? true : false),
67  _qrule(nullptr)
68 {
70  _subproblem.getMooseApp().theWarehouse().query().template condition<AttribSystem>(
71  "FVElementalKernel");
73  _subproblem.getMooseApp().theWarehouse().query().template condition<AttribSystem>(
74  "FVFluxKernel");
75 }
const unsigned int _var_num
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
const bool _displaced
Whether this variable is being calculated on a displaced system.
const Assembly & _assembly
virtual const MooseVariableFV< OutputType > & var() const override
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
const TimeIntegrator *const _time_integrator
Pointer to time integrator.
TheWarehouse::QueryCache _fv_flux_kernel_query_cache
Cached warehouse query for FVFluxKernels.
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
const libMesh::FEType & _fe_type
MeshChangedInterface(const InputParameters &params)
const libMesh::QBase * _qrule
The quadrature rule.
Moose::ElementType _element_type
The element type this object is storing data for. This is either Element, Neighbor, or Lower.
bool _need_second
SolutionState second_u flags.
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
const TimeIntegrator * queryTimeIntegrator(const unsigned int var_num) const
Retrieve the time integrator that integrates the given variable&#39;s equation.
Definition: SystemBase.C:1640
const THREAD_ID _tid
The thread ID that this object is on.
TheWarehouse & theWarehouse()
Definition: MooseApp.h:119
const Elem *const & _elem
The current elem.
bool _need_curl
curl flags
TheWarehouse::QueryCache _fv_elemental_kernel_query_cache
Cached warehouse query for FVElementalKernels.
const ADReal _ad_zero
A zero AD variable.

Member Function Documentation

◆ add() [1/2]

template<typename OutputType>
void MooseVariableDataBase< OutputType >::add ( libMesh::NumericVector< libMesh::Number > &  residual)
inherited

Add the current local DOF values to the input vector.

Definition at line 429 of file MooseVariableDataBase.C.

430 {
431  if (_has_dof_values)
432  {
433  auto & dof_values = _vector_tags_dof_u[_solution_tag];
434  residual.add_vector(&dof_values[0], _dof_indices);
435  }
436 }
virtual void add_vector(const T *v, const std::vector< numeric_index_type > &dof_indices)
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ add() [2/2]

template<>
void MooseVariableDataBase< RealEigenVector >::add ( NumericVector< Number > &  residual)
inherited

Definition at line 440 of file MooseVariableDataBase.C.

441 {
442  if (_has_dof_values)
443  {
444  auto & dof_values = _vector_tags_dof_u[_solution_tag];
445  if (isNodal())
446  {
447  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
448  for (unsigned int j = 0; j < _count; ++j)
449  residual.add(_dof_indices[i] + j, dof_values[i](j));
450  }
451  else
452  {
453  unsigned int n = 0;
454  for (unsigned int j = 0; j < _count; ++j)
455  {
456  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
457  residual.add(_dof_indices[i] + n, dof_values[i](j));
458  n += _dof_indices.size();
459  }
460  }
461  }
462 }
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
virtual bool isNodal() const =0
unsigned int _count
Number of components of the associated variable.
virtual void add(const numeric_index_type i, const Number value)=0
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ adDofValues()

template<typename OutputType >
const MooseArray< ADReal > & MooseVariableDataFV< OutputType >::adDofValues ( ) const

Return the AD dof values.

Definition at line 475 of file MooseVariableDataFV.h.

476 {
477  _need_ad = true;
478  return _ad_dof_values;
479 }
MooseArray< ADReal > _ad_dof_values

◆ adDofValuesDot()

template<typename OutputType >
const MooseArray< ADReal > & MooseVariableDataFV< OutputType >::adDofValuesDot ( ) const

Return the AD dof time derivatives.

Definition at line 483 of file MooseVariableDataFV.h.

484 {
485  _need_ad = _need_ad_u_dot = true;
486  return _ad_dofs_dot;
487 }
MooseArray< ADReal > _ad_dofs_dot

◆ adGradSln()

template<typename OutputType>
const ADTemplateVariableGradient<OutputType>& MooseVariableDataFV< OutputType >::adGradSln ( ) const
inline

Definition at line 181 of file MooseVariableDataFV.h.

182  {
183  _need_ad = _need_ad_grad_u = true;
184  return _ad_grad_u;
185  }
ADTemplateVariableGradient< OutputShape > _ad_grad_u

◆ adGradSlnDot()

template<typename OutputType>
const ADTemplateVariableGradient<OutputType>& MooseVariableDataFV< OutputType >::adGradSlnDot ( ) const
inline

Definition at line 187 of file MooseVariableDataFV.h.

188  {
189  mooseError("Gradient of time derivative not yet implemented for FV");
190  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ adSecondSln()

template<typename OutputType>
const ADTemplateVariableSecond<OutputType>& MooseVariableDataFV< OutputType >::adSecondSln ( ) const
inline

Definition at line 192 of file MooseVariableDataFV.h.

193  {
194  _need_ad = _need_ad_second_u = true;
195  return _ad_second_u;
196  }
ADTemplateVariableSecond< OutputShape > _ad_second_u

◆ adSln()

template<typename OutputType>
const ADTemplateVariableValue<OutputType>& MooseVariableDataFV< OutputType >::adSln ( ) const
inline

Definition at line 175 of file MooseVariableDataFV.h.

176  {
177  _need_ad = _need_ad_u = true;
178  return _ad_u;
179  }
ADTemplateVariableValue< OutputShape > _ad_u
AD u.

◆ adUDot()

template<typename OutputType >
const ADTemplateVariableValue< OutputType > & MooseVariableDataFV< OutputType >::adUDot ( ) const
inline

Definition at line 504 of file MooseVariableDataFV.h.

505 {
506  _need_ad = _need_ad_u_dot = true;
507 
508  if (!safeToComputeADUDot())
509  // We will just copy the value of _u_dot into _ad_u_dot
510  _need_u_dot = true;
511 
512  return _ad_u_dot;
513 }
ADTemplateVariableValue< OutputShape > _ad_u_dot
bool safeToComputeADUDot() const
Helper method that tells us whether it&#39;s safe to compute _ad_u_dot.

◆ adUDotDot()

template<typename OutputType >
const ADTemplateVariableValue< OutputType > & MooseVariableDataFV< OutputType >::adUDotDot ( ) const

Definition at line 517 of file MooseVariableDataFV.h.

518 {
519  // Generally speaking, we need u dot information when computing u dot dot
520  adUDot();
521 
522  _need_ad = _need_ad_u_dotdot = true;
523 
524  if (!safeToComputeADUDot())
525  // We will just copy the value of _u_dotdot into _ad_u_dotdot
526  _need_u_dotdot = true;
527 
528  return _ad_u_dotdot;
529 }
const ADTemplateVariableValue< OutputType > & adUDot() const
bool safeToComputeADUDot() const
Helper method that tells us whether it&#39;s safe to compute _ad_u_dot.
ADTemplateVariableValue< OutputShape > _ad_u_dotdot

◆ assignNodalValue() [1/3]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::assignNodalValue ( )
protectedinherited

Definition at line 743 of file MooseVariableDataBase.C.

744 {
745  bool is_transient = _subproblem.isTransient();
746 
748 
749  auto & dof_values = _vector_tags_dof_u[_solution_tag];
750  _nodal_value = dof_values[0];
752 
753  if (is_transient)
754  {
755  if (oldestSolutionStateRequested() >= 1)
756  {
759  }
760  if (oldestSolutionStateRequested() >= 2)
761  {
764  }
773  }
776 }
DoFValue _dof_values_dotdot
second time derivative of the solution values
DoFValue _dof_values_dotdot_old
the previous time step&#39;s solution value second time derivative
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
DoFValue _dof_values_dot
time derivative of the solution values
OutputType _nodal_value
Nodal values.
DoFValue _dof_values_dot_old
the previous time step&#39;s solution value time derivative
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
virtual bool isTransient() const =0
std::vector< DoFValue > _vector_tags_dof_u
libmesh_assert(ctx)
TagID _older_solution_tag
The vector tag ID corresponding to the older solution vector.
OutputType _nodal_value_dotdot
nodal values of u_dotdot
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
OutputType _nodal_value_dot_old
nodal values of u_dot_old
MooseArray< OutputType > _nodal_value_old_array
OutputType _nodal_value_dotdot_old
nodal values of u_dotdot_old
TagID _old_solution_tag
The vector tag ID corresponding to the old solution vector.
const TagID INVALID_TAG_ID
Definition: MooseTypes.C:23
OutputType _nodal_value_dot
nodal values of u_dot
TagID _previous_nl_solution_tag
The vector tag ID corresponding to the previous nonlinear iteration&#39;s solution vector.
bool _need_dof_values_dot
local solution flags
MooseArray< OutputType > _nodal_value_older_array
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
unsigned int oldestSolutionStateRequested() const
The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).

◆ assignNodalValue() [2/3]

template<>
void MooseVariableDataBase< RealVectorValue >::assignNodalValue ( )
protectedinherited

◆ assignNodalValue() [3/3]

template<>
void MooseVariableDataBase< RealVectorValue >::assignNodalValue ( )
protectedinherited

Definition at line 780 of file MooseVariableDataBase.C.

781 {
782  bool is_transient = _subproblem.isTransient();
783 
784  auto n = _dof_indices.size();
785  libmesh_assert(n);
786 
787  auto & dof_values = _vector_tags_dof_u[_solution_tag];
788  for (decltype(n) i = 0; i < n; ++i)
789  _nodal_value(i) = dof_values[i];
791 
792  if (is_transient)
793  {
794  if (oldestSolutionStateRequested() >= 1)
795  {
796  auto & dof_values_old = _vector_tags_dof_u[_old_solution_tag];
797  for (decltype(n) i = 0; i < n; ++i)
798  _nodal_value_old(i) = dof_values_old[i];
800  }
801  if (oldestSolutionStateRequested() >= 2)
802  {
803  auto & dof_values_older = _vector_tags_dof_u[_older_solution_tag];
804  for (decltype(n) i = 0; i < n; ++i)
805  _nodal_value_older(i) = dof_values_older[i];
807  }
809  for (decltype(n) i = 0; i < n; ++i)
812  for (decltype(n) i = 0; i < n; ++i)
815  for (decltype(n) i = 0; i < n; ++i)
818  for (decltype(n) i = 0; i < n; ++i)
820  }
822  {
823  auto & dof_values_previous_nl = _vector_tags_dof_u[_previous_nl_solution_tag];
824  for (decltype(n) i = 0; i < n; ++i)
825  _nodal_value_previous_nl(i) = dof_values_previous_nl[i];
826  }
827 }
DoFValue _dof_values_dotdot
second time derivative of the solution values
DoFValue _dof_values_dotdot_old
the previous time step&#39;s solution value second time derivative
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
DoFValue _dof_values_dot
time derivative of the solution values
OutputType _nodal_value
Nodal values.
DoFValue _dof_values_dot_old
the previous time step&#39;s solution value time derivative
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
virtual bool isTransient() const =0
std::vector< DoFValue > _vector_tags_dof_u
libmesh_assert(ctx)
TagID _older_solution_tag
The vector tag ID corresponding to the older solution vector.
OutputType _nodal_value_dotdot
nodal values of u_dotdot
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
OutputType _nodal_value_dot_old
nodal values of u_dot_old
MooseArray< OutputType > _nodal_value_old_array
OutputType _nodal_value_dotdot_old
nodal values of u_dotdot_old
TagID _old_solution_tag
The vector tag ID corresponding to the old solution vector.
const TagID INVALID_TAG_ID
Definition: MooseTypes.C:23
OutputType _nodal_value_dot
nodal values of u_dot
TagID _previous_nl_solution_tag
The vector tag ID corresponding to the previous nonlinear iteration&#39;s solution vector.
bool _need_dof_values_dot
local solution flags
MooseArray< OutputType > _nodal_value_older_array
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
unsigned int oldestSolutionStateRequested() const
The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).

◆ clearDofIndices()

template<typename OutputType>
void MooseVariableDataFV< OutputType >::clearDofIndices ( )
inline

Definition at line 242 of file MooseVariableDataFV.h.

243  {
244  _dof_indices.clear();
245  _prev_elem = nullptr;
246  }
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
const Elem * _prev_elem
used to keep track of when dof indices are out of date

◆ computeAD()

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

compute AD things

Definition at line 511 of file MooseVariableDataFV.C.

512 {
513  // This query and if check prevent running this code when we have FV
514  // variables, but no kernels. When this happens, maxVarNDofsPerElem is
515  // not computed (because no kernels) and is zero giving nonsense offsets for
516  // AD stuff. So we just skip all this when that is the case. Maybe there
517  // is a better way to do this - like just checking if getMaxVarNDofsPerElem
518  // returns zero?
519  std::vector<FVKernel *> ks;
521  if (ks.size() == 0)
522  {
524  if (ks.size() == 0)
525  return;
526  }
527 
528  _ad_dof_values.resize(num_dofs);
529  if (_need_ad_u)
530  _ad_u.resize(nqp);
531 
532  if (_need_ad_grad_u)
533  _ad_grad_u.resize(nqp);
534 
535  if (_need_ad_second_u)
536  _ad_second_u.resize(nqp);
537 
538  if (_need_ad_u_dot)
539  {
540  _ad_dofs_dot.resize(num_dofs);
541  _ad_u_dot.resize(nqp);
542  }
543 
544  if (_need_ad_u_dotdot)
545  {
546  _ad_dofs_dotdot.resize(num_dofs);
547  _ad_u_dotdot.resize(nqp);
548  }
549 
550  if (_need_ad_second_u)
551  assignForAllQps(0, _ad_second_u, nqp);
552 
553  if (_need_ad_u_dot)
554  assignForAllQps(_ad_zero, _ad_u_dot, nqp);
555 
556  if (_need_ad_u_dotdot)
557  assignForAllQps(_ad_zero, _ad_u_dotdot, nqp);
558 
559  const bool do_derivatives =
560  ADReal::do_derivatives && _sys.number() == _subproblem.currentNlSysNum();
561 
562  for (unsigned int i = 0; i < num_dofs; i++)
563  {
565 
566  // NOTE! You have to do this AFTER setting the value!
567  if (do_derivatives)
568  Moose::derivInsert(_ad_dof_values[i].derivatives(), _dof_indices[i], 1.);
569 
571  {
574  _dof_indices[i],
576  : _ad_real_dummy);
577  }
578  }
579 
580  if (_need_ad_u)
581  assignForAllQps(_ad_dof_values[0], _ad_u, nqp);
582 
583  if (_need_ad_grad_u)
584  assignForAllQps(static_cast<const MooseVariableFV<OutputType> &>(_var).adGradSln(
586  _ad_grad_u,
587  nqp);
588 
589  if (_need_ad_u_dot)
590  {
591  if (safeToComputeADUDot())
592  {
593  assignForAllQps(_ad_dofs_dot[0], _ad_u_dot, nqp);
594  if (_need_ad_u_dotdot)
595  assignForAllQps(_ad_dofs_dotdot[0], _ad_u_dotdot, nqp);
596  }
597  else
598  {
599  assignForAllQps(_u_dot[0], _ad_u_dot, nqp);
600  if (_need_ad_u_dotdot)
601  assignForAllQps(_u_dotdot[0], _ad_u_dotdot, nqp);
602  }
603  }
604 }
virtual const NumericVector< Number > *const & currentSolution() const =0
The solution vector that is currently being operated on.
FieldVariableValue _u_dot
u_dot (time derivative)
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
virtual unsigned int currentNlSysNum() const =0
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
Definition: TheWarehouse.h:311
MooseArray< ADReal > _ad_dof_values
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
const TimeIntegrator *const _time_integrator
Pointer to time integrator.
TheWarehouse::QueryCache _fv_flux_kernel_query_cache
Cached warehouse query for FVFluxKernels.
MooseArray< ADReal > _ad_dofs_dot
const ADTemplateVariableGradient< OutputType > & adGradSln() const
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
ADTemplateVariableValue< OutputShape > _ad_u_dot
virtual void computeADTimeDerivatives(ADReal &ad_u_dot, const dof_id_type &dof, ADReal &ad_u_dot_dot) const =0
method for computing local automatic differentiation time derivatives
const Real & dt() const
Returns the time step size.
ADReal _ad_real_dummy
A dummy ADReal variable.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
bool safeToComputeADUDot() const
Helper method that tells us whether it&#39;s safe to compute _ad_u_dot.
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
Definition: ADReal.h:21
ADTemplateVariableSecond< OutputShape > _ad_second_u
MooseArray< ADReal > _ad_dofs_dotdot
const Elem *const & _elem
The current elem.
ADTemplateVariableValue< OutputShape > _ad_u
AD u.
This class provides variable solution values for other classes/objects to bind to when looping over f...
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
StateArg currentState()
ADTemplateVariableGradient< OutputShape > _ad_grad_u
TheWarehouse::QueryCache _fv_elemental_kernel_query_cache
Cached warehouse query for FVElementalKernels.
ADTemplateVariableValue< OutputShape > _ad_u_dotdot
const ADReal _ad_zero
A zero AD variable.

◆ computeIncrementAtQps()

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

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

◆ computeValues()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::computeValues ( )

compute the variable values

Definition at line 420 of file MooseVariableDataFV.C.

421 {
422  initDofIndices();
424 
425  unsigned int num_dofs = _dof_indices.size();
426 
427  if (num_dofs > 0)
428  fetchDoFValues();
429  else
430  // We don't have any dofs. There's nothing to do
431  return;
432 
433  mooseAssert(num_dofs == 1 && _vector_tags_dof_u[_solution_tag].size() == 1,
434  "There should only be one dof per elem for FV variables");
435 
436  bool is_transient = _subproblem.isTransient();
437  const auto nqp = _qrule->n_points();
438  auto && active_coupleable_matrix_tags =
440 
441  bool second_required =
443  bool curl_required = _need_curl || _need_curl_old;
444 
445  for (const auto qp : make_range(nqp))
446  {
447  if (is_transient)
448  {
449  if (_need_u_dot)
450  _u_dot[qp] = _dof_values_dot[0];
451 
452  if (_need_u_dotdot)
453  _u_dotdot[qp] = _dof_values_dotdot[0];
454 
455  if (_need_u_dot_old)
457 
458  if (_need_u_dotdot_old)
460 
461  if (_need_du_dot_du)
462  _du_dot_du[qp] = _dof_du_dot_du[0];
463 
464  if (_need_du_dotdot_du)
466  }
467 
468  if (second_required)
469  {
470  if (_need_second)
471  _second_u[qp] = 0.;
472 
474  _second_u_previous_nl[qp] = 0.;
475 
476  if (is_transient)
477  {
478  if (_need_second_old)
479  _second_u_old[qp] = 0.;
480 
481  if (_need_second_older)
482  _second_u_older[qp] = 0.;
483  }
484  }
485 
486  if (curl_required)
487  {
488  if (_need_curl)
489  _curl_u[qp] = 0.;
490 
491  if (is_transient && _need_curl_old)
492  _curl_u_old[qp] = 0.;
493  }
494 
495  for (auto tag : _required_vector_tags)
496  if (_need_vector_tag_u[tag])
497  _vector_tag_u[tag][qp] = _vector_tags_dof_u[tag][0];
498 
499  for (auto tag : active_coupleable_matrix_tags)
500  if (_need_matrix_tag_u[tag])
501  _matrix_tag_u[tag][qp] = _matrix_tags_dof_u[tag][0];
502  }
503 
504  // Automatic differentiation
505  if (_need_ad)
506  computeAD(num_dofs, nqp);
507 }
std::vector< DoFValue > _matrix_tags_dof_u
FieldVariableValue _u_dot
u_dot (time derivative)
const std::vector< dof_id_type > & initDofIndices()
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u
FieldVariableValue _u_dotdot_old
u_dotdot_old (second time derivative)
DoFValue _dof_values_dotdot
second time derivative of the solution values
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:390
std::vector< FieldVariableValue > _matrix_tag_u
void fetchDoFValues()
Helper methods for assigning dof values from their corresponding solution values. ...
std::vector< bool > _need_vector_tag_u
DoFValue _dof_values_dotdot_old
the previous time step&#39;s solution value second time derivative
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
FieldVariableSecond _second_u
second_u
FieldVariableCurl _curl_u
curl_u
DoFValue _dof_values_dot
time derivative of the solution values
MooseArray< libMesh::Number > _dof_du_dot_du
derivatives of the solution value time derivative with respect to the degrees of freedom ...
MooseArray< libMesh::Number > _dof_du_dotdot_du
derivatives of the solution value second time derivative with respect to the degrees of freedom ...
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
DoFValue _dof_values_dot_old
the previous time step&#39;s solution value time derivative
SubProblem & subproblem()
Definition: SystemBase.h:101
virtual bool isTransient() const =0
std::vector< DoFValue > _vector_tags_dof_u
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
unsigned int n_points() const
FieldVariableSecond _second_u_older
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
FieldVariableSecond _second_u_old
std::vector< bool > _need_matrix_tag_u
FieldVariableSecond _second_u_previous_nl
const libMesh::QBase * _qrule
The quadrature rule.
bool _need_second
SolutionState second_u flags.
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
IntRange< T > make_range(T beg, T end)
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
const THREAD_ID _tid
The thread ID that this object is on.
std::vector< FieldVariableValue > _vector_tag_u
VariableValue _du_dot_du
derivative of u_dot wrt u
FieldVariableCurl _curl_u_old
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
void computeAD(const unsigned int num_dofs, const unsigned int nqp)
compute AD things
bool _need_curl
curl flags

◆ computeValuesFace()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::computeValuesFace ( const FaceInfo fi)

compute the variable values

Definition at line 381 of file MooseVariableDataFV.C.

382 {
383  _has_dirichlet_bc = false;
385 
386  // TODO: compute reconstructed values somehow. For now, just do the trivial
387  // reconstruction where we take the const cell value from the centroid and
388  // use that value on the face. How will users affect the reconstruction
389  // method used here? After reconstruction, we should cache the computed
390  // soln/gradients per element so we don't have to recompute them again for
391  // other faces that share an element with this face.
392  //
393  // TODO: Also we need to be able to track (AD) derivatives through the
394  // reconstruction process - how will we do that?
395 
396  computeValues();
397 
398  // TODO: maybe initialize a separate _grad_u_interface here that is
399  // only used for diffusion terms that need an interface gradient. Also -
400  // it would need cross-diffusion corrections for non-orthogonal meshes
401  // eventually. Or maybe we just leave this alone zero and have users
402  // calculate whatever grad_interface value they want and provide some
403  // helper functions for cross-diffusion correction.
404 
405  // TODO: figure out how to store old/older values of reconstructed
406  // solutions/gradient states without having to re-reconstruct them from
407  // older dof/soln values.
408 }
const libMesh::DofMap & _dof_map
The degree of freedom map from libMesh.
const unsigned int _var_num
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
bool _has_dirichlet_bc
if this variable has a dirichlet bc defined on a particular face
void computeValues()
compute the variable values
const Elem *const & _elem
The current elem.
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ curlSln()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::FieldVariableCurl & MooseVariableDataFV< OutputType >::curlSln ( Moose::SolutionState  state) const

Local solution curl getter.

Parameters
stateThe state of the simulation: current, old, older

Definition at line 240 of file MooseVariableDataFV.C.

241 {
242  _var.requireQpComputations();
243  switch (state)
244  {
245  case Moose::Current:
246  {
247  _need_curl = true;
248  return _curl_u;
249  }
250 
251  case Moose::Old:
252  {
253  _need_curl_old = true;
254  return _curl_u_old;
255  }
256 
257  case Moose::Older:
258  {
259  _need_curl_older = true;
260  return _curl_u_older;
261  }
262 
263  default:
264  mooseError("We don't currently support curl from the previous non-linear iteration");
265  }
266 }
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
FieldVariableCurl _curl_u
curl_u
FieldVariableCurl _curl_u_older
FieldVariableCurl _curl_u_old
bool _need_curl
curl flags

◆ currentElem()

template<typename OutputType>
const Elem* const& MooseVariableDataFV< OutputType >::currentElem ( ) const
inline

The current element.

Definition at line 139 of file MooseVariableDataFV.h.

139 { return _elem; }
const Elem *const & _elem
The current elem.

◆ dofIndices()

template<typename OutputType >
const std::vector< dof_id_type > & MooseVariableDataFV< OutputType >::dofIndices ( ) const

Definition at line 533 of file MooseVariableDataFV.h.

534 {
535  return const_cast<MooseVariableDataFV<OutputType> *>(this)->initDofIndices();
536 }
const std::vector< dof_id_type > & initDofIndices()

◆ dofValues()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DoFValue & MooseVariableDataBase< OutputType >::dofValues ( ) const
inherited

Definition at line 333 of file MooseVariableDataBase.C.

334 {
336 }
const DoFValue & vectorTagDofValue(TagID tag) const

◆ dofValuesDot()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::DoFValue & MooseVariableDataFV< OutputType >::dofValuesDot ( ) const

Definition at line 669 of file MooseVariableDataFV.C.

670 {
671  if (_sys.solutionUDot())
672  {
673  _need_dof_values_dot = true;
674  return _dof_values_dot;
675  }
676  else
677  mooseError(
678  "MooseVariableDataFV: Time derivative of solution (`u_dot`) is not stored. Please set "
679  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
680 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
DoFValue _dof_values_dot
time derivative of the solution values
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:252
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
bool _need_dof_values_dot
local solution flags

◆ dofValuesDotDot()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::DoFValue & MooseVariableDataFV< OutputType >::dofValuesDotDot ( ) const

Definition at line 684 of file MooseVariableDataFV.C.

685 {
686  if (_sys.solutionUDotDot())
687  {
689  return _dof_values_dotdot;
690  }
691  else
692  mooseError(
693  "MooseVariableDataFV: Second time derivative of solution (`u_dotdot`) is not stored. "
694  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
695  "`u_dotdot`.");
696 }
DoFValue _dof_values_dotdot
second time derivative of the solution values
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:253

◆ dofValuesDotDotOld()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::DoFValue & MooseVariableDataFV< OutputType >::dofValuesDotDotOld ( ) const

Definition at line 715 of file MooseVariableDataFV.C.

716 {
717  if (_sys.solutionUDotDotOld())
718  {
720  return _dof_values_dotdot_old;
721  }
722  else
723  mooseError(
724  "MooseVariableDataFV: Old second time derivative of solution (`u_dotdot_old`) is not "
725  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
726  "requesting `u_dotdot_old`.");
727 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
DoFValue _dof_values_dotdot_old
the previous time step&#39;s solution value second time derivative
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:255
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...

◆ dofValuesDotOld()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::DoFValue & MooseVariableDataFV< OutputType >::dofValuesDotOld ( ) const

Definition at line 700 of file MooseVariableDataFV.C.

701 {
702  if (_sys.solutionUDotOld())
703  {
705  return _dof_values_dot_old;
706  }
707  else
708  mooseError("MooseVariableDataFV: Old time derivative of solution (`u_dot_old`) is not stored. "
709  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
710  "`u_dot_old`.");
711 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
DoFValue _dof_values_dot_old
the previous time step&#39;s solution value time derivative
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:254
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...

◆ dofValuesDuDotDotDu()

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

Definition at line 739 of file MooseVariableDataFV.C.

740 {
741  _need_dof_du_dotdot_du = true;
742  return _dof_du_dotdot_du;
743 }
MooseArray< libMesh::Number > _dof_du_dotdot_du
derivatives of the solution value second time derivative with respect to the degrees of freedom ...

◆ dofValuesDuDotDu()

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

Definition at line 731 of file MooseVariableDataFV.C.

732 {
733  _need_dof_du_dot_du = true;
734  return _dof_du_dot_du;
735 }
MooseArray< libMesh::Number > _dof_du_dot_du
derivatives of the solution value time derivative with respect to the degrees of freedom ...

◆ dofValuesOld()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DoFValue & MooseVariableDataBase< OutputType >::dofValuesOld ( ) const
inherited

Definition at line 340 of file MooseVariableDataBase.C.

341 {
343 }
const DoFValue & vectorTagDofValue(TagID tag) const

◆ dofValuesOlder()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DoFValue & MooseVariableDataBase< OutputType >::dofValuesOlder ( ) const
inherited

Definition at line 347 of file MooseVariableDataBase.C.

348 {
350 }
const DoFValue & vectorTagDofValue(TagID tag) const

◆ dofValuesPreviousNL()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DoFValue & MooseVariableDataBase< OutputType >::dofValuesPreviousNL ( ) const
inherited

Definition at line 354 of file MooseVariableDataBase.C.

355 {
357 }
const DoFValue & vectorTagDofValue(TagID tag) const

◆ duDotDotDu()

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

Definition at line 216 of file MooseVariableDataFV.h.

217  {
218  _need_du_dotdot_du = true;
219  return _du_dotdot_du;
220  }
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u

◆ duDotDu()

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

Definition at line 210 of file MooseVariableDataFV.h.

211  {
212  _need_du_dot_du = true;
213  return _du_dot_du;
214  }
VariableValue _du_dot_du
derivative of u_dot wrt u

◆ fetchADDoFValues()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::fetchADDoFValues ( )
private

Helper methods for assigning nodal values from their corresponding solution values (dof values as they're referred to here in this class).

These methods are only truly meaningful for nodal basis families

Definition at line 747 of file MooseVariableDataFV.C.

748 {
749  auto n = _dof_indices.size();
750  libmesh_assert(n);
752 
753  const bool do_derivatives =
754  ADReal::do_derivatives && _sys.number() == _subproblem.currentNlSysNum();
755 
756  for (decltype(n) i = 0; i < n; ++i)
757  {
759  if (do_derivatives)
760  Moose::derivInsert(_ad_dof_values[i].derivatives(), _dof_indices[i], 1.);
761  }
762 }
virtual unsigned int currentNlSysNum() const =0
MooseArray< ADReal > _ad_dof_values
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
std::vector< DoFValue > _vector_tags_dof_u
libmesh_assert(ctx)
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
Definition: ADReal.h:21
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ fetchDoFValues() [1/3]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::fetchDoFValues ( )
protectedinherited

Helper methods for assigning dof values from their corresponding solution values.

Definition at line 529 of file MooseVariableDataBase.C.

530 {
531  bool is_transient = _subproblem.isTransient();
532 
533  auto n = _dof_indices.size();
534  libmesh_assert(n);
535 
536  if (is_transient)
537  {
539  {
543  }
545  {
549  }
551  {
555  }
557  {
561  }
562  }
563 
564  for (auto tag : _required_vector_tags)
569  // tag is defined on problem but may not be used by a system
570  // the grain tracker requires being able to read from solution vectors that we are also in
571  // the process of writing :-/
572  if (_sys.hasVector(tag) /* && _sys.getVector(tag).closed()*/)
573  {
574  auto & vec = _sys.getVector(tag);
575  _vector_tags_dof_u[tag].resize(n);
576  vec.get(_dof_indices, &_vector_tags_dof_u[tag][0]);
577  }
578 
580  {
581  auto & active_coupleable_matrix_tags =
583  for (auto tag : active_coupleable_matrix_tags)
584  {
585  _matrix_tags_dof_u[tag].resize(n);
587  if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag) && _sys.getMatrix(tag).closed())
588  {
589  auto & mat = _sys.getMatrix(tag);
590  for (unsigned i = 0; i < n; i++)
591  {
592  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
593  _matrix_tags_dof_u[tag][i] = mat(_dof_indices[i], _dof_indices[i]);
594  }
595  }
596  }
597  }
598 
600  {
602  for (decltype(n) i = 0; i < n; ++i)
603  _dof_du_dot_du[i] = _sys.duDotDu(_var.number());
604  }
606  {
608  for (decltype(n) i = 0; i < n; ++i)
610  }
611 }
std::vector< DoFValue > _matrix_tags_dof_u
bool _need_grad_dot
gradient dot flags
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
DoFValue _dof_values_dotdot
second time derivative of the solution values
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:390
virtual void get(const std::vector< numeric_index_type > &index, Number *values) const
virtual bool safeAccessTaggedVectors() const
Is it safe to access the tagged vectors.
Definition: SubProblem.h:729
std::vector< bool > _need_vector_tag_u
DoFValue _dof_values_dotdot_old
the previous time step&#39;s solution value second time derivative
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:255
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
std::vector< bool > _need_vector_tag_grad
std::vector< bool > _need_vector_tag_dof_u
DoFValue _dof_values_dot
time derivative of the solution values
MooseArray< libMesh::Number > _dof_du_dot_du
derivatives of the solution value time derivative with respect to the degrees of freedom ...
MooseArray< libMesh::Number > _dof_du_dotdot_du
derivatives of the solution value second time derivative with respect to the degrees of freedom ...
virtual Number & duDotDotDu()
Definition: SystemBase.h:248
DoFValue _dof_values_dot_old
the previous time step&#39;s solution value time derivative
virtual const Number & duDotDu(unsigned int var_num=0) const
Definition: SystemBase.C:1668
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:252
virtual bool isTransient() const =0
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:254
virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const
Definition: SubProblem.C:231
std::vector< DoFValue > _vector_tags_dof_u
libmesh_assert(ctx)
virtual bool matrixTagActive(TagID tag) const
If or not a matrix tag is active.
Definition: SystemBase.C:1151
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
virtual bool closed() const=0
std::vector< bool > _need_matrix_tag_u
std::vector< bool > _need_matrix_tag_dof_u
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
bool _need_dof_values_dot
local solution flags
const THREAD_ID _tid
The thread ID that this object is on.
virtual bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
Definition: SubProblem.h:726
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:253
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ fetchDoFValues() [2/3]

template<>
void MooseVariableDataBase< RealEigenVector >::fetchDoFValues ( )
protectedinherited

◆ fetchDoFValues() [3/3]

template<>
void MooseVariableDataBase< RealEigenVector >::fetchDoFValues ( )
protectedinherited

Definition at line 647 of file MooseVariableDataBase.C.

648 {
649  bool is_transient = _subproblem.isTransient();
650 
651  auto n = _dof_indices.size();
652  libmesh_assert(n);
653 
654  if (is_transient)
655  {
657  {
660  }
662  {
665  }
667  {
670  }
672  {
675  }
676  }
677 
678  for (auto tag : _required_vector_tags)
682  // tag is defined on problem but may not be used by a system
683  if (_sys.hasVector(tag) && _sys.getVector(tag).closed())
685 
687  {
688  auto & active_coupleable_matrix_tags =
690  for (auto tag : active_coupleable_matrix_tags)
691  {
692  _matrix_tags_dof_u[tag].resize(n);
694  if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag) && _sys.getMatrix(tag).closed())
695  {
696  auto & mat = _sys.getMatrix(tag);
697  for (unsigned i = 0; i < n; i++)
698  {
699  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
700  for (unsigned j = 0; j < _count; j++)
701  _matrix_tags_dof_u[tag][i](j) = mat(_dof_indices[i] + j, _dof_indices[i] + j);
702  }
703  }
704  }
705  }
706 
708  {
710  for (decltype(n) i = 0; i < n; ++i)
711  _dof_du_dot_du[i] = _sys.duDotDu(_var.number());
712  }
714  {
716  for (decltype(n) i = 0; i < n; ++i)
718  }
719 }
std::vector< DoFValue > _matrix_tags_dof_u
bool _need_grad_dot
gradient dot flags
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
DoFValue _dof_values_dotdot
second time derivative of the solution values
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:390
virtual bool safeAccessTaggedVectors() const
Is it safe to access the tagged vectors.
Definition: SubProblem.h:729
void getArrayDoFValues(const libMesh::NumericVector< libMesh::Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
DoFValue _dof_values_dotdot_old
the previous time step&#39;s solution value second time derivative
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:255
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
DoFValue _dof_values_dot
time derivative of the solution values
MooseArray< libMesh::Number > _dof_du_dot_du
derivatives of the solution value time derivative with respect to the degrees of freedom ...
MooseArray< libMesh::Number > _dof_du_dotdot_du
derivatives of the solution value second time derivative with respect to the degrees of freedom ...
virtual Number & duDotDotDu()
Definition: SystemBase.h:248
DoFValue _dof_values_dot_old
the previous time step&#39;s solution value time derivative
virtual const Number & duDotDu(unsigned int var_num=0) const
Definition: SystemBase.C:1668
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:252
virtual bool isTransient() const =0
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:254
virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const
Definition: SubProblem.C:231
std::vector< DoFValue > _vector_tags_dof_u
libmesh_assert(ctx)
virtual bool matrixTagActive(TagID tag) const
If or not a matrix tag is active.
Definition: SystemBase.C:1151
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
virtual bool closed() const=0
virtual bool closed() const
std::vector< bool > _need_matrix_tag_u
std::vector< bool > _need_matrix_tag_dof_u
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _count
Number of components of the associated variable.
bool _need_dof_values_dot
local solution flags
const THREAD_ID _tid
The thread ID that this object is on.
virtual bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
Definition: SubProblem.h:726
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:253
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ getArrayDoFValues()

template<typename OutputType>
void MooseVariableDataBase< OutputType >::getArrayDoFValues ( const libMesh::NumericVector< libMesh::Number > &  sol,
unsigned int  n,
MooseArray< RealEigenVector > &  dof_values 
) const
protectedinherited

Definition at line 615 of file MooseVariableDataBase.C.

618 {
619  dof_values.resize(n);
620  if (isNodal())
621  {
622  for (unsigned int i = 0; i < n; ++i)
623  {
624  dof_values[i].resize(_count);
625  auto dof = _dof_indices[i];
626  for (unsigned int j = 0; j < _count; ++j)
627  dof_values[i](j) = sol(dof++);
628  }
629  }
630  else
631  {
632  for (unsigned int i = 0; i < n; ++i)
633  {
634  dof_values[i].resize(_count);
635  auto dof = _dof_indices[i];
636  for (unsigned int j = 0; j < _count; ++j)
637  {
638  dof_values[i](j) = sol(dof);
639  dof += n;
640  }
641  }
642  }
643 }
virtual bool isNodal() const =0
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _count
Number of components of the associated variable.
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ getContinuity()

template<typename OutputType>
libMesh::FEContinuity MooseVariableDataFV< OutputType >::getContinuity ( ) const
inlineoverridevirtual

Return the variable continuity.

Implements MooseVariableDataBase< OutputType >.

Definition at line 104 of file MooseVariableDataFV.h.

104 { return libMesh::DISCONTINUOUS; }

◆ getDofIndices()

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

Definition at line 661 of file MooseVariableDataFV.C.

663 {
664  _dof_map.dof_indices(elem, dof_indices, _var_num);
665 }
const libMesh::DofMap & _dof_map
The degree of freedom map from libMesh.
const unsigned int _var_num
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const

◆ getElementalValue()

template<typename OutputType >
MooseVariableDataFV< OutputType >::OutputData MooseVariableDataFV< OutputType >::getElementalValue ( const Elem *  elem,
Moose::SolutionState  state,
unsigned int  idx = 0 
) const

Definition at line 636 of file MooseVariableDataFV.C.

639 {
640  std::vector<dof_id_type> dof_indices;
641  _dof_map.dof_indices(elem, dof_indices, _var_num);
642 
643  switch (state)
644  {
645  case Moose::Current:
646  return (*_sys.currentSolution())(dof_indices[idx]);
647 
648  case Moose::Old:
649  return _sys.solutionOld()(dof_indices[idx]);
650 
651  case Moose::Older:
652  return _sys.solutionOlder()(dof_indices[idx]);
653 
654  default:
655  mooseError("PreviousNL not currently supported for getElementalValue");
656  }
657 }
const libMesh::DofMap & _dof_map
The degree of freedom map from libMesh.
virtual const NumericVector< Number > *const & currentSolution() const =0
The solution vector that is currently being operated on.
const unsigned int _var_num
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
NumericVector< Number > & solutionOlder()
Definition: SystemBase.h:197
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
NumericVector< Number > & solutionOld()
Definition: SystemBase.h:196
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)

◆ gradSln()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableGradient & MooseVariableDataBase< OutputType >::gradSln ( Moose::SolutionState  state) const
inherited

Local solution gradient getter.

Parameters
stateThe state of the simulation: current, old, older, previous nl

Definition at line 312 of file MooseVariableDataBase.C.

313 {
314  auto functor = [this](TagID tag_id) -> const FieldVariableGradient &
315  { return vectorTagGradient(tag_id); };
316 
317  return const_cast<MooseVariableDataBase<OutputType> *>(this)
318  ->stateToTagHelper<FieldVariableGradient>(state, functor);
319 }
unsigned int TagID
Definition: MooseTypes.h:210
const FieldVariableGradient & vectorTagGradient(TagID tag) const
MooseArray< OutputGradient > FieldVariableGradient

◆ gradSlnDot()

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

Local time derivative of solution gradient getter.

Definition at line 171 of file MooseVariableDataFV.C.

172 {
173  if (_sys.solutionUDot())
174  {
175  _var.requireQpComputations();
176  _need_grad_dot = true;
177  return _grad_u_dot;
178  }
179  else
180  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
181  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
182 }
bool _need_grad_dot
gradient dot flags
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:252
FieldVariableGradient _grad_u_dot
grad_u dots
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...

◆ gradSlnDotDot()

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

Local second time derivative of solution gradient getter.

Definition at line 186 of file MooseVariableDataFV.C.

187 {
188  if (_sys.solutionUDotDot())
189  {
190  _var.requireQpComputations();
191  _need_grad_dotdot = true;
192  return _grad_u_dotdot;
193  }
194  else
195  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
196  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
197  "`u_dotdot`.");
198 }
FieldVariableGradient _grad_u_dotdot
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:253

◆ hasDirichletBC()

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::hasDirichletBC ( ) const
inline

checks if a Dirichlet BC exists on this face

Definition at line 281 of file MooseVariableDataFV.h.

281 { return _has_dirichlet_bc; }
bool _has_dirichlet_bc
if this variable has a dirichlet bc defined on a particular face

◆ hasDoFsOnNodes()

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::hasDoFsOnNodes ( ) const
inlineoverridevirtual

Whether this data is associated with a variable that has DoFs on nodes.

Implements MooseVariableDataBase< OutputType >.

Definition at line 103 of file MooseVariableDataFV.h.

103 { return false; }

◆ increment()

template<typename OutputType>
const FieldVariableValue& MooseVariableDataFV< OutputType >::increment ( ) const
inline

Increment getter.

Returns
The increment

Definition at line 273 of file MooseVariableDataFV.h.

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

◆ initDofIndices()

template<typename OutputType >
const std::vector< dof_id_type > & MooseVariableDataFV< OutputType >::initDofIndices ( )
private

Definition at line 412 of file MooseVariableDataFV.C.

413 {
414  Moose::initDofIndices(*this, *_elem);
415  return _dof_indices;
416 }
void initDofIndices(T &data, const Elem &elem)
const Elem *const & _elem
The current elem.
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ initializeSolnVars()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::initializeSolnVars ( )
private

Definition at line 270 of file MooseVariableDataFV.C.

271 {
272  auto && active_coupleable_matrix_tags =
274  mooseAssert(_qrule, "We should have a non-null qrule");
275  const auto nqp = _qrule->n_points();
276 
277  for (auto tag : _required_vector_tags)
278  if (_need_vector_tag_u[tag])
279  {
280  _vector_tag_u[tag].resize(nqp);
281  assignForAllQps(0, _vector_tag_u[tag], nqp);
282  }
283 
284  for (auto tag : active_coupleable_matrix_tags)
285  if (_need_matrix_tag_u[tag])
286  {
287  _matrix_tag_u[tag].resize(nqp);
288  assignForAllQps(0, _matrix_tag_u[tag], nqp);
289  }
290 
291  if (_need_second)
292  {
293  _second_u.resize(nqp);
294  assignForAllQps(0, _second_u, nqp);
295  }
296 
297  if (_need_curl)
298  {
299  _curl_u.resize(nqp);
300  assignForAllQps(0, _curl_u, nqp);
301  }
302 
304  {
306  assignForAllQps(0, _second_u_previous_nl, nqp);
307  }
308 
309  if (_subproblem.isTransient())
310  {
311  if (_need_u_dot)
312  {
313  _u_dot.resize(nqp);
314  assignForAllQps(0, _u_dot, nqp);
315  }
316 
317  if (_need_u_dotdot)
318  {
319  _u_dotdot.resize(nqp);
320  assignForAllQps(0, _u_dotdot, nqp);
321  }
322 
323  if (_need_u_dot_old)
324  {
325  _u_dot_old.resize(nqp);
326  assignForAllQps(0, _u_dot_old, nqp);
327  }
328 
329  if (_need_u_dotdot_old)
330  {
331  _u_dotdot_old.resize(nqp);
332  assignForAllQps(0, _u_dotdot_old, nqp);
333  }
334 
335  if (_need_du_dot_du)
336  {
337  _du_dot_du.resize(nqp);
338  assignForAllQps(0, _du_dot_du, nqp);
339  }
340 
341  if (_need_du_dotdot_du)
342  {
343  _du_dotdot_du.resize(nqp);
344  assignForAllQps(0, _du_dotdot_du, nqp);
345  }
346 
347  if (_need_grad_dot)
348  {
349  _grad_u_dot.resize(nqp);
350  assignForAllQps(0, _grad_u_dot, nqp);
351  }
352 
353  if (_need_grad_dotdot)
354  {
355  _grad_u_dotdot.resize(nqp);
356  assignForAllQps(0, _grad_u_dotdot, nqp);
357  }
358 
359  if (_need_second_old)
360  {
361  _second_u_old.resize(nqp);
362  assignForAllQps(0, _second_u_old, nqp);
363  }
364 
365  if (_need_curl_old)
366  {
367  _curl_u_old.resize(nqp);
368  assignForAllQps(0, _curl_u_old, nqp);
369  }
370 
371  if (_need_second_older)
372  {
373  _second_u_older.resize(nqp);
374  assignForAllQps(0, _second_u_older, nqp);
375  }
376  }
377 }
bool _need_grad_dot
gradient dot flags
FieldVariableValue _u_dot
u_dot (time derivative)
FieldVariableGradient _grad_u_dotdot
VariableValue _du_dotdot_du
derivative of u_dotdot wrt u
FieldVariableValue _u_dotdot_old
u_dotdot_old (second time derivative)
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:390
std::vector< FieldVariableValue > _matrix_tag_u
std::vector< bool > _need_vector_tag_u
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
FieldVariableSecond _second_u
second_u
FieldVariableCurl _curl_u
curl_u
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
SubProblem & subproblem()
Definition: SystemBase.h:101
virtual bool isTransient() const =0
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
unsigned int n_points() const
FieldVariableSecond _second_u_older
FieldVariableSecond _second_u_old
std::vector< bool > _need_matrix_tag_u
FieldVariableSecond _second_u_previous_nl
const libMesh::QBase * _qrule
The quadrature rule.
bool _need_second
SolutionState second_u flags.
FieldVariableGradient _grad_u_dot
grad_u dots
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
FieldVariableValue _u_dot_old
u_dot_old (time derivative)
const THREAD_ID _tid
The thread ID that this object is on.
std::vector< FieldVariableValue > _vector_tag_u
VariableValue _du_dot_du
derivative of u_dot wrt u
FieldVariableCurl _curl_u_old
bool _need_curl
curl flags

◆ insert() [1/2]

template<typename OutputType>
void MooseVariableDataBase< OutputType >::insert ( libMesh::NumericVector< libMesh::Number > &  residual)
inherited

Set the current local DOF values to the input vector.

Definition at line 390 of file MooseVariableDataBase.C.

391 {
392  if (_has_dof_values)
393  {
394  auto & dof_values = _vector_tags_dof_u[_solution_tag];
395  mooseAssert(dof_values.size() == _dof_indices.size(),
396  "Degree of freedom values size and degree of freedom indices sizes must match.");
397  residual.insert(&dof_values[0], _dof_indices);
398  }
399 }
virtual void insert(const T *v, const std::vector< numeric_index_type > &dof_indices)
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ insert() [2/2]

template<>
void MooseVariableDataBase< RealEigenVector >::insert ( NumericVector< Number > &  residual)
inherited

Definition at line 403 of file MooseVariableDataBase.C.

404 {
405  if (_has_dof_values)
406  {
407  auto & dof_values = _vector_tags_dof_u[_solution_tag];
408  if (isNodal())
409  {
410  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
411  for (unsigned int j = 0; j < _count; ++j)
412  residual.set(_dof_indices[i] + j, dof_values[i](j));
413  }
414  else
415  {
416  unsigned int n = 0;
417  for (unsigned int j = 0; j < _count; ++j)
418  {
419  for (unsigned int i = 0; i < _dof_indices.size(); ++i)
420  residual.set(_dof_indices[i] + n, dof_values[i](j));
421  n += _dof_indices.size();
422  }
423  }
424  }
425 }
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
virtual bool isNodal() const =0
unsigned int _count
Number of components of the associated variable.
virtual void set(const numeric_index_type i, const Number value)=0
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ insertSolutionTag()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::insertSolutionTag ( TagID  tag_id)
protectedinherited

insert a solution tag into our tag containers

Definition at line 323 of file MooseVariableDataBase.h.

Referenced by MooseVariableDataBase< OutputType >::MooseVariableDataBase().

324 {
325  _solution_tags.insert(tag_id);
326  _required_vector_tags.insert(tag_id);
327 }
std::set< TagID > _solution_tags
The set of solution tags we need to evaluate.
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.

◆ isNodal()

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::isNodal ( ) const
inlineoverridevirtual
Returns
Whether this data is associated with a nodal variable

Implements MooseVariableDataBase< OutputType >.

Definition at line 102 of file MooseVariableDataFV.h.

102 { return false; }

◆ matrixTagValue()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableValue & MooseVariableDataBase< OutputType >::matrixTagValue ( TagID  tag) const
inherited

Definition at line 219 of file MooseVariableDataBase.C.

220 {
221  if (tag >= _matrix_tag_u.size())
222  {
223  _need_matrix_tag_u.resize(tag + 1, false);
224  const_cast<MooseVariableDataBase<OutputType> *>(this)->_matrix_tag_u.resize(tag + 1);
225  }
226 
227  _need_matrix_tag_u[tag] = true;
228 
229  if (_sys.hasMatrix(tag))
230  return _matrix_tag_u[tag];
231  else
232  mooseError("Tag ", tag, " is not associated with any matrix for variable ", _var.name());
233 }
std::vector< FieldVariableValue > _matrix_tag_u
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< bool > _need_matrix_tag_u
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ meshChanged()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::meshChanged ( )
overridevirtual

Called on this object when the mesh changes.

Reimplemented from MeshChangedInterface.

Definition at line 779 of file MooseVariableDataFV.C.

780 {
781  _prev_elem = nullptr;
782 }
const Elem * _prev_elem
used to keep track of when dof indices are out of date

◆ needsAD()

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::needsAD ( ) const
inline

Returns whether this data structure needs automatic differentiation calculations.

Definition at line 109 of file MooseVariableDataFV.h.

109 { return _need_ad; }

◆ needSolutionState()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::needSolutionState ( unsigned int  state)
protectedinherited

Request that we have at least state number of older solution states/vectors.

Definition at line 244 of file MooseVariableDataBase.C.

245 {
246  if (state > _max_state)
247  {
248  _sys.needSolutionState(state);
249  _max_state = state;
250  }
251 }
virtual void needSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Registers that the solution state state is needed.
Definition: SystemBase.C:1428
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
unsigned int _max_state
The maximum number of older solution states our variable needs.

◆ nodalMatrixTagValue()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DoFValue & MooseVariableDataBase< OutputType >::nodalMatrixTagValue ( TagID  tag) const
inherited

Definition at line 116 of file MooseVariableDataBase.C.

117 {
118  if (isNodal())
119  {
120  if (tag >= _matrix_tags_dof_u.size())
121  {
122  _need_matrix_tag_dof_u.resize(tag + 1, false);
123  const_cast<MooseVariableDataBase<OutputType> *>(this)->_matrix_tags_dof_u.resize(tag + 1);
124  }
125 
126  _need_matrix_tag_dof_u[tag] = true;
127 
128  if (_sys.hasMatrix(tag))
129  return _matrix_tags_dof_u[tag];
130  else
131  mooseError(
132  "Tag ", tag, " is not associated with any matrix for nodal variable ", _var.name());
133  }
134  else
135  mooseError("Nodal values can be requested only on nodal variables, variable '",
136  _var.name(),
137  "' is not nodal.");
138 }
std::vector< DoFValue > _matrix_tags_dof_u
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual bool isNodal() const =0
std::vector< bool > _need_matrix_tag_dof_u
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ nodalValue()

template<typename OutputType >
const OutputType & MooseVariableDataBase< OutputType >::nodalValue ( Moose::SolutionState  state) const
inherited

Definition at line 466 of file MooseVariableDataBase.C.

467 {
468  if (isNodal())
469  {
470  // Request the correct solution states and data members
471  vectorTagDofValue(state);
472  switch (state)
473  {
474  case Moose::Current:
475  return _nodal_value;
476 
477  case Moose::Old:
478  return _nodal_value_old;
479 
480  case Moose::Older:
481  return _nodal_value_older;
482 
483  case Moose::PreviousNL:
485 
486  default:
487  // We should never get here but gcc requires that we have a default. See
488  // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
489  mooseError("Unknown SolutionState!");
490  }
491  }
492  else
493  mooseError("Nodal values can be requested only on nodal variables, variable '",
494  _var.name(),
495  "' is not nodal.");
496 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
OutputType _nodal_value
Nodal values.
virtual bool isNodal() const =0
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.
const DoFValue & vectorTagDofValue(TagID tag) const

◆ nodalValueArray()

template<typename OutputType >
const MooseArray< OutputType > & MooseVariableDataBase< OutputType >::nodalValueArray ( Moose::SolutionState  state) const
inherited

Definition at line 500 of file MooseVariableDataBase.C.

501 {
502  if (isNodal())
503  {
504  // Request the correct solution states and data members
505  vectorTagDofValue(state);
506  switch (state)
507  {
508  case Moose::Current:
509  return _nodal_value_array;
510 
511  case Moose::Old:
512  return _nodal_value_old_array;
513 
514  case Moose::Older:
516 
517  default:
518  mooseError("No current support for PreviousNL for nodal value array");
519  }
520  }
521  else
522  mooseError("Nodal values can be requested only on nodal variables, variable '",
523  _var.name(),
524  "' is not nodal.");
525 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
MooseArray< OutputType > _nodal_value_old_array
virtual bool isNodal() const =0
MooseArray< OutputType > _nodal_value_older_array
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.
const DoFValue & vectorTagDofValue(TagID tag) const

◆ nodalVectorTagValue()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DoFValue & MooseVariableDataBase< OutputType >::nodalVectorTagValue ( TagID  tag) const
inherited

Definition at line 93 of file MooseVariableDataBase.C.

94 {
95  if (isNodal())
96  {
97  if (tag >= _need_vector_tag_dof_u.size())
99 
100  _need_vector_tag_dof_u[tag] = true;
101 
102  if (_sys.hasVector(tag))
103  return _vector_tags_dof_u[tag];
104  else
105  mooseError(
106  "Tag ", tag, " is not associated with any vector for nodal variable ", _var.name());
107  }
108  else
109  mooseError("Nodal values can be requested only on nodal variables, variable '",
110  _var.name(),
111  "' is not nodal.");
112 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void resizeVectorTagData(TagID tag)
resize the vector tag need flags and data containers to accomodate this tag index ...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< bool > _need_vector_tag_dof_u
std::vector< DoFValue > _vector_tags_dof_u
virtual bool isNodal() const =0
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ numberOfDofs()

template<typename OutputType >
unsigned int MooseVariableDataFV< OutputType >::numberOfDofs ( ) const

Definition at line 540 of file MooseVariableDataFV.h.

541 {
542  return dofIndices().size();
543 }
const std::vector< dof_id_type > & dofIndices() const

◆ oldestSolutionStateRequested()

template<typename OutputType >
unsigned int MooseVariableDataBase< OutputType >::oldestSolutionStateRequested ( ) const
inherited

The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).

Definition at line 237 of file MooseVariableDataBase.C.

238 {
239  return _max_state;
240 }
unsigned int _max_state
The maximum number of older solution states our variable needs.

◆ prepareAux()

template<typename OutputType>
void MooseVariableDataBase< OutputType >::prepareAux ( )
inlineinherited

Clear aux state.

Definition at line 140 of file MooseVariableDataBase.h.

140 { _has_dof_values = false; }
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...

◆ prepareIC()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::prepareIC ( )

prepare the initial condition

Definition at line 766 of file MooseVariableDataFV.C.

767 {
768  // TODO: implement this function
769  initDofIndices();
771 
772  mooseAssert(_qrule, "We should have a non-null qrule");
773  const auto nqp = _qrule->n_points();
774  _vector_tag_u[_solution_tag].resize(nqp);
775 }
const std::vector< dof_id_type > & initDofIndices()
std::vector< DoFValue > _vector_tags_dof_u
unsigned int n_points() const
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
const libMesh::QBase * _qrule
The quadrature rule.
std::vector< FieldVariableValue > _vector_tag_u
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.

◆ resizeVectorTagData()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::resizeVectorTagData ( TagID  tag)
protectedinherited

resize the vector tag need flags and data containers to accomodate this tag index

Definition at line 142 of file MooseVariableDataBase.C.

Referenced by MooseVariableDataBase< OutputType >::nodalVectorTagValue(), MooseVariableDataBase< OutputType >::vectorTagDofValue(), MooseVariableDataBase< OutputType >::vectorTagGradient(), and MooseVariableDataBase< OutputType >::vectorTagValue().

143 {
144  mooseAssert(_need_vector_tag_dof_u.size() == _need_vector_tag_u.size() &&
146  _need_vector_tag_dof_u.size() == _vector_tags_dof_u.size() &&
147  _need_vector_tag_dof_u.size() == _vector_tag_u.size() &&
148  _need_vector_tag_dof_u.size() == _vector_tag_grad.size(),
149  "These sizes should be in sync.");
150 
151  auto check_capacity = [tag](const auto & vector_to_check)
152  {
153  if (tag + 1 > vector_to_check.capacity())
154  mooseError("New size greater than tag capacity. This will cause reallocation which will "
155  "invalidate any stored references.");
156  };
157  check_capacity(_need_vector_tag_dof_u);
158  check_capacity(_need_vector_tag_u);
159  check_capacity(_need_vector_tag_grad);
160  check_capacity(_vector_tags_dof_u);
161  check_capacity(_vector_tag_u);
162  check_capacity(_vector_tag_grad);
163 
164  _need_vector_tag_dof_u.resize(tag + 1, false);
165  _need_vector_tag_u.resize(tag + 1, false);
166  _need_vector_tag_grad.resize(tag + 1, false);
167  _vector_tags_dof_u.resize(tag + 1);
168  _vector_tag_u.resize(tag + 1);
169  _vector_tag_grad.resize(tag + 1);
170 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< bool > _need_vector_tag_u
std::vector< bool > _need_vector_tag_grad
std::vector< bool > _need_vector_tag_dof_u
std::vector< DoFValue > _vector_tags_dof_u
std::vector< FieldVariableGradient > _vector_tag_grad
std::vector< FieldVariableValue > _vector_tag_u

◆ safeToComputeADUDot()

template<typename OutputType >
bool MooseVariableDataFV< OutputType >::safeToComputeADUDot ( ) const
inlineprivate

Helper method that tells us whether it's safe to compute _ad_u_dot.

Definition at line 491 of file MooseVariableDataFV.h.

492 {
493  // If we don't have a time integrator then we have no way to calculate _ad_u_dot because we rely
494  // on calls to TimeIntegrator::computeADTimeDerivatives. Another potential situation where
495  // _ad_u_dot computation is potentially troublesome is if we are an auxiliary variable which uses
496  // the auxiliary system copy of the time integrator. Some derived time integrator classes do setup
497  // in their solve() method, and that solve() method only happens for the nonlinear system copy of
498  // the time integrator.
499  return _time_integrator && (_var.kind() == Moose::VAR_SOLVER);
500 }
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
const TimeIntegrator *const _time_integrator
Pointer to time integrator.

◆ secondSln()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::FieldVariableSecond & MooseVariableDataFV< OutputType >::secondSln ( Moose::SolutionState  state) const

Local solution second spatial derivative getter.

Parameters
stateThe state of the simulation: current, old, older, previous nl

Definition at line 202 of file MooseVariableDataFV.C.

203 {
204  _var.requireQpComputations();
205  switch (state)
206  {
207  case Moose::Current:
208  {
209  _need_second = true;
210  return _second_u;
211  }
212 
213  case Moose::Old:
214  {
215  _need_second_old = true;
216  return _second_u_old;
217  }
218 
219  case Moose::Older:
220  {
221  _need_second_older = true;
222  return _second_u_older;
223  }
224 
225  case Moose::PreviousNL:
226  {
228  return _second_u_previous_nl;
229  }
230 
231  default:
232  // We should never get here but gcc requires that we have a default. See
233  // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
234  mooseError("Unknown SolutionState!");
235  }
236 }
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
FieldVariableSecond _second_u
second_u
FieldVariableSecond _second_u_older
FieldVariableSecond _second_u_old
FieldVariableSecond _second_u_previous_nl
bool _need_second
SolutionState second_u flags.

◆ setActiveTags()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::setActiveTags ( const std::set< TagID > &  vtags)
inherited

Set the active vector tags.

Parameters
vtagsAdditional vector tags that this variable will need to query at dof indices for, in addition to our own required solution tags

Definition at line 307 of file MooseVariableDataBase.h.

308 {
310  for (const auto tag : vtags)
311  _required_vector_tags.insert(tag);
312 
313  if (!_required_vector_tags.empty())
314  {
315  const auto largest_tag_id = *_required_vector_tags.rbegin();
316  if (largest_tag_id >= _need_vector_tag_dof_u.size())
317  resizeVectorTagData(largest_tag_id);
318  }
319 }
void resizeVectorTagData(TagID tag)
resize the vector tag need flags and data containers to accomodate this tag index ...
std::vector< bool > _need_vector_tag_dof_u
std::set< TagID > _solution_tags
The set of solution tags we need to evaluate.
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.

◆ setDofValue()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::setDofValue ( const OutputData value,
unsigned int  index 
)

dof value setters

Definition at line 608 of file MooseVariableDataFV.C.

609 {
610  mooseAssert(index == 0, "We only ever have one dof value locally");
612  _has_dof_values = true;
613 
614  auto & u = _vector_tag_u[_solution_tag];
615  // Update the qp values as well
616  for (const auto qp : index_range(u))
617  u[qp] = value;
618 
619  if (_need_ad_u)
620  for (const auto qp : index_range(_ad_u))
621  _ad_u[qp] = value;
622 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
ADTemplateVariableValue< OutputShape > _ad_u
AD u.
std::vector< FieldVariableValue > _vector_tag_u
auto index_range(const T &sizable)

◆ setDofValues()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::setDofValues ( const DenseVector< OutputData > &  values)

Set local DOF values and evaluate the values on quadrature points.

Definition at line 626 of file MooseVariableDataFV.C.

627 {
628  auto & dof_values = _vector_tags_dof_u[_solution_tag];
629  for (unsigned int i = 0; i < values.size(); i++)
630  dof_values[i] = values(i);
631  _has_dof_values = true;
632 }
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
TagID _solution_tag
The vector tag ID corresponding to the solution vector.

◆ setGeometry()

template<typename OutputType >
void MooseVariableDataFV< OutputType >::setGeometry ( Moose::GeometryType  gm_type)

Set the geometry type before calculating variables values.

Parameters
gm_typeThe type type of geometry; either Volume or Face

Definition at line 79 of file MooseVariableDataFV.C.

80 {
81  switch (gm_type)
82  {
83  case Moose::Volume:
84  {
86  // TODO: set integration multiplier to cell volume
87  break;
88  }
89  case Moose::Face:
90  {
92  // TODO: set integration multiplier to face area
93  break;
94  }
95  }
96 }
const libMesh::QBase *const & qRuleFace() const
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:294
const Assembly & _assembly
const libMesh::QBase * _qrule
The quadrature rule.
const libMesh::QBase *const & qRule() const
Returns the reference to the current quadrature being used.
Definition: Assembly.h:218

◆ setNodalValue() [1/2]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::setNodalValue ( const OutputType &  value,
unsigned int  idx = 0 
)
inherited

Set nodal value.

Definition at line 361 of file MooseVariableDataBase.C.

362 {
363  auto & dof_values = _vector_tags_dof_u[_solution_tag];
364  mooseAssert(idx < dof_values.size(), "idx is out of the bounds of degree of freedom values");
365  dof_values[idx] = value; // update variable nodal value
366  _has_dof_values = true;
368 
369  // Update the qp values as well
370  auto & u = _vector_tag_u[_solution_tag];
371  for (unsigned int qp = 0; qp < u.size(); qp++)
372  u[qp] = value;
373 }
OutputType _nodal_value
Nodal values.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
std::vector< FieldVariableValue > _vector_tag_u
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)

◆ setNodalValue() [2/2]

template<>
void MooseVariableDataBase< RealVectorValue >::setNodalValue ( const RealVectorValue value,
unsigned int  idx 
)
inherited

Definition at line 377 of file MooseVariableDataBase.C.

379 {
380  auto & dof_values = _vector_tags_dof_u[_solution_tag];
381  for (decltype(idx) i = 0; i < dof_values.size(); ++i, ++idx)
382  dof_values[idx] = value(i);
383 
384  _has_dof_values = true;
386 }
OutputType _nodal_value
Nodal values.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)

◆ sln()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::FieldVariableValue & MooseVariableDataFV< OutputType >::sln ( Moose::SolutionState  state) const

Local solution value.

Definition at line 163 of file MooseVariableDataFV.C.

164 {
165  _var.requireQpComputations();
167 }
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
const FieldVariableValue & sln(Moose::SolutionState state) const
Local solution getter.

◆ stateToTagHelper()

template<typename OutputType >
template<typename ReturnType , typename Functor >
const ReturnType & MooseVariableDataBase< OutputType >::stateToTagHelper ( Moose::SolutionState  state,
Functor  functor 
)
protectedinherited

Helper method that converts a SolutionState argument into a corresponding tag ID, potentially requesting necessary additional solution states and assigning tag id data members, and then calls the provided functor with the tag ID.

Definition at line 256 of file MooseVariableDataBase.C.

258 {
259  if (state > 0)
260  {
261  // We need to request all states that are between current and the requested state
262  stateToTagHelper<ReturnType>(Moose::SolutionState(static_cast<int>(state) - 1), functor);
263  needSolutionState(cast_int<unsigned int>(state));
264  }
265 
266  switch (state)
267  {
268  case Moose::Current:
270 
271  case Moose::Old:
272  {
275  return functor(_old_solution_tag);
276  }
277 
278  case Moose::Older:
279  {
282  return functor(_older_solution_tag);
283  }
284 
285  case Moose::PreviousNL:
286  {
289  return functor(_previous_nl_solution_tag);
290  }
291 
292  default:
293  // We should never get here but gcc requires that we have a default. See
294  // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
295  mooseError("Unknown SolutionState!");
296  }
297 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const TagName OLDER_SOLUTION_TAG
Definition: MooseTypes.C:27
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
const TagName OLD_SOLUTION_TAG
Definition: MooseTypes.C:26
TagID _older_solution_tag
The vector tag ID corresponding to the older solution vector.
void insertSolutionTag(TagID tag_id)
insert a solution tag into our tag containers
TagID _old_solution_tag
The vector tag ID corresponding to the old solution vector.
SolutionState
Definition: MooseTypes.h:233
TagID _previous_nl_solution_tag
The vector tag ID corresponding to the previous nonlinear iteration&#39;s solution vector.
const TagName SOLUTION_TAG
Definition: MooseTypes.C:25
void needSolutionState(unsigned int state)
Request that we have at least state number of older solution states/vectors.
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:28

◆ uDot()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::FieldVariableValue & MooseVariableDataFV< OutputType >::uDot ( ) const

Definition at line 100 of file MooseVariableDataFV.C.

101 {
102  if (_sys.solutionUDot())
103  {
104  _var.requireQpComputations();
105  _need_u_dot = true;
106  return _u_dot;
107  }
108  else
109  mooseError("MooseVariableFE: Time derivative of solution (`u_dot`) is not stored. Please set "
110  "uDotRequested() to true in FEProblemBase before requesting `u_dot`.");
111 }
FieldVariableValue _u_dot
u_dot (time derivative)
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:252
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...

◆ uDotDot()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::FieldVariableValue & MooseVariableDataFV< OutputType >::uDotDot ( ) const

Definition at line 115 of file MooseVariableDataFV.C.

116 {
117  if (_sys.solutionUDotDot())
118  {
119  _var.requireQpComputations();
120  _need_u_dotdot = true;
121  return _u_dotdot;
122  }
123  else
124  mooseError("MooseVariableFE: Second time derivative of solution (`u_dotdot`) is not stored. "
125  "Please set uDotDotRequested() to true in FEProblemBase before requesting "
126  "`u_dotdot`.");
127 }
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
FieldVariableValue _u_dotdot
u_dotdot (second time derivative)
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:253

◆ uDotDotOld()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::FieldVariableValue & MooseVariableDataFV< OutputType >::uDotDotOld ( ) const

Definition at line 147 of file MooseVariableDataFV.C.

148 {
149  if (_sys.solutionUDotDotOld())
150  {
151  _var.requireQpComputations();
152  _need_u_dotdot_old = true;
153  return _u_dotdot_old;
154  }
155  else
156  mooseError("MooseVariableFE: Old second time derivative of solution (`u_dotdot_old`) is not "
157  "stored. Please set uDotDotOldRequested() to true in FEProblemBase before "
158  "requesting `u_dotdot_old`");
159 }
FieldVariableValue _u_dotdot_old
u_dotdot_old (second time derivative)
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:255
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...

◆ uDotOld()

template<typename OutputType >
const MooseVariableDataFV< OutputType >::FieldVariableValue & MooseVariableDataFV< OutputType >::uDotOld ( ) const

Definition at line 131 of file MooseVariableDataFV.C.

132 {
133  if (_sys.solutionUDotOld())
134  {
135  _var.requireQpComputations();
136  _need_u_dot_old = true;
137  return _u_dot_old;
138  }
139  else
140  mooseError("MooseVariableFE: Old time derivative of solution (`u_dot_old`) is not stored. "
141  "Please set uDotOldRequested() to true in FEProblemBase before requesting "
142  "`u_dot_old`.");
143 }
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:254
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
FieldVariableValue _u_dot_old
u_dot_old (time derivative)

◆ validParams()

InputParameters MeshChangedInterface::validParams ( )
staticinherited

Definition at line 15 of file MeshChangedInterface.C.

Referenced by AuxScalarKernel::validParams(), ResidualObject::validParams(), LinearSystemContributionObject::validParams(), FVInterfaceKernel::validParams(), and AuxKernelTempl< Real >::validParams().

16 {
18  return params;
19 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters emptyInputParameters()

◆ var()

template<typename OutputType>
virtual const MooseVariableFV<OutputType>& MooseVariableDataFV< OutputType >::var ( ) const
inlineoverrideprotectedvirtual
Returns
The variable to which the data in this class belongs to

Reimplemented from MooseVariableDataBase< OutputType >.

Definition at line 286 of file MooseVariableDataFV.h.

286 { return _var; }
const MooseVariableFV< OutputType > & _var
A const reference to the owning MooseVariableFV object.

◆ vectorTagDofValue() [1/2]

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DoFValue & MooseVariableDataBase< OutputType >::vectorTagDofValue ( TagID  tag) const
inherited

Definition at line 189 of file MooseVariableDataBase.C.

190 {
191  if (tag >= _need_vector_tag_dof_u.size())
192  const_cast<MooseVariableDataBase<OutputType> *>(this)->resizeVectorTagData(tag);
193 
194  _need_vector_tag_dof_u[tag] = true;
195 
196  if (_sys.hasVector(tag))
197  return _vector_tags_dof_u[tag];
198  else
199  mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
200 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void resizeVectorTagData(TagID tag)
resize the vector tag need flags and data containers to accomodate this tag index ...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< bool > _need_vector_tag_dof_u
std::vector< DoFValue > _vector_tags_dof_u
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ vectorTagDofValue() [2/2]

template<typename OutputType >
const MooseVariableDataBase< OutputType >::DoFValue & MooseVariableDataBase< OutputType >::vectorTagDofValue ( Moose::SolutionState  state) const
inherited

Definition at line 323 of file MooseVariableDataBase.C.

324 {
325  auto functor = [this](TagID tag_id) -> const DoFValue & { return vectorTagDofValue(tag_id); };
326 
327  return const_cast<MooseVariableDataBase<OutputType> *>(this)->stateToTagHelper<DoFValue>(state,
328  functor);
329 }
unsigned int TagID
Definition: MooseTypes.h:210
MooseArray< OutputData > DoFValue
const DoFValue & vectorTagDofValue(TagID tag) const

◆ vectorTagGradient()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableGradient & MooseVariableDataBase< OutputType >::vectorTagGradient ( TagID  tag) const
inherited

Definition at line 204 of file MooseVariableDataBase.C.

205 {
206  if (tag >= _need_vector_tag_grad.size())
207  const_cast<MooseVariableDataBase<OutputType> *>(this)->resizeVectorTagData(tag);
208 
209  _need_vector_tag_grad[tag] = true;
210 
211  if (_sys.hasVector(tag))
212  return _vector_tag_grad[tag];
213  else
214  mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
215 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void resizeVectorTagData(TagID tag)
resize the vector tag need flags and data containers to accomodate this tag index ...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< bool > _need_vector_tag_grad
std::vector< FieldVariableGradient > _vector_tag_grad
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ vectorTagValue()

template<typename OutputType >
const MooseVariableDataBase< OutputType >::FieldVariableValue & MooseVariableDataBase< OutputType >::vectorTagValue ( TagID  tag) const
inherited

Definition at line 174 of file MooseVariableDataBase.C.

175 {
176  if (tag >= _need_vector_tag_u.size())
177  const_cast<MooseVariableDataBase<OutputType> *>(this)->resizeVectorTagData(tag);
178 
179  _need_vector_tag_u[tag] = true;
180 
181  if (_sys.hasVector(tag))
182  return _vector_tag_u[tag];
183  else
184  mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
185 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void resizeVectorTagData(TagID tag)
resize the vector tag need flags and data containers to accomodate this tag index ...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< bool > _need_vector_tag_u
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
std::vector< FieldVariableValue > _vector_tag_u
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ zeroSizeDofValues()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::zeroSizeDofValues ( )
protectedinherited

Definition at line 723 of file MooseVariableDataBase.C.

724 {
725  if (_subproblem.isTransient())
726  {
733  }
734 
735  for (auto & dof_values : _vector_tags_dof_u)
736  dof_values.resize(0);
737 
738  _has_dof_values = false;
739 }
DoFValue _dof_values_dotdot
second time derivative of the solution values
DoFValue _dof_values_dotdot_old
the previous time step&#39;s solution value second time derivative
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
DoFValue _dof_values_dot
time derivative of the solution values
MooseArray< libMesh::Number > _dof_du_dot_du
derivatives of the solution value time derivative with respect to the degrees of freedom ...
MooseArray< libMesh::Number > _dof_du_dotdot_du
derivatives of the solution value second time derivative with respect to the degrees of freedom ...
DoFValue _dof_values_dot_old
the previous time step&#39;s solution value time derivative
virtual bool isTransient() const =0
std::vector< DoFValue > _vector_tags_dof_u
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216

Friends And Related Function Documentation

◆ Moose::initDofIndices

template<typename OutputType>
void Moose::initDofIndices ( MooseVariableDataFV< OutputType > &  ,
const Elem &   
)
friend

Member Data Documentation

◆ _ad_dof_values

template<typename OutputType>
MooseArray<ADReal> MooseVariableDataFV< OutputType >::_ad_dof_values
private

Definition at line 363 of file MooseVariableDataFV.h.

◆ _ad_dofs_dot

template<typename OutputType>
MooseArray<ADReal> MooseVariableDataFV< OutputType >::_ad_dofs_dot
private

Definition at line 364 of file MooseVariableDataFV.h.

◆ _ad_dofs_dotdot

template<typename OutputType>
MooseArray<ADReal> MooseVariableDataFV< OutputType >::_ad_dofs_dotdot
private

Definition at line 365 of file MooseVariableDataFV.h.

◆ _ad_grad_u

template<typename OutputType>
ADTemplateVariableGradient<OutputShape> MooseVariableDataFV< OutputType >::_ad_grad_u
private

Definition at line 361 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::adGradSln().

◆ _ad_grad_u_dot

template<typename OutputType>
ADTemplateVariableGradient<OutputShape> MooseVariableDataFV< OutputType >::_ad_grad_u_dot
private

Definition at line 368 of file MooseVariableDataFV.h.

◆ _ad_real_dummy

template<typename OutputType>
ADReal MooseVariableDataFV< OutputType >::_ad_real_dummy = 0
private

A dummy ADReal variable.

Definition at line 412 of file MooseVariableDataFV.h.

◆ _ad_second_u

template<typename OutputType>
ADTemplateVariableSecond<OutputShape> MooseVariableDataFV< OutputType >::_ad_second_u
private

◆ _ad_u

template<typename OutputType>
ADTemplateVariableValue<OutputShape> MooseVariableDataFV< OutputType >::_ad_u
private

AD u.

Definition at line 360 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::adSln().

◆ _ad_u_dot

template<typename OutputType>
ADTemplateVariableValue<OutputShape> MooseVariableDataFV< OutputType >::_ad_u_dot
private

Definition at line 366 of file MooseVariableDataFV.h.

◆ _ad_u_dotdot

template<typename OutputType>
ADTemplateVariableValue<OutputShape> MooseVariableDataFV< OutputType >::_ad_u_dotdot
private

Definition at line 367 of file MooseVariableDataFV.h.

◆ _ad_zero

template<typename OutputType>
const ADReal MooseVariableDataFV< OutputType >::_ad_zero
private

A zero AD variable.

Definition at line 322 of file MooseVariableDataFV.h.

◆ _assembly

template<typename OutputType>
const Assembly& MooseVariableDataFV< OutputType >::_assembly
private

Definition at line 310 of file MooseVariableDataFV.h.

◆ _continuity

template<typename OutputType>
libMesh::FEContinuity MooseVariableDataFV< OutputType >::_continuity
private

Continuity type of the variable.

Definition at line 316 of file MooseVariableDataFV.h.

◆ _count

template<typename OutputType>
unsigned int MooseVariableDataBase< OutputType >::_count
protectedinherited

Number of components of the associated variable.

Definition at line 195 of file MooseVariableDataBase.h.

◆ _curl_u

template<typename OutputType>
FieldVariableCurl MooseVariableDataFV< OutputType >::_curl_u
private

curl_u

Definition at line 355 of file MooseVariableDataFV.h.

◆ _curl_u_old

template<typename OutputType>
FieldVariableCurl MooseVariableDataFV< OutputType >::_curl_u_old
private

Definition at line 356 of file MooseVariableDataFV.h.

◆ _curl_u_older

template<typename OutputType>
FieldVariableCurl MooseVariableDataFV< OutputType >::_curl_u_older
private

Definition at line 357 of file MooseVariableDataFV.h.

◆ _displaced

template<typename OutputType>
const bool MooseVariableDataFV< OutputType >::_displaced
private

Whether this variable is being calculated on a displaced system.

Definition at line 406 of file MooseVariableDataFV.h.

◆ _dof_du_dot_du

template<typename OutputType>
MooseArray<libMesh::Number> MooseVariableDataBase< OutputType >::_dof_du_dot_du
protectedinherited

derivatives of the solution value time derivative with respect to the degrees of freedom

Definition at line 274 of file MooseVariableDataBase.h.

◆ _dof_du_dotdot_du

template<typename OutputType>
MooseArray<libMesh::Number> MooseVariableDataBase< OutputType >::_dof_du_dotdot_du
protectedinherited

derivatives of the solution value second time derivative with respect to the degrees of freedom

Definition at line 277 of file MooseVariableDataBase.h.

◆ _dof_indices

template<typename OutputType>
std::vector<dof_id_type> MooseVariableDataBase< OutputType >::_dof_indices
protectedinherited

◆ _dof_map

template<typename OutputType>
const libMesh::DofMap& MooseVariableDataBase< OutputType >::_dof_map
protectedinherited

The degree of freedom map from libMesh.

Definition at line 192 of file MooseVariableDataBase.h.

◆ _dof_values_dot

template<typename OutputType>
DoFValue MooseVariableDataBase< OutputType >::_dof_values_dot
protectedinherited

time derivative of the solution values

Definition at line 266 of file MooseVariableDataBase.h.

◆ _dof_values_dot_old

template<typename OutputType>
DoFValue MooseVariableDataBase< OutputType >::_dof_values_dot_old
protectedinherited

the previous time step's solution value time derivative

Definition at line 270 of file MooseVariableDataBase.h.

◆ _dof_values_dotdot

template<typename OutputType>
DoFValue MooseVariableDataBase< OutputType >::_dof_values_dotdot
protectedinherited

second time derivative of the solution values

Definition at line 268 of file MooseVariableDataBase.h.

◆ _dof_values_dotdot_old

template<typename OutputType>
DoFValue MooseVariableDataBase< OutputType >::_dof_values_dotdot_old
protectedinherited

the previous time step's solution value second time derivative

Definition at line 272 of file MooseVariableDataBase.h.

◆ _du_dot_du

template<typename OutputType>
VariableValue MooseVariableDataFV< OutputType >::_du_dot_du
private

derivative of u_dot wrt u

Definition at line 385 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::duDotDu().

◆ _du_dotdot_du

template<typename OutputType>
VariableValue MooseVariableDataFV< OutputType >::_du_dotdot_du
private

derivative of u_dotdot wrt u

Definition at line 388 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::duDotDotDu().

◆ _elem

template<typename OutputType>
const Elem* const& MooseVariableDataFV< OutputType >::_elem
private

The current elem.

This has to be a reference because the current elem will be constantly changing. If we initialized this to point to one elem, then in the next calculation we would be pointing to the wrong place!

Definition at line 396 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::currentElem().

◆ _element_type

template<typename OutputType>
Moose::ElementType MooseVariableDataFV< OutputType >::_element_type
private

The element type this object is storing data for. This is either Element, Neighbor, or Lower.

Definition at line 313 of file MooseVariableDataFV.h.

◆ _fe_type

template<typename OutputType>
const libMesh::FEType& MooseVariableDataFV< OutputType >::_fe_type
private

Definition at line 306 of file MooseVariableDataFV.h.

◆ _fv_elemental_kernel_query_cache

template<typename OutputType>
TheWarehouse::QueryCache MooseVariableDataFV< OutputType >::_fv_elemental_kernel_query_cache
private

Cached warehouse query for FVElementalKernels.

Definition at line 415 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::MooseVariableDataFV().

◆ _fv_flux_kernel_query_cache

template<typename OutputType>
TheWarehouse::QueryCache MooseVariableDataFV< OutputType >::_fv_flux_kernel_query_cache
private

Cached warehouse query for FVFluxKernels.

Definition at line 417 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::MooseVariableDataFV().

◆ _grad_u_dot

template<typename OutputType>
FieldVariableGradient MooseVariableDataFV< OutputType >::_grad_u_dot
private

grad_u dots

Definition at line 345 of file MooseVariableDataFV.h.

◆ _grad_u_dotdot

template<typename OutputType>
FieldVariableGradient MooseVariableDataFV< OutputType >::_grad_u_dotdot
private

Definition at line 346 of file MooseVariableDataFV.h.

◆ _has_dirichlet_bc

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_has_dirichlet_bc
private

if this variable has a dirichlet bc defined on a particular face

Definition at line 403 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::hasDirichletBC().

◆ _has_dof_values

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_has_dof_values
protectedinherited

Whether we currently have degree of freedom values stored in our local containers (corresponding to the current element)

Definition at line 199 of file MooseVariableDataBase.h.

Referenced by MooseVariableDataBase< OutputType >::prepareAux().

◆ _increment

template<typename OutputType>
FieldVariableValue MooseVariableDataFV< OutputType >::_increment
private

Increment in the variable used in dampers.

Definition at line 319 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::increment().

◆ _matrix_tag_u

template<typename OutputType>
std::vector<FieldVariableValue> MooseVariableDataBase< OutputType >::_matrix_tag_u
protectedinherited

◆ _matrix_tags_dof_u

template<typename OutputType>
std::vector<DoFValue> MooseVariableDataBase< OutputType >::_matrix_tags_dof_u
protectedinherited

◆ _max_state

template<typename OutputType>
unsigned int MooseVariableDataBase< OutputType >::_max_state
protectedinherited

The maximum number of older solution states our variable needs.

Definition at line 202 of file MooseVariableDataBase.h.

◆ _mci_feproblem

FEProblemBase& MeshChangedInterface::_mci_feproblem
protectedinherited

Reference to FEProblemBase instance.

Definition at line 34 of file MeshChangedInterface.h.

Referenced by MeshChangedInterface::MeshChangedInterface().

◆ _need_ad

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_ad
mutableprivate

◆ _need_ad_grad_u

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_ad_grad_u
mutableprivate

Definition at line 340 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::adGradSln().

◆ _need_ad_grad_u_dot

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_ad_grad_u_dot
mutableprivate

Definition at line 341 of file MooseVariableDataFV.h.

◆ _need_ad_second_u

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_ad_second_u
mutableprivate

◆ _need_ad_u

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_ad_u
mutableprivate

Definition at line 337 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::adSln().

◆ _need_ad_u_dot

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_ad_u_dot
mutableprivate

Definition at line 338 of file MooseVariableDataFV.h.

◆ _need_ad_u_dotdot

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_ad_u_dotdot
mutableprivate

Definition at line 339 of file MooseVariableDataFV.h.

◆ _need_curl

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_curl
mutableprivate

curl flags

Definition at line 331 of file MooseVariableDataFV.h.

◆ _need_curl_old

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_curl_old
mutableprivate

Definition at line 332 of file MooseVariableDataFV.h.

◆ _need_curl_older

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_curl_older
mutableprivate

Definition at line 333 of file MooseVariableDataFV.h.

◆ _need_dof_du_dot_du

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_dof_du_dot_du
mutableprotectedinherited

Definition at line 262 of file MooseVariableDataBase.h.

◆ _need_dof_du_dotdot_du

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_dof_du_dotdot_du
mutableprotectedinherited

Definition at line 263 of file MooseVariableDataBase.h.

◆ _need_dof_values_dot

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_dof_values_dot
mutableprotectedinherited

local solution flags

Definition at line 258 of file MooseVariableDataBase.h.

◆ _need_dof_values_dot_old

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_dof_values_dot_old
mutableprotectedinherited

Definition at line 260 of file MooseVariableDataBase.h.

◆ _need_dof_values_dotdot

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_dof_values_dotdot
mutableprotectedinherited

Definition at line 259 of file MooseVariableDataBase.h.

◆ _need_dof_values_dotdot_old

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_dof_values_dotdot_old
mutableprotectedinherited

Definition at line 261 of file MooseVariableDataBase.h.

◆ _need_du_dot_du

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_du_dot_du
mutableprotectedinherited

◆ _need_du_dotdot_du

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_du_dotdot_du
mutableprotectedinherited

◆ _need_grad_dot

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_grad_dot
mutableprotectedinherited

gradient dot flags

Definition at line 254 of file MooseVariableDataBase.h.

Referenced by MooseVariableData< OutputType >::adGradSlnDot().

◆ _need_grad_dotdot

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_grad_dotdot
mutableprotectedinherited

Definition at line 255 of file MooseVariableDataBase.h.

◆ _need_matrix_tag_dof_u

template<typename OutputType>
std::vector<bool> MooseVariableDataBase< OutputType >::_need_matrix_tag_dof_u
mutableprotectedinherited

◆ _need_matrix_tag_u

template<typename OutputType>
std::vector<bool> MooseVariableDataBase< OutputType >::_need_matrix_tag_u
mutableprotectedinherited

◆ _need_second

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_second
mutableprivate

SolutionState second_u flags.

Definition at line 325 of file MooseVariableDataFV.h.

◆ _need_second_old

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_second_old
mutableprivate

Definition at line 326 of file MooseVariableDataFV.h.

◆ _need_second_older

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_second_older
mutableprivate

Definition at line 327 of file MooseVariableDataFV.h.

◆ _need_second_previous_nl

template<typename OutputType>
bool MooseVariableDataFV< OutputType >::_need_second_previous_nl
mutableprivate

Definition at line 328 of file MooseVariableDataFV.h.

◆ _need_u_dot

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_u_dot
mutableprotectedinherited

u dot flags

Definition at line 246 of file MooseVariableDataBase.h.

◆ _need_u_dot_old

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_u_dot_old
mutableprotectedinherited

Definition at line 248 of file MooseVariableDataBase.h.

◆ _need_u_dotdot

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_u_dotdot
mutableprotectedinherited

Definition at line 247 of file MooseVariableDataBase.h.

◆ _need_u_dotdot_old

template<typename OutputType>
bool MooseVariableDataBase< OutputType >::_need_u_dotdot_old
mutableprotectedinherited

Definition at line 249 of file MooseVariableDataBase.h.

◆ _need_vector_tag_dof_u

template<typename OutputType>
std::vector<bool> MooseVariableDataBase< OutputType >::_need_vector_tag_dof_u
mutableprotectedinherited

◆ _need_vector_tag_grad

template<typename OutputType>
std::vector<bool> MooseVariableDataBase< OutputType >::_need_vector_tag_grad
mutableprotectedinherited

◆ _need_vector_tag_u

template<typename OutputType>
std::vector<bool> MooseVariableDataBase< OutputType >::_need_vector_tag_u
mutableprotectedinherited

◆ _nodal_value

template<typename OutputType>
OutputType MooseVariableDataBase< OutputType >::_nodal_value
protectedinherited

Nodal values.

Definition at line 235 of file MooseVariableDataBase.h.

◆ _nodal_value_array

template<typename OutputType>
MooseArray<OutputType> MooseVariableDataBase< OutputType >::_nodal_value_array
protectedinherited

Nodal values as MooseArrays for use with AuxKernels.

Definition at line 241 of file MooseVariableDataBase.h.

Referenced by MooseVariableDataBase< OutputType >::MooseVariableDataBase().

◆ _nodal_value_dot

template<typename OutputType>
OutputType MooseVariableDataBase< OutputType >::_nodal_value_dot
protectedinherited

nodal values of u_dot

Definition at line 280 of file MooseVariableDataBase.h.

◆ _nodal_value_dot_old

template<typename OutputType>
OutputType MooseVariableDataBase< OutputType >::_nodal_value_dot_old
protectedinherited

nodal values of u_dot_old

Definition at line 284 of file MooseVariableDataBase.h.

◆ _nodal_value_dotdot

template<typename OutputType>
OutputType MooseVariableDataBase< OutputType >::_nodal_value_dotdot
protectedinherited

nodal values of u_dotdot

Definition at line 282 of file MooseVariableDataBase.h.

◆ _nodal_value_dotdot_old

template<typename OutputType>
OutputType MooseVariableDataBase< OutputType >::_nodal_value_dotdot_old
protectedinherited

nodal values of u_dotdot_old

Definition at line 286 of file MooseVariableDataBase.h.

◆ _nodal_value_old

template<typename OutputType>
OutputType MooseVariableDataBase< OutputType >::_nodal_value_old
protectedinherited

Definition at line 236 of file MooseVariableDataBase.h.

◆ _nodal_value_old_array

template<typename OutputType>
MooseArray<OutputType> MooseVariableDataBase< OutputType >::_nodal_value_old_array
protectedinherited

◆ _nodal_value_older

template<typename OutputType>
OutputType MooseVariableDataBase< OutputType >::_nodal_value_older
protectedinherited

Definition at line 237 of file MooseVariableDataBase.h.

◆ _nodal_value_older_array

template<typename OutputType>
MooseArray<OutputType> MooseVariableDataBase< OutputType >::_nodal_value_older_array
protectedinherited

◆ _nodal_value_previous_nl

template<typename OutputType>
OutputType MooseVariableDataBase< OutputType >::_nodal_value_previous_nl
protectedinherited

Definition at line 238 of file MooseVariableDataBase.h.

◆ _old_solution_tag

template<typename OutputType>
TagID MooseVariableDataBase< OutputType >::_old_solution_tag
protectedinherited

The vector tag ID corresponding to the old solution vector.

Definition at line 208 of file MooseVariableDataBase.h.

◆ _older_solution_tag

template<typename OutputType>
TagID MooseVariableDataBase< OutputType >::_older_solution_tag
protectedinherited

The vector tag ID corresponding to the older solution vector.

Definition at line 211 of file MooseVariableDataBase.h.

◆ _prev_elem

template<typename OutputType>
const Elem* MooseVariableDataFV< OutputType >::_prev_elem = nullptr
mutableprivate

used to keep track of when dof indices are out of date

Definition at line 398 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::clearDofIndices().

◆ _previous_nl_solution_tag

template<typename OutputType>
TagID MooseVariableDataBase< OutputType >::_previous_nl_solution_tag
protectedinherited

The vector tag ID corresponding to the previous nonlinear iteration's solution vector.

Definition at line 214 of file MooseVariableDataBase.h.

◆ _qrule

template<typename OutputType>
const libMesh::QBase* MooseVariableDataFV< OutputType >::_qrule
private

The quadrature rule.

Definition at line 409 of file MooseVariableDataFV.h.

◆ _required_vector_tags

template<typename OutputType>
std::set<TagID> MooseVariableDataBase< OutputType >::_required_vector_tags
protectedinherited

The set of vector tags (residual + solution) we need to evaluate.

Definition at line 289 of file MooseVariableDataBase.h.

◆ _second_u

template<typename OutputType>
FieldVariableSecond MooseVariableDataFV< OutputType >::_second_u
private

second_u

Definition at line 349 of file MooseVariableDataFV.h.

◆ _second_u_old

template<typename OutputType>
FieldVariableSecond MooseVariableDataFV< OutputType >::_second_u_old
private

Definition at line 350 of file MooseVariableDataFV.h.

◆ _second_u_older

template<typename OutputType>
FieldVariableSecond MooseVariableDataFV< OutputType >::_second_u_older
private

Definition at line 351 of file MooseVariableDataFV.h.

◆ _second_u_previous_nl

template<typename OutputType>
FieldVariableSecond MooseVariableDataFV< OutputType >::_second_u_previous_nl
private

Definition at line 352 of file MooseVariableDataFV.h.

◆ _solution_tag

template<typename OutputType>
TagID MooseVariableDataBase< OutputType >::_solution_tag
protectedinherited

The vector tag ID corresponding to the solution vector.

Definition at line 205 of file MooseVariableDataBase.h.

◆ _solution_tags

template<typename OutputType>
std::set<TagID> MooseVariableDataBase< OutputType >::_solution_tags
protectedinherited

The set of solution tags we need to evaluate.

Definition at line 292 of file MooseVariableDataBase.h.

◆ _subproblem

template<typename OutputType>
const SubProblem& MooseVariableDataBase< OutputType >::_subproblem
protectedinherited

The subproblem which we can query for information related to tagged vectors and matrices.

Definition at line 186 of file MooseVariableDataBase.h.

Referenced by MooseVariableDataBase< OutputType >::MooseVariableDataBase(), and MooseVariableDataFV< OutputType >::MooseVariableDataFV().

◆ _sys

template<typename OutputType>
SystemBase& MooseVariableDataBase< OutputType >::_sys
protectedinherited

The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data.

Definition at line 183 of file MooseVariableDataBase.h.

Referenced by MooseVariableData< OutputType >::MooseVariableData().

◆ _tid

template<typename OutputType>
const THREAD_ID MooseVariableDataBase< OutputType >::_tid
protectedinherited

The thread ID that this object is on.

Definition at line 189 of file MooseVariableDataBase.h.

◆ _time_integrator

template<typename OutputType>
const TimeIntegrator* const MooseVariableDataFV< OutputType >::_time_integrator
private

Pointer to time integrator.

Definition at line 391 of file MooseVariableDataFV.h.

◆ _u_dot

template<typename OutputType>
FieldVariableValue MooseVariableDataFV< OutputType >::_u_dot
private

u_dot (time derivative)

Definition at line 373 of file MooseVariableDataFV.h.

◆ _u_dot_old

template<typename OutputType>
FieldVariableValue MooseVariableDataFV< OutputType >::_u_dot_old
private

u_dot_old (time derivative)

Definition at line 379 of file MooseVariableDataFV.h.

◆ _u_dotdot

template<typename OutputType>
FieldVariableValue MooseVariableDataFV< OutputType >::_u_dotdot
private

u_dotdot (second time derivative)

Definition at line 376 of file MooseVariableDataFV.h.

◆ _u_dotdot_old

template<typename OutputType>
FieldVariableValue MooseVariableDataFV< OutputType >::_u_dotdot_old
private

u_dotdot_old (second time derivative)

Definition at line 382 of file MooseVariableDataFV.h.

◆ _var

template<typename OutputType>
const MooseVariableFV<OutputType>& MooseVariableDataFV< OutputType >::_var
private

A const reference to the owning MooseVariableFV object.

Definition at line 304 of file MooseVariableDataFV.h.

Referenced by MooseVariableDataFV< OutputType >::var().

◆ _var_num

template<typename OutputType>
const unsigned int MooseVariableDataFV< OutputType >::_var_num
private

Definition at line 308 of file MooseVariableDataFV.h.

◆ _vector_tag_grad

template<typename OutputType>
std::vector<FieldVariableGradient> MooseVariableDataBase< OutputType >::_vector_tag_grad
protectedinherited

◆ _vector_tag_u

template<typename OutputType>
std::vector<FieldVariableValue> MooseVariableDataBase< OutputType >::_vector_tag_u
protectedinherited

◆ _vector_tags_dof_u

template<typename OutputType>
std::vector<DoFValue> MooseVariableDataBase< OutputType >::_vector_tags_dof_u
protectedinherited

The documentation for this class was generated from the following files: