https://mooseframework.inl.gov
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
MooseVariableDataBase< OutputType > Class Template Referenceabstract

#include <MooseVariableDataBase.h>

Inheritance diagram for MooseVariableDataBase< 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 Moose::DOFType< OutputType >::type DofValue
 
typedef Moose::ADType< DofValue >::type ADDofValue
 
typedef MooseArray< DofValueDofValues
 
typedef MooseArray< ADDofValueADDofValues
 

Public Member Functions

 MooseVariableDataBase (const MooseVariableField< OutputType > &var, SystemBase &sys, THREAD_ID tid)
 
virtual ~MooseVariableDataBase ()=default
 
virtual bool isNodal () const =0
 
virtual bool hasDoFsOnNodes () const =0
 Whether this data is associated with a variable that has DoFs on nodes. More...
 
virtual libMesh::FEContinuity getContinuity () const =0
 Return the variable continuity. More...
 
const FieldVariableValuesln (Moose::SolutionState state) const
 Local solution getter. 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...
 
void insert (libMesh::NumericVector< libMesh::Number > &residual)
 Set the current local DOF values to the input vector. More...
 
void add (libMesh::NumericVector< libMesh::Number > &residual)
 Add the current local DOF values to the input vector. More...
 
void prepareIC ()
 prepare the initial condition More...
 
const DofValuesdofValues () const
 
const DofValuesdofValuesOld () const
 
const DofValuesdofValuesOlder () const
 
const DofValuesdofValuesPreviousNL () 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 DofValuesnodalVectorTagValue (TagID tag) const
 
const DofValuesnodalMatrixTagValue (TagID tag) const
 
const DofValuesvectorTagDofValue (TagID tag) const
 
const DofValuesvectorTagDofValue (Moose::SolutionState state) const
 
void setActiveTags (const std::set< TagID > &vtags)
 Set the active vector tags. More...
 
void prepareAux ()
 Clear aux state. More...
 
void sizeMatrixTagData ()
 size matrix tag data More...
 
template<>
void setNodalValue (const RealVectorValue &value, unsigned int idx)
 
template<>
void insert (NumericVector< Number > &residual)
 
template<>
void add (NumericVector< Number > &residual)
 

Protected Member Functions

virtual const MooseVariableField< OutputType > & var () const
 
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...
 
void zeroSizeDofValues ()
 
