https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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< OutputGradient > FieldVariableGradient
 
typedef Moose::DOFType< OutputType >::type DofValue
 
typedef Moose::ADType< DofValue >::type ADDofValue
 
typedef MooseArray< DofValue > DofValues
 
typedef MooseArray< ADDofValue > ADDofValues
 

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.
 
virtual libMesh::FEContinuity getContinuity () const =0
 Return the variable continuity.
 
const FieldVariableValue & sln (Moose::SolutionState state) const
 Local solution getter.
 
const FieldVariableGradient & gradSln (Moose::SolutionState state) const
 Local solution gradient getter.
 
unsigned int oldestSolutionStateRequested () const
 The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).
 
void setNodalValue (const OutputType &value)
 Set nodal value.
 
void insert (libMesh::NumericVector< libMesh::Number > &residual)
 Set the current local DOF values to the input vector.
 
void add (libMesh::NumericVector< libMesh::Number > &residual)
 Add the current local DOF values to the input vector.
 
void prepareIC ()
 prepare the initial condition
 
const DofValues & dofValues () const
 
const DofValues & dofValuesOld () const
 
const DofValues & dofValuesOlder () const
 
const DofValues & dofValuesPreviousNL () const
 
const OutputType & nodalValue (Moose::SolutionState state) const
 
const MooseArray< OutputType > & nodalValueArray (Moose::SolutionState state) const
 
const FieldVariableValue & vectorTagValue (TagID tag) const
 
const FieldVariableGradient & vectorTagGradient (TagID tag) const
 
const FieldVariableValue & matrixTagValue (TagID tag) const
 
const DofValues & nodalVectorTagValue (TagID tag) const
 
const DofValues & nodalMatrixTagValue (TagID tag) const
 
const DofValues & vectorTagDofValue (TagID tag) const
 
const DofValues & vectorTagDofValue (Moose::SolutionState state) const
 
void setActiveTags (const std::set< TagID > &vtags)
 Set the active vector tags.
 
void prepareAux ()
 Clear aux state.
 
void sizeMatrixTagData ()
 size matrix tag data
 
void setNodalValue (const RealVectorValue &value)
 
void insert (NumericVector< Number > &residual)
 
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
 
void needSolutionState (unsigned int state)
 Request that we have at least state number of older solution states/vectors.
 
void fetchDofValues ()
 Helper methods for assigning dof values from their corresponding solution values.
 
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.
 
void resizeVectorTagData (TagID tag)
 resize the vector tag need flags and data containers to accomodate this tag index
 
void fetchDofValues ()
 
void assignNodalValue ()
 
void fetchDofValues ()
 
void assignNodalValue ()
 

Protected Attributes

SystemBase & _sys
 The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data.
 
const SubProblem & _subproblem
 The subproblem which we can query for information related to tagged vectors and matrices.
 
const THREAD_ID _tid
 The thread ID that this object is on.
 
const libMesh::DofMap & _dof_map
 The degree of freedom map from libMesh.
 
unsigned int _count
 Number of components of the associated variable.
 
bool _has_dof_values
 Whether we currently have degree of freedom values stored in our local containers (corresponding to the current element)
 
unsigned int _max_state
 The maximum number of older solution states our variable needs.
 
TagID _solution_tag
 The vector tag ID corresponding to the solution vector.
 
TagID _old_solution_tag
 The vector tag ID corresponding to the old solution vector.
 
TagID _older_solution_tag
 The vector tag ID corresponding to the older solution vector.
 
TagID _previous_nl_solution_tag
 The vector tag ID corresponding to the previous nonlinear iteration's solution vector.
 
std::vector< dof_id_type > _dof_indices
 The dof indices for the current element.
 
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.
 
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.
 
MooseArray< OutputType > _nodal_value_old_array
 
MooseArray< OutputType > _nodal_value_older_array
 
bool _need_u_dot
 u dot flags
 
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
 
bool _need_grad_dotdot
 
bool _need_dof_values_dot
 local solution flags
 
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
 
DofValues _dof_values_dotdot
 second time derivative of the solution values
 
DofValues _dof_values_dot_old
 the previous time step's solution value time derivative
 
