15 #include "libmesh/tensor_tools.h" 16 #include "libmesh/vector_value.h" 17 #include "libmesh/tensor_value.h" 18 #include "libmesh/type_n_tensor.h" 19 #include "libmesh/enum_fe_family.h" 32 template <
typename OutputType>
60 virtual bool isNodal()
const = 0;
93 void setNodalValue(
const OutputType & value,
unsigned int idx = 0);
180 template <
typename ReturnType,
typename Functor>
312 template <
typename OutputType>
316 _required_vector_tags = _solution_tags;
317 for (
const auto tag : vtags)
318 _required_vector_tags.insert(tag);
320 if (!_required_vector_tags.empty())
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);
328 template <
typename OutputType>
332 _solution_tags.insert(tag_id);
333 _required_vector_tags.insert(tag_id);
bool _need_grad_dot
gradient dot flags
bool _need_u_dot
u dot flags
OutputType _nodal_value_old
const libMesh::DofMap & _dof_map
The degree of freedom map from libMesh.
OutputType _nodal_value_previous_nl
MooseArray< DofValue > DofValues
std::vector< DofValues > _matrix_tags_dof_u
void resizeVectorTagData(TagID tag)
resize the vector tag need flags and data containers to accomodate this tag index ...
const FieldVariableValue & matrixTagValue(TagID tag) const
void prepareIC()
prepare the initial condition
std::vector< FieldVariableValue > _matrix_tag_u
Class for stuff related to variables.
const ReturnType & stateToTagHelper(Moose::SolutionState state, Functor functor)
Helper method that converts a SolutionState argument into a corresponding tag ID, potentially request...
void sizeMatrixTagData()
size matrix tag data
void prepareAux()
Clear aux state.
const FieldVariableGradient & vectorTagGradient(TagID tag) const
const DofValues & nodalVectorTagValue(TagID tag) const
const MooseArray< OutputType > & nodalValueArray(Moose::SolutionState state) const
std::vector< bool > _need_vector_tag_u
MooseArray< OutputGradient > FieldVariableGradient
DofValues _dof_values_dotdot_old
the previous time step's solution value second time derivative
virtual ~MooseVariableDataBase()=default
void getArrayDofValues(const libMesh::NumericVector< libMesh::Number > &sol, unsigned int n, MooseArray< RealEigenVector > &dof_values) const
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
const SubProblem & _subproblem
The subproblem which we can query for information related to tagged vectors and matrices.
void setActiveTags(const std::set< TagID > &vtags)
Set the active vector tags.
Base class for a system (of equations)
Moose::ADType< DofValue >::type ADDofValue
std::vector< bool > _need_vector_tag_grad
const DofValues & vectorTagDofValue(TagID tag) const
libMesh::TensorTools::DecrementRank< OutputType >::type OutputDivergence
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 ...
void add(libMesh::NumericVector< libMesh::Number > &residual)
Add the current local DOF values to the input vector.
OutputType _nodal_value
Nodal values.
void setNodalValue(const OutputType &value, unsigned int idx=0)
Set nodal value.
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 > _solution_tags
The set of solution tags we need to evaluate.
bool _need_dof_values_dot_old
void insert(libMesh::NumericVector< libMesh::Number > &residual)
Set the current local DOF values to the input vector.
const FieldVariableGradient & gradSln(Moose::SolutionState state) const
Local solution gradient getter.
FunctorEnvelope< T > Functor
DofValues _dof_values_dotdot
second time derivative of the solution values
OutputType _nodal_value_older
MooseArray< OutputType > _nodal_value_array
Nodal values as MooseArrays for use with AuxKernels.
virtual const MooseVariableField< OutputType > & var() const
Moose::DOFType< OutputType >::type DofValue
bool _need_dof_values_dotdot
TagID _older_solution_tag
The vector tag ID corresponding to the older solution vector.
const OutputType & nodalValue(Moose::SolutionState state) const
std::set< TagID > _required_vector_tags
The set of vector tags (residual + solution) we need to evaluate.
const DofValues & nodalMatrixTagValue(TagID tag) const
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...
bool _need_dof_du_dotdot_du
std::vector< DofValues > _vector_tags_dof_u
OutputType _nodal_value_dotdot
nodal values of u_dotdot
MooseArray< OutputType > FieldVariableValue
MooseVariableDataBase(const MooseVariableField< OutputType > &var, SystemBase &sys, THREAD_ID tid)
TagID _solution_tag
The vector tag ID corresponding to the solution vector.
const DofValues & dofValuesOlder() const
OutputType _nodal_value_dot_old
nodal values of u_dot_old
DofValues _dof_values_dot
time derivative of the solution values
bool _need_dof_values_dotdot_old
MooseArray< OutputType > _nodal_value_old_array
std::vector< bool > _need_matrix_tag_u
OutputType _nodal_value_dotdot_old
nodal values of u_dotdot_old
libMesh::TensorTools::IncrementRank< OutputType >::type OutputGradient
const FieldVariableValue & vectorTagValue(TagID tag) const
virtual bool isNodal() const =0
TagID _old_solution_tag
The vector tag ID corresponding to the old solution vector.
void fetchDofValues()
Helper methods for assigning dof values from their corresponding solution values. ...
virtual libMesh::FEContinuity getContinuity() const =0
Return the variable continuity.
Generic class for solving transient nonlinear problems.
std::vector< bool > _need_matrix_tag_dof_u
const DofValues & dofValuesPreviousNL() const
OutputType _nodal_value_dot
nodal values of u_dot
std::vector< FieldVariableGradient > _vector_tag_grad
SystemBase & _sys
The MOOSE system which ultimately holds the vectors and matrices relevant to this variable data...
MooseArray< ADDofValue > ADDofValues
unsigned int _count
Number of components of the associated variable.
const FieldVariableValue & sln(Moose::SolutionState state) const
Local solution getter.
TagID _previous_nl_solution_tag
The vector tag ID corresponding to the previous nonlinear iteration's solution vector.
bool _need_dof_values_dot
local solution flags
const THREAD_ID _tid
The thread ID that this object is on.
MooseArray< OutputType > _nodal_value_older_array
libMesh::TensorTools::IncrementRank< OutputGradient >::type OutputSecond
void needSolutionState(unsigned int state)
Request that we have at least state number of older solution states/vectors.
DofValues _dof_values_dot_old
the previous time step's solution value time derivative
std::vector< FieldVariableValue > _vector_tag_u
const DofValues & dofValuesOld() const
std::vector< dof_id_type > _dof_indices
The dof indices for the current element.
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.
virtual bool hasDoFsOnNodes() const =0
Whether this data is associated with a variable that has DoFs on nodes.
unsigned int oldestSolutionStateRequested() const
The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).
const DofValues & dofValues() const