void getArrayDofValues (const libMesh::NumericVector< libMesh::Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
 
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...
 
template<>
void fetchDofValues ()
 
template<>
void assignNodalValue ()
 
template<>
void fetchDofValues ()
 
template<>
void assignNodalValue ()
 

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< DofValues_vector_tags_dof_u
 
std::vector< DofValues_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
 
DofValues _dof_values_dot
 time derivative of the solution values More...
 
DofValues _dof_values_dotdot
 second time derivative of the solution values More...
 
DofValues _dof_values_dot_old
 the previous time step's solution value time derivative More...
 
DofValues _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...
 

Private Attributes

const MooseVariableField< OutputType > & _var
 A const reference to the owning MooseVariableField object. More...
 

Detailed Description

template<typename OutputType>
class MooseVariableDataBase< OutputType >

Definition at line 33 of file MooseVariableDataBase.h.

Member Typedef Documentation

◆ ADDofValue

template<typename OutputType>
typedef Moose::ADType<DofValue>::type MooseVariableDataBase< OutputType >::ADDofValue

Definition at line 47 of file MooseVariableDataBase.h.

◆ ADDofValues

template<typename OutputType>
typedef MooseArray<ADDofValue> MooseVariableDataBase< OutputType >::ADDofValues

Definition at line 49 of file MooseVariableDataBase.h.

◆ DofValue

template<typename OutputType>
typedef Moose::DOFType<OutputType>::type MooseVariableDataBase< OutputType >::DofValue

Definition at line 46 of file MooseVariableDataBase.h.

◆ DofValues

template<typename OutputType>
typedef MooseArray<DofValue> MooseVariableDataBase< OutputType >::DofValues

Definition at line 48 of file MooseVariableDataBase.h.

◆ FieldVariableGradient

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

Definition at line 43 of file MooseVariableDataBase.h.

◆ FieldVariableValue

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

Definition at line 42 of file MooseVariableDataBase.h.

◆ OutputDivergence

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

Definition at line 39 of file MooseVariableDataBase.h.

◆ OutputGradient

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

Definition at line 37 of file MooseVariableDataBase.h.

◆ OutputSecond

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

Definition at line 38 of file MooseVariableDataBase.h.

Constructor & Destructor Documentation

◆ MooseVariableDataBase()

template<typename OutputType >
MooseVariableDataBase< OutputType >::MooseVariableDataBase ( const MooseVariableField< OutputType > &  var,
SystemBase sys,
THREAD_ID  tid 
)

Definition at line 18 of file MooseVariableDataBase.C.

21  : _sys(sys),
23  _tid(tid),
24  _dof_map(_sys.dofMap()),
25  _count(var.count()),
26  _has_dof_values(false),
27  _max_state(0),
32  _need_u_dot(false),
33  _need_u_dotdot(false),
34  _need_u_dot_old(false),
35  _need_u_dotdot_old(false),
36  _need_du_dot_du(false),
37  _need_du_dotdot_du(false),
38  _need_grad_dot(false),
39  _need_grad_dotdot(false),
40  _need_dof_values_dot(false),
44  _need_dof_du_dot_du(false),
46  _var(var)
47 {
48  auto num_vector_tags = _subproblem.numVectorTags();
49  // Additional solution tags corresponding to older-than-current solution states may be requested
50  // on-the-fly by consumer objects after variable construction. To accomodate this we should
51  // reserve the possibly requisite memory. As of now we only support old and older solution states
52  // but this could potentially increase in the future
53  const auto max_future_num_vector_tags = num_vector_tags + 2;
54 
55  _vector_tags_dof_u.reserve(max_future_num_vector_tags);
56  _vector_tags_dof_u.resize(num_vector_tags);
57  _need_vector_tag_dof_u.reserve(max_future_num_vector_tags);
58  _need_vector_tag_dof_u.resize(num_vector_tags, false);
59 
60  _need_vector_tag_u.reserve(max_future_num_vector_tags);
61  _need_vector_tag_u.resize(num_vector_tags, false);
62  _vector_tag_u.reserve(max_future_num_vector_tags);
63  _vector_tag_u.resize(num_vector_tags);
64 
65  _need_vector_tag_grad.reserve(max_future_num_vector_tags);
66  _need_vector_tag_grad.resize(num_vector_tags, false);
67  _vector_tag_grad.reserve(max_future_num_vector_tags);
68  _vector_tag_grad.resize(num_vector_tags);
69 
70  // Always fetch the dof values for the solution tag
71  const auto soln_tag = _subproblem.getVectorTagID(Moose::SOLUTION_TAG);
72  _need_vector_tag_dof_u[soln_tag] = true;
73  _need_vector_tag_u[soln_tag] = true;
74  insertSolutionTag(soln_tag);
75 
76  // These MooseArray objects are used by AuxKernelBase for nodal AuxKernel objects, hence the size
77  // size is always 1 (i.e, nodal kernels work with _qp=0 only).
81 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:204
bool _need_grad_dot
gradient dot flags
const libMesh::DofMap & _dof_map
The degree of freedom map from libMesh.
std::vector< bool > _need_vector_tag_u
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
virtual libMesh::DofMap & dofMap()
Gets writeable reference to the dof map.
Definition: SystemBase.C:1164
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
virtual const MooseVariableField< OutputType > & var() const
SubProblem & subproblem()
Definition: SystemBase.h:102
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
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
std::vector< DofValues > _vector_tags_dof_u
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
MooseArray< OutputType > _nodal_value_old_array
TagID _old_solution_tag
The vector tag ID corresponding to the old solution vector.
const TagID INVALID_TAG_ID
Definition: MooseTypes.C:23
std::vector< FieldVariableGradient > _vector_tag_grad
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
virtual unsigned int numVectorTags(const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
The total number of tags, which can be limited to the tag type.
Definition: SubProblem.C:196
unsigned int _count
Number of components of the associated variable.
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
const THREAD_ID _tid
The thread ID that this object is on.
const TagName SOLUTION_TAG
Definition: MooseTypes.C:25
MooseArray< OutputType > _nodal_value_older_array
std::vector< FieldVariableValue > _vector_tag_u
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.
unsigned int _max_state
The maximum number of older solution states our variable needs.

◆ ~MooseVariableDataBase()

template<typename OutputType>
virtual MooseVariableDataBase< OutputType >::~MooseVariableDataBase ( )
virtualdefault

Member Function Documentation

◆ add() [1/2]

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

Add the current local DOF values to the input vector.

Definition at line 441 of file MooseVariableDataBase.C.

442 {
443  if (_has_dof_values)
444  {
445  const auto & dof_values = _vector_tags_dof_u[_solution_tag];
446  residual.add_vector(&dof_values[0], _dof_indices);
447  }
448 }
virtual void add_vector(const T *v, const std::vector< numeric_index_type > &dof_indices)
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
std::vector< DofValues > _vector_tags_dof_u
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)

Definition at line 452 of file MooseVariableDataBase.C.

453 {
454  if (_has_dof_values)
455  {
456  const auto & dof_values = _vector_tags_dof_u[_solution_tag];
457  mooseAssert(_dof_indices.size() % _count == 0,
458  "Dof indices should be cleanly divisible by the variable count");
459  const auto n_shapes = _dof_indices.size() / _count;
460  for (const auto indx : index_range(_dof_indices))
461  {
462  const auto i = indx % n_shapes;
463  const auto j = indx / n_shapes;
464  residual.add(_dof_indices[indx], dof_values[i](j));
465  }
466  }
467 }
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
std::vector< DofValues > _vector_tags_dof_u
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
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.
auto index_range(const T &sizable)

◆ assignNodalValue() [1/3]

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

Definition at line 737 of file MooseVariableDataBase.C.

738 {
739  bool is_transient = _subproblem.isTransient();
741 
742  auto & dof_values = _vector_tags_dof_u[_solution_tag];
743  _nodal_value = dof_values[0];
745 
746  if (is_transient)
747  {
748  if (oldestSolutionStateRequested() >= 1)
749  {
752  }
753  if (oldestSolutionStateRequested() >= 2)
754  {
757  }
766  }
769 }
DofValues _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.
OutputType _nodal_value
Nodal values.
DofValues _dof_values_dotdot
second time derivative of the solution values
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
virtual bool isTransient() const =0
libmesh_assert(ctx)
TagID _older_solution_tag
The vector tag ID corresponding to the older solution vector.
std::vector< DofValues > _vector_tags_dof_u
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
DofValues _dof_values_dot
time derivative of the solution values
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
DofValues _dof_values_dot_old
the previous time step&#39;s solution value time derivative
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 ( )
protected

◆ assignNodalValue() [3/3]

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

Definition at line 773 of file MooseVariableDataBase.C.

774 {
775  bool is_transient = _subproblem.isTransient();
776 
777  auto n = _dof_indices.size();
778  libmesh_assert(n);
779 
780  auto & dof_values = _vector_tags_dof_u[_solution_tag];
781  for (decltype(n) i = 0; i < n; ++i)
782  _nodal_value(i) = dof_values[i];
784 
785  if (is_transient)
786  {
787  if (oldestSolutionStateRequested() >= 1)
788  {
789  auto & dof_values_old = _vector_tags_dof_u[_old_solution_tag];
790  for (decltype(n) i = 0; i < n; ++i)
791  _nodal_value_old(i) = dof_values_old[i];
793  }
794  if (oldestSolutionStateRequested() >= 2)
795  {
796  auto & dof_values_older = _vector_tags_dof_u[_older_solution_tag];
797  for (decltype(n) i = 0; i < n; ++i)
798  _nodal_value_older(i) = dof_values_older[i];
800  }
802  for (decltype(n) i = 0; i < n; ++i)
805  for (decltype(n) i = 0; i < n; ++i)
808  for (decltype(n) i = 0; i < n; ++i)
811  for (decltype(n) i = 0; i < n; ++i)
813  }
815  {
816  auto & dof_values_previous_nl = _vector_tags_dof_u[_previous_nl_solution_tag];
817  for (decltype(n) i = 0; i < n; ++i)
818  _nodal_value_previous_nl(i) = dof_values_previous_nl[i];
819  }
820 }
DofValues _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.
OutputType _nodal_value
Nodal values.
DofValues _dof_values_dotdot
second time derivative of the solution values
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
virtual bool isTransient() const =0
libmesh_assert(ctx)
TagID _older_solution_tag
The vector tag ID corresponding to the older solution vector.
std::vector< DofValues > _vector_tags_dof_u
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
DofValues _dof_values_dot
time derivative of the solution values
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
DofValues _dof_values_dot_old
the previous time step&#39;s solution value time derivative
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).

◆ dofValues()

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

Definition at line 352 of file MooseVariableDataBase.C.

353 {
355 }
const DofValues & vectorTagDofValue(TagID tag) const

◆ dofValuesOld()

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

Definition at line 359 of file MooseVariableDataBase.C.

360 {
362 }
const DofValues & vectorTagDofValue(TagID tag) const

◆ dofValuesOlder()

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

Definition at line 366 of file MooseVariableDataBase.C.

367 {
369 }
const DofValues & vectorTagDofValue(TagID tag) const

◆ dofValuesPreviousNL()

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

Definition at line 373 of file MooseVariableDataBase.C.

374 {
376 }
const DofValues & vectorTagDofValue(TagID tag) const

◆ fetchDofValues() [1/3]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::fetchDofValues ( )
protected

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

Definition at line 534 of file MooseVariableDataBase.C.

535 {
536  bool is_transient = _subproblem.isTransient();
537 
538  auto n = _dof_indices.size();
539  libmesh_assert(n);
540 
541  if (is_transient)
542  {
544  {
548  }
550  {
554  }
556  {
560  }
562  {
566  }
567  }
568 
569  for (auto tag : _required_vector_tags)
574  {
575  // tag is defined on problem but may not be used by a system
576  // the grain tracker requires being able to read from solution vectors that we are also in
577  // the process of writing :-/
578  // Note: the extra vector tags are also still not closed when a TagVectorAux uses them
579  if (_sys.hasVector(tag) /* && _sys.getVector(tag).closed()*/)
580  {
581  auto & vec = _sys.getVector(tag);
582  _vector_tags_dof_u[tag].resize(n);
583  vec.get(_dof_indices, &_vector_tags_dof_u[tag][0]);
584  }
585  }
586 
588  {
589  auto & active_coupleable_matrix_tags =
591 
592  for (auto tag : active_coupleable_matrix_tags)
593  {
594  _matrix_tags_dof_u[tag].resize(n);
596  if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag))
597  {
598  mooseAssert(_sys.getMatrix(tag).closed(),
599  "Matrix with tag '" + std::to_string(tag) + "' should be closed");
600  auto & mat = _sys.getMatrix(tag);
601  for (unsigned i = 0; i < n; i++)
602  _matrix_tags_dof_u[tag][i] = mat(_dof_indices[i], _dof_indices[i]);
603  }
604  }
605  }
606 
608  {
610  for (decltype(n) i = 0; i < n; ++i)
611  _dof_du_dot_du[i] = _sys.duDotDu(_var.number());
612  }
614  {
616  for (decltype(n) i = 0; i < n; ++i)
618  }
619 }
bool _need_grad_dot
gradient dot flags
std::vector< DofValues > _matrix_tags_dof_u
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:925
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:391
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:742
std::vector< bool > _need_vector_tag_u
DofValues _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:361
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:265
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
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:258
virtual const Number & duDotDu(unsigned int var_num=0) const
Definition: SystemBase.C:1690
DofValues _dof_values_dotdot
second time derivative of the solution values
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:262
virtual bool isTransient() const =0
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:264
virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const
Definition: SubProblem.C:232
libmesh_assert(ctx)
virtual bool matrixTagActive(TagID tag) const
If or not a matrix tag is active.
Definition: SystemBase.C:1150
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
std::vector< DofValues > _vector_tags_dof_u
virtual bool closed() const=0
DofValues _dof_values_dot
time derivative of the solution values
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:1025
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.
DofValues _dof_values_dot_old
the previous time step&#39;s solution value time derivative
virtual bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
Definition: SubProblem.h:739
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:263
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:934
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ fetchDofValues() [2/3]