DofValues _dof_values_dotdot_old
 the previous time step's solution value second time derivative
 
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
 
OutputType _nodal_value_dot
 nodal values of u_dot
 
OutputType _nodal_value_dotdot
 nodal values of u_dotdot
 
OutputType _nodal_value_dot_old
 nodal values of u_dot_old
 
OutputType _nodal_value_dotdot_old
 nodal values of u_dotdot_old
 
std::set< TagID > _required_vector_tags
 The set of vector tags (residual + solution) we need to evaluate.
 
std::set< TagID > _solution_tags
 The set of solution tags we need to evaluate.
 

Private Attributes

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

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

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

◆ ~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 468 of file MooseVariableDataBase.C.

469{
470 if (_has_dof_values)
471 {
472 const auto & dof_values = _vector_tags_dof_u[_solution_tag];
473 residual.add_vector(&dof_values[0], _dof_indices);
474 }
475}
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
virtual void add_vector(const T *v, const std::vector< numeric_index_type > &dof_indices)

◆ add() [2/2]

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

Definition at line 479 of file MooseVariableDataBase.C.

480{
481 if (_has_dof_values)
482 {
483 const auto & dof_values = _vector_tags_dof_u[_solution_tag];
484 mooseAssert(_dof_indices.size() % _count == 0,
485 "Dof indices should be cleanly divisible by the variable count");
486 const auto n_shapes = _dof_indices.size() / _count;
487 for (const auto indx : index_range(_dof_indices))
488 {
489 const auto i = indx % n_shapes;
490 const auto j = indx / n_shapes;
491 residual.add(_dof_indices[indx], dof_values[i](j));
492 }
493 }
494}
virtual void add(const numeric_index_type i, const T value)=0
auto index_range(const T &sizable)

◆ assignNodalValue() [1/3]

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

Definition at line 763 of file MooseVariableDataBase.C.