template<>
void MooseVariableDataBase< RealEigenVector >::fetchDofValues ( )
protected

◆ fetchDofValues() [3/3]

template<>
void MooseVariableDataBase< RealEigenVector >::fetchDofValues ( )
protected

Definition at line 638 of file MooseVariableDataBase.C.

639 {
640  bool is_transient = _subproblem.isTransient();
641 
642  auto n = _dof_indices.size() / _count;
643  libmesh_assert(n);
644 
645  if (is_transient)
646  {
648  {
651  }
653  {
656  }
658  {
661  }
663  {
666  }
667  }
668 
669  for (auto tag : _required_vector_tags)
673  // tag is defined on problem but may not be used by a system
674  if (_sys.hasVector(tag))
675  {
676  mooseAssert(_sys.getVector(tag).closed(),
677  "Vector with tag '" + std::to_string(tag) + "' should be closed");
679  }
680 
682  {
683  auto & active_coupleable_matrix_tags =
685  for (auto tag : active_coupleable_matrix_tags)
686  {
687  _matrix_tags_dof_u[tag].resize(n);
689  if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag))
690  {
691  mooseAssert(_sys.getMatrix(tag).closed(),
692  "Matrix with tag '" + std::to_string(tag) + "' should be closed");
693  auto & mat = _sys.getMatrix(tag);
694  for (unsigned i = 0; i < n; i++)
695  for (unsigned j = 0; j < _count; j++)
696  _matrix_tags_dof_u[tag][i](j) = mat(_dof_indices[i] + j, _dof_indices[i] + j);
697  }
698  }
699  }
700 
702  {
704  for (decltype(n) i = 0; i < n; ++i)
705  _dof_du_dot_du[i] = _sys.duDotDu(_var.number());
706  }
708  {
710  for (decltype(n) i = 0; i < n; ++i)
712  }
713 }
bool _need_grad_dot
gradient dot flags
std::vector< DofValues > _matrix_tags_dof_u
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:925
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:391
virtual bool safeAccessTaggedVectors() const
Is it safe to access the tagged vectors.
Definition: SubProblem.h:742
DofValues _dof_values_dotdot_old
the previous time step&#39;s solution value second time derivative
void getArrayDofValues(const libMesh::NumericVector< libMesh::Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:361
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:265
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
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:258
virtual const Number & duDotDu(unsigned int var_num=0) const
Definition: SystemBase.C:1690
DofValues _dof_values_dotdot
second time derivative of the solution values
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:262
virtual bool isTransient() const =0
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:264
virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const
Definition: SubProblem.C:232
libmesh_assert(ctx)
virtual bool matrixTagActive(TagID tag) const
If or not a matrix tag is active.
Definition: SystemBase.C:1150
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
std::vector< DofValues > _vector_tags_dof_u
virtual bool closed() const=0
DofValues _dof_values_dot
time derivative of the solution values
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:1025
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.
DofValues _dof_values_dot_old
the previous time step&#39;s solution value time derivative
virtual bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
Definition: SubProblem.h:739
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:263
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:934
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
protected

Definition at line 623 of file MooseVariableDataBase.C.

626 {
627  dof_values.resize(nshapes);
628  for (const auto i : make_range(nshapes))
629  {
630  dof_values[i].resize(_count);
631  for (const auto j : make_range(_count))
632  dof_values[i](j) = sol(_dof_indices[j * nshapes + i]);
633  }
634 }
IntRange< T > make_range(T beg, T end)
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>
virtual libMesh::FEContinuity MooseVariableDataBase< OutputType >::getContinuity ( ) const
pure virtual

◆ gradSln()

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

Local solution gradient getter.

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

Definition at line 327 of file MooseVariableDataBase.C.

328 {
329  auto functor = [this](TagID tag_id) -> const FieldVariableGradient &
330  { return vectorTagGradient(tag_id); };
331 
332  _var.requireQpComputations();
333 
334  return const_cast<MooseVariableDataBase<OutputType> *>(this)
335  ->stateToTagHelper<FieldVariableGradient>(state, functor);
336 }
unsigned int TagID
Definition: MooseTypes.h:238
const FieldVariableGradient & vectorTagGradient(TagID tag) const
MooseArray< OutputGradient > FieldVariableGradient
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ hasDoFsOnNodes()

template<typename OutputType>
virtual bool MooseVariableDataBase< OutputType >::hasDoFsOnNodes ( ) const
pure virtual

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

Implemented in MooseVariableData< OutputType >, MooseVariableDataFV< OutputType >, and MooseVariableDataLinearFV< OutputType >.

◆ insert() [1/2]

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

Set the current local DOF values to the input vector.

Definition at line 409 of file MooseVariableDataBase.C.

410 {
411  if (_has_dof_values)
412  {
413  const auto & dof_values = _vector_tags_dof_u[_solution_tag];
414  mooseAssert(dof_values.size() == _dof_indices.size(),
415  "Degree of freedom values size and degree of freedom indices sizes must match.");
416  residual.insert(&dof_values[0], _dof_indices);
417  }
418 }
virtual void insert(const T *v, const std::vector< numeric_index_type > &dof_indices)
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
std::vector< DofValues > _vector_tags_dof_u
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)

Definition at line 422 of file MooseVariableDataBase.C.

423 {
424  if (_has_dof_values)
425  {
426  const auto & dof_values = _vector_tags_dof_u[_solution_tag];
427  mooseAssert(_dof_indices.size() % _count == 0,
428  "Dof indices should be cleanly divisible by the variable count");
429  const auto n_shapes = _dof_indices.size() / _count;
430  for (const auto indx : index_range(_dof_indices))
431  {
432  const auto i = indx % n_shapes;
433  const auto j = indx / n_shapes;
434  residual.set(_dof_indices[indx], dof_values[i](j));
435  }
436  }
437 }
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
std::vector< DofValues > _vector_tags_dof_u
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
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.
auto index_range(const T &sizable)

◆ insertSolutionTag()

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

insert a solution tag into our tag containers

Definition at line 330 of file MooseVariableDataBase.h.

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

331 {
332  _solution_tags.insert(tag_id);
333  _required_vector_tags.insert(tag_id);
334 }
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>
virtual bool MooseVariableDataBase< OutputType >::isNodal ( ) const
pure virtual
Returns
Whether this data is associated with a nodal variable

Implemented in MooseVariableData< OutputType >, MooseVariableDataFV< OutputType >, and MooseVariableDataLinearFV< OutputType >.