764{
765 bool is_transient = _subproblem.isTransient();
767
768 auto & dof_values = _vector_tags_dof_u[_solution_tag];
769 _nodal_value = dof_values[0];
771
772 if (is_transient)
773 {
775 {
778 }
780 {
783 }
792 }
795}
OutputType _nodal_value_dotdot
nodal values of u_dotdot
OutputType _nodal_value_dot_old
nodal values of u_dot_old
DofValues _dof_values_dotdot
second time derivative of the solution values
unsigned int oldestSolutionStateRequested() const
The oldest solution state that is requested for this variable (0 = current, 1 = old,...
OutputType _nodal_value_dotdot_old
nodal values of u_dotdot_old
DofValues _dof_values_dot_old
the previous time step's solution value time derivative
DofValues _dof_values_dot
time derivative of the solution values
DofValues _dof_values_dotdot_old
the previous time step's solution value second time derivative
OutputType _nodal_value
Nodal values.
OutputType _nodal_value_dot
nodal values of u_dot
virtual bool isTransient() const =0
libmesh_assert(ctx)

◆ assignNodalValue() [2/3]

void MooseVariableDataBase< RealVectorValue >::assignNodalValue ( )
protected

◆ assignNodalValue() [3/3]

void MooseVariableDataBase< RealVectorValue >::assignNodalValue ( )
protected

Definition at line 799 of file MooseVariableDataBase.C.

800{
801 bool is_transient = _subproblem.isTransient();
802
803 auto n = _dof_indices.size();
805
806 auto & dof_values = _vector_tags_dof_u[_solution_tag];
807 for (decltype(n) i = 0; i < n; ++i)
808 _nodal_value(i) = dof_values[i];
810
811 if (is_transient)
812 {
814 {
815 auto & dof_values_old = _vector_tags_dof_u[_old_solution_tag];
816 for (decltype(n) i = 0; i < n; ++i)
817 _nodal_value_old(i) = dof_values_old[i];
819 }
821 {
822 auto & dof_values_older = _vector_tags_dof_u[_older_solution_tag];
823 for (decltype(n) i = 0; i < n; ++i)
824 _nodal_value_older(i) = dof_values_older[i];
826 }
828 for (decltype(n) i = 0; i < n; ++i)
831 for (decltype(n) i = 0; i < n; ++i)
834 for (decltype(n) i = 0; i < n; ++i)
837 for (decltype(n) i = 0; i < n; ++i)
839 }
841 {
842 auto & dof_values_previous_nl = _vector_tags_dof_u[_previous_nl_solution_tag];
843 for (decltype(n) i = 0; i < n; ++i)
844 _nodal_value_previous_nl(i) = dof_values_previous_nl[i];
845 }
846}

◆ dofValues()

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

Definition at line 354 of file MooseVariableDataBase.C.

355{
357}
const DofValues & vectorTagDofValue(TagID tag) const
@ Current
Definition MooseTypes.h:263

◆ dofValuesOld()

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

Definition at line 361 of file MooseVariableDataBase.C.

362{
364}

◆ dofValuesOlder()

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

Definition at line 368 of file MooseVariableDataBase.C.

369{
371}

◆ dofValuesPreviousNL()

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

Definition at line 375 of file MooseVariableDataBase.C.

376{
378}
@ PreviousNL
Definition MooseTypes.h:266

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

562{
563 bool is_transient = _subproblem.isTransient();
564
565 auto n = _dof_indices.size();
567
568 if (is_transient)
569 {
571 {
575 }
577 {
581 }
583 {
587 }
589 {
593 }
595 {
597 for (decltype(n) i = 0; i < n; ++i)
598 _dof_du_dot_du[i] = _sys.duDotDu(_var.number());
599 }
601 {
603 for (decltype(n) i = 0; i < n; ++i)
605 }
606 }
607
608 for (auto tag : _required_vector_tags)
610 if ((_subproblem.vectorTagType(tag) == Moose::VECTOR_TAG_RESIDUAL &&
611 _subproblem.safeAccessTaggedVectors()) ||
612 _subproblem.vectorTagType(tag) == Moose::VECTOR_TAG_SOLUTION)
613 {
614 // tag is defined on problem but may not be used by a system
615 // the grain tracker requires being able to read from solution vectors that we are also in
616 // the process of writing :-/
617 // Note: the extra vector tags are also still not closed when a TagVectorAux uses them
618 if (_sys.hasVector(tag) /* && _sys.getVector(tag).closed()*/)
619 {
620 auto & vec = _sys.getVector(tag);
621 _vector_tags_dof_u[tag].resize(n);
622 vec.get(_dof_indices, &_vector_tags_dof_u[tag][0]);
623 }
624 }
625
627 {
628 auto & active_coupleable_matrix_tags =
630
631 for (auto tag : active_coupleable_matrix_tags)
632 {
634 if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag))
635 {
636 mooseAssert(_sys.getMatrix(tag).closed(),
637 "Matrix with tag '" + std::to_string(tag) + "' should be closed");
638 auto & mat = _sys.getMatrix(tag);
639 _matrix_tags_dof_u[tag].resize(n);
640 for (unsigned i = 0; i < n; i++)
641 _matrix_tags_dof_u[tag][i] = mat(_dof_indices[i], _dof_indices[i]);
642 }
643 }
644 }
645}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
std::vector< bool > _need_matrix_tag_u
std::vector< bool > _need_matrix_tag_dof_u
std::vector< DofValues > _matrix_tags_dof_u
MooseArray< libMesh::Number > _dof_du_dotdot_du
derivatives of the solution value second time derivative with respect to the degrees of freedom
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
MooseArray< libMesh::Number > _dof_du_dot_du
derivatives of the solution value time derivative with respect to the degrees of freedom
virtual bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
Definition SubProblem.h:739
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition SubProblem.C:379
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition SystemBase.C:921
virtual NumericVector< Number > * solutionUDot()
Definition SystemBase.h:289
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition SystemBase.C:930
virtual bool matrixTagActive(TagID tag) const
If or not a matrix tag is active.
virtual NumericVector< Number > * solutionUDotOld()
Definition SystemBase.h:291
virtual const Number & duDotDu(unsigned int var_num=0) const
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition SystemBase.h:388
virtual NumericVector< Number > * solutionUDotDotOld()
Definition SystemBase.h:292
virtual Number & duDotDotDu()
Definition SystemBase.h:285
virtual NumericVector< Number > * solutionUDotDot()
Definition SystemBase.h:290
virtual void get(const std::vector< numeric_index_type > &index, T *values) const
virtual bool closed() const=0
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
@ VECTOR_TAG_SOLUTION
@ VECTOR_TAG_RESIDUAL

◆ fetchDofValues() [2/3]

void MooseVariableDataBase< RealEigenVector >::fetchDofValues ( )
protected

◆ fetchDofValues() [3/3]

void MooseVariableDataBase< RealEigenVector >::fetchDofValues ( )
protected

Definition at line 664 of file MooseVariableDataBase.C.

665{
666 bool is_transient = _subproblem.isTransient();
667
668 auto n = _dof_indices.size() / _count;
670
671 if (is_transient)
672 {
674 {
677 }
679 {
682 }
684 {
687 }
689 {
692 }
693 }
694
695 for (auto tag : _required_vector_tags)
696 if ((_subproblem.vectorTagType(tag) == Moose::VECTOR_TAG_RESIDUAL &&
697 _subproblem.safeAccessTaggedVectors()) ||
698 _subproblem.vectorTagType(tag) == Moose::VECTOR_TAG_SOLUTION)
699 // tag is defined on problem but may not be used by a system
700 if (_sys.hasVector(tag))
701 {
702 mooseAssert(_sys.getVector(tag).closed(),
703 "Vector with tag '" + std::to_string(tag) + "' should be closed");
705 }
706
708 {
709 auto & active_coupleable_matrix_tags =
711 for (auto tag : active_coupleable_matrix_tags)
712 {
713 _matrix_tags_dof_u[tag].resize(n);
715 if (_sys.hasMatrix(tag) && _sys.matrixTagActive(tag))
716 {
717 mooseAssert(_sys.getMatrix(tag).closed(),
718 "Matrix with tag '" + std::to_string(tag) + "' should be closed");
719 auto & mat = _sys.getMatrix(tag);
720 for (unsigned i = 0; i < n; i++)
721 for (unsigned j = 0; j < _count; j++)
722 _matrix_tags_dof_u[tag][i](j) = mat(_dof_indices[i] + j, _dof_indices[i] + j);
723 }
724 }
725 }
726
728 {
730 for (decltype(n) i = 0; i < n; ++i)
731 _dof_du_dot_du[i] = _sys.duDotDu(_var.number());
732 }
734 {
736 for (decltype(n) i = 0; i < n; ++i)
738 }
739}
void getArrayDofValues(const libMesh::NumericVector< libMesh::Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
virtual bool closed() const

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

652{
653 dof_values.resize(nshapes);
654 for (const auto i : make_range(nshapes))
655 {
656 dof_values[i].resize(_count);
657 for (const auto j : make_range(_count))
658 dof_values[i](j) = sol(_dof_indices[j * nshapes + i]);
659 }
660}
IntRange< T > make_range(T beg, T end)

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

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

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

437{
438 if (_has_dof_values)
439 {
440 const auto & dof_values = _vector_tags_dof_u[_solution_tag];
441 mooseAssert(dof_values.size() == _dof_indices.size(),
442 "Degree of freedom values size and degree of freedom indices sizes must match.");
443 residual.insert(&dof_values[0], _dof_indices);
444 }
445}
virtual void insert(const T *v, const std::vector< numeric_index_type > &dof_indices)

◆ insert() [2/2]

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

Definition at line 449 of file MooseVariableDataBase.C.

450{
451 if (_has_dof_values)
452 {
453 const auto & dof_values = _vector_tags_dof_u[_solution_tag];
454 mooseAssert(_dof_indices.size() % _count == 0,
455 "Dof indices should be cleanly divisible by the variable count");
456 const auto n_shapes = _dof_indices.size() / _count;
457 for (const auto indx : index_range(_dof_indices))
458 {
459 const auto i = indx % n_shapes;
460 const auto j = indx / n_shapes;
461 residual.set(_dof_indices[indx], dof_values[i](j));
462 }
463 }
464}
virtual void set(const numeric_index_type i, const T value)=0

◆ 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.

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.

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

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

233{
234 if (tag >= _matrix_tag_u.size())
235 {
236 _need_matrix_tag_u.resize(tag + 1, false);
237 const_cast<MooseVariableDataBase<OutputType> *>(this)->_matrix_tag_u.resize(tag + 1);
238 }
239
240 _var.requireQpComputations();
241
242 _need_matrix_tag_u[tag] = true;
243
244 if (_sys.hasMatrix(tag))
245 return _matrix_tag_u[tag];
246 else
247 mooseError("Tag ", tag, " is not associated with any matrix for variable ", _var.name());
248}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
std::vector< FieldVariableValue > _matrix_tag_u

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

260{
261 if (state > _max_state)
262 {
263 _sys.needSolutionState(state);
264 _max_state = state;
265 }
266}
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.

◆ nodalMatrixTagValue()

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

Definition at line 123 of file MooseVariableDataBase.C.

124{
125 if (isNodal())
126 {
127 if (tag >= _matrix_tags_dof_u.size())
128 {
129 _need_matrix_tag_dof_u.resize(tag + 1, false);
130 const_cast<MooseVariableDataBase<OutputType> *>(this)->_matrix_tags_dof_u.resize(tag + 1);
131 }
132
133 _need_matrix_tag_dof_u[tag] = true;
134
135 if (_sys.hasMatrix(tag))
136 return _matrix_tags_dof_u[tag];
137 else
139 "Tag ", tag, " is not associated with any matrix for nodal variable ", _var.name());
140 }
141 else
142 mooseError("Nodal values can be requested only on nodal variables, variable '",
143 _var.name(),
144 "' is not nodal.");
145}
virtual bool isNodal() const =0