◆ matrixTagValue()

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

Definition at line 230 of file MooseVariableDataBase.C.

231 {
232  if (tag >= _matrix_tag_u.size())
233  {
234  _need_matrix_tag_u.resize(tag + 1, false);
235  const_cast<MooseVariableDataBase<OutputType> *>(this)->_matrix_tag_u.resize(tag + 1);
236  }
237 
238  _var.requireQpComputations();
239 
240  _need_matrix_tag_u[tag] = true;
241 
242  if (_sys.hasMatrix(tag))
243  return _matrix_tag_u[tag];
244  else
245  mooseError("Tag ", tag, " is not associated with any matrix for variable ", _var.name());
246 }
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:311
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:361
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.

◆ needSolutionState()

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

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

Definition at line 257 of file MooseVariableDataBase.C.

258 {
259  if (state > _max_state)
260  {
261  _sys.needSolutionState(state);
262  _max_state = state;
263  }
264 }
virtual void needSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time, libMesh::ParallelType parallel_type=GHOSTED)
Registers that the solution state state is needed.
Definition: SystemBase.C:1452
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 >::DofValues & MooseVariableDataBase< OutputType >::nodalMatrixTagValue ( TagID  tag) const

Definition at line 121 of file MooseVariableDataBase.C.

122 {
123  if (isNodal())
124  {
125  if (tag >= _matrix_tags_dof_u.size())
126  {
127  _need_matrix_tag_dof_u.resize(tag + 1, false);
128  const_cast<MooseVariableDataBase<OutputType> *>(this)->_matrix_tags_dof_u.resize(tag + 1);
129  }
130 
131  _need_matrix_tag_dof_u[tag] = true;
132 
133  if (_sys.hasMatrix(tag))
134  return _matrix_tags_dof_u[tag];
135  else
136  mooseError(
137  "Tag ", tag, " is not associated with any matrix for nodal variable ", _var.name());
138  }
139  else
140  mooseError("Nodal values can be requested only on nodal variables, variable '",
141  _var.name(),
142  "' is not nodal.");
143 }
std::vector< DofValues > _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:311
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:361
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

Definition at line 471 of file MooseVariableDataBase.C.

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

◆ nodalValueArray()

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

Definition at line 505 of file MooseVariableDataBase.C.