◆ nodalValue()

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

Definition at line 498 of file MooseVariableDataBase.C.

499{
500 if (isNodal())
501 {
502 // Request the correct solution states and data members
503 vectorTagDofValue(state);
504 switch (state)
505 {
506 case Moose::Current:
507 return _nodal_value;
508
509 case Moose::Old:
510 return _nodal_value_old;
511
512 case Moose::Older:
513 return _nodal_value_older;
514
517
518 default:
519 // We should never get here but gcc requires that we have a default. See
520 // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
521 mooseError("Unknown SolutionState!");
522 }
523 }
524 else
525 mooseError("Nodal values can be requested only on nodal variables, variable '",
526 _var.name(),
527 "' is not nodal.");
528}

◆ nodalValueArray()

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

Definition at line 532 of file MooseVariableDataBase.C.

533{
534 if (isNodal())
535 {
536 // Request the correct solution states and data members
537 vectorTagDofValue(state);
538 switch (state)
539 {
540 case Moose::Current:
541 return _nodal_value_array;
542
543 case Moose::Old:
545
546 case Moose::Older:
548
549 default:
550 mooseError("No current support for PreviousNL for nodal value array");
551 }
552 }
553 else
554 mooseError("Nodal values can be requested only on nodal variables, variable '",
555 _var.name(),
556 "' is not nodal.");
557}

◆ nodalVectorTagValue()

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

Definition at line 100 of file MooseVariableDataBase.C.

101{
102 if (isNodal())
103 {
104 if (tag >= _need_vector_tag_dof_u.size())
106
107 _need_vector_tag_dof_u[tag] = true;
108
109 if (_sys.hasVector(tag))
110 return _vector_tags_dof_u[tag];
111 else
113 "Tag ", tag, " is not associated with any vector for nodal variable ", _var.name());
114 }
115 else
116 mooseError("Nodal values can be requested only on nodal variables, variable '",
117 _var.name(),
118 "' is not nodal.");
119}
void resizeVectorTagData(TagID tag)
resize the vector tag need flags and data containers to accomodate this tag index

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

253{
254 return _max_state;
255}

◆ 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; }

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

150{
151 mooseAssert(_need_vector_tag_dof_u.size() == _need_vector_tag_u.size() &&
154 _need_vector_tag_dof_u.size() == _vector_tag_u.size() &&
156 "These sizes should be in sync.");
157
158 auto check_capacity = [tag](const auto & vector_to_check)
159 {
160 if (tag + 1 > vector_to_check.capacity())
161 mooseError("New size greater than tag capacity. This will cause reallocation which will "
162 "invalidate any stored references.");
163 };
164 check_capacity(_need_vector_tag_dof_u);
165 check_capacity(_need_vector_tag_u);
166 check_capacity(_need_vector_tag_grad);
167 check_capacity(_vector_tags_dof_u);
168 check_capacity(_vector_tag_u);
169 check_capacity(_vector_tag_grad);
170
171 _need_vector_tag_dof_u.resize(tag + 1, false);
172 _need_vector_tag_u.resize(tag + 1, false);
173 _need_vector_tag_grad.resize(tag + 1, false);
174 _vector_tags_dof_u.resize(tag + 1);
175 _vector_tag_u.resize(tag + 1);
176 _vector_tag_grad.resize(tag + 1);
177}

◆ 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)
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 insert(libMesh::NumericVector< libMesh::Number > &residual)
Set the current local DOF values to the input vector.

◆ setNodalValue() [1/2]

template<typename OutputType >
void MooseVariableDataBase< OutputType >::setNodalValue ( const OutputType &  value)

Set nodal value.

Definition at line 382 of file MooseVariableDataBase.C.

383{
384 // dof_values here is indexed per shape function, with each entry holding all _count array
385 // components packed into a single OutputType value. setNodalValue writes only one shape
386 // function's value, so it is only valid for a variable with a single shape function, e.g. a
387 // nodal Lagrange variable or a CONSTANT-order elemental variable; a variable with more than
388 // one shape function must use setDofValues instead. A subparametric variable, e.g. the pressure
389 // of a Taylor-Hood pair, has nodes on its elements that carry none of its degrees of freedom;
390 // callers query isNodalDefined() to skip those nodes before reaching this method.
391 mooseAssert(_dof_indices.size() == _count,
392 "setNodalValue is only valid for a variable with one shape function per node");
393 auto & dof_values = _vector_tags_dof_u[_solution_tag];
394 dof_values.resize(/*n_shapes=*/1);
395 dof_values[0] = value; // update variable nodal value
396 _has_dof_values = true;
398
399 // Update the qp values as well
400 auto & u = _vector_tag_u[_solution_tag];
401 for (unsigned int qp = 0; qp < u.size(); qp++)
402 u[qp] = value;
403}
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ setNodalValue() [2/2]

void MooseVariableDataBase< RealVectorValue >::setNodalValue ( const RealVectorValue &  value)

Definition at line 407 of file MooseVariableDataBase.C.

408{
409 // Unlike the generic implementation above, a vector-valued variable is never an array
410 // variable, so _count is always 1 and dof_values is indexed per component of the vector
411 // rather than per shape function -- each shape function contributes one raw degree of
412 // freedom per component given the finite element family and order constraints we set below.
413 mooseAssert(_count == 1, "Vector-valued variables cannot be array variables");
414 mooseAssert(
415 _var.feType().family == LAGRANGE_VEC ||
416 (_var.feType().family == MONOMIAL_VEC && _var.feType().order == CONSTANT &&
417 (!_var.feType().p_refinement || !_subproblem.doingPRefinement())),
418 "setNodalValue only makes sense for LAGRANGE_VEC or non-p-refined CONSTANT MONOMIAL_VEC "
419 "vector variables");
420 mooseAssert(_dof_indices.size() <= _var.sys().mesh().getMesh().mesh_dimension(),
421 "The number of dof indices for a vector variable should be at most the mesh manifold "
422 "dimension. We cannot use an exact equality because it's possible the vector "
423 "variable could live on a lower-dimensional manifold.");
424
425 auto & dof_values = _vector_tags_dof_u[_solution_tag];
426 dof_values.resize(_dof_indices.size());
427 for (const auto i : index_range(dof_values))
428 dof_values[i] = value(i);
429
430 _has_dof_values = true;
432}
bool doingPRefinement() const

◆ sizeMatrixTagData()

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

size matrix tag data

Definition at line 87 of file MooseVariableDataBase.C.