506 {
507  if (isNodal())
508  {
509  // Request the correct solution states and data members
510  vectorTagDofValue(state);
511  switch (state)
512  {
513  case Moose::Current:
514  return _nodal_value_array;
515 
516  case Moose::Old:
517  return _nodal_value_old_array;
518 
519  case Moose::Older:
521 
522  default:
523  mooseError("No current support for PreviousNL for nodal value array");
524  }
525  }
526  else
527  mooseError("Nodal values can be requested only on nodal variables, variable '",
528  _var.name(),
529  "' is not nodal.");
530 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const DofValues & vectorTagDofValue(TagID tag) const
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.

◆ nodalVectorTagValue()

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

Definition at line 98 of file MooseVariableDataBase.C.

99 {
100  if (isNodal())
101  {
102  if (tag >= _need_vector_tag_dof_u.size())
103  const_cast<MooseVariableDataBase<OutputType> *>(this)->resizeVectorTagData(tag);
104 
105  _need_vector_tag_dof_u[tag] = true;
106 
107  if (_sys.hasVector(tag))
108  return _vector_tags_dof_u[tag];
109  else
110  mooseError(
111  "Tag ", tag, " is not associated with any vector for nodal variable ", _var.name());
112  }
113  else
114  mooseError("Nodal values can be requested only on nodal variables, variable '",
115  _var.name(),
116  "' is not nodal.");
117 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:925
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:311
std::vector< bool > _need_vector_tag_dof_u
std::vector< DofValues > _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.

◆ oldestSolutionStateRequested()

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

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

Definition at line 250 of file MooseVariableDataBase.C.

251 {
252  return _max_state;
253 }
unsigned int _max_state
The maximum number of older solution states our variable needs.

◆ prepareAux()

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

Clear aux state.

Definition at line 142 of file MooseVariableDataBase.h.

142 { _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 MooseVariableDataBase< OutputType >::prepareIC ( )

prepare the initial condition

◆ resizeVectorTagData()

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

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

Definition at line 147 of file MooseVariableDataBase.C.

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

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

◆ setActiveTags()

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

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 314 of file MooseVariableDataBase.h.

315 {
317  for (const auto tag : vtags)
318  _required_vector_tags.insert(tag);
319 
320  if (!_required_vector_tags.empty())
321  {
322  const auto largest_tag_id = *_required_vector_tags.rbegin();
323  if (largest_tag_id >= _need_vector_tag_dof_u.size())
324  resizeVectorTagData(largest_tag_id);
325  }
326 }
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.

◆ setNodalValue() [1/2]

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

Set nodal value.

Definition at line 380 of file MooseVariableDataBase.C.

381 {
382  auto & dof_values = _vector_tags_dof_u[_solution_tag];
383  mooseAssert(idx < dof_values.size(), "idx is out of the bounds of degree of freedom values");
384  dof_values[idx] = value; // update variable nodal value
385  _has_dof_values = true;
387 
388  // Update the qp values as well
389  auto & u = _vector_tag_u[_solution_tag];
390  for (unsigned int qp = 0; qp < u.size(); qp++)
391  u[qp] = value;
392 }
OutputType _nodal_value
Nodal values.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
std::vector< DofValues > _vector_tags_dof_u
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 
)

Definition at line 396 of file MooseVariableDataBase.C.

398 {
399  auto & dof_values = _vector_tags_dof_u[_solution_tag];
400  for (decltype(idx) i = 0; i < dof_values.size(); ++i, ++idx)
401  dof_values[idx] = value(i);
402 
403  _has_dof_values = true;
405 }
OutputType _nodal_value
Nodal values.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
std::vector< DofValues > _vector_tags_dof_u
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)

◆ sizeMatrixTagData()

template<typename OutputType >
void MooseVariableDataBase< OutputType >::sizeMatrixTagData ( )

size matrix tag data

Definition at line 85 of file MooseVariableDataBase.C.

86 {
87  auto num_matrix_tags = _subproblem.numMatrixTags();
88 
89  _matrix_tags_dof_u.resize(num_matrix_tags);
90  _need_matrix_tag_dof_u.resize(num_matrix_tags, false);
91 
92  _need_matrix_tag_u.resize(num_matrix_tags, false);
93  _matrix_tag_u.resize(num_matrix_tags);
94 }
std::vector< DofValues > _matrix_tags_dof_u
std::vector< FieldVariableValue > _matrix_tag_u
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
std::vector< bool > _need_matrix_tag_u
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition: SubProblem.h:248
std::vector< bool > _need_matrix_tag_dof_u

◆ sln()

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

Local solution getter.

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

Definition at line 314 of file MooseVariableDataBase.C.

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

315 {
316  auto functor = [this](TagID tag_id) -> const FieldVariableValue &
317  { return vectorTagValue(tag_id); };
318 
319  _var.requireQpComputations();
320 
321  return const_cast<MooseVariableDataBase<OutputType> *>(this)
322  ->stateToTagHelper<FieldVariableValue>(state, functor);
323 }
unsigned int TagID
Definition: MooseTypes.h:238
MooseArray< OutputType > FieldVariableValue
const FieldVariableValue & vectorTagValue(TagID tag) const
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ stateToTagHelper()

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

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 269 of file MooseVariableDataBase.C.

271 {
272  if (state > 0)
273  {
274  // We need to request all states that are between current and the requested state
275  stateToTagHelper<ReturnType>(Moose::SolutionState(static_cast<int>(state) - 1), functor);
276  needSolutionState(cast_int<unsigned int>(state));
277  }
278 
279  switch (state)
280  {
281  case Moose::Current:
283 
284  case Moose::Old:
285  {
288  return functor(_old_solution_tag);
289  }
290 
291  case Moose::Older:
292  {
295  return functor(_older_solution_tag);
296  }
297 
298  case Moose::PreviousNL:
299  {
302  return functor(_previous_nl_solution_tag);
303  }
304 
305  default:
306  // We should never get here but gcc requires that we have a default. See
307  // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
308  mooseError("Unknown SolutionState!");
309  }
310 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:204
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
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:261
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

◆ var()

template<typename OutputType>
virtual const MooseVariableField<OutputType>& MooseVariableDataBase< OutputType >::var ( ) const
inlineprotectedvirtual
Returns
The variable to which the data in this class belongs to

Reimplemented in MooseVariableDataFV< OutputType >, and MooseVariableDataLinearFV< OutputType >.

Definition at line 153 of file MooseVariableDataBase.h.

Referenced by MooseVariableData< OutputType >::arrayGradPhi(), and MooseVariableData< OutputType >::arrayGradPhiFace().

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

◆ vectorTagDofValue() [1/2]

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

Definition at line 196 of file MooseVariableDataBase.C.

197 {
198  if (tag >= _need_vector_tag_dof_u.size())
199  const_cast<MooseVariableDataBase<OutputType> *>(this)->resizeVectorTagData(tag);
200 
201  _var.requireQpComputations();
202 
203  _need_vector_tag_dof_u[tag] = true;
204 
205  if (_sys.hasVector(tag))
206  return _vector_tags_dof_u[tag];
207  else
208  mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
209 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:925
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:311
std::vector< bool > _need_vector_tag_dof_u
std::vector< DofValues > _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 >::DofValues & MooseVariableDataBase< OutputType >::vectorTagDofValue ( Moose::SolutionState  state) const

Definition at line 340 of file MooseVariableDataBase.C.

341 {
342  auto functor = [this](TagID tag_id) -> const DofValues & { return vectorTagDofValue(tag_id); };
343 
344  _var.requireQpComputations();
345 
346  return const_cast<MooseVariableDataBase<OutputType> *>(this)->stateToTagHelper<DofValues>(
347  state, functor);
348 }
MooseArray< DofValue > DofValues
unsigned int TagID
Definition: MooseTypes.h:238
const DofValues & vectorTagDofValue(TagID tag) const
const MooseVariableField< OutputType > & _var
A const reference to the owning MooseVariableField object.

◆ vectorTagGradient()

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

Definition at line 213 of file MooseVariableDataBase.C.

214 {
215  if (tag >= _need_vector_tag_grad.size())
216  const_cast<MooseVariableDataBase<OutputType> *>(this)->resizeVectorTagData(tag);
217 
218  _var.requireQpComputations();
219 
220  _need_vector_tag_grad[tag] = true;
221 
222  if (_sys.hasVector(tag))
223  return _vector_tag_grad[tag];
224  else
225  mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
226 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:925
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:311
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

Definition at line 179 of file MooseVariableDataBase.C.

180 {
181  if (tag >= _need_vector_tag_u.size())
182  const_cast<MooseVariableDataBase<OutputType> *>(this)->resizeVectorTagData(tag);
183 
184  _var.requireQpComputations();
185 
186  _need_vector_tag_u[tag] = true;
187 
188  if (_sys.hasVector(tag))
189  return _vector_tag_u[tag];
190  else
191  mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
192 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:925
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:311
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 ( )
protected

Definition at line 717 of file MooseVariableDataBase.C.

718 {
719  if (_subproblem.isTransient())
720  {
727  }
728 
729  for (auto & dof_values : _vector_tags_dof_u)
730  dof_values.resize(0);
731 
732  _has_dof_values = false;
733 }
DofValues _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.
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 ...
DofValues _dof_values_dotdot
second time derivative of the solution values
virtual bool isTransient() const =0
bool _has_dof_values
Whether we currently have degree of freedom values stored in our local containers (corresponding to t...
std::vector< DofValues > _vector_tags_dof_u
DofValues _dof_values_dot
time derivative of the solution values
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
DofValues _dof_values_dot_old
the previous time step&#39;s solution value time derivative

Member Data Documentation

◆ _count

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

Number of components of the associated variable.

Definition at line 202 of file MooseVariableDataBase.h.

◆ _dof_du_dot_du

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

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

Definition at line 281 of file MooseVariableDataBase.h.

◆ _dof_du_dotdot_du

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

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

Definition at line 284 of file MooseVariableDataBase.h.

◆ _dof_indices

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

◆ _dof_map

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

The degree of freedom map from libMesh.

Definition at line 199 of file MooseVariableDataBase.h.

◆ _dof_values_dot

template<typename OutputType>
DofValues MooseVariableDataBase< OutputType >::_dof_values_dot
protected

time derivative of the solution values

Definition at line 273 of file MooseVariableDataBase.h.

◆ _dof_values_dot_old

template<typename OutputType>
DofValues MooseVariableDataBase< OutputType >::_dof_values_dot_old
protected

the previous time step's solution value time derivative

Definition at line 277 of file MooseVariableDataBase.h.

◆ _dof_values_dotdot

template<typename OutputType>
DofValues MooseVariableDataBase< OutputType >::_dof_values_dotdot
protected

second time derivative of the solution values

Definition at line 275 of file MooseVariableDataBase.h.

◆ _dof_values_dotdot_old

template<typename OutputType>
DofValues MooseVariableDataBase< OutputType >::_dof_values_dotdot_old
protected

the previous time step's solution value second time derivative

Definition at line 279 of file MooseVariableDataBase.h.

◆ _has_dof_values

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

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

Definition at line 206 of file MooseVariableDataBase.h.

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

◆ _matrix_tag_u

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

Definition at line 238 of file MooseVariableDataBase.h.

◆ _matrix_tags_dof_u

template<typename OutputType>
std::vector<DofValues> MooseVariableDataBase< OutputType >::_matrix_tags_dof_u
protected

Definition at line 232 of file MooseVariableDataBase.h.

◆ _max_state

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

The maximum number of older solution states our variable needs.

Definition at line 209 of file MooseVariableDataBase.h.

◆ _need_dof_du_dot_du

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

Definition at line 269 of file MooseVariableDataBase.h.

◆ _need_dof_du_dotdot_du

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

Definition at line 270 of file MooseVariableDataBase.h.

◆ _need_dof_values_dot

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

local solution flags

Definition at line 265 of file MooseVariableDataBase.h.

◆ _need_dof_values_dot_old

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

Definition at line 267 of file MooseVariableDataBase.h.

◆ _need_dof_values_dotdot

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

Definition at line 266 of file MooseVariableDataBase.h.

◆ _need_dof_values_dotdot_old

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

Definition at line 268 of file MooseVariableDataBase.h.

◆ _need_du_dot_du

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

◆ _need_du_dotdot_du

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

◆ _need_grad_dot

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

gradient dot flags

Definition at line 261 of file MooseVariableDataBase.h.

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

◆ _need_grad_dotdot

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

Definition at line 262 of file MooseVariableDataBase.h.

◆ _need_matrix_tag_dof_u

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

Definition at line 227 of file MooseVariableDataBase.h.

◆ _need_matrix_tag_u

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

Definition at line 239 of file MooseVariableDataBase.h.

◆ _need_u_dot

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

u dot flags

Definition at line 253 of file MooseVariableDataBase.h.

◆ _need_u_dot_old

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

Definition at line 255 of file MooseVariableDataBase.h.

◆ _need_u_dotdot

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

Definition at line 254 of file MooseVariableDataBase.h.

◆ _need_u_dotdot_old

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

Definition at line 256 of file MooseVariableDataBase.h.

◆ _need_vector_tag_dof_u

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

◆ _need_vector_tag_grad

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

◆ _need_vector_tag_u

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

◆ _nodal_value

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

Nodal values.

Definition at line 242 of file MooseVariableDataBase.h.

◆ _nodal_value_array

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

Nodal values as MooseArrays for use with AuxKernels.

Definition at line 248 of file MooseVariableDataBase.h.

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

◆ _nodal_value_dot

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

nodal values of u_dot

Definition at line 287 of file MooseVariableDataBase.h.

◆ _nodal_value_dot_old

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

nodal values of u_dot_old

Definition at line 291 of file MooseVariableDataBase.h.

◆ _nodal_value_dotdot

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

nodal values of u_dotdot

Definition at line 289 of file MooseVariableDataBase.h.

◆ _nodal_value_dotdot_old

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

nodal values of u_dotdot_old

Definition at line 293 of file MooseVariableDataBase.h.

◆ _nodal_value_old

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

Definition at line 243 of file MooseVariableDataBase.h.

◆ _nodal_value_old_array

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

◆ _nodal_value_older

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

Definition at line 244 of file MooseVariableDataBase.h.

◆ _nodal_value_older_array

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

◆ _nodal_value_previous_nl

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

Definition at line 245 of file MooseVariableDataBase.h.

◆ _old_solution_tag

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

The vector tag ID corresponding to the old solution vector.

Definition at line 215 of file MooseVariableDataBase.h.

◆ _older_solution_tag

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

The vector tag ID corresponding to the older solution vector.

Definition at line 218 of file MooseVariableDataBase.h.

◆ _previous_nl_solution_tag

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

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

Definition at line 221 of file MooseVariableDataBase.h.

◆ _required_vector_tags

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

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

Definition at line 296 of file MooseVariableDataBase.h.

◆ _solution_tag

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

The vector tag ID corresponding to the solution vector.

Definition at line 212 of file MooseVariableDataBase.h.

◆ _solution_tags

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

The set of solution tags we need to evaluate.

Definition at line 299 of file MooseVariableDataBase.h.

◆ _subproblem

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

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

Definition at line 193 of file MooseVariableDataBase.h.

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

◆ _sys

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

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

Definition at line 190 of file MooseVariableDataBase.h.

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

◆ _tid

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

The thread ID that this object is on.

Definition at line 196 of file MooseVariableDataBase.h.

◆ _var

template<typename OutputType>
const MooseVariableField<OutputType>& MooseVariableDataBase< OutputType >::_var
private

A const reference to the owning MooseVariableField object.

Definition at line 303 of file MooseVariableDataBase.h.

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

◆ _vector_tag_grad

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

◆ _vector_tag_u

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

◆ _vector_tags_dof_u

template<typename OutputType>
std::vector<DofValues> MooseVariableDataBase< OutputType >::_vector_tags_dof_u
protected

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