88{
89 auto num_matrix_tags = _subproblem.numMatrixTags();
90
91 _matrix_tags_dof_u.resize(num_matrix_tags);
92 _need_matrix_tag_dof_u.resize(num_matrix_tags, false);
93
94 _need_matrix_tag_u.resize(num_matrix_tags, false);
95 _matrix_tag_u.resize(num_matrix_tags);
96}
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition SubProblem.h:248

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

317{
318 auto functor = [this](TagID tag_id) -> const FieldVariableValue &
319 { return vectorTagValue(tag_id); };
320
321 _var.requireQpComputations();
322
323 return const_cast<MooseVariableDataBase<OutputType> *>(this)
324 ->stateToTagHelper<FieldVariableValue>(state, functor);
325}
const FieldVariableValue & vectorTagValue(TagID tag) const
MooseArray< OutputType > FieldVariableValue

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

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

273{
274 if (state > 0)
275 {
276 // We need to request all states that are between current and the requested state
277 stateToTagHelper<ReturnType>(Moose::SolutionState(static_cast<int>(state) - 1), functor);
278 needSolutionState(cast_int<unsigned int>(state));
279 }
280
281 switch (state)
282 {
283 case Moose::Current:
285
286 case Moose::Old:
287 {
290 return functor(_old_solution_tag);
291 }
292
293 case Moose::Older:
294 {
297 return functor(_older_solution_tag);
298 }
299
301 {
304 return functor(_previous_nl_solution_tag);
305 }
306
307 default:
308 // We should never get here but gcc requires that we have a default. See
309 // htpps://stackoverflow.com/questions/18680378/after-defining-case-for-all-enum-values-compiler-still-says-control-reaches-e
310 mooseError("Unknown SolutionState!");
311 }
312}
void needSolutionState(unsigned int state)
Request that we have at least state number of older solution states/vectors.
const TagName OLDER_SOLUTION_TAG
Definition MooseTypes.C:27
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition MooseTypes.C:28
SolutionState
Definition MooseTypes.h:262
const TagName OLD_SOLUTION_TAG
Definition MooseTypes.C:26

◆ 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.

153{ return _var; }

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

◆ vectorTagDofValue() [1/2]

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

Definition at line 342 of file MooseVariableDataBase.C.

343{
344 auto functor = [this](TagID tag_id) -> const DofValues & { return vectorTagDofValue(tag_id); };
345
346 _var.requireQpComputations();
347
348 return const_cast<MooseVariableDataBase<OutputType> *>(this)->stateToTagHelper<DofValues>(
349 state, functor);
350}
MooseArray< DofValue > DofValues

◆ vectorTagDofValue() [2/2]

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

Definition at line 198 of file MooseVariableDataBase.C.

199{
200 if (tag >= _need_vector_tag_dof_u.size())
202
203 _var.requireQpComputations();
204
205 _need_vector_tag_dof_u[tag] = true;
206
207 if (_sys.hasVector(tag))
208 return _vector_tags_dof_u[tag];
209 else
210 mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
211}

◆ vectorTagGradient()

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

Definition at line 215 of file MooseVariableDataBase.C.

216{
217 if (tag >= _need_vector_tag_grad.size())
219
220 _var.requireQpComputations();
221
222 _need_vector_tag_grad[tag] = true;
223
224 if (_sys.hasVector(tag))
225 return _vector_tag_grad[tag];
226 else
227 mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
228}

◆ vectorTagValue()

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

Definition at line 181 of file MooseVariableDataBase.C.

182{
183 if (tag >= _need_vector_tag_u.size())
185
186 _var.requireQpComputations();
187
188 _need_vector_tag_u[tag] = true;
189
190 if (_sys.hasVector(tag))
191 return _vector_tag_u[tag];
192 else
193 mooseError("Tag ", tag, " is not associated with any vector for variable ", _var.name());
194}

◆ zeroSizeDofValues()

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

Definition at line 743 of file MooseVariableDataBase.C.

744{
746 {
753 }
754
755 for (auto & dof_values : _vector_tags_dof_u)
756 dof_values.resize(0);
757
758 _has_dof_values = false;
759}

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: