https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
AuxiliarySystem Class Reference

A system that holds auxiliary variables. More...

#include <AuxiliarySystem.h>

Inheritance diagram for AuxiliarySystem:
[legend]

Classes

struct  KokkosAuxStage
 Kokkos auxiliary kernels computed in a single device pass. More...
 

Public Member Functions

 AuxiliarySystem (FEProblemBase &subproblem, const std::string &name)
 
virtual ~AuxiliarySystem ()
 
virtual void initSolutionState () override
 Initializes the solution state.
 
virtual void initialSetup () override
 Setup Functions.
 
virtual void reinit () override
 Reinitialize the system when the degrees of freedom in this system have changed.
 
virtual void timestepSetup () override
 
virtual void customSetup (const ExecFlagType &exec_type) override
 
virtual void subdomainSetup () override
 
virtual void residualSetup () override
 
virtual void jacobianSetup () override
 
virtual void updateActive (THREAD_ID tid)
 
virtual void addVariable (const std::string &var_type, const std::string &name, InputParameters &parameters) override
 Canonical method for adding a variable.
 
void addKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 Adds an auxiliary kernel.
 
void addKokkosKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
void addScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 Adds a scalar kernel.
 
virtual void reinitElem (const Elem *elem, THREAD_ID tid) override
 Reinit an element assembly info.
 
virtual void reinitElemFace (const Elem *elem, unsigned int side, THREAD_ID tid) override
 Reinit assembly info for a side of an element.
 
const NumericVector< Number > *const & currentSolution () const override
 The solution vector that is currently being operated on.
 
virtual void serializeSolution ()
 
virtual void augmentSparsity (libMesh::SparsityPattern::Graph &, std::vector< dof_id_type > &, std::vector< dof_id_type > &) override
 Will modify the sparsity pattern to add logical geometric connections.
 
virtual void compute (ExecFlagType type) override
 Compute auxiliary variables.
 
void kokkosCompute (ExecFlagType type)
 
void buildKokkosAuxStages ()
 Group the active Kokkos auxiliary kernels of each execution flag into stages that can each be computed in a single device pass.
 
std::set< std::string > getDependObjects (ExecFlagType type)
 Get a list of dependent UserObjects for this exec type.
 
std::set< std::string > getDependObjects ()
 
virtual libMesh::Order getMinQuadratureOrder () override
 Get the minimum quadrature order for evaluating elemental auxiliary variables.
 
bool needMaterialOnSide (BoundaryID bnd_id)
 Indicated whether this system needs material properties on boundaries.
 
virtual libMesh::System & sys ()
 
virtual libMesh::System & system () override
 Get the reference to the libMesh system.
 
virtual const libMesh::System & system () const override
 
virtual void copyCurrentIntoPreviousNL ()
 Copies the current solution into the previous nonlinear iteration solution.
 
void setScalarVariableCoupleableTags (ExecFlagType type)
 
void clearScalarVariableCoupleableTags ()
 
const ExecuteMooseObjectWarehouse< AuxKernel > & nodalAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< AuxKernel > & mortarNodalAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< VectorAuxKernel > & nodalVectorAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< ArrayAuxKernel > & nodalArrayAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< AuxKernel > & elemAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< VectorAuxKernel > & elemVectorAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< ArrayAuxKernel > & elemArrayAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< AuxKernelBase > & kokkosNodalAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< AuxKernelBase > & kokkosElemAuxWarehouse () const
 
void variableWiseRelativeSolutionDifferenceNorm (std::vector< Number > &var_diffs) const
 Computes and stores ||current - old|| / ||current|| for each variable in the given vector.
 
LinearFVGradientReader registerFVGradient (unsigned int variable_number, const FVGradientMethod &method, unsigned int oldest_state=0)
 Register a variable for gradient values produced by a method object.
 
void updateFVGradient (const LinearFVGradientReader &reader)
 Update a registered gradient reader explicitly.
 
unsigned int number () const
 Gets the number of this system.
 
MooseMesh & mesh ()
 
const MooseMesh & mesh () const
 
SubProblem & subproblem ()
 
const SubProblem & subproblem () const
 
FEProblemBase & feProblem ()
 
const FEProblemBase & feProblem () const
 
THREAD_ID numThreads () const
 
void applyScalingFactors (const std::vector< Real > &inverse_scaling_factors)
 Applies scaling factors to the system's variables.
 
bool computingScalingJacobian () const
 Whether we are computing an initial Jacobian for automatic variable scaling.
 
bool automaticScaling () const
 Getter for whether we are performing automatic scaling.
 
void automaticScaling (bool automatic_scaling)
 Setter for whether we are performing automatic scaling.
 
void setVerboseFlag (const bool &verbose)
 Sets the verbose flag.
 
virtual libMesh::DofMap & dofMap ()
 Gets writeable reference to the dof map.
 
virtual const libMesh::DofMap & dofMap () const
 Gets const reference to the dof map.
 
virtual void preInit ()
 This is called prior to the libMesh system has been init'd.
 
virtual void postInit ()
 
virtual void initializeObjects ()
 Called only once, just before the solve begins so objects can do some precalculations.
 
void update ()
 Update the system (doing libMesh magic)
 
virtual void solve ()
 Solve the system (using libMesh magic)
 
void copyOldSolutions ()
 Copy the solution back in time (older -> old, etc).
 
void advanceStateHistory (Moose::SolutionIterationType iteration_type)
 Advance solution vectors and additional system-owned state together.
 
void copyPreviousSolutions (const Moose::SolutionIterationType iteration_type)
 Copy a specific type of solution back in time (current -> old -> older, etc).
 
void restoreStateHistory ()
 Restore solution vectors and additional system-owned state together.
 
virtual void restoreSolutions ()
 Restore current solutions (call after your solve failed)
 
NumericVector< Number > & solution ()
 
const NumericVector< Number > & solution () const
 
NumericVector< Number > & solutionOld ()
 
const NumericVector< Number > & solutionOld () const
 
NumericVector< Number > & solutionOlder ()
 
const NumericVector< Number > & solutionOlder () const
 
virtual const NumericVector< Number > * solutionPreviousNewton () const
 
virtual NumericVector< Number > * solutionPreviousNewton ()
 
const std::vector< NumericVector< Number > * > & getSolutionStates (const Moose::SolutionIterationType iteration_type) const
 Get all of the solution states (current, old, ...) for the given iteration type.
 
std::size_t getNumSolutionStates (const Moose::SolutionIterationType iteration_type) const
 Get the number of solution states (0 = current, 1 = current + old, ...) for the given iteration type.
 
virtual NumericVector< Number > & solutionState (const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
 Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
 
virtual const NumericVector< Number > & solutionState (const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
 Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
 
libMesh::ParallelType solutionStateParallelType (const unsigned int state, const Moose::SolutionIterationType iteration_type) const
 Returns the parallel type of the given solution state.
 
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.
 
virtual bool hasSolutionState (const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
 Whether or not the system has the solution state (0 = current, 1 = old, 2 = older, etc).
 
virtual void addDotVectors ()
 Add u_dot, u_dotdot, u_dot_old and u_dotdot_old vectors if requested by the time integrator.
 
virtual std::vector< Number > & duDotDus ()
 
virtual Number & duDotDotDu ()
 
virtual const Number & duDotDotDu () const
 
virtual const Number & duDotDu (unsigned int var_num=0) const
 
virtual NumericVector< Number > * solutionUDot ()
 
virtual const NumericVector< Number > * solutionUDot () const
 
virtual NumericVector< Number > * solutionUDotDot ()
 
virtual const NumericVector< Number > * solutionUDotDot () const
 
virtual NumericVector< Number > * solutionUDotOld ()
 
virtual const NumericVector< Number > * solutionUDotOld () const
 
virtual NumericVector< Number > * solutionUDotDotOld ()
 
virtual const NumericVector< Number > * solutionUDotDotOld () const
 
virtual void saveOldSolutions ()
 Save the old and older solutions.
 
virtual void restoreOldSolutions ()
 Restore the old and older solutions when the saved solutions present.
 
bool hasVector (const std::string &tag_name) const
 Check if the named vector exists in the system.
 
virtual bool hasVector (TagID tag_id) const
 Check if the tagged vector exists in the system.
 
virtual TagID timeVectorTag () const
 Ideally, we should not need this API.
 
virtual TagID systemMatrixTag () const
 Return the Matrix Tag ID for System.
 
virtual TagID nonTimeVectorTag () const
 
virtual TagID residualVectorTag () const
 
virtual std::set< TagID > defaultVectorTags () const
 Get the default vector tags associated with this system.
 
virtual std::set< TagID > defaultMatrixTags () const
 Get the default matrix tags associted with this system.
 
virtual void associateVectorToTag (NumericVector< Number > &vec, TagID tag)
 Associate a vector for a given tag.
 
virtual void disassociateVectorFromTag (NumericVector< Number > &vec, TagID tag)
 Disassociate a given vector from a given tag.
 
virtual void disassociateVectorFromTag (TagID tag)
 Disassociate any vector that is associated with a given tag.
 
virtual void disassociateDefaultVectorTags ()
 Disassociate the vectors associated with the default vector tags of this system.
 
virtual bool hasMatrix (TagID tag) const
 Check if the tagged matrix exists in the system.
 
virtual libMesh::SparseMatrix< Number > & getMatrix (TagID tag)
 Get a raw SparseMatrix.
 
virtual const libMesh::SparseMatrix< Number > & getMatrix (TagID tag) const
 Get a raw SparseMatrix.
 
virtual void activateAllMatrixTags ()
 Make all existing matrices active.
 
virtual bool matrixTagActive (TagID tag) const
 If or not a matrix tag is active.
 
virtual void deactivateAllMatrixTags ()
 Make matrices inactive.
 
void closeTaggedMatrices (const std::set< TagID > &tags)
 Close all matrices associated the tags.
 
void flushTaggedMatrices (const std::set< TagID > &tags)
 flushes all matrices associated to tags.
 
virtual void associateMatrixToTag (libMesh::SparseMatrix< Number > &matrix, TagID tag)
 Associate a matrix to a tag.
 
virtual void disassociateMatrixFromTag (libMesh::SparseMatrix< Number > &matrix, TagID tag)
 Disassociate a matrix from a tag.
 
virtual void disassociateMatrixFromTag (TagID tag)
 Disassociate any matrix that is associated with a given tag.
 
virtual void disassociateDefaultMatrixTags ()
 Disassociate the matrices associated with the default matrix tags of this system.
 
virtual NumericVector< Number > & serializedSolution ()
 Returns a reference to a serialized version of the solution vector for this subproblem.
 
virtual NumericVector< Number > & residualCopy ()
 
virtual NumericVector< Number > & residualGhosted ()
 
virtual void augmentSendList (std::vector< dof_id_type > &send_list)
 Will modify the send_list to add all of the extra ghosted dofs for this system.
 
virtual bool isArrayVariable (const std::string &var_name) const
 If a variable is an array variable.
 
virtual bool isScalarVariable (unsigned int var_name) const
 
MooseVariableFieldBase & getVariable (THREAD_ID tid, const std::string &var_name) const
 Gets a reference to a variable of with specified name.
 
MooseVariableFieldBase & getVariable (THREAD_ID tid, unsigned int var_number) const
 Gets a reference to a variable with specified number.
 
template<typename T >
MooseVariableFE< T > & getFieldVariable (THREAD_ID tid, const std::string &var_name)
 Gets a reference to a variable of with specified name.
 
template<typename T >
MooseVariableFE< T > & getFieldVariable (THREAD_ID tid, unsigned int var_number)
 Gets a reference to a variable with specified number.
 
template<typename T >
MooseVariableField< T > & getActualFieldVariable (THREAD_ID tid, const std::string &var_name)
 Returns a field variable pointer - this includes finite volume variables.
 
template<typename T >
MooseVariableField< T > & getActualFieldVariable (THREAD_ID tid, unsigned int var_number)
 Returns a field variable pointer - this includes finite volume variables.
 
template<typename T >
MooseVariableFV< T > & getFVVariable (THREAD_ID tid, const std::string &var_name)
 Return a finite volume variable.
 
virtual MooseVariableScalar & getScalarVariable (THREAD_ID tid, const std::string &var_name) const
 Gets a reference to a scalar variable with specified number.
 
virtual MooseVariableScalar & getScalarVariable (THREAD_ID tid, unsigned int var_number) const
 Gets a reference to a variable with specified number.
 
virtual const std::set< SubdomainID > * getVariableBlocks (unsigned int var_number)
 Get the block where a variable of this system is defined.
 
virtual unsigned int nVariables () const
 Get the number of variables in this system.
 
unsigned int nFieldVariables () const
 Get the number of field variables in this system.
 
unsigned int nFVVariables () const
 Get the number of finite volume variables in this system.
 
std::size_t getMaxVarNDofsPerElem () const
 Gets the maximum number of dofs used by any one variable on any one element.
 
std::size_t getMaxVarNDofsPerNode () const
 Gets the maximum number of dofs used by any one variable on any one node.
 
void assignMaxVarNDofsPerElem (std::size_t max_dofs)
 assign the maximum element dofs
 
void assignMaxVarNDofsPerNode (std::size_t max_dofs)
 assign the maximum node dofs
 
virtual void addVariableToZeroOnResidual (std::string var_name)
 Adds this variable to the list of variables to be zeroed during each residual evaluation.
 
virtual void addVariableToZeroOnJacobian (std::string var_name)
 Adds this variable to the list of variables to be zeroed during each Jacobian evaluation.
 
virtual void zeroVariables (std::vector< std::string > &vars_to_be_zeroed)
 Zero out the solution for the list of variables passed in.
 
virtual void zeroVariablesForResidual ()
 Zero out the solution for the variables that were registered as needing to have their solutions zeroed on out on residual evaluation by a call to addVariableToZeroOnResidual()
 
virtual void zeroVariablesForJacobian ()
 Zero out the solution for the variables that were registered as needing to have their solutions zeroed on out on Jacobian evaluation by a call to addVariableToZeroOnResidual()
 
virtual void prepare (THREAD_ID tid)
 Prepare the system for use.
 
virtual void prepareFace (THREAD_ID tid, bool resize_data)
 Prepare the system for use on sides.
 
virtual void prepareNeighbor (THREAD_ID tid)
 Prepare the system for use.
 
virtual void prepareLowerD (THREAD_ID tid)
 Prepare the system for use for lower dimensional elements.
 
virtual void reinitNeighborFace (const Elem *elem, unsigned int side, THREAD_ID tid)
 Compute the values of the variables at all the current points.
 
virtual void reinitNeighbor (const Elem *elem, THREAD_ID tid)
 Compute the values of the variables at all the current points.
 
virtual void reinitLowerD (THREAD_ID tid)
 Compute the values of the variables on the lower dimensional element.
 
virtual void reinitNode (const Node *node, THREAD_ID tid)
 Reinit nodal assembly info.
 
virtual void reinitNodeFace (const Node *node, BoundaryID bnd_id, THREAD_ID tid)
 Reinit nodal assembly info on a face.
 
virtual void reinitNodes (const std::vector< dof_id_type > &nodes, THREAD_ID tid)
 Reinit variables at a set of nodes.
 
virtual void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes, THREAD_ID tid)
 Reinit variables at a set of neighbor nodes.
 
virtual void reinitScalars (THREAD_ID tid, bool reinit_for_derivative_reordering=false)
 Reinit scalar varaibles.
 
virtual void addVariableToCopy (const std::string &dest_name, const std::string &source_name, const std::string &timestep)
 Add info about variable that will be copied.
 
const std::vector< MooseVariableFieldBase * > & getVariables (THREAD_ID tid)
 
const VariableWarehouse & variableWarehouse (THREAD_ID tid=0) const
 
const std::vector< MooseVariableScalar * > & getScalarVariables (THREAD_ID tid)
 
const std::set< SubdomainID > & getSubdomainsForVar (unsigned int var_number) const
 
const std::set< SubdomainID > & getSubdomainsForVar (const std::string &var_name) const
 Get the block where a variable of this system is defined.
 
void removeVector (const std::string &name)
 Remove a vector from the system with the given name.
 
void removeVector (TagID tag_id)
 Remove a solution length vector from the system with the specified TagID.
 
NumericVector< Number > & addVector (const std::string &vector_name, const bool project, const libMesh::ParallelType type)
 Adds a solution length vector to the system.
 
NumericVector< Number > & addVector (TagID tag, const bool project, const libMesh::ParallelType type)
 Adds a solution length vector to the system with the specified TagID.
 
void closeTaggedVector (const TagID tag)
 Close vector with the given tag.
 
void closeTaggedVectors (const std::set< TagID > &tags)
 Close all vectors for given tags.
 
void zeroTaggedVector (const TagID tag)
 Zero vector with the given tag.
 
void zeroTaggedVectors (const std::set< TagID > &tags)
 Zero all vectors for given tags.
 
void setVariableGlobalDoFs (const std::string &var_name)
 set all the global dof indices for a variable
 
const std::vector< dof_id_type > & getVariableGlobalDoFs ()
 Get the global dof indices of a variable, this needs to be called after the indices have been set by setVariableGlobalDoFs
 
libMesh::SparseMatrix< Number > & addMatrix (TagID tag)
 Adds a matrix with a given tag.
 
void removeMatrix (TagID tag)
 Removes a matrix with a given tag.
 
virtual const std::string & name () const
 
const std::vector< VariableName > & getVariableNames () const
 
void getStandardFieldVariableNames (std::vector< VariableName > &std_field_variables) const
 
unsigned int getMaxVariableNumber () const
 Returns the maximum number of all variables on the system.
 
virtual void computeVariables (const NumericVector< Number > &)
 
void copyVars (libMesh::ExodusII_IO &io)
 
virtual void copySolutionsBackwards ()
 Copy current solution into old and older.
 
void copyStateHistoryBackwards ()
 Copy solution vectors and additional system-owned state into older states.
 
void addTimeIntegrator (const std::string &type, const std::string &name, InputParameters &parameters)
 
bool hasVarCopy () const
 Whether or not there are variables to be restarted from an Exodus mesh file.
 
bool solutionStatesInitialized () const
 Whether or not the solution states have been initialized via initSolutionState()
 
void clearAllDofIndices ()
 Clear all dof indices from moose variables.
 
void setActiveVariableCoupleableVectorTags (const std::set< TagID > &vtags, THREAD_ID tid)
 Set the active vector tags for the variables.
 
void setActiveScalarVariableCoupleableVectorTags (const std::set< TagID > &vtags, THREAD_ID tid)
 Set the active vector tags for the scalar variables.
 
Moose::VarKindType varKind () const
 
void copyTimeIntegrators (const SystemBase &other_sys)
 Copy time integrators from another system.
 
const TimeIntegrator & getTimeIntegrator (const unsigned int var_num) const
 Retrieve the time integrator that integrates the given variable's equation.
 
const TimeIntegrator * queryTimeIntegrator (const unsigned int var_num) const
 Retrieve the time integrator that integrates the given variable's equation.
 
const std::vector< std::shared_ptr< TimeIntegrator > > & getTimeIntegrators ()
 
std::string prefix () const
 
void sizeVariableMatrixData ()
 size the matrix data for each variable for the number of matrix tags we have
 
void skipNextSolutionToOldCopy ()
 Skip the next copy from the solution vector to the old solution vector old -> older is still performed.
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
PerfGraph & perfGraph ()
 Get the PerfGraph.
 
const FVGradientMethod & resolveFVGradientMethod (const GradientMethodName &method_name)
 Resolve a named gradient method, constructing a built-in method when needed.
 
virtual NumericVector< Number > & getVector (const std::string &name)
 Get a raw NumericVector by name.
 
virtual const NumericVector< Number > & getVector (const std::string &name) const
 
virtual NumericVector< Number > & getVector (TagID tag)
 Get a raw NumericVector by tag.
 
virtual const NumericVector< Number > & getVector (TagID tag) const
 
virtual bool hasVariable (const std::string &var_name) const
 Query a system for a variable.
 
virtual bool hasScalarVariable (const std::string &var_name) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects.
 

Protected Types

using GradientContainer = LinearFVGradientReader::GradientContainer
 Non-owning view with one vector per spatial component of a cell-centered gradient field.
 
using GradientStateContainer = LinearFVGradientReader::GradientStateContainer
 Gradient fields indexed by solution time state.
 
using OwnedGradientContainer = std::vector< std::unique_ptr< libMesh::NumericVector< libMesh::Number > > >
 Owned vectors used for the current gradient and its replacement.
 

Protected Member Functions

virtual void copyAdditionalStateBackwards (Moose::SolutionIterationType iteration_type, bool skip_current_to_old) override
 Copy system-owned state not represented by solution vectors.
 
virtual void restoreAdditionalStates () override
 Restore system-owned state not represented by solution vectors.
 
void computeScalarVars (ExecFlagType type)
 
void computeNodalVars (ExecFlagType type)
 
void computeMortarNodalVars (ExecFlagType type)
 
void computeNodalVecVars (ExecFlagType type)
 
void computeNodalArrayVars (ExecFlagType type)
 
void computeElementalVars (ExecFlagType type)
 
void computeElementalVecVars (ExecFlagType type)
 
void computeElementalArrayVars (ExecFlagType type)
 
template<typename AuxKernelType >
void computeElementalVarsHelper (const MooseObjectWarehouse< AuxKernelType > &warehouse)
 
template<typename AuxKernelType >
void computeNodalVarsHelper (const MooseObjectWarehouse< AuxKernelType > &warehouse)
 
NumericVector< Number > & solutionInternal () const override
 Internal getter for solution owned by libMesh.
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing.
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 Call to register a named section for timing.
 
std::string timedSectionName (const std::string &section_name) const
 
void computeGradients ()
 Compute and finalize all registered linear FV gradient fields.
 
void computeGradientsExcept (const LinearFVGradientReader &excluded_reader)
 Compute and finalize every registered linear FV gradient field except one method.
 
void initializeLinearFVGradientStorage ()
 Initialize private current and replacement gradient storage.
 
void initializeLinearFVGradientHistoryStorage ()
 Register named system vectors for requested historical gradient states.
 
void rebuildLinearFVGradientStorage ()
 Rebuild cached gradient values and reusable scratch storage after mesh/DOF changes.
 
void copyPreviousGradientStates (Moose::SolutionIterationType iteration_type, bool skip_current_to_old)
 Copy published gradient values into requested older states.
 
void restoreGradientStates ()
 Restore current gradients from state one after a failed timestep.
 
bool hasLinearFVGradients () const
 Whether any linear finite-volume gradient fields have been registered to this object.
 
void computeGradientsForMethods (const std::vector< const FVGradientMethod * > &gradient_methods)
 Compute and finalize the supplied registered gradient methods.
 
void initializeContainer (OwnedGradientContainer &container) const
 Allocate one zeroed vector per spatial component for gradient storage.
 
void resizeGradientStateStorage (LinearFVGradientContainer &container, unsigned int oldest_state)
 Ensure that a method container stores every requested time state.
 
void setCurrentGradientState (LinearFVGradientContainer &container) const
 Set solution state zero to the current gradient.
 
void checkRestartedGradientHistory (const FVGradientMethod &method, LinearFVGradientContainer &container)
 Validate and mark gradient history loaded during restart or recovery.
 
void initializeGradientStatesForTimeAdvance ()
 Compute and publish uninitialized gradients before their first time-state advancement.
 
LinearFVGradientContainer & computeLinearFVGradientContainer (const FVGradientMethod &method)
 Compute replacement field values for a registered gradient method.
 
void finalizeLinearFVGradientContainer (LinearFVGradientContainer &container)
 Replace the current gradient storage with the freshly computed new gradients.
 

Static Protected Member Functions

static std::string gradientStateVectorName (const FVGradientMethod &method, unsigned int state, unsigned int component)
 Return the stable system-vector name for one old gradient component.
 

Protected Attributes

libMesh::System & _sys
 
const NumericVector< Number > * _current_solution
 solution vector from nonlinear solver
 
std::vector< NumericVector< Number > * > _solution_state
 The current states of the solution (0 = current, 1 = old, etc)
 
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
 
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
 
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
 
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
 
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
 
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
 
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage
 
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
 
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
 
ExecuteMooseObjectWarehouse< AuxKernelBase > _kokkos_nodal_aux_storage
 
ExecuteMooseObjectWarehouse< AuxKernelBase > _kokkos_elemental_aux_storage
 
std::map< ExecFlagType, std::vector< KokkosAuxStage > > _kokkos_aux_stages
 Active Kokkos auxiliary kernels of each execution flag grouped into stages, where a kernel coupling the current value of a variable runs in a later stage than the kernels writing it.
 
SubProblem & _subproblem
 The subproblem for whom this class holds variable data, etc; this can either be the governing finite element/volume problem or a subjugate displaced problem.
 
FEProblemBase & _fe_problem
 the governing finite element/volume problem
 
MooseApp & _app
 
Factory & _factory
 
MooseMesh & _mesh
 
std::string _name
 The name of this system.
 
std::vector< VariableWarehouse > _vars
 Variable warehouses (one for each thread)
 
std::map< unsigned int, std::set< SubdomainID > > _var_map
 Map of variables (variable id -> array of subdomains where it lives)
 
unsigned int _max_var_number
 Maximum variable number.
 
std::vector< std::string > _vars_to_be_zeroed_on_residual
 
std::vector< std::string > _vars_to_be_zeroed_on_jacobian
 
NumericVector< Number > * _u_dot
 solution vector for u^dot
 
NumericVector< Number > * _u_dotdot
 solution vector for u^dotdot
 
NumericVector< Number > * _u_dot_old
 old solution vector for u^dot
 
NumericVector< Number > * _u_dotdot_old
 old solution vector for u^dotdot
 
std::vector< Real > _du_dot_du
 Derivative of time derivative of u with respect to uj.
 
Real _du_dotdot_du
 
std::vector< NumericVector< Number > * > _tagged_vectors
 Tagged vectors (pointer)
 
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
 Tagged matrices (pointer)
 
std::unordered_map< TagID, libMesh::SparseMatrix< Number > * > _active_tagged_matrices
 Active tagged matrices. A matrix is active if its tag-matrix pair is present in the map. We use a map instead of a vector so that users can easily add and remove to this container with calls to (de)activateMatrixTag.
 
std::vector< bool > _matrix_tag_active_flags
 Active flags for tagged matrices.
 
NumericVector< Real > * _saved_old
 
NumericVector< Real > * _saved_older
 
NumericVector< Real > * _saved_dot_old
 
NumericVector< Real > * _saved_dotdot_old
 
Moose::VarKindType _var_kind
 default kind of variables in this system
 
std::vector< VarCopyInfo > _var_to_copy
 
size_t _max_var_n_dofs_per_elem
 Maximum number of dofs for any one variable on any one element.
 
size_t _max_var_n_dofs_per_node
 Maximum number of dofs for any one variable on any one node.
 
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
 Time integrator.
 
std::vector< std::vector< MooseVariableFieldBase * > > _numbered_vars
 Map variable number to its pointer.
 
bool _automatic_scaling
 Whether to automatically scale the variables.
 
bool _verbose
 True if printing out additional information.
 
bool _solution_states_initialized
 Whether or not the solution states have been initialized.
 
std::vector< dof_id_type > _var_all_dof_indices
 Container for the dof indices of a given variable.
 
std::unique_ptr< NumericVector< Number > > _serialized_solution
 Serialized version of the solution vector, or nullptr if a serialized solution is not needed.
 
const Parallel::Communicator & _communicator
 
MooseApp & _pg_moose_app
 The MooseApp that owns the PerfGraph.
 
const std::string _prefix
 A prefix to use for all sections.
 
std::unordered_map< const FVGradientMethod *, LinearFVGradientContainer > _linear_fv_gradient_container_by_method
 Gradient containers keyed by the method object that produces them.
 
std::vector< const FVGradientMethod * > _linear_fv_gradient_methods
 Registered gradient methods in registration order.
 
std::vector< std::vector< MooseVariableFieldBase * > > _elem_vars
 Elemental variables.
 

Private Member Functions

std::vector< NumericVector< Number > * > & getSolutionStates (const Moose::SolutionIterationType iteration_type)
 Get all of the solution states (current, old, ...) for the given iteration type.
 
TagName oldSolutionStateVectorName (const unsigned int, Moose::SolutionIterationType iteration_type) const
 Gets the vector name used for an old (not current) solution state.
 

Private Attributes

std::array< std::vector< NumericVector< Number > * >, static_cast< size_t >(Moose::SolutionIterationType::Count)> _solution_states
 2D array of solution state vector pointers.
 
std::vector< NumericVector< Number > * > _saved_solution_states
 The saved solution states (0 = current, 1 = old, 2 = older, etc)
 
bool _skip_next_solution_to_old_copy
 Whether to skip the next copy from the solution to the old vector.
 

Friends

class ComputeIndicatorThread
 
class ComputeMarkerThread
 
class FlagElementsThread
 
class ComputeNodalKernelsThread
 
class ComputeNodalKernelBcsThread
 
class ComputeNodalKernelJacobiansThread
 
class ComputeNodalKernelBCJacobiansThread
 

Detailed Description

A system that holds auxiliary variables.

Definition at line 43 of file AuxiliarySystem.h.

Member Typedef Documentation

◆ GradientContainer

Non-owning view with one vector per spatial component of a cell-centered gradient field.

Definition at line 65 of file LinearFVGradientManager.h.

◆ GradientStateContainer

Gradient fields indexed by solution time state.

Definition at line 68 of file LinearFVGradientManager.h.

◆ OwnedGradientContainer

using LinearFVGradientManager::OwnedGradientContainer = std::vector<std::unique_ptr<libMesh::NumericVector<libMesh::Number> >>
protectedinherited

Owned vectors used for the current gradient and its replacement.

Definition at line 71 of file LinearFVGradientManager.h.

Constructor & Destructor Documentation

◆ AuxiliarySystem()

AuxiliarySystem::AuxiliarySystem ( FEProblemBase &  subproblem,
const std::string &  name 
)

Definition at line 74 of file AuxiliarySystem.C.

75{
78}
void initializeLinearFVGradientHistoryStorage()
Register named system vectors for requested historical gradient states.
virtual void initSolutionState()
Initializes the solution state.

◆ ~AuxiliarySystem()

virtual AuxiliarySystem::~AuxiliarySystem ( )
virtual

Member Function Documentation

◆ activateAllMatrixTags()

void SystemBase::activateAllMatrixTags ( )
virtualinherited

Make all existing matrices active.

Definition at line 1131 of file SystemBase.C.

1132{
1133 auto num_matrix_tags = _subproblem.numMatrixTags();
1134
1135 _matrix_tag_active_flags.resize(num_matrix_tags);
1137
1138 for (const auto tag : make_range(num_matrix_tags))
1139 if (hasMatrix(tag))
1140 {
1141 _matrix_tag_active_flags[tag] = true;
1142 _active_tagged_matrices.emplace(tag, &getMatrix(tag));
1143 }
1144 else
1145 _matrix_tag_active_flags[tag] = false;
1146}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition SubProblem.h:251
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
std::unordered_map< TagID, libMesh::SparseMatrix< Number > * > _active_tagged_matrices
Active tagged matrices. A matrix is active if its tag-matrix pair is present in the map....
std::vector< bool > _matrix_tag_active_flags
Active flags for tagged matrices.
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition SystemBase.h:391
IntRange< T > make_range(T beg, T end)

Referenced by NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), and NonlinearSystemBase::computeResidualTags().

◆ addDotVectors()

void SystemBase::addDotVectors ( )
virtualinherited

Add u_dot, u_dotdot, u_dot_old and u_dotdot_old vectors if requested by the time integrator.

Reimplemented in DisplacedSystem.

Definition at line 1650 of file SystemBase.C.

1651{
1653 _u_dot = &addVector("u_dot", true, GHOSTED);
1655 _u_dot_old = &addVector("u_dot_old", true, GHOSTED);
1657 _u_dotdot = &addVector("u_dotdot", true, GHOSTED);
1659 _u_dotdot_old = &addVector("u_dotdot_old", true, GHOSTED);
1660}
virtual bool uDotRequested()
Get boolean flag to check whether solution time derivative needs to be stored.
virtual bool uDotOldRequested()
Get boolean flag to check whether old solution time derivative needs to be stored.
virtual bool uDotDotRequested()
Get boolean flag to check whether solution second time derivative needs to be stored.
virtual bool uDotDotOldRequested()
Get boolean flag to check whether old solution second time derivative needs to be stored.
NumericVector< Number > * _u_dot
solution vector for u^dot
FEProblemBase & _fe_problem
the governing finite element/volume problem
NumericVector< Number > * _u_dotdot
solution vector for u^dotdot
NumericVector< Number > * _u_dotdot_old
old solution vector for u^dotdot
NumericVector< Number > * _u_dot_old
old solution vector for u^dot
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.
Definition SystemBase.C:608

Referenced by DisplacedSystem::addDotVectors().

◆ addKernel()

void AuxiliarySystem::addKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)

Adds an auxiliary kernel.

Parameters
kernel_nameThe type of the kernel
nameThe name of the kernel
parametersParameters for this kernel

Definition at line 335 of file AuxiliarySystem.C.

338{
339 for (THREAD_ID tid = 0; tid < this->numThreads(); tid++)
340 {
341 const auto & base = parameters.getBase();
342 if (base == "AuxKernel" || base == "Bounds")
343 {
344 std::shared_ptr<AuxKernel> kernel =
345 _factory.create<AuxKernel>(kernel_name, name, parameters, tid);
346 if (kernel->isNodal())
347 {
348 if (kernel->isMortar())
349 _mortar_nodal_aux_storage.addObject(kernel, tid);
350 else
351 _nodal_aux_storage.addObject(kernel, tid);
352 }
353 else
354 _elemental_aux_storage.addObject(kernel, tid);
355 }
356
357 else if (base == "VectorAuxKernel")
358 {
359 std::shared_ptr<VectorAuxKernel> kernel =
360 _factory.create<VectorAuxKernel>(kernel_name, name, parameters, tid);
361 if (kernel->isNodal())
362 {
363 if (kernel->isMortar())
364 mooseError("Vector mortar aux kernels not yet implemented");
365 _nodal_vec_aux_storage.addObject(kernel, tid);
366 }
367 else
368 _elemental_vec_aux_storage.addObject(kernel, tid);
369 }
370
371 else if (base == "ArrayAuxKernel")
372 {
373 std::shared_ptr<ArrayAuxKernel> kernel =
374 _factory.create<ArrayAuxKernel>(kernel_name, name, parameters, tid);
375 if (kernel->isNodal())
376 {
377 if (kernel->isMortar())
378 mooseError("Vector mortar aux kernels not yet implemented");
379 _nodal_array_aux_storage.addObject(kernel, tid);
380 }
381 else
382 _elemental_array_aux_storage.addObject(kernel, tid);
383 }
384 else
385 mooseAssert(false,
386 "Attempting to add AuxKernel of type '" + kernel_name + "' and name '" + name +
387 "' to the auxiliary system with invalid _moose_base: " + base);
388 }
389}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
unsigned int THREAD_ID
Definition MooseTypes.h:237
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition Factory.C:142
const std::string & getBase() const
Factory & _factory
THREAD_ID numThreads() const
Definition SystemBase.C:89
virtual const std::string & name() const

◆ addKokkosKernel()

void AuxiliarySystem::addKokkosKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)

◆ addMatrix()

SparseMatrix< Number > & SystemBase::addMatrix ( TagID  tag)
inherited

Adds a matrix with a given tag.

Parameters
tag_nameThe name of the tag

Definition at line 570 of file SystemBase.C.

571{
573 mooseError("Cannot add tagged matrix with TagID ",
574 tag,
575 " in system '",
576 name(),
577 "' because the tag does not exist in the problem");
578
579 if (hasMatrix(tag))
580 return getMatrix(tag);
581
582 const auto matrix_name = _subproblem.matrixTagName(tag);
583 SparseMatrix<Number> & mat = system().add_matrix(matrix_name);
584 associateMatrixToTag(mat, tag);
585
586 return mat;
587}
virtual TagName matrixTagName(TagID tag)
Retrieve the name associated with a TagID.
Definition SubProblem.C:349
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition SubProblem.C:320
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
SparseMatrix< Number > & add_matrix(std::string_view mat_name, ParallelType type=PARALLEL, MatrixBuildType mat_build_type=MatrixBuildType::AUTOMATIC)

Referenced by TimeIntegrator::requestTimeJacobian().

◆ addScalarKernel()

void AuxiliarySystem::addScalarKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)

Adds a scalar kernel.

Parameters
kernel_nameThe type of the kernel
nameThe name of the kernel
parametersKernel parameters

Definition at line 392 of file AuxiliarySystem.C.

395{
396 for (THREAD_ID tid = 0; tid < this->numThreads(); tid++)
397 {
398 std::shared_ptr<AuxScalarKernel> kernel =
399 _factory.create<AuxScalarKernel>(kernel_name, name, parameters, tid);
400 _aux_scalar_storage.addObject(kernel, tid);
401 }
402}
Base class for making kernels that work on auxiliary scalar variables.
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.

◆ addTimeIntegrator()

void SystemBase::addTimeIntegrator ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
inherited

Definition at line 1675 of file SystemBase.C.

1678{
1679 parameters.set<SystemBase *>("_sys") = this;
1680 _time_integrators.push_back(_factory.create<TimeIntegrator>(type, name, parameters));
1681}
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition SystemBase.h:87
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
Time integrator.
Base class for time integrators.

◆ addVariable()

void AuxiliarySystem::addVariable ( const std::string &  var_type,
const std::string &  var_name,
InputParameters &  parameters 
)
overridevirtual

Canonical method for adding a variable.

Parameters
var_typethe type of the variable, e.g. MooseVariableScalar
var_namethe variable name, e.g. 'u'
paramsthe InputParameters from which to construct the variable

Reimplemented from SystemBase.

Definition at line 282 of file AuxiliarySystem.C.

285{
286 SystemBase::addVariable(var_type, name, parameters);
287
288 const auto fe_type = MooseUtils::variableFEType(parameters);
289
290 if (var_type == "MooseVariableScalar")
291 return;
292
293 for (THREAD_ID tid = 0; tid < this->numThreads(); tid++)
294 {
295 if (FEInterface::field_type(fe_type) == libMesh::TYPE_VECTOR)
296 {
297 auto * var = _vars[tid].getActualFieldVariable<RealVectorValue>(name);
298 if (var)
299 {
300 if (var->feType().family == LAGRANGE_VEC)
301 _nodal_vars[tid].push_back(var);
302 else
303 _elem_vars[tid].push_back(var);
304 }
305 }
306
307 else
308 {
309 MooseVariableBase * var_base = _vars[tid].getVariable(name);
310
311 auto * const var = dynamic_cast<MooseVariableField<Real> *>(var_base);
312
313 if (var)
314 {
315 if (var->feType().family == LAGRANGE)
316 _nodal_vars[tid].push_back(var);
317 else
318 _elem_vars[tid].push_back(var);
319 }
320
321 auto * const avar = dynamic_cast<MooseVariableField<RealEigenVector> *>(var_base);
322
323 if (avar)
324 {
325 if (avar->feType().family == LAGRANGE)
326 _nodal_vars[tid].push_back(avar);
327 else
328 _elem_vars[tid].push_back(avar);
329 }
330 }
331 }
332}
std::vector< std::vector< MooseVariableFieldBase * > > _elem_vars
Elemental variables.
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
Base variable class.
Class for stuff related to variables.
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &parameters)
Canonical method for adding a variable.
Definition SystemBase.C:720
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
libMesh::FEType variableFEType(const InputParameters &params)
Definition MooseUtils.C:98
VectorValue< Real > RealVectorValue
Definition SubProblem.h:34

◆ addVariableToCopy()

void SystemBase::addVariableToCopy ( const std::string &  dest_name,
const std::string &  source_name,
const std::string &  timestep 
)
virtualinherited

Add info about variable that will be copied.

Parameters
dest_nameName of the nodal variable being used for copying into (name is from the exodusII file)
source_nameName of the nodal variable being used for copying from (name is from the exodusII file)
timestepTimestep in the file being used

Definition at line 1175 of file SystemBase.C.

1178{
1179 _var_to_copy.push_back(VarCopyInfo(dest_name, source_name, timestep));
1180}
std::vector< VarCopyInfo > _var_to_copy
Information about variables that will be copied.
Definition SystemBase.h:68

Referenced by CopyNodalVarsAction::act(), and PhysicsBase::copyVariablesFromMesh().

◆ addVariableToZeroOnJacobian()

void SystemBase::addVariableToZeroOnJacobian ( std::string  var_name)
virtualinherited

◆ addVariableToZeroOnResidual()

void SystemBase::addVariableToZeroOnResidual ( std::string  var_name)
virtualinherited

◆ addVector() [1/2]

NumericVector< Number > & SystemBase::addVector ( const std::string &  vector_name,
const bool  project,
const libMesh::ParallelType  type 
)
inherited

Adds a solution length vector to the system.

Parameters
vector_nameThe name of the vector.
projectWhether or not to project this vector when doing mesh refinement. If the vector is just going to be recomputed then there is no need to project it.
typeWhat type of parallel vector. This is usually either PARALLEL or GHOSTED. GHOSTED is needed if you are going to be accessing off-processor entries. The ghosting pattern is the same as the solution vector.

Definition at line 608 of file SystemBase.C.

611{
612 if (hasVector(vector_name))
613 return getVector(vector_name);
614
615 NumericVector<Number> & vec = system().add_vector(vector_name, project, type);
616 return vec;
617}
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition SystemBase.C:924
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition SystemBase.C:933
NumericVector< Number > & add_vector(std::string_view vec_name, const bool projections=true, const ParallelType type=PARALLEL)

Referenced by SystemBase::addDotVectors(), NonlinearTimeIntegratorInterface::addVector(), PicardSolve::allocateStorage(), SecantSolve::allocateStorage(), SteffensenSolve::allocateStorage(), FEProblemBase::appendConstantModes(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), LinearFVGradientManager::initializeLinearFVGradientHistoryStorage(), CentralDifference::initialSetup(), SystemBase::needSolutionState(), NonlinearSystemBase::residualGhosted(), and SystemBase::saveOldSolutions().

◆ addVector() [2/2]

NumericVector< Number > & SystemBase::addVector ( TagID  tag,
const bool  project,
const libMesh::ParallelType  type 
)
inherited

Adds a solution length vector to the system with the specified TagID.

Parameters
tag_nameThe name of the tag
projectWhether or not to project this vector when doing mesh refinement. If the vector is just going to be recomputed then there is no need to project it.
typeWhat type of parallel vector. This is usually either PARALLEL or GHOSTED. GHOSTED is needed if you are going to be accessing off-processor entries. The ghosting pattern is the same as the solution vector.

Definition at line 620 of file SystemBase.C.

621{
623 mooseError("Cannot add tagged vector with TagID ",
624 tag,
625 " in system '",
626 name(),
627 "' because the tag does not exist in the problem");
628
629 if (hasVector(tag))
630 {
631 auto & vec = getVector(tag);
632
633 if (type != AUTOMATIC && vec.type() != type)
634 mooseError("Cannot add tagged vector '",
636 "', in system '",
637 name(),
638 "' because a vector with the same name was found with a different parallel type");
639
640 return vec;
641 }
642
643 const auto vector_name = _subproblem.vectorTagName(tag);
644 NumericVector<Number> & vec = system().add_vector(vector_name, project, type);
645 associateVectorToTag(vec, tag);
646
647 return vec;
648}
virtual TagName vectorTagName(const TagID tag) const
Retrieve the name associated with a TagID.
Definition SubProblem.C:213
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition SubProblem.h:204
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition SystemBase.C:981

◆ advanceStateHistory()

void SystemBase::advanceStateHistory ( Moose::SolutionIterationType  iteration_type)
inherited

Advance solution vectors and additional system-owned state together.

Definition at line 1311 of file SystemBase.C.

1312{
1313 const bool skip_current_to_old =
1315 copyPreviousSolutions(iteration_type);
1316 copyAdditionalStateBackwards(iteration_type, skip_current_to_old);
1317}
void copyPreviousSolutions(const Moose::SolutionIterationType iteration_type)
Copy a specific type of solution back in time (current -> old -> older, etc).
bool _skip_next_solution_to_old_copy
Whether to skip the next copy from the solution to the old vector.
virtual void copyAdditionalStateBackwards(Moose::SolutionIterationType, bool)
Copy system-owned state not represented by solution vectors.

Referenced by SystemBase::copyStateHistoryBackwards(), and EigenExecutionerBase::inversePowerIteration().

◆ applyScalingFactors()

void SystemBase::applyScalingFactors ( const std::vector< Real > &  inverse_scaling_factors)
inherited

Applies scaling factors to the system's variables.

Parameters
inverse_scaling_factorsA vector containing the inverse of each variable's scaling factor, e.g. 1 / scaling_factor

Definition at line 1532 of file SystemBase.C.

1533{
1534 for (MooseIndex(_vars) thread = 0; thread < _vars.size(); ++thread)
1535 {
1536 auto & field_variables = _vars[thread].fieldVariables();
1537 for (MooseIndex(field_variables) i = 0, p = 0; i < field_variables.size(); ++i)
1538 {
1539 auto factors = field_variables[i]->arrayScalingFactor();
1540 for (unsigned int j = 0; j < field_variables[i]->count(); ++j, ++p)
1541 factors[j] /= inverse_scaling_factors[p];
1542
1543 field_variables[i]->scalingFactor(factors);
1544 }
1545
1546 auto offset = field_variables.size();
1547
1548 auto & scalar_variables = _vars[thread].scalars();
1549 for (MooseIndex(scalar_variables) i = 0; i < scalar_variables.size(); ++i)
1550 scalar_variables[i]->scalingFactor(
1551 {1. / inverse_scaling_factors[offset + i] * scalar_variables[i]->scalingFactor()});
1552
1553 if (thread == 0 && _verbose)
1554 {
1555 _console << "Automatic scaling factors:\n";
1556 auto original_flags = _console.flags();
1557 auto original_precision = _console.precision();
1558 _console.unsetf(std::ios_base::floatfield);
1560
1561 for (const auto & field_variable : field_variables)
1562 {
1563 const auto & factors = field_variable->arrayScalingFactor();
1564 _console << " " << field_variable->name() << ":";
1565 for (const auto i : make_range(field_variable->count()))
1566 _console << " " << factors[i];
1567 _console << "\n";
1568 }
1569 for (const auto & scalar_variable : scalar_variables)
1570 _console << " " << scalar_variable->name() << ": " << scalar_variable->scalingFactor()
1571 << "\n";
1572 _console << "\n" << std::endl;
1573
1574 // restore state
1575 _console.flags(original_flags);
1576 _console.precision(original_precision);
1577 }
1578 }
1579}
unsigned int count
Definition MortarUtils.C:53
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::ios_base::fmtflags flags() const
Return the current flags.
std::streamsize precision() const
Return the current precision.
void unsetf(std::ios_base::fmtflags mask) const
Unset format flags.
bool _verbose
True if printing out additional information.

Referenced by NonlinearSystemBase::computeScaling().

◆ assignMaxVarNDofsPerElem()

void SystemBase::assignMaxVarNDofsPerElem ( std::size_t  max_dofs)
inlineinherited

assign the maximum element dofs

Definition at line 628 of file SystemBase.h.

628{ _max_var_n_dofs_per_elem = max_dofs; }
size_t _max_var_n_dofs_per_elem
Maximum number of dofs for any one variable on any one element.

◆ assignMaxVarNDofsPerNode()

void SystemBase::assignMaxVarNDofsPerNode ( std::size_t  max_dofs)
inlineinherited

assign the maximum node dofs

Definition at line 633 of file SystemBase.h.

633{ _max_var_n_dofs_per_node = max_dofs; }
size_t _max_var_n_dofs_per_node
Maximum number of dofs for any one variable on any one node.

◆ associateMatrixToTag()

void SystemBase::associateMatrixToTag ( libMesh::SparseMatrix< Number > &  matrix,
TagID  tag 
)
virtualinherited

Associate a matrix to a tag.

Reimplemented in DisplacedSystem.

Definition at line 1076 of file SystemBase.C.

1077{
1078 if (!_subproblem.matrixTagExists(tag))
1079 mooseError("Cannot associate matrix to tag ", tag, " because that tag does not exist");
1080
1081 if (_tagged_matrices.size() < tag + 1)
1082 _tagged_matrices.resize(tag + 1);
1083
1084 _tagged_matrices[tag] = &matrix;
1085}
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
Tagged matrices (pointer)

Referenced by SystemBase::addMatrix(), DisplacedSystem::associateMatrixToTag(), NonlinearSystemBase::computeJacobian(), FEProblemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTag(), FEProblemBase::computeLinearSystemSys(), and FEProblemBase::computeResidualAndJacobian().

◆ associateVectorToTag()

void SystemBase::associateVectorToTag ( NumericVector< Number > &  vec,
TagID  tag 
)
virtualinherited

Associate a vector for a given tag.

Reimplemented in DisplacedSystem.

Definition at line 981 of file SystemBase.C.

982{
984 mooseError("Cannot associate vector to tag ", tag, " because that tag does not exist");
985
986 if (_tagged_vectors.size() < tag + 1)
987 _tagged_vectors.resize(tag + 1);
988
989 _tagged_vectors[tag] = &vec;
990}
std::vector< NumericVector< Number > * > _tagged_vectors
Tagged vectors (pointer)

Referenced by SystemBase::addVector(), DisplacedSystem::associateVectorToTag(), FEProblemBase::computeLinearSystemSys(), NonlinearSystemBase::computeNodalBCsResidual(), NonlinearSystemBase::computeNodalBCsResidual(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualTag(), NonlinearSystemBase::computeResidualTag(), FEProblemBase::computeResidualType(), LinearSystem::LinearSystem(), and SolverSystem::setSolution().

◆ augmentSendList()

void SystemBase::augmentSendList ( std::vector< dof_id_type > &  send_list)
virtualinherited

Will modify the send_list to add all of the extra ghosted dofs for this system.

Reimplemented in DisplacedSystem.

Definition at line 454 of file SystemBase.C.

455{
456 std::set<dof_id_type> & ghosted_elems = _subproblem.ghostedElems();
457
458 DofMap & dof_map = dofMap();
459
460 std::vector<dof_id_type> dof_indices;
461
462 System & sys = system();
463
464 unsigned int sys_num = sys.number();
465
466 unsigned int n_vars = sys.n_vars();
467
468 for (const auto & elem_id : ghosted_elems)
469 {
470 Elem * elem = _mesh.elemPtr(elem_id);
471
472 if (elem->active())
473 {
474 dof_map.dof_indices(elem, dof_indices);
475
476 // Only need to ghost it if it's actually not on this processor
477 for (const auto & dof : dof_indices)
478 if (dof < dof_map.first_dof() || dof >= dof_map.end_dof())
479 send_list.push_back(dof);
480
481 // Now add the DoFs from all of the nodes. This is necessary because of block
482 // restricted variables. A variable might not live _on_ this element but it
483 // might live on nodes connected to this element.
484 for (unsigned int n = 0; n < elem->n_nodes(); n++)
485 {
486 Node * node = elem->node_ptr(n);
487
488 // Have to get each variable's dofs
489 for (unsigned int v = 0; v < n_vars; v++)
490 {
491 const libMesh::Variable & var = sys.variable(v);
492 unsigned int var_num = var.number();
493 unsigned int n_comp = var.n_components();
494
495 // See if this variable has any dofs at this node
496 if (node->n_dofs(sys_num, var_num) > 0)
497 {
498 // Loop over components of the variable
499 for (unsigned int c = 0; c < n_comp; c++)
500 send_list.push_back(node->dof_number(sys_num, var_num, c));
501 }
502 }
503 }
504 }
505 }
506}
unsigned int n_vars
virtual Elem * elemPtr(const dof_id_type i)
Definition MooseMesh.C:3211
virtual std::set< dof_id_type > & ghostedElems()
Return the list of elements that should have their DoFs ghosted to this processor.
Definition SubProblem.h:683
virtual libMesh::DofMap & dofMap()
Gets writeable reference to the dof map.
MooseMesh & _mesh
unsigned int n_components() const
unsigned int number() const

Referenced by DisplacedSystem::augmentSendList(), and extraSendList().

◆ augmentSparsity()

void AuxiliarySystem::augmentSparsity ( libMesh::SparsityPattern::Graph &  sparsity,
std::vector< dof_id_type > &  n_nz,
std::vector< dof_id_type > &  n_oz 
)
overridevirtual

Will modify the sparsity pattern to add logical geometric connections.

Implements SystemBase.

Definition at line 898 of file AuxiliarySystem.C.

902{
903}

◆ automaticScaling() [1/2]

bool SystemBase::automaticScaling ( ) const
inlineinherited

Getter for whether we are performing automatic scaling.

Returns
whether we are performing automatic scaling

Definition at line 126 of file SystemBase.h.

126{ return _automatic_scaling; }
bool _automatic_scaling
Whether to automatically scale the variables.

Referenced by SubProblem::automaticScaling(), and SubProblem::automaticScaling().

◆ automaticScaling() [2/2]

void SystemBase::automaticScaling ( bool  automatic_scaling)
inlineinherited

Setter for whether we are performing automatic scaling.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Definition at line 132 of file SystemBase.h.

132{ _automatic_scaling = automatic_scaling; }

◆ buildKokkosAuxStages()

void AuxiliarySystem::buildKokkosAuxStages ( )

Group the active Kokkos auxiliary kernels of each execution flag into stages that can each be computed in a single device pass.

Referenced by initialSetup(), and updateActive().

◆ checkRestartedGradientHistory()

void LinearFVGradientManager::checkRestartedGradientHistory ( const FVGradientMethod &  method,
LinearFVGradientContainer &  container 
)
protectedinherited

Validate and mark gradient history loaded during restart or recovery.

Definition at line 270 of file LinearFVGradientManager.C.

272{
273 if (container.has_checked_restart_history)
274 return;
275
276 container.has_checked_restart_history = true;
277 if (container.state_values.size() <= 1)
278 return;
279
280 const auto & app = _sys.feProblem().getMooseApp();
281 if (!app.isRestarting() && !app.isRecovering())
282 return;
283
284 const auto & restartable_equation_systems = _sys.feProblem().getRestartableEquationSystems();
285 for (const auto state : make_range(std::size_t(1), container.state_values.size()))
286 for (const auto component : index_range(container.state_values[state]))
287 {
288 const auto vector_name = gradientStateVectorName(method, state, component);
289 for (const auto variable_number : container.variable_numbers)
290 {
291 const auto & variable = _sys.getVariable(0, variable_number);
292 if (!restartable_equation_systems.isVariableRestored(
293 _sys.name(), vector_name, variable.name()))
294 mooseError("Linear FV gradient state ",
295 state,
296 " for variable '",
297 variable.name(),
298 "' using gradient method '",
299 method.name(),
300 "' was requested on system '",
301 _sys.name(),
302 "', but vector '",
303 vector_name,
304 "' was not available in the restart data.");
305 }
306 }
307
308 container.has_initialized_history = true;
309}
for(PetscInt i=0;i< nvars;++i)
const RestartableEquationSystems & getRestartableEquationSystems() const
Get the RestartableEquationSystems object.
SystemBase & _sys
Reference to the system object.
static std::string gradientStateVectorName(const FVGradientMethod &method, unsigned int state, unsigned int component)
Return the stable system-vector name for one old gradient component.
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition MooseBase.h:87
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition SystemBase.C:92
FEProblemBase & feProblem()
Definition SystemBase.h:104
auto index_range(const T &sizable)

Referenced by LinearFVGradientManager::initializeLinearFVGradientStorage().

◆ clearAllDofIndices()

void SystemBase::clearAllDofIndices ( )
inherited

Clear all dof indices from moose variables.

Definition at line 1630 of file SystemBase.C.

1631{
1632 for (auto & var_warehouse : _vars)
1633 var_warehouse.clearAllDofIndices();
1634}
void clearAllDofIndices()
Clear all dof indices from moose variables.

Referenced by SubProblem::clearAllDofIndices().

◆ clearScalarVariableCoupleableTags()

void AuxiliarySystem::clearScalarVariableCoupleableTags ( )

Definition at line 742 of file AuxiliarySystem.C.

743{
746}
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) override
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid) override

Referenced by computeScalarVars().

◆ closeTaggedMatrices()

void SystemBase::closeTaggedMatrices ( const std::set< TagID > &  tags)
inherited

Close all matrices associated the tags.

Definition at line 1060 of file SystemBase.C.

1061{
1062 for (auto tag : tags)
1063 if (hasMatrix(tag))
1064 getMatrix(tag).close();
1065}

Referenced by NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), NonlinearSystemBase::computeNodalBCsJacobian(), and NonlinearSystemBase::computeResidualAndJacobianTags().

◆ closeTaggedVector()

void SystemBase::closeTaggedVector ( const TagID  tag)
inherited

Close vector with the given tag.

Definition at line 651 of file SystemBase.C.

652{
654 mooseError("Cannot close vector with TagID ",
655 tag,
656 " in system '",
657 name(),
658 "' because that tag does not exist in the problem");
659 else if (!hasVector(tag))
660 mooseError("Cannot close vector tag with name '",
662 "' in system '",
663 name(),
664 "' because there is no vector associated with that tag");
665 getVector(tag).close();
666}
virtual void close()=0

Referenced by SystemBase::closeTaggedVectors().

◆ closeTaggedVectors()

void SystemBase::closeTaggedVectors ( const std::set< TagID > &  tags)
inherited

Close all vectors for given tags.

Definition at line 669 of file SystemBase.C.

670{
671 for (const auto tag : tags)
673}
void closeTaggedVector(const TagID tag)
Close vector with the given tag.
Definition SystemBase.C:651

Referenced by NonlinearSystemBase::computeResidualAndJacobianTags(), NonlinearSystemBase::computeResidualTags(), LinearSystem::stopSolve(), and NonlinearSystem::stopSolve().

◆ compute()

void AuxiliarySystem::compute ( ExecFlagType  type)
overridevirtual

Compute auxiliary variables.

Parameters
typeTime flag of which variables should be computed

Implements SystemBase.

Definition at line 448 of file AuxiliarySystem.C.

449{
450 // avoid division by dt which might be zero.
451 if (_fe_problem.dt() > 0.)
452 for (auto & ti : _time_integrators)
453 ti->preStep();
454
455 // We need to compute time derivatives every time each kind of the variables is finished, because:
456 //
457 // a) the user might want to use the aux variable value somewhere, thus we need to provide the
458 // up-to-date value
459 // b) time integration system works with the whole vectors of solutions, thus we cannot update
460 // only a part of the vector
461 //
462
463 if (_vars[0].scalars().size() > 0)
464 {
465 computeScalarVars(type);
466 // compute time derivatives of scalar aux variables _after_ the values were updated
467 if (_fe_problem.dt() > 0.)
468 for (auto & ti : _time_integrators)
469 ti->computeTimeDerivatives();
470 }
471
472 if (_vars[0].fieldVariables().size() > 0)
473 {
476 computeNodalVars(type);
481
482#ifdef MOOSE_KOKKOS_ENABLED
483 kokkosCompute(type);
484#endif
485
487 {
488 solution().close();
489 _sys.update();
491 }
492
493 // compute time derivatives of nodal aux variables _after_ the values were updated
494 if (_fe_problem.dt() > 0.)
495 for (auto & ti : _time_integrators)
496 ti->computeTimeDerivatives();
497 }
498
499 if (_serialized_solution.get())
501}
void computeScalarVars(ExecFlagType type)
void kokkosCompute(ExecFlagType type)
void computeMortarNodalVars(ExecFlagType type)
void computeElementalVars(ExecFlagType type)
void computeNodalVecVars(ExecFlagType type)
void computeElementalVecVars(ExecFlagType type)
void computeElementalArrayVars(ExecFlagType type)
void computeNodalVars(ExecFlagType type)
virtual void serializeSolution()
libMesh::System & _sys
void computeNodalArrayVars(ExecFlagType type)
virtual Real & dt() const
void computeGradients()
Compute and finalize all registered linear FV gradient fields.
bool hasLinearFVGradients() const
Whether any linear finite-volume gradient fields have been registered to this object.
std::unique_ptr< NumericVector< Number > > _serialized_solution
Serialized version of the solution vector, or nullptr if a serialized solution is not needed.
NumericVector< Number > & solution()
Definition SystemBase.h:215
virtual void update()

◆ computeElementalArrayVars()

void AuxiliarySystem::computeElementalArrayVars ( ExecFlagType  type)
protected

Definition at line 891 of file AuxiliarySystem.C.

892{
894 computeElementalVarsHelper<ArrayAuxKernel>(elemental);
895}
A storage container for MooseObjects that inherit from SetupInterface.

Referenced by compute().

◆ computeElementalVars()

void AuxiliarySystem::computeElementalVars ( ExecFlagType  type)
protected

Definition at line 873 of file AuxiliarySystem.C.

874{
875 TIME_SECTION("computeElementalVars", 3);
876
878 computeElementalVarsHelper<AuxKernel>(elemental);
879}

Referenced by compute().

◆ computeElementalVarsHelper()

template<typename AuxKernelType >
template void AuxiliarySystem::computeElementalVarsHelper< VectorAuxKernel > ( const MooseObjectWarehouse< AuxKernelType > &  warehouse)
protected

Definition at line 939 of file AuxiliarySystem.C.

940{
941 if (warehouse.hasActiveBlockObjects())
942 {
943 // Block Elemental AuxKernels
944 PARALLEL_TRY
945 {
948 try
949 {
950 Threads::parallel_reduce(range, eavt, this->numThreads());
951 }
952 catch (MooseException & e)
953 {
954 _fe_problem.setException("The following MooseException was raised during elemental "
955 "Auxiliary variable computation:\n" +
956 std::string(e.what()));
957 }
958 }
959 PARALLEL_CATCH;
960
961 // We need to make sure we propagate exceptions to all processes before trying to close
962 // here, which is a parallel operation
963 solution().close();
964 _sys.update();
965 }
966
967 // Boundary Elemental AuxKernels
968 if (warehouse.hasActiveBoundaryObjects())
969 {
970 TIME_SECTION("computeElementalVecVars", 3);
971
972 PARALLEL_TRY
973 {
976 try
977 {
978 Threads::parallel_reduce(bnd_elems, eabt, this->numThreads());
979 }
980 catch (MooseException & e)
981 {
982 _fe_problem.setException("The following MooseException was raised during boundary "
983 "elemental Auxiliary variable computation:\n" +
984 std::string(e.what()));
985 }
986 }
987 PARALLEL_CATCH;
988
989 // We need to make sure we propagate exceptions to all processes before trying to close
990 // here, which is a parallel operation
991 solution().close();
992 _sys.update();
993 }
994}
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class,...
Provides a way for users to bail out of the current solve.
virtual const char * what() const
Get out the error message.
const libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems,...
Definition MooseMesh.C:1247
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition MooseMesh.C:1303
bool hasActiveBlockObjects(THREAD_ID tid=0) const
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
void parallel_reduce(const Range &range, Body &body, unsigned int n_threads=libMesh::n_threads())
StoredRange< MeshBase::const_element_iterator, const Elem * > ConstElemRange

◆ computeElementalVecVars()

void AuxiliarySystem::computeElementalVecVars ( ExecFlagType  type)
protected

Definition at line 882 of file AuxiliarySystem.C.

883{
884 TIME_SECTION("computeElementalVecVars", 3);
885
887 computeElementalVarsHelper<VectorAuxKernel>(elemental);
888}

Referenced by compute().

◆ computeGradients()

void LinearFVGradientManager::computeGradients ( )
protectedinherited

Compute and finalize all registered linear FV gradient fields.

Definition at line 120 of file LinearFVGradientManager.C.

121{
123}
void computeGradientsForMethods(const std::vector< const FVGradientMethod * > &gradient_methods)
Compute and finalize the supplied registered gradient methods.
std::vector< const FVGradientMethod * > _linear_fv_gradient_methods
Registered gradient methods in registration order.

Referenced by compute().

◆ computeGradientsExcept()

void LinearFVGradientManager::computeGradientsExcept ( const LinearFVGradientReader &  excluded_reader)
protectedinherited

Compute and finalize every registered linear FV gradient field except one method.

Parameters
excluded_readerReader whose gradient method should not be updated.

Definition at line 126 of file LinearFVGradientManager.C.

127{
128 if (&excluded_reader.system() != &_sys)
129 mooseError("Cannot exclude a linear FV gradient field from a different system than '",
130 _sys.name(),
131 "'.");
132
133 auto gradient_methods = _linear_fv_gradient_methods;
134 gradient_methods.erase(
135 std::remove(gradient_methods.begin(), gradient_methods.end(), &excluded_reader.method()),
136 gradient_methods.end());
137 computeGradientsForMethods(gradient_methods);
138}
const FVGradientMethod & method() const
Method object that produces the stored values.
const SystemBase & system() const
System whose DOF map indexes the stored values.

◆ computeGradientsForMethods()

void LinearFVGradientManager::computeGradientsForMethods ( const std::vector< const FVGradientMethod * > &  gradient_methods)
protectedinherited

Compute and finalize the supplied registered gradient methods.

Parameters
gradient_methodsMethods whose gradient fields should be updated.

Definition at line 141 of file LinearFVGradientManager.C.

143{
144 if (gradient_methods.empty() || !_sys.solutionStatesInitialized())
145 return;
146
147 auto * const perf_graph_interface = dynamic_cast<PerfGraphInterface *>(&_sys);
148 mooseAssert(perf_graph_interface,
149 "LinearFVGradientManager requires its owning system to implement "
150 "PerfGraphInterface.");
151 const auto perf_id = perf_graph_interface->registerTimedSection("LinearVariableFV_Gradients", 3);
152 mooseAssert(!Threads::in_threads, "PerfGraph timing cannot be used within threaded sections");
153 PerfGuard time_guard(perf_graph_interface->perfGraph(), perf_id);
154
155 // Keep current values unchanged until every replacement has been computed so boundary
156 // conditions consistently use gradients from the previous update.
157 // BCs may use cell gradients to compute the boundary face value, which is itself used to
158 // compute cell gradients
159 for (const auto * const method : gradient_methods)
161
162 for (const auto * const method : gradient_methods)
164 libmesh_map_find(_linear_fv_gradient_container_by_method, method));
165}
LinearFVGradientContainer & computeLinearFVGradientContainer(const FVGradientMethod &method)
Compute replacement field values for a registered gradient method.
void finalizeLinearFVGradientContainer(LinearFVGradientContainer &container)
Replace the current gradient storage with the freshly computed new gradients.
std::unordered_map< const FVGradientMethod *, LinearFVGradientContainer > _linear_fv_gradient_container_by_method
Gradient containers keyed by the method object that produces them.
Interface for objects interacting with the PerfGraph.
Scope guard for starting and stopping timing for a node.
Definition PerfGuard.h:26
bool solutionStatesInitialized() const
Whether or not the solution states have been initialized via initSolutionState()
Definition SystemBase.h:929

Referenced by LinearFVGradientManager::computeGradients(), and LinearFVGradientManager::computeGradientsExcept().

◆ computeLinearFVGradientContainer()

LinearFVGradientManager::LinearFVGradientContainer & LinearFVGradientManager::computeLinearFVGradientContainer ( const FVGradientMethod &  method)
protectedinherited

Compute replacement field values for a registered gradient method.

Parameters
methodGradient method used to compute the replacement values.
Returns
Method container whose replacement values were computed.

Definition at line 312 of file LinearFVGradientManager.C.

313{
314 // Gradient requests can be registered before the current solution vector exists, so the current
315 // and replacement fields cannot always be created when the request is recorded. These fields
316 // must be zero clones of the solution vector to inherit its finalized layout and parallel type.
317 // Requests can also arrive after the normal initialization phase. Initializing immediately
318 // before computation handles both cases, while the empty checks make repeated calls harmless.
320
321 auto & container = libmesh_map_find(_linear_fv_gradient_container_by_method, &method);
322
323 mooseAssert(!container.state_values.empty(),
324 "Gradient state storage must contain a current state.");
325 mooseAssert(!container.state_values[0].empty(),
326 "Gradient storage must be initialized before gradient computation.");
327 mooseAssert(!container.next_values.empty(),
328 "Replacement gradient storage must be initialized before gradient computation.");
329 mooseAssert(container.next_values.size() == container.current_values.size(),
330 "Next and current gradient containers must have the same size.");
331
332 method.computeGradient(_sys, container.next_values, container.variable_numbers);
333
334 return container;
335}
void computeGradient(SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const
Compute the final gradient values for the requested variables.
void initializeLinearFVGradientStorage()
Initialize private current and replacement gradient storage.

Referenced by LinearFVGradientManager::computeGradientsForMethods(), LinearFVGradientManager::initializeGradientStatesForTimeAdvance(), and LinearFVGradientManager::updateFVGradient().

◆ computeMortarNodalVars()

void AuxiliarySystem::computeMortarNodalVars ( ExecFlagType  type)
protected

Definition at line 815 of file AuxiliarySystem.C.

816{
817 TIME_SECTION("computeMortarNodalVars", 3);
818
819 const MooseObjectWarehouse<AuxKernel> & mortar_nodal_warehouse = _mortar_nodal_aux_storage[type];
820
821 mooseAssert(!mortar_nodal_warehouse.hasActiveBlockObjects(),
822 "We don't allow creation of block restricted mortar nodal aux kernels.");
823
824 if (mortar_nodal_warehouse.hasActiveBoundaryObjects())
825 {
827 for (const auto & [bnd_id, mortar_nodal_auxes] :
828 mortar_nodal_warehouse.getActiveBoundaryObjects())
829 for (const auto index : index_range(mortar_nodal_auxes))
830 {
831 PARALLEL_TRY
832 {
833 try
834 {
836 _fe_problem, mortar_nodal_warehouse, bnd_id, index);
837 Threads::parallel_reduce(bnd_nodes, mnabt, this->numThreads());
838 }
839 catch (MooseException & e)
840 {
841 _fe_problem.setException("The following MooseException was raised during mortar nodal "
842 "Auxiliary variable computation:\n" +
843 std::string(e.what()));
844 }
845 catch (MetaPhysicL::LogicError & e)
846 {
848 }
849 catch (std::exception & e)
850 {
851 // Continue if we find a libMesh degenerate map exception, but
852 // just re-throw for any real error
853 if (!strstr(e.what(), "Jacobian") && !strstr(e.what(), "singular") &&
854 !strstr(e.what(), "det != 0"))
855 throw;
856
857 _fe_problem.setException("We caught a libMesh degeneracy exception during mortar "
858 "nodal Auxiliary variable computation:\n" +
859 std::string(e.what()));
860 }
861 }
862 PARALLEL_CATCH;
863
864 // We need to make sure we propagate exceptions to all processes before trying to close
865 // here, which is a parallel operation
866 solution().close();
867 _sys.update();
868 }
869 }
870}
This class evaluates a single mortar nodal aux kernel.
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition MooseMesh.C:1290
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
Definition MooseError.C:153

Referenced by compute().

◆ computeNodalArrayVars()

void AuxiliarySystem::computeNodalArrayVars ( ExecFlagType  type)
protected

Definition at line 808 of file AuxiliarySystem.C.

809{
811 computeNodalVarsHelper<ArrayAuxKernel>(nodal);
812}

Referenced by compute().

◆ computeNodalVars()

void AuxiliarySystem::computeNodalVars ( ExecFlagType  type)
protected

Definition at line 790 of file AuxiliarySystem.C.

791{
792 TIME_SECTION("computeNodalVars", 3);
793
795 computeNodalVarsHelper<AuxKernel>(nodal);
796}

Referenced by compute().

◆ computeNodalVarsHelper()

template<typename AuxKernelType >
template void AuxiliarySystem::computeNodalVarsHelper< VectorAuxKernel > ( const MooseObjectWarehouse< AuxKernelType > &  warehouse)
protected

Definition at line 998 of file AuxiliarySystem.C.

999{
1000 if (warehouse.hasActiveBlockObjects())
1001 {
1002 // Block Nodal AuxKernels
1003 PARALLEL_TRY
1004 {
1007 Threads::parallel_reduce(range, navt, this->numThreads());
1008
1009 solution().close();
1010 _sys.update();
1011 }
1012 PARALLEL_CATCH;
1013 }
1014
1015 if (warehouse.hasActiveBoundaryObjects())
1016 {
1017 TIME_SECTION("computeBoundaryObjects", 3);
1018
1019 // Boundary Nodal AuxKernels
1020 PARALLEL_TRY
1021 {
1024 Threads::parallel_reduce(bnd_nodes, nabt, this->numThreads());
1025
1026 solution().close();
1027 _sys.update();
1028 }
1029 PARALLEL_CATCH;
1030 }
1031}
libMesh::ConstNodeRange * getLocalNodeRange()
Definition MooseMesh.C:1276
StoredRange< MeshBase::const_node_iterator, const Node * > ConstNodeRange

◆ computeNodalVecVars()

void AuxiliarySystem::computeNodalVecVars ( ExecFlagType  type)
protected

Definition at line 799 of file AuxiliarySystem.C.

800{
801 TIME_SECTION("computeNodalVecVars", 3);
802
804 computeNodalVarsHelper<VectorAuxKernel>(nodal);
805}

Referenced by compute().

◆ computeScalarVars()

void AuxiliarySystem::computeScalarVars ( ExecFlagType  type)
protected

Definition at line 749 of file AuxiliarySystem.C.

750{
752
753 // Reference to the current storage container
755
756 if (storage.hasActiveObjects())
757 {
758 TIME_SECTION("computeScalarVars", 1);
759
760 PARALLEL_TRY
761 {
762 // FIXME: run multi-threaded
763 THREAD_ID tid = 0;
764 if (storage.hasActiveObjects())
765 {
767
768 const std::vector<std::shared_ptr<AuxScalarKernel>> & objects =
769 storage.getActiveObjects(tid);
770
771 // Call compute() method on all active AuxScalarKernel objects
772 for (const auto & obj : objects)
773 obj->compute();
774
775 const std::vector<MooseVariableScalar *> & scalar_vars = getScalarVariables(tid);
776 for (const auto & var : scalar_vars)
777 var->insert(solution());
778 }
779 }
780 PARALLEL_CATCH;
781
782 solution().close();
783 _sys.update();
784 }
785
787}
void clearScalarVariableCoupleableTags()
virtual void compute(ExecFlagType type) override
Compute auxiliary variables.
void setScalarVariableCoupleableTags(ExecFlagType type)
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
bool hasActiveObjects(THREAD_ID tid=0) const
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread.
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition SystemBase.h:789

Referenced by compute().

◆ computeVariables()

virtual void SystemBase::computeVariables ( const NumericVector< Number > &  )
inlinevirtualinherited

Definition at line 902 of file SystemBase.h.

902{}

◆ computingScalingJacobian()

bool SystemBase::computingScalingJacobian ( ) const
inherited

Whether we are computing an initial Jacobian for automatic variable scaling.

Definition at line 1582 of file SystemBase.C.

1583{
1585}
virtual bool computingScalingJacobian() const =0
Getter for whether we're computing the scaling jacobian.

Referenced by Assembly::addJacobianBlock(), Assembly::addJacobianBlockNonlocal(), Assembly::cacheJacobianBlock(), Assembly::cacheJacobianBlock(), EigenKernel::computeJacobian(), Kernel::computeJacobian(), VectorKernel::computeJacobian(), and FEProblemBase::computeJacobianTags().

◆ copyAdditionalStateBackwards()

void AuxiliarySystem::copyAdditionalStateBackwards ( Moose::SolutionIterationType  ,
bool   
)
overrideprotectedvirtual

Copy system-owned state not represented by solution vectors.

The first argument selects the solution history being advanced. The second indicates that state 0 must not overwrite state 1 while deeper states still shift; additional state must honor this to remain aligned with the solution history. Default implementation does nothing.

Reimplemented from SystemBase.

Definition at line 135 of file AuxiliarySystem.C.

137{
138 if (iteration_type == Moose::SolutionIterationType::Time)
139 LinearFVGradientManager::copyPreviousGradientStates(iteration_type, skip_current_to_old);
140}
void copyPreviousGradientStates(Moose::SolutionIterationType iteration_type, bool skip_current_to_old)
Copy published gradient values into requested older states.

◆ copyCurrentIntoPreviousNL()

void AuxiliarySystem::copyCurrentIntoPreviousNL ( )
virtual

Copies the current solution into the previous nonlinear iteration solution.

Definition at line 931 of file AuxiliarySystem.C.

932{
935}
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
virtual const NumericVector< Number > * solutionPreviousNewton() const

◆ copyOldSolutions()

void SystemBase::copyOldSolutions ( )
inherited

Copy the solution back in time (older -> old, etc).

Shifts the solutions backwards in time.

Definition at line 1323 of file SystemBase.C.

◆ copyPreviousGradientStates()

void LinearFVGradientManager::copyPreviousGradientStates ( Moose::SolutionIterationType  iteration_type,
bool  skip_current_to_old 
)
protectedinherited

Copy published gradient values into requested older states.

Non-time histories are ignored because only time gradient states are currently stored.

Parameters
iteration_typeType of solution history being advanced.
skip_current_to_oldWhether state zero should not overwrite state one while deeper states still shift, matching the owning system's solution-state advancement.

Definition at line 397 of file LinearFVGradientManager.C.

399{
400 mooseAssert(iteration_type != Moose::SolutionIterationType::Nonlinear,
401 "Linear FV gradient storage does not support nonlinear iteration states.");
402 if (iteration_type != Moose::SolutionIterationType::Time)
403 return;
404
405 mooseAssert(!Threads::in_threads, "Linear FV gradient state copying is not thread-safe.");
407
408 for (auto & [_, container] : _linear_fv_gradient_container_by_method)
409 {
410 const auto number_of_states = container.state_values.size();
411 if (number_of_states <= 1)
412 continue;
413
414 mooseAssert(container.has_computed_gradient,
415 "Current gradient state must be initialized before advancing time states.");
416 // Mirror solution-state advancement: some restore workflows preserve state 1 by skipping the
417 // current-to-old copy while still shifting every deeper state.
418 const std::size_t stop = skip_current_to_old ? 1 : 0;
419 for (std::size_t state = number_of_states - 1; state > stop; --state)
420 copyGradient(container.state_values[state - 1], container.state_values[state]);
421 }
422}
void initializeGradientStatesForTimeAdvance()
Compute and publish uninitialized gradients before their first time-state advancement.
void stop(const char *file, int line, const char *date, const char *time)

Referenced by copyAdditionalStateBackwards(), and LinearSystem::copyAdditionalStateBackwards().

◆ copyPreviousSolutions()

void SystemBase::copyPreviousSolutions ( const Moose::SolutionIterationType  iteration_type)
inherited

Copy a specific type of solution back in time (current -> old -> older, etc).

Definition at line 1274 of file SystemBase.C.

1275{
1276 // Normally copy through old (index 1). For Time, optionally stop at older
1277 // and leave old unchanged.
1278 const bool skip_old =
1280
1281 const auto num_states = getNumSolutionStates(iteration_type);
1282 if (num_states > 1)
1283 {
1284 const std::size_t stop = skip_old ? 1 : 0;
1285 for (std::size_t i = num_states - 1; i > stop; --i)
1286 solutionState(i, iteration_type) = solutionState(i - 1, iteration_type);
1287 }
1288
1289 // Custom logic for changing state based on iteration type
1290 switch (iteration_type)
1291 {
1294 if (solutionUDotOld())
1296 if (solutionUDotDotOld())
1298 break;
1302 break;
1306 break;
1307 }
1308}
virtual const NumericVector< Number > *const & currentSolution() const =0
The solution vector that is currently being operated on.
virtual NumericVector< Number > * solutionUDot()
Definition SystemBase.h:292
virtual NumericVector< Number > * solutionUDotOld()
Definition SystemBase.h:294
std::size_t getNumSolutionStates(const Moose::SolutionIterationType iteration_type) const
Get the number of solution states (0 = current, 1 = current + old, ...) for the given iteration type.
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
virtual NumericVector< Number > * solutionUDotDotOld()
Definition SystemBase.h:295
virtual NumericVector< Number > * solutionUDotDot()
Definition SystemBase.h:293

Referenced by SystemBase::advanceStateHistory(), SystemBase::copyOldSolutions(), and SystemBase::copySolutionsBackwards().

◆ copySolutionsBackwards()

void SystemBase::copySolutionsBackwards ( )
virtualinherited

Copy current solution into old and older.

Definition at line 1258 of file SystemBase.C.

◆ copyStateHistoryBackwards()

void SystemBase::copyStateHistoryBackwards ( )
inherited

Copy solution vectors and additional system-owned state into older states.

Definition at line 1266 of file SystemBase.C.

1267{
1268 system().update();
1271}
void advanceStateHistory(Moose::SolutionIterationType iteration_type)
Advance solution vectors and additional system-owned state together.

◆ copyTimeIntegrators()

void SystemBase::copyTimeIntegrators ( const SystemBase &  other_sys)
inherited

Copy time integrators from another system.

Definition at line 1684 of file SystemBase.C.

1685{
1687}

◆ copyVars()

void SystemBase::copyVars ( libMesh::ExodusII_IO &  io)
inherited

Definition at line 1183 of file SystemBase.C.

1184{
1185 int n_steps = io.get_num_time_steps();
1186
1187 bool did_copy = false;
1188 for (const auto & vci : _var_to_copy)
1189 {
1190 int timestep = -1;
1191
1192 if (vci._timestep == "LATEST")
1193 // Use the last time step in the file from which to retrieve the solution
1194 timestep = n_steps;
1195 else
1196 {
1197 timestep = MooseUtils::convert<int>(vci._timestep);
1198 if (timestep > n_steps)
1199 mooseError("Invalid value passed as \"initial_from_file_timestep\". Expected \"LATEST\" or "
1200 "a valid integer between 1 and ",
1201 n_steps,
1202 " inclusive, received ",
1203 vci._timestep);
1204 }
1205
1206 did_copy = true;
1207
1208 if (hasVariable(vci._dest_name))
1209 {
1210 const auto & var = getVariable(0, vci._dest_name);
1211 if (var.isArray())
1212 {
1213 const auto & array_var = getFieldVariable<RealEigenVector>(0, vci._dest_name);
1214 for (MooseIndex(var.count()) i = 0; i < var.count(); ++i)
1215 {
1216 const auto & exodus_var = var.arrayVariableComponent(i);
1217 const auto & system_var = array_var.componentName(i);
1218 if (var.isNodal())
1219 io.copy_nodal_solution(system(), exodus_var, system_var, timestep);
1220 else
1221 io.copy_elemental_solution(system(), exodus_var, system_var, timestep);
1222 }
1223 }
1224 else
1225 {
1226 if (var.isNodal())
1227 io.copy_nodal_solution(system(), vci._dest_name, vci._source_name, timestep);
1228 else
1229 io.copy_elemental_solution(system(), vci._dest_name, vci._source_name, timestep);
1230 }
1231 }
1232 else if (hasScalarVariable(vci._dest_name))
1233 io.copy_scalar_solution(system(), {vci._dest_name}, {vci._source_name}, timestep);
1234 else
1235 mooseError("Unrecognized variable ", vci._dest_name, " in variables to copy.");
1236 }
1237
1238 if (did_copy)
1239 solution().close();
1240}
virtual bool hasScalarVariable(const std::string &var_name) const
Definition SystemBase.C:876
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition SystemBase.C:851
void copy_scalar_solution(System &system, std::vector< std::string > system_var_names, std::vector< std::string > exodus_var_names, unsigned int timestep=1)
void copy_nodal_solution(System &system, std::string system_var_name, std::string exodus_var_name, unsigned int timestep=1)
void copy_elemental_solution(System &system, std::string system_var_name, std::string exodus_var_name, unsigned int timestep=1)

◆ currentSolution()

const NumericVector< Number > *const & AuxiliarySystem::currentSolution ( ) const
inlineoverridevirtual

The solution vector that is currently being operated on.

This is typically a ghosted vector that comes in from the Nonlinear solver.

Implements SystemBase.

Definition at line 92 of file AuxiliarySystem.h.

93 {
94 return _current_solution;
95 }
const NumericVector< Number > * _current_solution
solution vector from nonlinear solver

Referenced by copyCurrentIntoPreviousNL(), FlagElementsThread::onElement(), AB2PredictorCorrector::step(), and DisplacedProblem::syncSolutions().

◆ customSetup()

void AuxiliarySystem::customSetup ( const ExecFlagType &  exec_type)
overridevirtual

Reimplemented from SystemBase.

Definition at line 172 of file AuxiliarySystem.C.

173{
174 SystemBase::customSetup(exec_type);
175
176 for (unsigned int tid = 0; tid < this->numThreads(); tid++)
177 {
178 _aux_scalar_storage.customSetup(exec_type, tid);
179 _nodal_aux_storage.customSetup(exec_type, tid);
180 _mortar_nodal_aux_storage.customSetup(exec_type, tid);
181 _nodal_vec_aux_storage.customSetup(exec_type, tid);
182 _nodal_array_aux_storage.customSetup(exec_type, tid);
183 _elemental_aux_storage.customSetup(exec_type, tid);
184 _elemental_vec_aux_storage.customSetup(exec_type, tid);
185 _elemental_array_aux_storage.customSetup(exec_type, tid);
186 }
187
188#ifdef MOOSE_KOKKOS_ENABLED
189 _kokkos_nodal_aux_storage.customSetup(exec_type, /*tid=*/0);
190 _kokkos_elemental_aux_storage.customSetup(exec_type, /*tid=*/0);
191#endif
192}
ExecuteMooseObjectWarehouse< AuxKernelBase > _kokkos_elemental_aux_storage
ExecuteMooseObjectWarehouse< AuxKernelBase > _kokkos_nodal_aux_storage
virtual void customSetup(const ExecFlagType &exec_type, THREAD_ID tid=0) const
virtual void customSetup(const ExecFlagType &exec_type)

◆ deactivateAllMatrixTags()

void SystemBase::deactivateAllMatrixTags ( )
virtualinherited

Make matrices inactive.

Definition at line 1119 of file SystemBase.C.

1120{
1121 auto num_matrix_tags = _subproblem.numMatrixTags();
1122
1123 _matrix_tag_active_flags.resize(num_matrix_tags);
1124
1125 for (decltype(num_matrix_tags) tag = 0; tag < num_matrix_tags; tag++)
1126 _matrix_tag_active_flags[tag] = false;
1128}

Referenced by NonlinearSystemBase::computeResidualTags(), and NonlinearSystemBase::setInitialSolution().

◆ defaultMatrixTags()

virtual std::set< TagID > SystemBase::defaultMatrixTags ( ) const
inlinevirtualinherited

Get the default matrix tags associted with this system.

Reimplemented in DisplacedSystem, and NonlinearEigenSystem.

Definition at line 350 of file SystemBase.h.

350{ return {systemMatrixTag()}; }
virtual TagID systemMatrixTag() const
Return the Matrix Tag ID for System.
Definition SystemBase.h:328

Referenced by DisplacedSystem::defaultMatrixTags(), NonlinearEigenSystem::defaultMatrixTags(), and SystemBase::disassociateDefaultMatrixTags().

◆ defaultVectorTags()

virtual std::set< TagID > SystemBase::defaultVectorTags ( ) const
inlinevirtualinherited

Get the default vector tags associated with this system.

Reimplemented in DisplacedSystem, and NonlinearEigenSystem.

Definition at line 343 of file SystemBase.h.

344 {
346 }
virtual TagID residualVectorTag() const
Definition SystemBase.h:338
virtual TagID timeVectorTag() const
Ideally, we should not need this API.
Definition SystemBase.h:323
virtual TagID nonTimeVectorTag() const
Definition SystemBase.h:333

Referenced by DisplacedSystem::defaultVectorTags(), NonlinearEigenSystem::defaultVectorTags(), and SystemBase::disassociateDefaultVectorTags().

◆ disassociateDefaultMatrixTags()

void SystemBase::disassociateDefaultMatrixTags ( )
virtualinherited

Disassociate the matrices associated with the default matrix tags of this system.

Reimplemented in DisplacedSystem.

Definition at line 1110 of file SystemBase.C.

1111{
1112 const auto tags = defaultMatrixTags();
1113 for (const auto tag : tags)
1114 if (_subproblem.matrixTagExists(tag))
1116}
virtual std::set< TagID > defaultMatrixTags() const
Get the default matrix tags associted with this system.
Definition SystemBase.h:350
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.

Referenced by DisplacedSystem::disassociateDefaultMatrixTags().

◆ disassociateDefaultVectorTags()

void SystemBase::disassociateDefaultVectorTags ( )
virtualinherited

Disassociate the vectors associated with the default vector tags of this system.

Reimplemented in DisplacedSystem.

Definition at line 1015 of file SystemBase.C.

1016{
1017 const auto tags = defaultVectorTags();
1018 for (const auto tag : tags)
1019 if (_subproblem.vectorTagExists(tag))
1021}
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition SystemBase.C:993
virtual std::set< TagID > defaultVectorTags() const
Get the default vector tags associated with this system.
Definition SystemBase.h:343

Referenced by DisplacedSystem::disassociateDefaultVectorTags().

◆ disassociateMatrixFromTag() [1/2]

void SystemBase::disassociateMatrixFromTag ( libMesh::SparseMatrix< Number > &  matrix,
TagID  tag 
)
virtualinherited

Disassociate a matrix from a tag.

Reimplemented in DisplacedSystem.

Definition at line 1088 of file SystemBase.C.

1089{
1090 if (!_subproblem.matrixTagExists(tag))
1091 mooseError("Cannot disassociate matrix from tag ", tag, " because that tag does not exist");
1092 if (hasMatrix(tag) && &getMatrix(tag) != &matrix)
1093 mooseError("You can not disassociate a matrix from a tag which it was not associated to");
1094
1096}

Referenced by NonlinearSystemBase::computeJacobian(), FEProblemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTag(), FEProblemBase::computeLinearSystemSys(), FEProblemBase::computeResidualAndJacobian(), SystemBase::disassociateDefaultMatrixTags(), SystemBase::disassociateMatrixFromTag(), DisplacedSystem::disassociateMatrixFromTag(), and DisplacedSystem::disassociateMatrixFromTag().

◆ disassociateMatrixFromTag() [2/2]

void SystemBase::disassociateMatrixFromTag ( TagID  tag)
virtualinherited

Disassociate any matrix that is associated with a given tag.

Reimplemented in DisplacedSystem.

Definition at line 1099 of file SystemBase.C.

1100{
1101 if (!_subproblem.matrixTagExists(tag))
1102 mooseError("Cannot disassociate matrix from tag ", tag, " because that tag does not exist");
1103
1104 if (_tagged_matrices.size() < tag + 1)
1105 _tagged_matrices.resize(tag + 1);
1106 _tagged_matrices[tag] = nullptr;
1107}

◆ disassociateVectorFromTag() [1/2]

void SystemBase::disassociateVectorFromTag ( NumericVector< Number > &  vec,
TagID  tag 
)
virtualinherited

◆ disassociateVectorFromTag() [2/2]

void SystemBase::disassociateVectorFromTag ( TagID  tag)
virtualinherited

Disassociate any vector that is associated with a given tag.

Reimplemented in DisplacedSystem.

Definition at line 1004 of file SystemBase.C.

1005{
1006 if (!_subproblem.vectorTagExists(tag))
1007 mooseError("Cannot disassociate vector from tag ", tag, " because that tag does not exist");
1008
1009 if (_tagged_vectors.size() < tag + 1)
1010 _tagged_vectors.resize(tag + 1);
1011 _tagged_vectors[tag] = nullptr;
1012}

◆ dofMap() [1/2]

DofMap & SystemBase::dofMap ( )
virtualinherited

◆ dofMap() [2/2]

const DofMap & SystemBase::dofMap ( ) const
virtualinherited

Gets const reference to the dof map.

Definition at line 1169 of file SystemBase.C.

1170{
1171 return system().get_dof_map();
1172}

◆ duDotDotDu() [1/2]

virtual Number & SystemBase::duDotDotDu ( )
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 288 of file SystemBase.h.

288{ return _du_dotdot_du; }
Real _du_dotdot_du

Referenced by DisplacedSystem::duDotDotDu(), DisplacedSystem::duDotDotDu(), and MooseVariableScalar::reinit().

◆ duDotDotDu() [2/2]

virtual const Number & SystemBase::duDotDotDu ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 290 of file SystemBase.h.

290{ return _du_dotdot_du; }

◆ duDotDu()

const Number & SystemBase::duDotDu ( unsigned int  var_num = 0) const
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 1718 of file SystemBase.C.

1719{
1720 return _du_dot_du[var_num];
1721}
std::vector< Real > _du_dot_du
Derivative of time derivative of u with respect to uj.

Referenced by DisplacedSystem::duDotDu(), MooseVariableScalar::reinit(), Moose::Kokkos::VariableGradientTempl< is_ad >::VariableGradientTempl(), and Moose::Kokkos::VariableValueTempl< is_ad >::VariableValueTempl().

◆ duDotDus()

virtual std::vector< Number > & SystemBase::duDotDus ( )
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 287 of file SystemBase.h.

287{ return _du_dot_du; }

Referenced by DisplacedSystem::duDotDus().

◆ elemArrayAuxWarehouse()

const ExecuteMooseObjectWarehouse< ArrayAuxKernel > & AuxiliarySystem::elemArrayAuxWarehouse ( ) const
inline

Definition at line 295 of file AuxiliarySystem.h.

296{
298}

◆ elemAuxWarehouse()

const ExecuteMooseObjectWarehouse< AuxKernel > & AuxiliarySystem::elemAuxWarehouse ( ) const
inline

Definition at line 283 of file AuxiliarySystem.h.

284{
286}

◆ elemVectorAuxWarehouse()

const ExecuteMooseObjectWarehouse< VectorAuxKernel > & AuxiliarySystem::elemVectorAuxWarehouse ( ) const
inline

Definition at line 289 of file AuxiliarySystem.h.

290{
292}

◆ feProblem() [1/2]

FEProblemBase & SystemBase::feProblem ( )
inlineinherited

◆ feProblem() [2/2]

const FEProblemBase & SystemBase::feProblem ( ) const
inlineinherited

Definition at line 105 of file SystemBase.h.

105{ return _fe_problem; }

◆ finalizeLinearFVGradientContainer()

void LinearFVGradientManager::finalizeLinearFVGradientContainer ( LinearFVGradientContainer &  container)
protectedinherited

Replace the current gradient storage with the freshly computed new gradients.

Parameters
containerMethod container whose gradient values should be finalized.

Definition at line 338 of file LinearFVGradientManager.C.

339{
340 mooseAssert(!container.state_values.empty(),
341 "Gradient state storage must contain a current state.");
342 mooseAssert(container.next_values.size() == container.current_values.size(),
343 "Next and current gradient containers must have the same size.");
344 container.current_values.swap(container.next_values);
345 setCurrentGradientState(container);
346
347 if (!container.has_initialized_history)
348 {
349 for (const auto state : make_range(std::size_t(1), container.state_values.size()))
350 copyGradient(container.state_values[0], container.state_values[state]);
351 container.has_initialized_history = true;
352 }
353
354 container.has_computed_gradient = true;
355}
void setCurrentGradientState(LinearFVGradientContainer &container) const
Set solution state zero to the current gradient.

Referenced by LinearFVGradientManager::computeGradientsForMethods(), LinearFVGradientManager::initializeGradientStatesForTimeAdvance(), and LinearFVGradientManager::updateFVGradient().

◆ flushTaggedMatrices()

void SystemBase::flushTaggedMatrices ( const std::set< TagID > &  tags)
inherited

flushes all matrices associated to tags.

Flush assembles the matrix but doesn't shrink memory allocation

Definition at line 1068 of file SystemBase.C.

1069{
1070 for (auto tag : tags)
1071 if (hasMatrix(tag))
1072 getMatrix(tag).flush();
1073}

◆ getActualFieldVariable() [1/2]

template<typename T >
template MooseVariableField< RealEigenVector > & SystemBase::getActualFieldVariable< RealEigenVector > ( THREAD_ID  tid,
const std::string &  var_name 
)
inherited

Returns a field variable pointer - this includes finite volume variables.

Definition at line 120 of file SystemBase.C.

121{
122 return *_vars[tid].getActualFieldVariable<T>(var_name);
123}

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

◆ getActualFieldVariable() [2/2]

template<typename T >
template MooseVariableField< RealEigenVector > & SystemBase::getActualFieldVariable< RealEigenVector > ( THREAD_ID  tid,
unsigned int  var_number 
)
inherited

Returns a field variable pointer - this includes finite volume variables.

Definition at line 141 of file SystemBase.C.

142{
143 return *_vars[tid].getActualFieldVariable<T>(var_number);
144}

◆ getDependObjects() [1/2]

std::set< std::string > AuxiliarySystem::getDependObjects ( )

Definition at line 613 of file AuxiliarySystem.C.

614{
615 std::set<std::string> depend_objects;
616
617 // Elemental AuxKernels
618 {
619 const std::vector<std::shared_ptr<AuxKernel>> & auxs =
620 _elemental_aux_storage.getActiveObjects();
621 for (const auto & aux : auxs)
622 {
623 const std::set<UserObjectName> & uo = aux->getDependObjects();
624 depend_objects.insert(uo.begin(), uo.end());
625 }
626 }
627
628 // Elemental VectorAuxKernels
629 {
630 const std::vector<std::shared_ptr<VectorAuxKernel>> & auxs =
631 _elemental_vec_aux_storage.getActiveObjects();
632 for (const auto & aux : auxs)
633 {
634 const std::set<UserObjectName> & uo = aux->getDependObjects();
635 depend_objects.insert(uo.begin(), uo.end());
636 }
637 }
638
639 // Elemental ArrayAuxKernels
640 {
641 const std::vector<std::shared_ptr<ArrayAuxKernel>> & auxs =
642 _elemental_array_aux_storage.getActiveObjects();
643 for (const auto & aux : auxs)
644 {
645 const std::set<UserObjectName> & uo = aux->getDependObjects();
646 depend_objects.insert(uo.begin(), uo.end());
647 }
648 }
649
650 // Nodal AuxKernels
651 {
652 const std::vector<std::shared_ptr<AuxKernel>> & auxs = _nodal_aux_storage.getActiveObjects();
653 for (const auto & aux : auxs)
654 {
655 const std::set<UserObjectName> & uo = aux->getDependObjects();
656 depend_objects.insert(uo.begin(), uo.end());
657 }
658 }
659
660 // Mortar Nodal AuxKernels
661 {
662 const std::vector<std::shared_ptr<AuxKernel>> & auxs =
663 _mortar_nodal_aux_storage.getActiveObjects();
664 for (const auto & aux : auxs)
665 {
666 const std::set<UserObjectName> & uo = aux->getDependObjects();
667 depend_objects.insert(uo.begin(), uo.end());
668 }
669 }
670
671 // Nodal VectorAuxKernels
672 {
673 const std::vector<std::shared_ptr<VectorAuxKernel>> & auxs =
674 _nodal_vec_aux_storage.getActiveObjects();
675 for (const auto & aux : auxs)
676 {
677 const std::set<UserObjectName> & uo = aux->getDependObjects();
678 depend_objects.insert(uo.begin(), uo.end());
679 }
680 }
681
682 // Nodal ArrayAuxKernels
683 {
684 const std::vector<std::shared_ptr<ArrayAuxKernel>> & auxs =
685 _nodal_array_aux_storage.getActiveObjects();
686 for (const auto & aux : auxs)
687 {
688 const std::set<UserObjectName> & uo = aux->getDependObjects();
689 depend_objects.insert(uo.begin(), uo.end());
690 }
691 }
692
693#ifdef MOOSE_KOKKOS_ENABLED
694 // Nodal KokkosAuxKernels
695 {
696 const std::vector<std::shared_ptr<AuxKernelBase>> & auxs =
698 for (const auto & aux : auxs)
699 {
700 const std::set<UserObjectName> & uo = aux->getDependObjects();
701 depend_objects.insert(uo.begin(), uo.end());
702 }
703 }
704
705 // Elemental KokkosAuxKernels
706 {
707 const std::vector<std::shared_ptr<AuxKernelBase>> & auxs =
709 for (const auto & aux : auxs)
710 {
711 const std::set<UserObjectName> & uo = aux->getDependObjects();
712 depend_objects.insert(uo.begin(), uo.end());
713 }
714 }
715#endif
716
717 return depend_objects;
718}

◆ getDependObjects() [2/2]

std::set< std::string > AuxiliarySystem::getDependObjects ( ExecFlagType  type)

Get a list of dependent UserObjects for this exec type.

Parameters
typeExecution flag type
Returns
a set of dependent user objects

Definition at line 504 of file AuxiliarySystem.C.

505{
506 std::set<std::string> depend_objects;
507
508 // Elemental AuxKernels
509 {
510 const std::vector<std::shared_ptr<AuxKernel>> & auxs =
511 _elemental_aux_storage[type].getActiveObjects();
512 for (const auto & aux : auxs)
513 {
514 const std::set<UserObjectName> & uo = aux->getDependObjects();
515 depend_objects.insert(uo.begin(), uo.end());
516 }
517 }
518
519 // Elemental VectorAuxKernels
520 {
521 const std::vector<std::shared_ptr<VectorAuxKernel>> & auxs =
522 _elemental_vec_aux_storage[type].getActiveObjects();
523 for (const auto & aux : auxs)
524 {
525 const std::set<UserObjectName> & uo = aux->getDependObjects();
526 depend_objects.insert(uo.begin(), uo.end());
527 }
528 }
529
530 // Elemental ArrayAuxKernels
531 {
532 const std::vector<std::shared_ptr<ArrayAuxKernel>> & auxs =
533 _elemental_array_aux_storage[type].getActiveObjects();
534 for (const auto & aux : auxs)
535 {
536 const std::set<UserObjectName> & uo = aux->getDependObjects();
537 depend_objects.insert(uo.begin(), uo.end());
538 }
539 }
540
541 // Nodal AuxKernels
542 {
543 const std::vector<std::shared_ptr<AuxKernel>> & auxs =
544 _nodal_aux_storage[type].getActiveObjects();
545 for (const auto & aux : auxs)
546 {
547 const std::set<UserObjectName> & uo = aux->getDependObjects();
548 depend_objects.insert(uo.begin(), uo.end());
549 }
550 }
551
552 // Mortar Nodal AuxKernels
553 {
554 const std::vector<std::shared_ptr<AuxKernel>> & auxs =
555 _mortar_nodal_aux_storage[type].getActiveObjects();
556 for (const auto & aux : auxs)
557 {
558 const std::set<UserObjectName> & uo = aux->getDependObjects();
559 depend_objects.insert(uo.begin(), uo.end());
560 }
561 }
562
563 // Nodal VectorAuxKernels
564 {
565 const std::vector<std::shared_ptr<VectorAuxKernel>> & auxs =
566 _nodal_vec_aux_storage[type].getActiveObjects();
567 for (const auto & aux : auxs)
568 {
569 const std::set<UserObjectName> & uo = aux->getDependObjects();
570 depend_objects.insert(uo.begin(), uo.end());
571 }
572 }
573
574 // Nodal ArrayAuxKernels
575 {
576 const std::vector<std::shared_ptr<ArrayAuxKernel>> & auxs =
577 _nodal_array_aux_storage[type].getActiveObjects();
578 for (const auto & aux : auxs)
579 {
580 const std::set<UserObjectName> & uo = aux->getDependObjects();
581 depend_objects.insert(uo.begin(), uo.end());
582 }
583 }
584
585#ifdef MOOSE_KOKKOS_ENABLED
586 // Kokkos NodalAuxKernels
587 {
588 const std::vector<std::shared_ptr<AuxKernelBase>> & auxs =
590 for (const auto & aux : auxs)
591 {
592 const std::set<UserObjectName> & uo = aux->getDependObjects();
593 depend_objects.insert(uo.begin(), uo.end());
594 }
595 }
596
597 // Kokkos ElementalAuxKernels
598 {
599 const std::vector<std::shared_ptr<AuxKernelBase>> & auxs =
601 for (const auto & aux : auxs)
602 {
603 const std::set<UserObjectName> & uo = aux->getDependObjects();
604 depend_objects.insert(uo.begin(), uo.end());
605 }
606 }
607#endif
608
609 return depend_objects;
610}

Referenced by groupUserObjects().

◆ getFieldVariable() [1/2]

template<typename T >
template MooseVariableFE< RealEigenVector > & SystemBase::getFieldVariable< RealEigenVector > ( THREAD_ID  tid,
const std::string &  var_name 
)
inherited

Gets a reference to a variable of with specified name.

This excludes and cannot return finite volume variables.

Parameters
tidThread id
var_namevariable name
Returns
reference the variable (class)

Definition at line 113 of file SystemBase.C.

114{
115 return *_vars[tid].getFieldVariable<T>(var_name);
116}

Referenced by Marker::getMarkerValue().

◆ getFieldVariable() [2/2]

template<typename T >
template MooseVariableFE< RealEigenVector > & SystemBase::getFieldVariable< RealEigenVector > ( THREAD_ID  tid,
unsigned int  var_number 
)
inherited

Gets a reference to a variable with specified number.

This excludes and cannot return finite volume variables.

Parameters
tidThread id
var_numberlibMesh variable number
Returns
reference the variable (class)

Definition at line 134 of file SystemBase.C.

135{
136 return *_vars[tid].getFieldVariable<T>(var_number);
137}

◆ getFVVariable()

template<typename T >
template MooseVariableFV< Real > & SystemBase::getFVVariable< Real > ( THREAD_ID  tid,
const std::string &  var_name 
)
inherited

Return a finite volume variable.

Definition at line 127 of file SystemBase.C.

128{
129 return *_vars[tid].getFVVariable<T>(var_name);
130}

◆ getMatrix() [1/2]

SparseMatrix< Number > & SystemBase::getMatrix ( TagID  tag)
virtualinherited

Get a raw SparseMatrix.

Reimplemented in DisplacedSystem.

Definition at line 1024 of file SystemBase.C.

1025{
1026 if (!hasMatrix(tag))
1027 {
1028 if (!_subproblem.matrixTagExists(tag))
1029 mooseError("Cannot retrieve matrix with tag ", tag, " because that tag does not exist");
1030 else
1031 mooseError("Cannot retrieve matrix with tag ",
1032 tag,
1033 " in system '",
1034 name(),
1035 "'\nbecause a matrix has not been associated with that tag.");
1036 }
1037
1038 return *_tagged_matrices[tag];
1039}

Referenced by SystemBase::activateAllMatrixTags(), Assembly::addCachedJacobian(), NonlinearSystemBase::addImplicitGeometricCouplingEntries(), Assembly::addJacobianCoupledVarPair(), Assembly::addJacobianLowerD(), Assembly::addJacobianNeighbor(), Assembly::addJacobianNeighborLowerD(), Assembly::addJacobianNonlocal(), SystemBase::addMatrix(), SystemBase::closeTaggedMatrices(), NonlinearSystemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeLinearSystemTags(), FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::constraintJacobians(), SystemBase::disassociateMatrixFromTag(), SystemBase::flushTaggedMatrices(), DisplacedSystem::getMatrix(), DisplacedSystem::getMatrix(), LinearSystemContributionObject::linkTaggedVectorsAndMatrices(), NonlinearSystemBase::postJacobian(), MooseVariableScalar::reinit(), Assembly::setCachedJacobian(), LinearSystem::setMatrixOptions(), NonlinearSystemBase::setMatrixOptions(), and Assembly::zeroCachedJacobian().

◆ getMatrix() [2/2]

const SparseMatrix< Number > & SystemBase::getMatrix ( TagID  tag) const
virtualinherited

Get a raw SparseMatrix.

Reimplemented in DisplacedSystem.

Definition at line 1042 of file SystemBase.C.

1043{
1044 if (!hasMatrix(tag))
1045 {
1046 if (!_subproblem.matrixTagExists(tag))
1047 mooseError("Cannot retrieve matrix with tag ", tag, " because that tag does not exist");
1048 else
1049 mooseError("Cannot retrieve matrix with tag ",
1050 tag,
1051 " in system '",
1052 name(),
1053 "'\nbecause a matrix has not been associated with that tag.");
1054 }
1055
1056 return *_tagged_matrices[tag];
1057}

◆ getMaxVariableNumber()

unsigned int SystemBase::getMaxVariableNumber ( ) const
inlineinherited

Returns the maximum number of all variables on the system.

Definition at line 900 of file SystemBase.h.

900{ return _max_var_number; }
unsigned int _max_var_number
Maximum variable number.

◆ getMaxVarNDofsPerElem()

std::size_t SystemBase::getMaxVarNDofsPerElem ( ) const
inlineinherited

Gets the maximum number of dofs used by any one variable on any one element.

Returns
The max

Definition at line 616 of file SystemBase.h.

616{ return _max_var_n_dofs_per_elem; }

Referenced by Moose::globalDofIndexToDerivative().

◆ getMaxVarNDofsPerNode()

std::size_t SystemBase::getMaxVarNDofsPerNode ( ) const
inlineinherited

Gets the maximum number of dofs used by any one variable on any one node.

Returns
The max

Definition at line 623 of file SystemBase.h.

623{ return _max_var_n_dofs_per_node; }

◆ getMinQuadratureOrder()

Order AuxiliarySystem::getMinQuadratureOrder ( )
overridevirtual

Get the minimum quadrature order for evaluating elemental auxiliary variables.

Reimplemented from SystemBase.

Definition at line 906 of file AuxiliarySystem.C.

907{
908 Order order = CONSTANT;
909 std::vector<MooseVariableFEBase *> vars = _vars[0].fieldVariables();
910 for (const auto & var : vars)
911 {
912 if (!var->isNodal()) // nodal aux variables do not need quadrature
913 {
914 FEType fe_type = var->feType();
915 if (fe_type.default_quadrature_order() > order)
916 order = fe_type.default_quadrature_order();
917 }
918 }
919
920 return order;
921}
char ** vars

◆ getNumSolutionStates()

std::size_t SystemBase::getNumSolutionStates ( const Moose::SolutionIterationType  iteration_type) const
inlineinherited

Get the number of solution states (0 = current, 1 = current + old, ...) for the given iteration type.

Definition at line 1161 of file SystemBase.h.

1162{
1163 return getSolutionStates(iteration_type).size();
1164}
const std::vector< NumericVector< Number > * > & getSolutionStates(const Moose::SolutionIterationType iteration_type) const
Get all of the solution states (current, old, ...) for the given iteration type.

Referenced by SystemBase::copyPreviousSolutions(), SystemBase::hasSolutionState(), SystemBase::restoreOldSolutions(), SystemBase::saveOldSolutions(), and SystemBase::solutionState().

◆ getScalarVariable() [1/2]

MooseVariableScalar & SystemBase::getScalarVariable ( THREAD_ID  tid,
const std::string &  var_name 
) const
virtualinherited

◆ getScalarVariable() [2/2]

MooseVariableScalar & SystemBase::getScalarVariable ( THREAD_ID  tid,
unsigned int  var_number 
) const
virtualinherited

Gets a reference to a variable with specified number.

Parameters
tidThread id
var_numberlibMesh variable number
Returns
reference the variable (class)

Definition at line 156 of file SystemBase.C.

157{
158 MooseVariableScalar * var =
159 dynamic_cast<MooseVariableScalar *>(_vars[tid].getVariable(var_number));
160 if (!var)
161 mooseError("variable #" + Moose::stringify(var_number) + " does not exist in this system");
162 return *var;
163}
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:65

◆ getScalarVariables()

const std::vector< MooseVariableScalar * > & SystemBase::getScalarVariables ( THREAD_ID  tid)
inlineinherited

◆ getSolutionStates() [1/2]

std::vector< NumericVector< Number > * > & SystemBase::getSolutionStates ( const Moose::SolutionIterationType  iteration_type)
inlineprivateinherited

Get all of the solution states (current, old, ...) for the given iteration type.

Definition at line 1126 of file SystemBase.h.

1127 {
1128 return const_cast<std::vector<NumericVector<Number> *> &>(
1129 cast_ptr<const SystemBase *>(this)->getSolutionStates(iteration_type));
1130 }

◆ getSolutionStates() [2/2]

const std::vector< NumericVector< Number > * > & SystemBase::getSolutionStates ( const Moose::SolutionIterationType  iteration_type) const
inlineinherited

Get all of the solution states (current, old, ...) for the given iteration type.

Definition at line 1151 of file SystemBase.h.

1152{
1153 const auto iteration_type_index = static_cast<std::size_t>(iteration_type);
1154 mooseAssert(iteration_type_index < static_cast<std::size_t>(Moose::SolutionIterationType::Count),
1155 "Invalid solution iteration type");
1156 mooseAssert(iteration_type_index < _solution_states.size(), "_solution_states sized incorrectly");
1157 return _solution_states[iteration_type_index];
1158}
std::array< std::vector< NumericVector< Number > * >, static_cast< size_t >(Moose::SolutionIterationType::Count)> _solution_states
2D array of solution state vector pointers.

Referenced by SystemBase::getNumSolutionStates(), SystemBase::needSolutionState(), SystemBase::solutionState(), SystemBase::solutionState(), and SystemBase::solutionStateParallelType().

◆ getStandardFieldVariableNames()

void SystemBase::getStandardFieldVariableNames ( std::vector< VariableName > &  std_field_variables) const
inherited

◆ getSubdomainsForVar() [1/2]

const std::set< SubdomainID > & SystemBase::getSubdomainsForVar ( const std::string &  var_name) const
inherited

Get the block where a variable of this system is defined.

Parameters
var_nameThe name of the variable
Returns
the set of subdomain ids where the variable is active (defined)

Definition at line 1724 of file SystemBase.C.

1725{
1726 return getSubdomainsForVar(getVariable(0, var_name).number());
1727}
const std::set< SubdomainID > & getSubdomainsForVar(unsigned int var_number) const
Definition SystemBase.h:794
unsigned int number() const
Gets the number of this system.

◆ getSubdomainsForVar() [2/2]

const std::set< SubdomainID > & SystemBase::getSubdomainsForVar ( unsigned int  var_number) const
inlineinherited

Definition at line 794 of file SystemBase.h.

795 {
796 return _var_map.at(var_number);
797 }
std::map< unsigned int, std::set< SubdomainID > > _var_map
Map of variables (variable id -> array of subdomains where it lives)

Referenced by NonlinearSystemBase::checkKernelCoverage(), and SystemBase::getSubdomainsForVar().

◆ getTimeIntegrator()

const TimeIntegrator & SystemBase::getTimeIntegrator ( const unsigned int  var_num) const
inherited

Retrieve the time integrator that integrates the given variable's equation.

Definition at line 1700 of file SystemBase.C.

1701{
1702 const auto * const ti = queryTimeIntegrator(var_num);
1703
1704 if (ti)
1705 return *ti;
1706 else
1707 mooseError("No time integrator found that integrates variable number ",
1708 std::to_string(var_num));
1709}
const TimeIntegrator * queryTimeIntegrator(const unsigned int var_num) const
Retrieve the time integrator that integrates the given variable's equation.

Referenced by AB2PredictorCorrector::estimateTimeError().

◆ getTimeIntegrators()

const std::vector< std::shared_ptr< TimeIntegrator > > & SystemBase::getTimeIntegrators ( )
inherited
Returns
All the time integrators owned by this system

Definition at line 1712 of file SystemBase.C.

1713{
1714 return _time_integrators;
1715}

◆ getVariable() [1/2]

MooseVariableFieldBase & SystemBase::getVariable ( THREAD_ID  tid,
const std::string &  var_name 
) const
inherited

Gets a reference to a variable of with specified name.

Parameters
tidThread id
var_namevariable name
Returns
reference the variable (class)

Definition at line 92 of file SystemBase.C.

93{
95 dynamic_cast<MooseVariableFieldBase *>(_vars[tid].getVariable(var_name));
96 if (!var)
97 mooseError("Variable '", var_name, "' does not exist in this system");
98 return *var;
99}
This class provides an interface for common operations on field variables of both FE and FV types wit...

Referenced by AdaptivityAction::act(), Assembly::addJacobianBlockNonlocal(), FEProblemBase::addJacobianBlockTags(), LinearFVGradientManager::checkRestartedGradientHistory(), NonlocalIntegratedBC::computeNonlocalOffDiagJacobian(), NonlocalKernel::computeNonlocalOffDiagJacobian(), Assembly::copyFaceShapes(), Assembly::copyNeighborShapes(), Assembly::copyShapes(), SystemBase::copyVars(), DMMooseSetVariables(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), NodeElemConstraint::getConnectedDofIndices(), NodeFaceConstraint::getConnectedDofIndices(), SystemBase::getSubdomainsForVar(), ResidualObject::getVariable(), SubProblem::getVariableHelper(), NodalNormalsPreprocessor::initialize(), LinearSystem::initialSetup(), ExplicitTimeIntegrator::initialSetup(), Assembly::initNonlocalCoupling(), PNGOutput::makeMeshFunc(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), UpdateErrorVectorsThread::onElement(), FEProblemBase::prepare(), Assembly::prepareBlock(), Assembly::prepareBlockNonlocal(), NonlinearSystemBase::setupScalingData(), LinearFVGradientReader::stateComponents(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

◆ getVariable() [2/2]

MooseVariableFieldBase & SystemBase::getVariable ( THREAD_ID  tid,
unsigned int  var_number 
) const
inherited

Gets a reference to a variable with specified number.

Parameters
tidThread id
var_numberlibMesh variable number
Returns
reference the variable (class)

Definition at line 102 of file SystemBase.C.

103{
104 if (var_number < _numbered_vars[tid].size())
105 if (_numbered_vars[tid][var_number])
106 return *_numbered_vars[tid][var_number];
107
108 mooseError("Variable #", Moose::stringify(var_number), " does not exist in this system");
109}
std::vector< std::vector< MooseVariableFieldBase * > > _numbered_vars
Map variable number to its pointer.

◆ getVariableBlocks()

const std::set< SubdomainID > * SystemBase::getVariableBlocks ( unsigned int  var_number)
virtualinherited

Get the block where a variable of this system is defined.

Parameters
var_numberThe number of the variable
Returns
the set of subdomain ids where the variable is active (defined)

Definition at line 166 of file SystemBase.C.

167{
168 mooseAssert(_var_map.find(var_number) != _var_map.end(), "Variable does not exist.");
169 if (_var_map[var_number].empty())
170 return nullptr;
171 else
172 return &_var_map[var_number];
173}

Referenced by PhysicsBasedPreconditioner::addSystem().

◆ getVariableGlobalDoFs()

const std::vector< dof_id_type > & SystemBase::getVariableGlobalDoFs ( )
inlineinherited

Get the global dof indices of a variable, this needs to be called after the indices have been set by setVariableGlobalDoFs

Definition at line 875 of file SystemBase.h.

875{ return _var_all_dof_indices; }
std::vector< dof_id_type > _var_all_dof_indices
Container for the dof indices of a given variable.

◆ getVariableNames()

const std::vector< VariableName > & SystemBase::getVariableNames ( ) const
inlineinherited

◆ getVariables()

const std::vector< MooseVariableFieldBase * > & SystemBase::getVariables ( THREAD_ID  tid)
inlineinherited

◆ getVector() [1/4]

NumericVector< Number > & SystemBase::getVector ( const std::string &  name)
virtualinherited

Get a raw NumericVector by name.

Get a raw NumericVector with the given name.

Reimplemented in DisplacedSystem.

Definition at line 933 of file SystemBase.C.

934{
935 return system().get_vector(name);
936}
const NumericVector< Number > & get_vector(std::string_view vec_name) const

Referenced by Assembly::addCachedResiduals(), Assembly::addResidual(), Assembly::addResidualLower(), Assembly::addResidualNeighbor(), Assembly::addResidualScalar(), SystemBase::addVector(), SystemBase::addVector(), SystemBase::closeTaggedVector(), FEProblemBase::computeBounds(), FEProblemBase::computeNearNullSpace(), FEProblemBase::computeNullSpace(), NonlinearSystemBase::computeResidualAndJacobianTags(), NonlinearSystemBase::computeResidualTags(), CentralDifference::computeTimeDerivatives(), FEProblemBase::computeTransposeNullSpace(), SystemBase::disassociateVectorFromTag(), DisplacedSystem::getVector(), DisplacedSystem::getVector(), DisplacedSystem::getVector(), DisplacedSystem::getVector(), LinearSystemContributionObject::linkTaggedVectorsAndMatrices(), SystemBase::needSolutionState(), ReferenceResidualConvergence::ReferenceResidualConvergence(), MooseVariableScalar::reinit(), PicardSolve::saveVariableValues(), SecantSolve::saveVariableValues(), SteffensenSolve::saveVariableValues(), NonlinearSystemBase::setPreviousNewtonSolution(), TaggingInterface::setResidual(), TaggingInterface::setResidual(), TaggingInterface::setResidual(), SystemBase::solutionPreviousNewton(), SystemBase::solutionPreviousNewton(), SystemBase::solutionState(), MultiAppDofCopyTransfer::transfer(), PicardSolve::transformVariables(), SecantSolve::transformVariables(), SteffensenSolve::transformVariables(), and SystemBase::zeroTaggedVector().

◆ getVector() [2/4]

const NumericVector< Number > & SystemBase::getVector ( const std::string &  name) const
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 939 of file SystemBase.C.

940{
941 return system().get_vector(name);
942}

◆ getVector() [3/4]

NumericVector< Number > & SystemBase::getVector ( TagID  tag)
virtualinherited

Get a raw NumericVector by tag.

Reimplemented in DisplacedSystem.

Definition at line 945 of file SystemBase.C.

946{
947 if (!hasVector(tag))
948 {
950 mooseError("Cannot retrieve vector with tag ", tag, " because that tag does not exist");
951 else
952 mooseError("Cannot retrieve vector with tag ",
953 tag,
954 " in system '",
955 name(),
956 "'\nbecause a vector has not been associated with that tag.");
957 }
958
959 return *_tagged_vectors[tag];
960}

◆ getVector() [4/4]

const NumericVector< Number > & SystemBase::getVector ( TagID  tag) const
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 963 of file SystemBase.C.

964{
965 if (!hasVector(tag))
966 {
968 mooseError("Cannot retrieve vector with tag ", tag, " because that tag does not exist");
969 else
970 mooseError("Cannot retrieve vector with tag ",
971 tag,
972 " in system '",
973 name(),
974 "'\nbecause a vector has not been associated with that tag.");
975 }
976
977 return *_tagged_vectors[tag];
978}

◆ gradientStateVectorName()

std::string LinearFVGradientManager::gradientStateVectorName ( const FVGradientMethod &  method,
unsigned int  state,
unsigned int  component 
)
staticprotectedinherited

Return the stable system-vector name for one old gradient component.

Definition at line 261 of file LinearFVGradientManager.C.

264{
265 return "linear_fv_gradient_" + method.name() + "_state_" + std::to_string(state) + "_component_" +
266 std::to_string(component);
267}

Referenced by LinearFVGradientManager::checkRestartedGradientHistory(), and LinearFVGradientManager::initializeLinearFVGradientHistoryStorage().

◆ hasLinearFVGradients()

bool LinearFVGradientManager::hasLinearFVGradients ( ) const
protectedinherited

Whether any linear finite-volume gradient fields have been registered to this object.

Definition at line 198 of file LinearFVGradientManager.C.

199{
201}

Referenced by compute().

◆ hasMatrix()

virtual bool SystemBase::hasMatrix ( TagID  tag) const
inlinevirtualinherited

◆ hasScalarVariable()

bool SystemBase::hasScalarVariable ( const std::string &  var_name) const
virtualinherited

◆ hasSolutionState()

bool SystemBase::hasSolutionState ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type = Moose::SolutionIterationType::Time 
) const
inlinevirtualinherited

◆ hasVarCopy()

bool SystemBase::hasVarCopy ( ) const
inlineinherited

Whether or not there are variables to be restarted from an Exodus mesh file.

Definition at line 921 of file SystemBase.h.

921{ return _var_to_copy.size() > 0; }

◆ hasVariable()

bool SystemBase::hasVariable ( const std::string &  var_name) const
virtualinherited

◆ hasVector() [1/2]

bool SystemBase::hasVector ( const std::string &  tag_name) const
inherited

◆ hasVector() [2/2]

virtual bool SystemBase::hasVector ( TagID  tag_id) const
inlinevirtualinherited

Check if the tagged vector exists in the system.

Reimplemented in DisplacedSystem.

Definition at line 312 of file SystemBase.h.

313 {
314 return tag_id < _tagged_vectors.size() && _tagged_vectors[tag_id];
315 }

◆ initializeContainer()

void LinearFVGradientManager::initializeContainer ( OwnedGradientContainer &  container) const
protectedinherited

Allocate one zeroed vector per spatial component for gradient storage.

Parameters
containerComponent-vector container to rebuild.

Definition at line 204 of file LinearFVGradientManager.C.

205{
206 container.clear();
207 const auto & current_solution = _sys.system().current_local_solution;
208 mooseAssert(current_solution && current_solution->initialized(),
209 "Current solution must exist before building FV gradient storage.");
210 container.resize(_sys.mesh().dimension());
211 for (auto & component : container)
212 component = current_solution->zero_clone();
213}
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition MooseMesh.C:2983
MooseMesh & mesh()
Definition SystemBase.h:100
std::unique_ptr< NumericVector< Number > > current_local_solution

Referenced by LinearFVGradientManager::initializeLinearFVGradientStorage(), and updateFVGradient().

◆ initializeGradientStatesForTimeAdvance()

void LinearFVGradientManager::initializeGradientStatesForTimeAdvance ( )
protectedinherited

Compute and publish uninitialized gradients before their first time-state advancement.

Definition at line 385 of file LinearFVGradientManager.C.

386{
387 for (auto & [method, container] : _linear_fv_gradient_container_by_method)
388 if (container.state_values.size() > 1 && !container.has_computed_gradient)
390
391 for (auto & [_, container] : _linear_fv_gradient_container_by_method)
392 if (container.state_values.size() > 1 && !container.has_computed_gradient)
394}

Referenced by LinearFVGradientManager::copyPreviousGradientStates().

◆ initializeLinearFVGradientHistoryStorage()

void LinearFVGradientManager::initializeLinearFVGradientHistoryStorage ( )
protectedinherited

Register named system vectors for requested historical gradient states.

This must run after gradient state requirements are known and before restart or recovery data is loaded, so checkpoint data can be restored into these vectors. It does not initialize the current or replacement working storage.

Definition at line 234 of file LinearFVGradientManager.C.

235{
236 for (auto & [method, container] : _linear_fv_gradient_container_by_method)
237 for (const auto state : make_range(std::size_t(1), container.state_values.size()))
238 if (container.state_values[state].empty())
239 {
240 GradientContainer state_values(_sys.mesh().dimension());
241 for (const auto component : index_range(state_values))
242 state_values[component] = &_sys.addVector(
243 gradientStateVectorName(*method, state, component), true, libMesh::GHOSTED);
244 container.state_values[state] = std::move(state_values);
245 }
246}
LinearFVGradientReader::GradientContainer GradientContainer
Non-owning view with one vector per spatial component of a cell-centered gradient field.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...

Referenced by AuxiliarySystem(), and LinearSystem::initSolutionState().

◆ initializeLinearFVGradientStorage()

void LinearFVGradientManager::initializeLinearFVGradientStorage ( )
protectedinherited

Initialize private current and replacement gradient storage.

This must run after the current local solution has been created and initialized, and after restart or recovery data has been loaded. At that point, it also checks if the restored historical gradient storage is set up correctly.

Definition at line 358 of file LinearFVGradientManager.C.

359{
360 for (auto & [method, container] : _linear_fv_gradient_container_by_method)
361 {
362 if (container.current_values.empty())
363 initializeContainer(container.current_values);
364 if (container.next_values.empty())
365 initializeContainer(container.next_values);
366 setCurrentGradientState(container);
367 checkRestartedGradientHistory(*method, container);
368 }
369}
void initializeContainer(OwnedGradientContainer &container) const
Allocate one zeroed vector per spatial component for gradient storage.
void checkRestartedGradientHistory(const FVGradientMethod &method, LinearFVGradientContainer &container)
Validate and mark gradient history loaded during restart or recovery.

Referenced by LinearFVGradientManager::computeLinearFVGradientContainer(), initialSetup(), LinearSystem::initialSetup(), and LinearFVGradientManager::rebuildLinearFVGradientStorage().

◆ initializeObjects()

virtual void SystemBase::initializeObjects ( )
inlinevirtualinherited

Called only once, just before the solve begins so objects can do some precalculations.

Definition at line 177 of file SystemBase.h.

177{}

◆ initialSetup()

void AuxiliarySystem::initialSetup ( )
overridevirtual

Setup Functions.

Reimplemented from SystemBase.

Definition at line 81 of file AuxiliarySystem.C.

82{
83 TIME_SECTION("initialSetup", 3, "Initializing Auxiliary System");
84
88
89 for (unsigned int tid = 0; tid < this->numThreads(); tid++)
90 {
93
94 _nodal_aux_storage.sort(tid);
95 _nodal_aux_storage.initialSetup(tid);
96
98 _mortar_nodal_aux_storage.initialSetup(tid);
99
100 _nodal_vec_aux_storage.sort(tid);
101 _nodal_vec_aux_storage.initialSetup(tid);
102
103 _nodal_array_aux_storage.sort(tid);
104 _nodal_array_aux_storage.initialSetup(tid);
105
106 _elemental_aux_storage.sort(tid);
107 _elemental_aux_storage.initialSetup(tid);
108
110 _elemental_vec_aux_storage.initialSetup(tid);
111
113 _elemental_array_aux_storage.initialSetup(tid);
114 }
115
116#ifdef MOOSE_KOKKOS_ENABLED
119
122
124#endif
125}
void buildKokkosAuxStages()
Group the active Kokkos auxiliary kernels of each execution flag into stages that can each be compute...
void sort(THREAD_ID tid=0)
Performs a sort using the DependencyResolver.
virtual void initialSetup(THREAD_ID tid=0) const
Convenience methods for calling object setup methods.
virtual void initialSetup()
Setup Functions.

◆ initSolutionState()

virtual void AuxiliarySystem::initSolutionState ( )
overridevirtual

Initializes the solution state.

Reimplemented from SystemBase.

◆ isArrayVariable()

bool SystemBase::isArrayVariable ( const std::string &  var_name) const
virtualinherited

If a variable is an array variable.

Definition at line 864 of file SystemBase.C.

865{
866 auto & names = getVariableNames();
867 if (!system().has_variable(var_name) &&
868 std::find(names.begin(), names.end(), var_name) != names.end())
869 // array variable
870 return true;
871 else
872 return false;
873}

◆ isScalarVariable()

bool SystemBase::isScalarVariable ( unsigned int  var_name) const
virtualinherited

Definition at line 885 of file SystemBase.C.

886{
887 return (system().variable(var_num).type().family == SCALAR);
888}

Referenced by Assembly::initNonlocalCoupling().

◆ jacobianSetup()

void AuxiliarySystem::jacobianSetup ( )
overridevirtual

Reimplemented from SystemBase.

Definition at line 213 of file AuxiliarySystem.C.

214{
216
217 for (unsigned int tid = 0; tid < this->numThreads(); tid++)
218 {
220 _nodal_aux_storage.jacobianSetup(tid);
221 _mortar_nodal_aux_storage.jacobianSetup(tid);
222 _nodal_vec_aux_storage.jacobianSetup(tid);
223 _nodal_array_aux_storage.jacobianSetup(tid);
224 _elemental_aux_storage.jacobianSetup(tid);
225 _elemental_vec_aux_storage.jacobianSetup(tid);
226 _elemental_array_aux_storage.jacobianSetup(tid);
227 }
228
229#ifdef MOOSE_KOKKOS_ENABLED
232#endif
233}
void jacobianSetup(THREAD_ID tid=0) const override
Convenience methods for calling object setup methods.
virtual void jacobianSetup()

◆ kokkosCompute()

void AuxiliarySystem::kokkosCompute ( ExecFlagType  type)

Referenced by compute().

◆ kokkosElemAuxWarehouse()

const ExecuteMooseObjectWarehouse< AuxKernelBase > & AuxiliarySystem::kokkosElemAuxWarehouse ( ) const
inline

Definition at line 308 of file AuxiliarySystem.h.

309{
311}

◆ kokkosNodalAuxWarehouse()

const ExecuteMooseObjectWarehouse< AuxKernelBase > & AuxiliarySystem::kokkosNodalAuxWarehouse ( ) const
inline

Definition at line 302 of file AuxiliarySystem.h.

303{
305}

◆ matrixTagActive()

bool SystemBase::matrixTagActive ( TagID  tag) const
virtualinherited

If or not a matrix tag is active.

Definition at line 1149 of file SystemBase.C.

1150{
1151 mooseAssert(_subproblem.matrixTagExists(tag), "Matrix tag " << tag << " does not exist");
1152
1153 return tag < _matrix_tag_active_flags.size() && _matrix_tag_active_flags[tag];
1154}

◆ mesh() [1/2]

MooseMesh & SystemBase::mesh ( )
inlineinherited

◆ mesh() [2/2]

const MooseMesh & SystemBase::mesh ( ) const
inlineinherited

Definition at line 101 of file SystemBase.h.

101{ return _mesh; }

◆ mortarNodalAuxWarehouse()

const ExecuteMooseObjectWarehouse< AuxKernel > & AuxiliarySystem::mortarNodalAuxWarehouse ( ) const
inline

Definition at line 265 of file AuxiliarySystem.h.

266{
268}

◆ name()

const std::string & SystemBase::name ( ) const
virtualinherited

Definition at line 1362 of file SystemBase.C.

1363{
1364 return system().name();
1365}
const std::string & name() const

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addConstraint(), NonlinearSystemBase::addDamper(), NonlinearSystemBase::addDGKernel(), NonlinearSystemBase::addDiracKernel(), NonlinearSystemBase::addHDGKernel(), NonlinearSystemBase::addInterfaceKernel(), addKernel(), MooseEigenSystem::addKernel(), NonlinearSystemBase::addKernel(), SystemBase::addMatrix(), NonlinearSystemBase::addNodalKernel(), Moose::PetscSupport::addPetscOptionsFromCommandline(), addScalarKernel(), NonlinearSystemBase::addScalarKernel(), NonlinearSystemBase::addSplit(), SystemBase::addTimeIntegrator(), addVariable(), SystemBase::addVector(), DiffusionLHDGAssemblyHelper::checkCoupling(), LinearFVGradientManager::checkRestartedGradientHistory(), SystemBase::closeTaggedVector(), LinearFVGradientManager::computeGradientsExcept(), LinearSystem::computeLinearSystemTags(), DisplacedProblem::DisplacedProblem(), SystemBase::getMatrix(), SystemBase::getMatrix(), NonlinearSystemBase::getSplit(), SystemBase::getVector(), DisplacedSystem::getVector(), DisplacedSystem::getVector(), SystemBase::getVector(), SystemBase::getVector(), SystemBase::hasVector(), LinearSystem::initialSetup(), NonlinearEigenSystem::postAddResidualObject(), MooseStaticCondensationPreconditioner::prefix(), SystemBase::removeMatrix(), SystemBase::removeVector(), SystemBase::removeVector(), LinearFVGradientManager::resizeGradientStateStorage(), NonlinearSystemBase::setupScalingData(), SystemBase::solutionState(), LinearSystem::solve(), LinearFVGradientReader::stateComponents(), LinearTimeIntegratorInterface::timeDerivativeMatrixContribution(), LinearTimeIntegratorInterface::timeDerivativeRHSContribution(), updateFVGradient(), LinearFVGradientManager::updateFVGradient(), and SystemBase::zeroTaggedVector().

◆ needMaterialOnSide()

bool AuxiliarySystem::needMaterialOnSide ( BoundaryID  bnd_id)

Indicated whether this system needs material properties on boundaries.

Returns
Boolean if IntegratedBCs are active

Definition at line 924 of file AuxiliarySystem.C.

925{
926 return _elemental_aux_storage.hasActiveBoundaryObjects(bnd_id) ||
927 _elemental_vec_aux_storage.hasActiveBoundaryObjects(bnd_id);
928}

◆ needSolutionState()

void SystemBase::needSolutionState ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type = Moose::SolutionIterationType::Time,
libMesh::ParallelType  parallel_type = GHOSTED 
)
virtualinherited

Registers that the solution state state is needed.

Reimplemented in DisplacedSystem.

Definition at line 1487 of file SystemBase.C.

1490{
1491 libmesh_parallel_only(this->comm());
1492 mooseAssert(!Threads::in_threads,
1493 "This routine is not thread-safe. Request the solution state before using it in "
1494 "a threaded region.");
1495
1496 if (hasSolutionState(state, iteration_type))
1497 return;
1498
1499 auto & solution_states = getSolutionStates(iteration_type);
1500 solution_states.resize(state + 1);
1501
1502 // The 0-th (current) solution state is owned by libMesh
1503 if (!solution_states[0])
1504 solution_states[0] = &solutionInternal();
1505 else
1506 mooseAssert(solution_states[0] == &solutionInternal(), "Inconsistent current solution");
1507
1508 // We will manually add all states past current
1509 for (unsigned int i = 1; i <= state; ++i)
1510 if (!solution_states[i])
1511 {
1512 auto tag = _subproblem.addVectorTag(oldSolutionStateVectorName(i, iteration_type),
1514 solution_states[i] = &addVector(tag, true, parallel_type);
1515 }
1516 else
1517 {
1518 // If the existing parallel type is PARALLEL and GHOSTED is now requested,
1519 // this would require an upgrade, which is risky if anybody has already
1520 // stored a pointer to the existing vector, since the upgrade would create
1521 // a new vector and make that pointer null. If the existing parallel type
1522 // is GHOSTED and PARALLEL is now requested, we don't need to do anything.
1523 if (parallel_type == GHOSTED && solutionStateParallelType(i, iteration_type) == PARALLEL)
1524 mooseError("The solution state has already been declared as PARALLEL");
1525
1526 mooseAssert(solution_states[i] == &getVector(oldSolutionStateVectorName(i, iteration_type)),
1527 "Inconsistent solution state");
1528 }
1529}
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition SubProblem.C:84
virtual NumericVector< Number > & solutionInternal() const =0
Internal getter for solution owned by libMesh.
TagName oldSolutionStateVectorName(const unsigned int, Moose::SolutionIterationType iteration_type) const
Gets the vector name used for an old (not current) solution state.
libMesh::ParallelType solutionStateParallelType(const unsigned int state, const Moose::SolutionIterationType iteration_type) const
Returns the parallel type of the given solution state.
virtual bool hasSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
Whether or not the system has the solution state (0 = current, 1 = old, 2 = older,...
const Parallel::Communicator & comm() const
@ VECTOR_TAG_SOLUTION

Referenced by PicardSolve::allocateStorage(), SecantSolve::allocateStorage(), EigenExecutionerBase::EigenExecutionerBase(), FEProblemSolve::initialSetup(), SystemBase::initSolutionState(), DisplacedSystem::needSolutionState(), and SystemBase::solutionState().

◆ nFieldVariables()

unsigned int SystemBase::nFieldVariables ( ) const
inherited

Get the number of field variables in this system.

Returns
the number of field variables

Definition at line 900 of file SystemBase.C.

901{
902 unsigned int n = 0;
903 for (auto & var : _vars[0].fieldVariables())
904 n += var->count();
905
906 return n;
907}

Referenced by SystemBase::nVariables().

◆ nFVVariables()

unsigned int SystemBase::nFVVariables ( ) const
inherited

Get the number of finite volume variables in this system.

Returns
the number of finite volume variables

Definition at line 910 of file SystemBase.C.

911{
912 unsigned int n = 0;
913 for (auto & var : _vars[0].fieldVariables())
914 if (var->isFV())
915 n += var->count();
916
917 return n;
918}

◆ nodalArrayAuxWarehouse()

const ExecuteMooseObjectWarehouse< ArrayAuxKernel > & AuxiliarySystem::nodalArrayAuxWarehouse ( ) const
inline

Definition at line 277 of file AuxiliarySystem.h.

278{
280}

◆ nodalAuxWarehouse()

const ExecuteMooseObjectWarehouse< AuxKernel > & AuxiliarySystem::nodalAuxWarehouse ( ) const
inline

Definition at line 259 of file AuxiliarySystem.h.

260{
261 return _nodal_aux_storage;
262}

◆ nodalVectorAuxWarehouse()

const ExecuteMooseObjectWarehouse< VectorAuxKernel > & AuxiliarySystem::nodalVectorAuxWarehouse ( ) const
inline

Definition at line 271 of file AuxiliarySystem.h.

272{
274}

◆ nonTimeVectorTag()

virtual TagID SystemBase::nonTimeVectorTag ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem, and NonlinearSystemBase.

Definition at line 333 of file SystemBase.h.

333{ mooseError("Not implemented yet"); }

Referenced by SystemBase::defaultVectorTags(), and DisplacedSystem::nonTimeVectorTag().

◆ number()

unsigned int SystemBase::number ( ) const
inherited

Gets the number of this system.

Returns
The number of this system

Definition at line 1157 of file SystemBase.C.

1158{
1159 return system().number();
1160}
unsigned int number() const

Referenced by SetupResidualDebugAction::act(), FEProblemBase::addCachedResidualDirectly(), FEProblemBase::addJacobian(), FEProblemBase::addJacobianBlockTags(), FEProblemBase::addJacobianLowerD(), FEProblemBase::addJacobianNeighbor(), FEProblemBase::addJacobianNeighborLowerD(), FEProblemBase::addJacobianOffDiagScalar(), FEProblemBase::addJacobianScalar(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addResidual(), FEProblemBase::addResidualLower(), FEProblemBase::addResidualNeighbor(), FEProblemBase::addResidualScalar(), ADKernelTempl< T >::ADKernelTempl(), ElementSubdomainModifierBase::applyIC(), ArrayKernel::ArrayKernel(), NonlinearEigenSystem::attachPreconditioner(), DiffusionLHDGAssemblyHelper::checkCoupling(), FVFluxBC::checkFaceIntegrity(), SolverSystem::compute(), MooseVariableScalar::computeAD(), FEProblemBase::computeBounds(), Assembly::computeFaceMap(), InternalSideIndicatorBase::computeIndicator(), ArrayNodalBC::computeJacobian(), NodalBC::computeJacobian(), VectorNodalBC::computeJacobian(), MortarScalarBase::computeJacobian(), ODEKernel::computeJacobian(), FVInterfaceKernel::computeJacobian(), FVFluxKernel::computeJacobian(), FVBoundaryScalarLagrangeMultiplierConstraint::computeJacobian(), FEProblemBase::computeJacobianBlock(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), FEProblemBase::computeNearNullSpace(), NonlinearSystemBase::computeNodalBCsJacobian(), NonlinearSystemBase::computeNodalBCsResidualAndJacobian(), FEProblemBase::computeNullSpace(), ArrayNodalBC::computeOffDiagJacobian(), NodalBC::computeOffDiagJacobian(), VectorNodalBC::computeOffDiagJacobian(), NodalKernel::computeOffDiagJacobian(), ComputeFullJacobianThread::computeOnBoundary(), ComputeFullJacobianThread::computeOnElement(), ComputeFullJacobianThread::computeOnInterface(), ComputeJacobianThread::computeOnInternalFace(), ComputeFullJacobianThread::computeOnInternalFace(), FEProblemBase::computePostCheck(), FVInterfaceKernel::computeResidual(), FVFluxKernel::computeResidual(), FVBoundaryScalarLagrangeMultiplierConstraint::computeResidual(), IntegratedBC::computeResidualAndJacobian(), NodalBC::computeResidualAndJacobian(), Kernel::computeResidualAndJacobian(), KernelScalarBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeResidualL2Norm(), NonlinearSystemBase::computeResidualTags(), NonlinearSystemBase::computeScaling(), Assembly::computeSinglePointMapAD(), FEProblemBase::computeTransposeNullSpace(), DebugResidualAux::computeValue(), NearestNodeValueAux::computeValue(), SlepcEigenSolverConfiguration::configure_solver(), NonlinearSystemBase::constraintJacobians(), LinearSystem::containsTimeKernel(), Coupleable::coupled(), FEProblemBase::currentLinearSysNum(), FEProblemBase::currentNlSysNum(), PseudoTimestep::currentResidualNorm(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), ComputeResidualThread::determineObjectWarehouses(), Moose::doDerivatives(), GreaterThanLessThanPostprocessor::execute(), VariableResidual::execute(), NodalNormalsCorner::execute(), NodalNormalsEvaluator::execute(), NodalNormalsPreprocessor::execute(), ExplicitTimeIntegrator::ExplicitTimeIntegrator(), InternalSideIndicatorBase::finalize(), NumNonlinearIterations::finalize(), NonlinearEigenSystem::finalNonlinearResidual(), FunctorNodalCorrector::FunctorNodalCorrector(), BoundsBase::getDoFIndex(), NonlinearSystemBase::getFVSetupObjects(), NonlinearSystemBase::getNodeDofs(), NonlinearEigenSystem::getSNES(), SystemBase::getSubdomainsForVar(), NumLinearIterations::getValue(), NumResidualEvaluations::getValue(), Residual::getValue(), Moose::globalDofIndexToDerivative(), FVBoundaryCondition::hasFaceSide(), ExplicitTimeIntegrator::init(), AttribSysNum::initFrom(), AuxKernelBase::initialSetup(), LinearSystem::initialSetup(), NonlinearSystemBase::initialSetup(), ExplicitTimeIntegrator::initialSetup(), ActivateElementsUserObjectBase::initSolutions(), EigenExecutionerBase::inversePowerIteration(), MooseMesh::isTranslatedPeriodic(), Kernel::Kernel(), MooseMesh::minPeriodicDistance(), MooseMesh::minPeriodicVector(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionA(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionAB(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionB(), Moose::SlepcSupport::mooseSlepcEigenFormJacobianA(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), NonlinearEigenSystem::nLinearIterations(), NonlinearEigenSystem::nNonlinearIterations(), EigenExecutionerBase::nonlinearSolve(), ComputeDiracThread::onElement(), ComputeNodalKernelBCJacobiansThread::onNode(), ComputeNodalKernelJacobiansThread::onNode(), SystemNumberLess::operator()(), VariableResidualNormsDebugOutput::output(), Moose::PetscSupport::petscLinearConverged(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), FEProblemBase::prepare(), FEProblemBase::prepareAssembly(), FEProblemBase::prepareAssemblyNeighbor(), SystemBase::prepareFace(), FEProblemBase::prepareFaceShapes(), FEProblemBase::prepareNeighborShapes(), FEProblemBase::prepareShapes(), MooseMesh::queryPeriodicDimensions(), FEProblemBase::reinitDirac(), FEProblemBase::reinitNeighborPhys(), FEProblemBase::reinitNeighborPhys(), FEProblemBase::reinitOffDiagScalars(), NonlinearSystem::residualAndJacobianTogether(), FEProblemBase::setResidual(), FEProblemBase::setResidualNeighbor(), PhysicsBasedPreconditioner::setup(), FVInterfaceKernel::setupData(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), NonlinearEigenSystem::solve(), ActuallyExplicitEuler::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), ExplicitSSPRungeKutta::solveStage(), UserObjectBase::systemNumber(), MultiAppDofCopyTransfer::transferDofObject(), FVQpFluxBC::uOnGhost(), FVQpFluxBC::uOnUSub(), NodalDamper::variableDefinedOnNode(), and MortarConstraintBase::zeroInactiveLMDofs().

◆ numThreads()

THREAD_ID SystemBase::numThreads ( ) const
inherited
Returns
the number of threads the associated application uses (see MooseApp::numThreads())

Definition at line 89 of file SystemBase.C.

89{ return _app.numThreads(); }
THREAD_ID numThreads() const
Returns the number of threads this application uses.
Definition MooseApp.h:421
MooseApp & _app

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addDamper(), NonlinearSystemBase::addDGKernel(), NonlinearSystemBase::addDiracKernel(), NonlinearSystemBase::addHDGKernel(), NonlinearSystemBase::addInterfaceKernel(), addKernel(), MooseEigenSystem::addKernel(), NonlinearSystemBase::addKernel(), NonlinearSystemBase::addNodalKernel(), addScalarKernel(), addVariable(), SystemBase::addVariable(), NonlinearSystemBase::computeDiracContributions(), computeElementalVarsHelper(), FVGradientMethod::computeGradient(), FVGreenGaussGradient::computeGradientWithoutLimiter(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), computeMortarNodalVars(), NonlinearSystemBase::computeNodalBCsJacobian(), computeNodalVarsHelper(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), SystemBase::customSetup(), customSetup(), NonlinearSystemBase::customSetup(), SystemBase::initialSetup(), initialSetup(), LinearSystem::initialSetup(), NonlinearSystemBase::initialSetup(), SystemBase::jacobianSetup(), jacobianSetup(), NonlinearSystemBase::jacobianSetup(), SystemBase::residualSetup(), residualSetup(), NonlinearSystemBase::residualSetup(), SystemBase::setVariableGlobalDoFs(), SystemBase::subdomainSetup(), subdomainSetup(), SystemBase::timestepSetup(), timestepSetup(), NonlinearSystemBase::timestepSetup(), and SystemBase::zeroVariables().

◆ nVariables()

unsigned int SystemBase::nVariables ( ) const
virtualinherited

Get the number of variables in this system.

Returns
the number of variables

Definition at line 891 of file SystemBase.C.

892{
893 unsigned int n = nFieldVariables();
894 n += _vars[0].scalars().size();
895
896 return n;
897}
unsigned int nFieldVariables() const
Get the number of field variables in this system.
Definition SystemBase.C:900

Referenced by AdaptivityAction::act(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), NonlinearSystemBase::getNodeDofs(), ExplicitTimeIntegrator::initialSetup(), MaxVarNDofsPerElem::onElement(), MaxVarNDofsPerNode::onNode(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), and variableWiseRelativeSolutionDifferenceNorm().

◆ oldSolutionStateVectorName()

TagName SystemBase::oldSolutionStateVectorName ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type 
) const
privateinherited

Gets the vector name used for an old (not current) solution state.

Definition at line 1403 of file SystemBase.C.

1405{
1406 mooseAssert(state != 0, "Not an old state");
1407 mooseAssert(static_cast<unsigned short>(iteration_type) <
1408 static_cast<unsigned short>(Moose::SolutionIterationType::Count),
1409 "Invalid iteration_type");
1410
1411 switch (iteration_type)
1412 {
1414 if (state == 1)
1416 else if (state == 2)
1418 break;
1420 if (state == 1)
1422 break;
1424 if (state == 1)
1426 break;
1428 if (state == 1)
1430 break;
1432 break;
1433 }
1434
1435 return "solution_state_" + std::to_string(state) + "_" + Moose::stringify(iteration_type);
1436}
const TagName PREVIOUS_MULTISYSTEM_FP_SOLUTION_TAG
Definition MooseTypes.C:30
const TagName OLDER_SOLUTION_TAG
Definition MooseTypes.C:27
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition MooseTypes.C:28
const TagName PREVIOUS_MULTIAPP_FP_SOLUTION_TAG
Definition MooseTypes.C:29
const TagName OLD_SOLUTION_TAG
Definition MooseTypes.C:26

Referenced by SystemBase::needSolutionState(), and SystemBase::solutionState().

◆ perfGraph()

PerfGraph & PerfGraphInterface::perfGraph ( )
inherited

Get the PerfGraph.

Definition at line 86 of file PerfGraphInterface.C.

87{
88 return _pg_moose_app.perfGraph();
89}
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition MooseApp.h:176
MooseApp & _pg_moose_app
The MooseApp that owns the PerfGraph.

Referenced by CommonOutputAction::act(), PerfGraphData::finalize(), PerfGraphReporter::finalize(), and PerfGraphOutput::output().

◆ postInit()

virtual void SystemBase::postInit ( )
inlinevirtualinherited

Reimplemented in NonlinearEigenSystem.

Definition at line 166 of file SystemBase.h.

166{}

Referenced by NonlinearEigenSystem::postInit().

◆ prefix()

std::string SystemBase::prefix ( ) const
inherited
Returns
The prefix used for this system for solver settings for PETSc. This prefix is used to prevent collision of solver settings for different systems. Note that this prefix does not have a leading dash so it's appropriate for passage straight to PETSc APIs

Definition at line 1730 of file SystemBase.C.

1731{
1732 return system().prefix_with_name() ? system().prefix() : "";
1733}
void prefix_with_name(bool value)
std::string prefix() const

Referenced by FieldSplitPreconditioner::FieldSplitPreconditioner(), MoosePreconditioner::initialSetup(), and FieldSplitPreconditioner::prefix().

◆ preInit()

virtual void SystemBase::preInit ( )
inlinevirtualinherited

This is called prior to the libMesh system has been init'd.

MOOSE system wrappers can use this method to add vectors and matrices to the libMesh system

Reimplemented in LinearSystem, NonlinearSystemBase, and SolverSystem.

Definition at line 160 of file SystemBase.h.

160{}

Referenced by SolverSystem::preInit().

◆ prepare()

void SystemBase::prepare ( THREAD_ID  tid)
virtualinherited

Prepare the system for use.

Parameters
tidID of the thread

Definition at line 258 of file SystemBase.C.

259{
261 {
262 const std::set<MooseVariableFieldBase *> & active_elemental_moose_variables =
264 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
265 for (const auto & var : vars)
266 var->clearDofIndices();
267
268 for (const auto & var : active_elemental_moose_variables)
269 if (&(var->sys()) == this)
270 var->prepare();
271 }
272 else
273 {
274 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
275 for (const auto & var : vars)
276 var->prepare();
277 }
278}
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition SubProblem.C:446
virtual bool hasActiveElementalMooseVariables(const THREAD_ID tid) const
Whether or not a list of active elemental moose variables has been set.
Definition SubProblem.C:452
virtual void prepare(THREAD_ID tid)
Prepare the system for use.
Definition SystemBase.C:258

Referenced by SubProblem::reinitElemFaceRef().

◆ prepareFace()

void SystemBase::prepareFace ( THREAD_ID  tid,
bool  resize_data 
)
virtualinherited

Prepare the system for use on sides.

This will try to reuse the preparation done on the element.

Parameters
tidID of the thread
resize_dataPass True if this system needs to resize residual and jacobian datastructures based on preparing this face

Definition at line 281 of file SystemBase.C.

282{
283 // We only need to do something if the element prepare was restricted
285 {
286 const std::set<MooseVariableFieldBase *> & active_elemental_moose_variables =
288
289 std::vector<MooseVariableFieldBase *> newly_prepared_vars;
290
291 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
292 for (const auto & var : vars)
293 {
294 mooseAssert(&var->sys() == this,
295 "I will cry if we store variables in our warehouse that don't belong to us");
296
297 // If it wasn't in the active list, we need to prepare it. This has the potential to duplicate
298 // prepare if we have these conditions:
299 //
300 // 1. We have a displaced problem
301 // 2. We are using AD
302 // 3. We are not using global AD indexing
303 //
304 // But I think I would rather risk duplicate prepare than introduce an additional member set
305 // variable for tracking prepared variables. Set insertion is slow and some simulations have a
306 // ton of variables
307 if (!active_elemental_moose_variables.count(var))
308 {
309 var->prepare();
310 newly_prepared_vars.push_back(var);
311 }
312 }
313
314 // Make sure to resize the residual and jacobian datastructures for all the new variables
315 if (resize_data)
316 for (const auto var_ptr : newly_prepared_vars)
317 {
321 }
322 }
323}
void prepareVariableNonlocal(MooseVariableFieldBase *var)
Definition Assembly.C:2848
void prepareVariable(MooseVariableFieldBase *var)
Used for preparing the dense residual and jacobian blocks for one particular variable.
Definition Assembly.C:2818
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
virtual bool checkNonlocalCouplingRequirement() const =0

◆ prepareLowerD()

void SystemBase::prepareLowerD ( THREAD_ID  tid)
virtualinherited

Prepare the system for use for lower dimensional elements.

Parameters
tidID of the thread

Definition at line 334 of file SystemBase.C.

335{
336 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
337 for (const auto & var : vars)
338 var->prepareLowerD();
339}
virtual void prepareLowerD(THREAD_ID tid)
Prepare the system for use for lower dimensional elements.
Definition SystemBase.C:334

Referenced by SubProblem::reinitLowerDElem().

◆ prepareNeighbor()

void SystemBase::prepareNeighbor ( THREAD_ID  tid)
virtualinherited

Prepare the system for use.

Parameters
tidID of the thread

Definition at line 326 of file SystemBase.C.

327{
328 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
329 for (const auto & var : vars)
330 var->prepareNeighbor();
331}
virtual void prepareNeighbor(THREAD_ID tid)
Prepare the system for use.
Definition SystemBase.C:326

Referenced by SubProblem::reinitNeighborFaceRef().

◆ queryTimeIntegrator()

const TimeIntegrator * SystemBase::queryTimeIntegrator ( const unsigned int  var_num) const
inherited

Retrieve the time integrator that integrates the given variable's equation.

If no suitable time integrator is found (this could happen for instance if we're solving a non-transient problem), then a nullptr will be returned

Definition at line 1690 of file SystemBase.C.

1691{
1692 for (auto & ti : _time_integrators)
1693 if (ti->integratesVar(var_num))
1694 return ti.get();
1695
1696 return nullptr;
1697}
const Elem & get(const ElemType type_in)

Referenced by SystemBase::getTimeIntegrator(), HDGKernel::HDGKernel(), and MooseVariableData< OutputType >::MooseVariableData().

◆ rebuildLinearFVGradientStorage()

void LinearFVGradientManager::rebuildLinearFVGradientStorage ( )
protectedinherited

Rebuild cached gradient values and reusable scratch storage after mesh/DOF changes.

Definition at line 372 of file LinearFVGradientManager.C.

373{
374 for (auto & method_container_pair : _linear_fv_gradient_container_by_method)
375 {
376 method_container_pair.second.current_values.clear();
377 method_container_pair.second.next_values.clear();
378 method_container_pair.second.has_computed_gradient = false;
379 }
380
382}

Referenced by reinit(), and LinearSystem::reinit().

◆ registerFVGradient()

LinearFVGradientReader LinearFVGradientManager::registerFVGradient ( unsigned int  variable_number,
const FVGradientMethod &  method,
unsigned int  oldest_state = 0 
)

Register a variable for gradient values produced by a method object.

Parameters
variable_numberVariable number whose gradient should be stored.
methodGradient method that computes the field values.
oldest_stateOldest time state that consumers need to read.

Definition at line 59 of file LinearFVGradientManager.C.

88{
89 auto * const variable =
90 dynamic_cast<MooseVariableFieldBase *>(_sys.variableWarehouse().getVariable(variable_number));
91 if (!variable)
92 mooseError("Linear FV gradients were requested for variable number ",
93 variable_number,
94 " on system '",
95 _sys.name(),
96 "', but no field variable with that number exists on the system.");
97
98 auto [method_container, inserted] = _linear_fv_gradient_container_by_method.try_emplace(&method);
99 if (inserted)
100 _linear_fv_gradient_methods.push_back(&method);
101 auto & container = method_container->second;
102 container.variable_numbers.insert(variable_number);
103
104 resizeGradientStateStorage(container, oldest_state);
105
106 const auto & current_solution = _sys.system().current_local_solution;
107 if (current_solution && current_solution->initialized())
108 {
109 if (container.current_values.empty())
110 initializeContainer(container.current_values);
111 if (container.next_values.empty())
112 initializeContainer(container.next_values);
113 setCurrentGradientState(container);
114 }
115
116 return LinearFVGradientReader(_sys, container.state_values, method, variable_number);
117}
void resizeGradientStateStorage(LinearFVGradientContainer &container, unsigned int oldest_state)
Ensure that a method container stores every requested time state.
Read-only view of one variable's cell-centered linear finite-volume gradient values.
sys_type & system()

◆ registerTimedSection() [1/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 61 of file PerfGraphInterface.C.

63{
64 const auto timed_section_name = timedSectionName(section_name);
65 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
66 return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
67 else
68 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
69}
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID @section_name The name of the section.
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ registerTimedSection() [2/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level,
const std::string &  live_message,
const bool  print_dots = true 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
live_messageThe message to be printed to the screen during execution
print_dotsWhether or not progress dots should be printed for this section
Returns
The ID of the section - use when starting timing

Definition at line 72 of file PerfGraphInterface.C.

76{
77 const auto timed_section_name = timedSectionName(section_name);
78 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
80 timedSectionName(section_name), level, live_message, print_dots);
81 else
82 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
83}

◆ reinit()

void AuxiliarySystem::reinit ( )
overridevirtual

Reinitialize the system when the degrees of freedom in this system have changed.

This is called after the libMesh system has been reinit'd

Reimplemented from SystemBase.

Definition at line 128 of file AuxiliarySystem.C.

129{
132}
void rebuildLinearFVGradientStorage()
Rebuild cached gradient values and reusable scratch storage after mesh/DOF changes.

◆ reinitElem()

void AuxiliarySystem::reinitElem ( const Elem *  elem,
THREAD_ID  tid 
)
overridevirtual

Reinit an element assembly info.

Parameters
elemWhich element we are reinitializing for
tidID of the thread

Reimplemented from SystemBase.

Definition at line 405 of file AuxiliarySystem.C.

406{
407 for (auto * var : _nodal_vars[tid])
408 var->computeElemValues();
409
410 for (auto * var : _elem_vars[tid])
411 {
412 var->reinitAux();
413 var->computeElemValues();
414 }
415}

◆ reinitElemFace()

void AuxiliarySystem::reinitElemFace ( const Elem *  elem,
unsigned int  side,
THREAD_ID  tid 
)
overridevirtual

Reinit assembly info for a side of an element.

Parameters
elemThe element
sideSide of of the element
tidThread ID

Reimplemented from SystemBase.

Definition at line 418 of file AuxiliarySystem.C.

419{
420 for (auto * var : _nodal_vars[tid])
421 var->computeElemValuesFace();
422
423 for (auto * var : _elem_vars[tid])
424 {
425 var->reinitAux();
426 var->reinitAuxNeighbor();
427 var->computeElemValuesFace();
428 }
429}

Referenced by NonlinearThread::onInterfaceWithHRefinementMismatch().

◆ reinitLowerD()

void SystemBase::reinitLowerD ( THREAD_ID  tid)
virtualinherited

Compute the values of the variables on the lower dimensional element.

Definition at line 392 of file SystemBase.C.

393{
394 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
395 for (const auto & var : vars)
396 var->computeLowerDValues();
397}

Referenced by SubProblem::reinitLowerDElem().

◆ reinitNeighbor()

void SystemBase::reinitNeighbor ( const Elem *  elem,
THREAD_ID  tid 
)
virtualinherited

Compute the values of the variables at all the current points.

Definition at line 384 of file SystemBase.C.

385{
386 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
387 for (const auto & var : vars)
388 var->computeNeighborValues();
389}

◆ reinitNeighborFace()

void SystemBase::reinitNeighborFace ( const Elem *  elem,
unsigned int  side,
THREAD_ID  tid 
)
virtualinherited

Compute the values of the variables at all the current points.

Definition at line 376 of file SystemBase.C.

377{
378 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
379 for (const auto & var : vars)
380 var->computeNeighborValuesFace();
381}

Referenced by SubProblem::reinitNeighborFaceRef().

◆ reinitNode()

void SystemBase::reinitNode ( const Node *  node,
THREAD_ID  tid 
)
virtualinherited

Reinit nodal assembly info.

Parameters
nodeNode to reinit for
tidThread ID

Definition at line 400 of file SystemBase.C.

401{
402 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
403 for (const auto & var : vars)
404 {
405 var->reinitNode();
406 if (var->isNodalDefined())
407 var->computeNodalValues();
408 }
409}

◆ reinitNodeFace()

void SystemBase::reinitNodeFace ( const Node *  node,
BoundaryID  bnd_id,
THREAD_ID  tid 
)
virtualinherited

Reinit nodal assembly info on a face.

Parameters
nodeNode to reinit
bnd_idBoundary ID
tidThread ID

Reimplemented in NonlinearSystemBase.

Definition at line 412 of file SystemBase.C.

413{
414 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
415 for (const auto & var : vars)
416 {
417 var->reinitNode();
418 if (var->isNodalDefined())
419 var->computeNodalValues();
420 }
421}

◆ reinitNodes()

void SystemBase::reinitNodes ( const std::vector< dof_id_type > &  nodes,
THREAD_ID  tid 
)
virtualinherited

Reinit variables at a set of nodes.

Parameters
nodesList of node ids to reinit
tidThread ID

Definition at line 424 of file SystemBase.C.

425{
426 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
427 for (const auto & var : vars)
428 {
429 var->reinitNodes(nodes);
430 var->computeNodalValues();
431 }
432}

Referenced by SubProblem::reinitNodes().

◆ reinitNodesNeighbor()

void SystemBase::reinitNodesNeighbor ( const std::vector< dof_id_type > &  nodes,
THREAD_ID  tid 
)
virtualinherited

Reinit variables at a set of neighbor nodes.

Parameters
nodesList of node ids to reinit
tidThread ID

Definition at line 435 of file SystemBase.C.

436{
437 const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
438 for (const auto & var : vars)
439 {
440 var->reinitNodesNeighbor(nodes);
441 var->computeNodalNeighborValues();
442 }
443}

Referenced by SubProblem::reinitNodesNeighbor().

◆ reinitScalars()

void SystemBase::reinitScalars ( THREAD_ID  tid,
bool  reinit_for_derivative_reordering = false 
)
virtualinherited

Reinit scalar varaibles.

Parameters
tidThread ID
reinit_for_derivative_reorderingA flag indicating whether we are reinitializing for the purpose of re-ordering derivative information for ADNodalBCs

Definition at line 446 of file SystemBase.C.

447{
448 const std::vector<MooseVariableScalar *> & vars = _vars[tid].scalars();
449 for (const auto & var : vars)
450 var->reinit(reinit_for_derivative_reordering);
451}
virtual void reinit()
Reinitialize the system when the degrees of freedom in this system have changed.
Definition SystemBase.h:172

◆ removeMatrix()

void SystemBase::removeMatrix ( TagID  tag)
inherited

Removes a matrix with a given tag.

Parameters
tag_nameThe name of the tag

Definition at line 590 of file SystemBase.C.

591{
592 if (!_subproblem.matrixTagExists(tag_id))
593 mooseError("Cannot remove the matrix with TagID ",
594 tag_id,
595 "\nin system '",
596 name(),
597 "', because that tag does not exist in the problem");
598
599 if (hasMatrix(tag_id))
600 {
601 const auto matrix_name = _subproblem.matrixTagName(tag_id);
602 system().remove_matrix(matrix_name);
603 _tagged_matrices[tag_id] = nullptr;
604 }
605}
void remove_matrix(std::string_view mat_name)

◆ removeVector() [1/2]

void SystemBase::removeVector ( const std::string &  name)
inherited

Remove a vector from the system with the given name.

Definition at line 1356 of file SystemBase.C.

1357{
1359}
void remove_vector(std::string_view vec_name)

Referenced by SystemBase::restoreOldSolutions().

◆ removeVector() [2/2]

void SystemBase::removeVector ( TagID  tag_id)
inherited

Remove a solution length vector from the system with the specified TagID.

Parameters
tag_idTag ID

Definition at line 702 of file SystemBase.C.

703{
704 if (!_subproblem.vectorTagExists(tag_id))
705 mooseError("Cannot remove the vector with TagID ",
706 tag_id,
707 "\nin system '",
708 name(),
709 "', because that tag does not exist in the problem");
710
711 if (hasVector(tag_id))
712 {
713 auto vector_name = _subproblem.vectorTagName(tag_id);
714 system().remove_vector(vector_name);
715 _tagged_vectors[tag_id] = nullptr;
716 }
717}

◆ residualCopy()

virtual NumericVector< Number > & SystemBase::residualCopy ( )
inlinevirtualinherited

Reimplemented in DisplacedSystem, and NonlinearSystemBase.

Definition at line 457 of file SystemBase.h.

458 {
459 mooseError("This system does not support getting a copy of the residual");
460 }

Referenced by DisplacedSystem::residualCopy().

◆ residualGhosted()

virtual NumericVector< Number > & SystemBase::residualGhosted ( )
inlinevirtualinherited

Reimplemented in DisplacedSystem, and NonlinearSystemBase.

Definition at line 461 of file SystemBase.h.

462 {
463 mooseError("This system does not support getting a ghosted copy of the residual");
464 }

Referenced by DisplacedSystem::residualGhosted().

◆ residualSetup()

void AuxiliarySystem::residualSetup ( )
overridevirtual

Reimplemented from SystemBase.

Definition at line 236 of file AuxiliarySystem.C.

237{
239
240 for (unsigned int tid = 0; tid < this->numThreads(); tid++)
241 {
243 _nodal_aux_storage.residualSetup(tid);
244 _mortar_nodal_aux_storage.residualSetup(tid);
245 _nodal_vec_aux_storage.residualSetup(tid);
246 _nodal_array_aux_storage.residualSetup(tid);
247 _elemental_aux_storage.residualSetup(tid);
248 _elemental_vec_aux_storage.residualSetup(tid);
249 _elemental_array_aux_storage.residualSetup(tid);
250 }
251
252#ifdef MOOSE_KOKKOS_ENABLED
255#endif
256}
void residualSetup(THREAD_ID tid=0) const override
virtual void residualSetup()

◆ residualVectorTag()

virtual TagID SystemBase::residualVectorTag ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem, and NonlinearSystemBase.

Definition at line 338 of file SystemBase.h.

338{ mooseError("Not implemented yet"); }

Referenced by SystemBase::defaultVectorTags(), and DisplacedSystem::residualVectorTag().

◆ resizeGradientStateStorage()

void LinearFVGradientManager::resizeGradientStateStorage ( LinearFVGradientContainer &  container,
unsigned int  oldest_state 
)
protectedinherited

Ensure that a method container stores every requested time state.

Parameters
containerMethod container whose state storage should be grown.
oldest_stateOldest time state that must be stored.

Definition at line 216 of file LinearFVGradientManager.C.

218{
219 const auto required_states = static_cast<std::size_t>(oldest_state) + 1;
220 const auto old_size = container.state_values.size();
221 if (required_states > old_size && _sys.solutionStatesInitialized() && oldest_state > 0)
222 mooseError("Linear FV gradient state ",
223 oldest_state,
224 " was requested on system '",
225 _sys.name(),
226 "' after solution states were initialized. Old gradient states must be requested "
227 "during setup.");
228
229 if (required_states > old_size)
230 container.state_values.resize(required_states);
231}

Referenced by updateFVGradient().

◆ resolveFVGradientMethod()

const FVGradientMethod & LinearFVGradientManager::resolveFVGradientMethod ( const GradientMethodName &  method_name)
inherited

Resolve a named gradient method, constructing a built-in method when needed.

Parameters
method_nameName of the gradient method to retrieve.
Returns
Gradient method associated with the supplied name.

Definition at line 59 of file LinearFVGradientManager.C.

60{
61 auto & fe_problem = _sys.feProblem();
62
63 if (!fe_problem.hasFVGradientMethod(method_name))
64 {
65 if (method_name == "green-gauss")
66 {
67 auto params = fe_problem.getMooseApp().getFactory().getValidParams("FVGreenGaussGradient");
68 fe_problem.addFVGradientMethod("FVGreenGaussGradient", method_name, params);
69 }
70 else if (method_name == "green-gauss-venkatakrishnan")
71 {
72 auto params = fe_problem.getMooseApp().getFactory().getValidParams("FVGreenGaussGradient");
73 params.set<MooseEnum>("limiter") = "venkatakrishnan";
74 fe_problem.addFVGradientMethod("FVGreenGaussGradient", method_name, params);
75 }
76 }
77
78 if (!fe_problem.hasFVGradientMethod(method_name))
79 mooseError("Unable to find FVGradientMethod with name '", method_name, "'");
80
81 return fe_problem.getFVGradientMethod(method_name);
82}
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition Factory.C:68
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition MooseApp.h:404
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55

◆ restoreAdditionalStates()

void AuxiliarySystem::restoreAdditionalStates ( )
overrideprotectedvirtual

Restore system-owned state not represented by solution vectors.

Default implementation does nothing.

Reimplemented from SystemBase.

Definition at line 143 of file AuxiliarySystem.C.

144{
146}
void restoreGradientStates()
Restore current gradients from state one after a failed timestep.

◆ restoreGradientStates()

void LinearFVGradientManager::restoreGradientStates ( )
protectedinherited

Restore current gradients from state one after a failed timestep.

Definition at line 425 of file LinearFVGradientManager.C.

426{
427 mooseAssert(!Threads::in_threads, "Linear FV gradient state copying is not thread-safe.");
428 for (auto & [_, container] : _linear_fv_gradient_container_by_method)
429 {
430 if (container.state_values.size() <= 1)
431 continue;
432
433 mooseAssert(container.has_computed_gradient,
434 "Current gradient state must be initialized before restoration.");
435 copyGradient(container.state_values[1], container.state_values[0]);
436 copyGradient(container.state_values[0], container.next_values);
437 }
438}

Referenced by restoreAdditionalStates(), and LinearSystem::restoreAdditionalStates().

◆ restoreOldSolutions()

void SystemBase::restoreOldSolutions ( )
virtualinherited

Restore the old and older solutions when the saved solutions present.

Definition at line 543 of file SystemBase.C.

544{
546 if (num_states > 1)
547 for (unsigned int i = 1; i <= num_states - 1; ++i)
549 {
551 removeVector("save_solution_state_" + std::to_string(i));
552 _saved_solution_states[i] = nullptr;
553 }
554
556 {
558 removeVector("save_solution_dot_old");
559 _saved_dot_old = nullptr;
560 }
562 {
564 removeVector("save_solution_dotdot_old");
565 _saved_dotdot_old = nullptr;
566 }
567}
void removeVector(const std::string &name)
Remove a vector from the system with the given name.
NumericVector< Real > * _saved_dotdot_old
NumericVector< Real > * _saved_dot_old
std::vector< NumericVector< Number > * > _saved_solution_states
The saved solution states (0 = current, 1 = old, 2 = older, etc)

◆ restoreSolutions()

void SystemBase::restoreSolutions ( )
virtualinherited

Restore current solutions (call after your solve failed)

Reimplemented in SolverSystem.

Definition at line 1332 of file SystemBase.C.

1333{
1334 if (!hasSolutionState(1))
1335 mooseError("Cannot restore solutions without old solution");
1336
1337 *(const_cast<NumericVector<Number> *&>(currentSolution())) = solutionOld();
1338 solution() = solutionOld();
1339 if (solutionUDotOld())
1341 if (solutionUDotDotOld())
1345 system().update();
1346}
NumericVector< Number > & solutionOld()
Definition SystemBase.h:216

Referenced by SolverSystem::restoreSolutions(), and SystemBase::restoreStateHistory().

◆ restoreStateHistory()

void SystemBase::restoreStateHistory ( )
inherited

Restore solution vectors and additional system-owned state together.

Definition at line 1349 of file SystemBase.C.

1350{
1353}
virtual void restoreSolutions()
Restore current solutions (call after your solve failed)
virtual void restoreAdditionalStates()
Restore system-owned state not represented by solution vectors.

◆ saveOldSolutions()

void SystemBase::saveOldSolutions ( )
virtualinherited

Save the old and older solutions.

Definition at line 512 of file SystemBase.C.

513{
515 if (num_states > 1)
516 {
517 _saved_solution_states.resize(num_states);
518 for (unsigned int i = 1; i <= num_states - 1; ++i)
521 &addVector("save_solution_state_" + std::to_string(i), false, PARALLEL);
522
523 for (unsigned int i = 1; i <= num_states - 1; ++i)
525 }
526
528 _saved_dot_old = &addVector("save_solution_dot_old", false, PARALLEL);
530 _saved_dotdot_old = &addVector("save_solution_dotdot_old", false, PARALLEL);
531
532 if (solutionUDotOld())
534
535 if (solutionUDotDotOld())
537}

◆ serializedSolution()

NumericVector< Number > & SystemBase::serializedSolution ( )
virtualinherited

Returns a reference to a serialized version of the solution vector for this subproblem.

Reimplemented in DisplacedSystem.

Definition at line 1663 of file SystemBase.C.

1664{
1665 if (!_serialized_solution.get())
1666 {
1667 _serialized_solution = NumericVector<Number>::build(_communicator);
1668 _serialized_solution->init(system().n_dofs(), false, SERIAL);
1669 }
1670
1671 return *_serialized_solution;
1672}
const Parallel::Communicator & _communicator

Referenced by PNGOutput::calculateRescalingValues(), PNGOutput::makeMeshFunc(), and DisplacedSystem::serializedSolution().

◆ serializeSolution()

void AuxiliarySystem::serializeSolution ( )
virtual

Definition at line 432 of file AuxiliarySystem.C.

433{
434 if (_serialized_solution.get() &&
435 _sys.n_dofs() > 0) // libMesh does not like serializing of empty vectors
436 {
437 if (!_serialized_solution->initialized() || _serialized_solution->size() != _sys.n_dofs())
438 {
439 _serialized_solution->clear();
440 _serialized_solution->init(_sys.n_dofs(), false, SERIAL);
441 }
442
444 }
445}
virtual void localize(std::vector< T > &v_local) const=0
dof_id_type n_dofs() const

Referenced by compute().

◆ setActiveScalarVariableCoupleableVectorTags()

void SystemBase::setActiveScalarVariableCoupleableVectorTags ( const std::set< TagID > &  vtags,
THREAD_ID  tid 
)
inherited

Set the active vector tags for the scalar variables.

Definition at line 1643 of file SystemBase.C.

1645{
1646 _vars[tid].setActiveScalarVariableCoupleableVectorTags(vtags);
1647}

Referenced by SubProblem::setActiveScalarVariableCoupleableVectorTags().

◆ setActiveVariableCoupleableVectorTags()

void SystemBase::setActiveVariableCoupleableVectorTags ( const std::set< TagID > &  vtags,
THREAD_ID  tid 
)
inherited

Set the active vector tags for the variables.

Definition at line 1637 of file SystemBase.C.

1638{
1639 _vars[tid].setActiveVariableCoupleableVectorTags(vtags);
1640}

Referenced by SubProblem::setActiveFEVariableCoupleableVectorTags().

◆ setCurrentGradientState()

void LinearFVGradientManager::setCurrentGradientState ( LinearFVGradientContainer &  container) const
protectedinherited

Set solution state zero to the current gradient.

Definition at line 249 of file LinearFVGradientManager.C.

250{
251 mooseAssert(!container.state_values.empty(),
252 "Gradient state storage must contain a current state.");
253 auto & current_view = container.state_values[0];
254 current_view.clear();
255 current_view.reserve(container.current_values.size());
256 for (auto & component : container.current_values)
257 current_view.push_back(component.get());
258}

Referenced by LinearFVGradientManager::finalizeLinearFVGradientContainer(), LinearFVGradientManager::initializeLinearFVGradientStorage(), and updateFVGradient().

◆ setScalarVariableCoupleableTags()

void AuxiliarySystem::setScalarVariableCoupleableTags ( ExecFlagType  type)

Definition at line 721 of file AuxiliarySystem.C.

722{
724 const std::vector<std::shared_ptr<AuxScalarKernel>> & objects = storage.getActiveObjects(0);
725
726 std::set<TagID> needed_sc_var_matrix_tags;
727 std::set<TagID> needed_sc_var_vector_tags;
728 for (const auto & obj : objects)
729 {
730 auto & sc_var_coup_vtags = obj->getScalarVariableCoupleableVectorTags();
731 needed_sc_var_vector_tags.insert(sc_var_coup_vtags.begin(), sc_var_coup_vtags.end());
732
733 auto & sc_var_coup_mtags = obj->getScalarVariableCoupleableMatrixTags();
734 needed_sc_var_matrix_tags.insert(sc_var_coup_mtags.begin(), sc_var_coup_mtags.end());
735 }
736
737 _fe_problem.setActiveScalarVariableCoupleableMatrixTags(needed_sc_var_matrix_tags, 0);
738 _fe_problem.setActiveScalarVariableCoupleableVectorTags(needed_sc_var_vector_tags, 0);
739}
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid) override

Referenced by computeScalarVars().

◆ setVariableGlobalDoFs()

void SystemBase::setVariableGlobalDoFs ( const std::string &  var_name)
inherited

set all the global dof indices for a variable

Parameters
var_nameThe name of the variable

Definition at line 188 of file SystemBase.C.

189{
190 AllLocalDofIndicesThread aldit(_subproblem, {var_name});
191 const ConstElemRange & elem_range = *_mesh.getActiveLocalElementRange();
192 Threads::parallel_reduce(elem_range, aldit, numThreads());
193
194 // Gather the dof indices across procs to get all the dof indices for var_name
195 aldit.dofIndicesSetUnion();
196
197 const auto & all_dof_indices = aldit.getDofIndices();
198 _var_all_dof_indices.assign(all_dof_indices.begin(), all_dof_indices.end());
199}
Grab all the (possibly semi)local dof indices for the variables passed in, in the system passed in.

◆ setVerboseFlag()

void SystemBase::setVerboseFlag ( const bool &  verbose)
inlineinherited

Sets the verbose flag.

Parameters
[in]verboseVerbose flag

Definition at line 138 of file SystemBase.h.

138{ _verbose = verbose; }

Referenced by Executioner::Executioner().

◆ sizeVariableMatrixData()

void SystemBase::sizeVariableMatrixData ( )
inherited

size the matrix data for each variable for the number of matrix tags we have

Definition at line 1736 of file SystemBase.C.

1737{
1738 for (const auto & warehouse : _vars)
1739 for (const auto & [var_num, var_ptr] : warehouse.numberToVariableMap())
1740 var_ptr->sizeMatrixTagData();
1741}

◆ skipNextSolutionToOldCopy()

void SystemBase::skipNextSolutionToOldCopy ( )
inlineinherited

Skip the next copy from the solution vector to the old solution vector old -> older is still performed.

Definition at line 1003 of file SystemBase.h.

◆ solution() [1/2]

NumericVector< Number > & SystemBase::solution ( )
inlineinherited

Definition at line 215 of file SystemBase.h.

215{ return solutionState(0); }

Referenced by Adaptivity::adaptMesh(), SolverSystem::applyFixedPointRelaxation(), TransientMultiApp::appTransferVector(), MooseEigenSystem::combineSystemSolution(), compute(), NonlinearSystemBase::computeDamping(), computeElementalVarsHelper(), NonlinearSystemBase::computeJacobianInternal(), computeMortarNodalVars(), NonlinearSystemBase::computeNodalBCsJacobian(), NonlinearSystemBase::computeNodalBCsResidual(), computeNodalVarsHelper(), NonlinearSystemBase::computeResidualTags(), computeScalarVars(), NonlinearSystemBase::constraintResiduals(), SystemBase::copyVars(), GreaterThanLessThanPostprocessor::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), NodalNormalsCorner::execute(), NodalNormalsEvaluator::execute(), NodalNormalsPreprocessor::execute(), NodalNormalsCorner::finalize(), NodalNormalsEvaluator::finalize(), NodalNormalsPreprocessor::finalize(), NodalNormalsCorner::initialize(), NodalNormalsEvaluator::initialize(), NodalNormalsPreprocessor::initialize(), FEProblemSolve::initialSetup(), MooseEigenSystem::initSystemSolution(), ComputeIndicatorThread::onElement(), ComputeMarkerThread::onElement(), ComputeUserObjectsThread::onElement(), ComputeNodalUserObjectsThread::onNode(), FEProblemBase::projectInitialConditionOnCustomRange(), FEProblemBase::projectSolution(), Transient::relativeSolutionDifferenceNorm(), MultiApp::restore(), ElementSubdomainModifierBase::restoreOverriddenDofValues(), SystemBase::restoreSolutions(), PicardSolve::saveVariableValues(), SecantSolve::saveVariableValues(), SteffensenSolve::saveVariableValues(), MooseEigenSystem::scaleSystemSolution(), serializeSolution(), NonlinearSystemBase::setConstraintSecondaryValues(), NonlinearSystemBase::setInitialSolution(), DisplacedSystem::solutionInternal(), NonlinearEigenSystem::solve(), MultiAppDofCopyTransfer::transfer(), PicardSolve::transformVariables(), SecantSolve::transformVariables(), SteffensenSolve::transformVariables(), variableWiseRelativeSolutionDifferenceNorm(), MoveNodesByParsedExpressionModifier::writeOutputs(), and SystemBase::zeroVariables().

◆ solution() [2/2]

const NumericVector< Number > & SystemBase::solution ( ) const
inlineinherited

Definition at line 218 of file SystemBase.h.

218{ return solutionState(0); }

◆ solutionInternal()

NumericVector< Number > & AuxiliarySystem::solutionInternal ( ) const
inlineoverrideprotectedvirtual

Internal getter for solution owned by libMesh.

Implements SystemBase.

Definition at line 255 of file AuxiliarySystem.h.

255{ return *_sys.solution; }
std::unique_ptr< NumericVector< Number > > solution

◆ solutionOld() [1/2]

NumericVector< Number > & SystemBase::solutionOld ( )
inlineinherited

◆ solutionOld() [2/2]

const NumericVector< Number > & SystemBase::solutionOld ( ) const
inlineinherited

Definition at line 219 of file SystemBase.h.

219{ return solutionState(1); }

◆ solutionOlder() [1/2]

NumericVector< Number > & SystemBase::solutionOlder ( )
inlineinherited

◆ solutionOlder() [2/2]

const NumericVector< Number > & SystemBase::solutionOlder ( ) const
inlineinherited

Definition at line 220 of file SystemBase.h.

220{ return solutionState(2); }

◆ solutionPreviousNewton() [1/2]

NumericVector< Number > * SystemBase::solutionPreviousNewton ( )
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 1368 of file SystemBase.C.

1369{
1372 else
1373 return nullptr;
1374}

◆ solutionPreviousNewton() [2/2]

const NumericVector< Number > * SystemBase::solutionPreviousNewton ( ) const
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 1377 of file SystemBase.C.

1378{
1381 else
1382 return nullptr;
1383}

Referenced by copyCurrentIntoPreviousNL(), SystemBase::copyPreviousSolutions(), and SystemBase::restoreSolutions().

◆ solutionState() [1/2]

NumericVector< Number > & SystemBase::solutionState ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type = Moose::SolutionIterationType::Time 
)
virtualinherited

Get a state of the solution (0 = current, 1 = old, 2 = older, etc).

If the state does not exist, it will be initialized in addition to any newer states before it that have not been initialized.

Reimplemented in DisplacedSystem.

Definition at line 1469 of file SystemBase.C.

1471{
1472 if (!hasSolutionState(state, iteration_type))
1473 needSolutionState(state, iteration_type);
1474 return *getSolutionStates(iteration_type)[state];
1475}
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.

Referenced by SolverSystem::applyFixedPointRelaxation(), SystemBase::copyPreviousSolutions(), FunctorNodalCorrector::execute(), PointwiseRenormalizeVector::execute(), PointwiseRenormalizeVector::finalize(), MooseVariableBase::getSolution(), SystemBase::restoreOldSolutions(), SystemBase::saveOldSolutions(), SystemBase::solution(), SystemBase::solution(), SystemBase::solutionOld(), SystemBase::solutionOld(), SystemBase::solutionOlder(), SystemBase::solutionOlder(), DisplacedSystem::solutionState(), and DisplacedSystem::solutionState().

◆ solutionState() [2/2]

const NumericVector< Number > & SystemBase::solutionState ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type = Moose::SolutionIterationType::Time 
) const
virtualinherited

Get a state of the solution (0 = current, 1 = old, 2 = older, etc).

Reimplemented in DisplacedSystem.

Definition at line 1439 of file SystemBase.C.

1441{
1442 if (!hasSolutionState(state, iteration_type))
1443 {
1444 const auto num_states = getNumSolutionStates(iteration_type);
1445 mooseError("For iteration type '",
1446 Moose::stringify(iteration_type),
1447 "': solution state ",
1448 state,
1449 " was requested in ",
1450 name(),
1451 " but only up to state ",
1452 (num_states == 0) ? 0 : num_states - 1,
1453 " is available.");
1454 }
1455
1456 const auto & solution_states = getSolutionStates(iteration_type);
1457
1458 if (state == 0)
1459 mooseAssert(solution_states[0] == &solutionInternal(), "Inconsistent current solution");
1460 else
1461 mooseAssert(solution_states[state] ==
1462 &getVector(oldSolutionStateVectorName(state, iteration_type)),
1463 "Inconsistent solution state");
1464
1465 return *solution_states[state];
1466}

◆ solutionStateParallelType()

libMesh::ParallelType SystemBase::solutionStateParallelType ( const unsigned int  state,
const Moose::SolutionIterationType  iteration_type 
) const
inherited

Returns the parallel type of the given solution state.

Definition at line 1478 of file SystemBase.C.

1480{
1481 if (!hasSolutionState(state, iteration_type))
1482 mooseError("solutionStateParallelType() may only be called if the solution state exists.");
1483 return getSolutionStates(iteration_type)[state]->type();
1484}

Referenced by SolverSystem::applyFixedPointRelaxation(), and SystemBase::needSolutionState().

◆ solutionStatesInitialized()

bool SystemBase::solutionStatesInitialized ( ) const
inlineinherited

Whether or not the solution states have been initialized via initSolutionState()

After the solution states have been initialized, additional solution states cannot be added.

Definition at line 929 of file SystemBase.h.

bool _solution_states_initialized
Whether or not the solution states have been initialized.

Referenced by LinearFVGradientManager::computeGradientsForMethods(), LinearFVGradientManager::resizeGradientStateStorage(), AuxScalarKernel::uOld(), and ScalarKernelBase::uOld().

◆ solutionUDot() [1/2]

virtual NumericVector< Number > * SystemBase::solutionUDot ( )
inlinevirtualinherited

◆ solutionUDot() [2/2]

virtual const NumericVector< Number > * SystemBase::solutionUDot ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 296 of file SystemBase.h.

296{ return _u_dot; }

◆ solutionUDotDot() [1/2]

virtual NumericVector< Number > * SystemBase::solutionUDotDot ( )
inlinevirtualinherited

◆ solutionUDotDot() [2/2]

virtual const NumericVector< Number > * SystemBase::solutionUDotDot ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 297 of file SystemBase.h.

297{ return _u_dotdot; }

◆ solutionUDotDotOld() [1/2]

virtual NumericVector< Number > * SystemBase::solutionUDotDotOld ( )
inlinevirtualinherited

◆ solutionUDotDotOld() [2/2]

virtual const NumericVector< Number > * SystemBase::solutionUDotDotOld ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 299 of file SystemBase.h.

299{ return _u_dotdot_old; }

◆ solutionUDotOld() [1/2]

virtual NumericVector< Number > * SystemBase::solutionUDotOld ( )
inlinevirtualinherited

◆ solutionUDotOld() [2/2]

virtual const NumericVector< Number > * SystemBase::solutionUDotOld ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 298 of file SystemBase.h.

298{ return _u_dot_old; }

◆ solve()

void SystemBase::solve ( )
virtualinherited

Solve the system (using libMesh magic)

Reimplemented in DumpObjectsLinearSystem, DumpObjectsNonlinearSystem, LinearSystem, NonlinearEigenSystem, NonlinearSystem, and NonlinearSystemBase.

Definition at line 1249 of file SystemBase.C.

1250{
1251 system().solve();
1252}
virtual void solve()

◆ subdomainSetup()

void AuxiliarySystem::subdomainSetup ( )
overridevirtual

Reimplemented from SystemBase.

Definition at line 195 of file AuxiliarySystem.C.

196{
198
199 for (unsigned int tid = 0; tid < this->numThreads(); tid++)
200 {
202 _nodal_aux_storage.subdomainSetup(tid);
203 _mortar_nodal_aux_storage.subdomainSetup(tid);
204 _nodal_vec_aux_storage.subdomainSetup(tid);
205 _nodal_array_aux_storage.subdomainSetup(tid);
206 _elemental_aux_storage.subdomainSetup(tid);
207 _elemental_vec_aux_storage.subdomainSetup(tid);
208 _elemental_array_aux_storage.subdomainSetup(tid);
209 }
210}
virtual void subdomainSetup(THREAD_ID tid=0) const
virtual void subdomainSetup()

◆ subproblem() [1/2]

SubProblem & SystemBase::subproblem ( )
inlineinherited

◆ subproblem() [2/2]

const SubProblem & SystemBase::subproblem ( ) const
inlineinherited

Definition at line 103 of file SystemBase.h.

103{ return _subproblem; }

◆ sys()

virtual libMesh::System & AuxiliarySystem::sys ( )
inlinevirtual

Definition at line 139 of file AuxiliarySystem.h.

139{ return _sys; }

◆ system() [1/2]

virtual const libMesh::System & AuxiliarySystem::system ( ) const
inlineoverridevirtual

Implements SystemBase.

Definition at line 142 of file AuxiliarySystem.h.

142{ return _sys; }

◆ system() [2/2]

virtual libMesh::System & AuxiliarySystem::system ( )
inlineoverridevirtual

◆ systemMatrixTag()

virtual TagID SystemBase::systemMatrixTag ( ) const
inlinevirtualinherited

Return the Matrix Tag ID for System.

Reimplemented in DisplacedSystem, LinearSystem, and NonlinearSystemBase.

Definition at line 328 of file SystemBase.h.

328{ mooseError("Not implemented yet"); }

Referenced by SystemBase::defaultMatrixTags(), and DisplacedSystem::systemMatrixTag().

◆ timedSectionName()

std::string PerfGraphInterface::timedSectionName ( const std::string &  section_name) const
protectedinherited
Returns
The name of the timed section with the name section_name.

Optionally adds a prefix if one is defined.

Definition at line 55 of file PerfGraphInterface.C.

56{
57 return _prefix.empty() ? section_name : _prefix + "::" + section_name;
58}
const std::string _prefix
A prefix to use for all sections.

Referenced by PerfGraphInterface::registerTimedSection(), and PerfGraphInterface::registerTimedSection().

◆ timestepSetup()

void AuxiliarySystem::timestepSetup ( )
overridevirtual

Reimplemented from SystemBase.

Definition at line 149 of file AuxiliarySystem.C.

150{
152
153 for (unsigned int tid = 0; tid < this->numThreads(); tid++)
154 {
156 _nodal_aux_storage.timestepSetup(tid);
157 _mortar_nodal_aux_storage.timestepSetup(tid);
158 _nodal_vec_aux_storage.timestepSetup(tid);
159 _nodal_array_aux_storage.timestepSetup(tid);
160 _elemental_aux_storage.timestepSetup(tid);
161 _elemental_vec_aux_storage.timestepSetup(tid);
162 _elemental_array_aux_storage.timestepSetup(tid);
163 }
164
165#ifdef MOOSE_KOKKOS_ENABLED
168#endif
169}
virtual void timestepSetup(THREAD_ID tid=0) const
virtual void timestepSetup()

◆ timeVectorTag()

virtual TagID SystemBase::timeVectorTag ( ) const
inlinevirtualinherited

Ideally, we should not need this API.

There exists a really bad API "addCachedResidualDirectly " in FEProblem and DisplacedProblem This API should go away once addCachedResidualDirectly is removed in the future Return Tag ID for Time

Reimplemented in DisplacedSystem, and NonlinearSystemBase.

Definition at line 323 of file SystemBase.h.

323{ mooseError("Not implemented yet"); }

Referenced by SystemBase::defaultVectorTags(), and DisplacedSystem::timeVectorTag().

◆ update()

void SystemBase::update ( )
inherited

◆ updateActive()

void AuxiliarySystem::updateActive ( THREAD_ID  tid)
virtual

Definition at line 259 of file AuxiliarySystem.C.

260{
262 _nodal_aux_storage.updateActive(tid);
263 _mortar_nodal_aux_storage.updateActive(tid);
264 _nodal_vec_aux_storage.updateActive(tid);
265 _nodal_array_aux_storage.updateActive(tid);
266 _elemental_aux_storage.updateActive(tid);
267 _elemental_vec_aux_storage.updateActive(tid);
268 _elemental_array_aux_storage.updateActive(tid);
269
270#ifdef MOOSE_KOKKOS_ENABLED
271 if (tid == 0)
272 {
275
277 }
278#endif
279}
void updateActive(THREAD_ID tid=0) override
Updates the active objects storage.

◆ updateFVGradient()

void LinearFVGradientManager::updateFVGradient ( const LinearFVGradientReader &  reader)

Update a registered gradient reader explicitly.

Parameters
readerGradient reader to update.

Definition at line 87 of file LinearFVGradientManager.C.

169{
170 if (&reader.system() != &_sys)
171 mooseError("Requested update for a linear FV gradient field from a different system than '",
172 _sys.name(),
173 "'.");
174
175 const auto method_container_pair = _linear_fv_gradient_container_by_method.find(&reader.method());
176 if (method_container_pair != _linear_fv_gradient_container_by_method.end())
177 {
178 auto * const perf_graph_interface = dynamic_cast<PerfGraphInterface *>(&_sys);
179 mooseAssert(perf_graph_interface,
180 "LinearFVGradientManager requires its owning system to implement "
181 "PerfGraphInterface.");
182 const auto perf_id =
183 perf_graph_interface->registerTimedSection("LinearVariableFV_Gradients", 3);
184 mooseAssert(!Threads::in_threads, "PerfGraph timing cannot be used within threaded sections");
185 PerfGuard time_guard(perf_graph_interface->perfGraph(), perf_id);
186
187 auto & container = computeLinearFVGradientContainer(reader.method());
189 return;
190 }
191
192 mooseError("Requested update for an unregistered linear FV gradient field on system '",
193 _sys.name(),
194 "'.");
195}

◆ validParams()

InputParameters PerfGraphInterface::validParams ( )
staticinherited

Definition at line 16 of file PerfGraphInterface.C.

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

Referenced by Convergence::validParams().

◆ variableWarehouse()

const VariableWarehouse & SystemBase::variableWarehouse ( THREAD_ID  tid = 0) const
inlineinherited

Definition at line 787 of file SystemBase.h.

787{ return _vars[tid]; }

Referenced by NonlinearSystemBase::checkKernelCoverage(), and updateFVGradient().

◆ variableWiseRelativeSolutionDifferenceNorm()

void AuxiliarySystem::variableWiseRelativeSolutionDifferenceNorm ( std::vector< Number > &  var_diffs) const

Computes and stores ||current - old|| / ||current|| for each variable in the given vector.

Parameters
var_diffsa vector being filled with the L2 norm of the solution difference

Definition at line 1034 of file AuxiliarySystem.C.

1036{
1037 rel_diff_norms.resize(nVariables(), 0);
1038 // Get dof map from system
1039 const auto & dof_map = _sys.get_dof_map();
1040
1041 for (const auto n : make_range(nVariables()))
1042 {
1043 // Get local indices from dof map for each variable
1044 std::vector<dof_id_type> local_indices_n;
1045 dof_map.local_variable_indices(local_indices_n, _mesh, n);
1046 Number diff_norm_n = 0;
1047 Number norm_n = 0;
1048 // Get values from system, update norm
1049 for (const auto local_index : local_indices_n)
1050 {
1051 const Number & value = solution()(local_index);
1052 const Number & value_old = solutionOld()(local_index);
1053 diff_norm_n += Utility::pow<2, Number>(value - value_old);
1054 norm_n += Utility::pow<2, Number>(value);
1055 }
1056 // Aggregate norm over proceccors
1057 _communicator.sum(diff_norm_n);
1058 _communicator.sum(norm_n);
1059 diff_norm_n = sqrt(diff_norm_n);
1060 norm_n = sqrt(norm_n);
1061 rel_diff_norms[n] = diff_norm_n > 0 ? diff_norm_n / norm_n : 0.0;
1062 }
1063}
virtual unsigned int nVariables() const
Get the number of variables in this system.
Definition SystemBase.C:891
void local_variable_indices(T &idx, const MeshBase &mesh, unsigned int var_num) const
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real Number

Referenced by DefaultSteadyStateConvergence::checkConvergence().

◆ varKind()

Moose::VarKindType SystemBase::varKind ( ) const
inlineinherited
Returns
the type of variables this system holds, e.g. nonlinear or auxiliary

Definition at line 957 of file SystemBase.h.

957{ return _var_kind; }
Moose::VarKindType _var_kind
default kind of variables in this system

Referenced by Coupleable::coupled().

◆ zeroTaggedVector()

void SystemBase::zeroTaggedVector ( const TagID  tag)
inherited

Zero vector with the given tag.

Definition at line 676 of file SystemBase.C.

677{
679 mooseError("Cannot zero vector with TagID ",
680 tag,
681 " in system '",
682 name(),
683 "' because that tag does not exist in the problem");
684 else if (!hasVector(tag))
685 mooseError("Cannot zero vector tag with name '",
687 "' in system '",
688 name(),
689 "' because there is no vector associated with that tag");
691 getVector(tag).zero();
692}
bool vectorTagNotZeroed(const TagID tag) const
Checks if a vector tag is in the list of vectors that will not be zeroed when other tagged vectors ar...
Definition SubProblem.C:147
virtual void zero()=0

Referenced by SystemBase::zeroTaggedVectors().

◆ zeroTaggedVectors()

void SystemBase::zeroTaggedVectors ( const std::set< TagID > &  tags)
inherited

Zero all vectors for given tags.

Definition at line 695 of file SystemBase.C.

696{
697 for (const auto tag : tags)
698 zeroTaggedVector(tag);
699}
void zeroTaggedVector(const TagID tag)
Zero vector with the given tag.
Definition SystemBase.C:676

Referenced by NonlinearSystemBase::computeResidualAndJacobianTags(), and NonlinearSystemBase::computeResidualTags().

◆ zeroVariables()

void SystemBase::zeroVariables ( std::vector< std::string > &  vars_to_be_zeroed)
virtualinherited

Zero out the solution for the list of variables passed in.

@ param vars_to_be_zeroed The variable names in this vector will have their solutions set to zero after this call

Reimplemented in DisplacedSystem.

Definition at line 202 of file SystemBase.C.

203{
204 if (vars_to_be_zeroed.size() > 0)
205 {
206 NumericVector<Number> & solution = this->solution();
207
208 auto problem = dynamic_cast<FEProblemBase *>(&_subproblem);
209 if (!problem)
210 mooseError("System needs to be registered in FEProblemBase for using zeroVariables.");
211
212 AllLocalDofIndicesThread aldit(*problem, vars_to_be_zeroed, true);
213 const ConstElemRange & elem_range = *_mesh.getActiveLocalElementRange();
214 Threads::parallel_reduce(elem_range, aldit, numThreads());
215
216 const auto & dof_indices_to_zero = aldit.getDofIndices();
217
218 solution.close();
219
220 for (const auto & dof : dof_indices_to_zero)
221 solution.set(dof, 0);
222
223 solution.close();
224
225 // Call update to update the current_local_solution for this system
226 system().update();
227 }
228}
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.

Referenced by DisplacedSystem::zeroVariables(), SystemBase::zeroVariablesForJacobian(), and SystemBase::zeroVariablesForResidual().

◆ zeroVariablesForJacobian()

void SystemBase::zeroVariablesForJacobian ( )
virtualinherited

Zero out the solution for the variables that were registered as needing to have their solutions zeroed on out on Jacobian evaluation by a call to addVariableToZeroOnResidual()

Definition at line 237 of file SystemBase.C.

238{
240}
virtual void zeroVariables(std::vector< std::string > &vars_to_be_zeroed)
Zero out the solution for the list of variables passed in.
Definition SystemBase.C:202

◆ zeroVariablesForResidual()

void SystemBase::zeroVariablesForResidual ( )
virtualinherited

Zero out the solution for the variables that were registered as needing to have their solutions zeroed on out on residual evaluation by a call to addVariableToZeroOnResidual()

Definition at line 231 of file SystemBase.C.

Friends And Related Symbol Documentation

◆ ComputeIndicatorThread

friend class ComputeIndicatorThread
friend

Definition at line 247 of file AuxiliarySystem.h.

◆ ComputeMarkerThread

friend class ComputeMarkerThread
friend

Definition at line 248 of file AuxiliarySystem.h.

◆ ComputeNodalKernelBCJacobiansThread

Definition at line 253 of file AuxiliarySystem.h.

◆ ComputeNodalKernelBcsThread

friend class ComputeNodalKernelBcsThread
friend

Definition at line 251 of file AuxiliarySystem.h.

◆ ComputeNodalKernelJacobiansThread

friend class ComputeNodalKernelJacobiansThread
friend

Definition at line 252 of file AuxiliarySystem.h.

◆ ComputeNodalKernelsThread

friend class ComputeNodalKernelsThread
friend

Definition at line 250 of file AuxiliarySystem.h.

◆ FlagElementsThread

friend class FlagElementsThread
friend

Definition at line 249 of file AuxiliarySystem.h.

Member Data Documentation

◆ _active_tagged_matrices

std::unordered_map<TagID, libMesh::SparseMatrix<Number> *> SystemBase::_active_tagged_matrices
protectedinherited

Active tagged matrices. A matrix is active if its tag-matrix pair is present in the map. We use a map instead of a vector so that users can easily add and remove to this container with calls to (de)activateMatrixTag.

Definition at line 1070 of file SystemBase.h.

Referenced by SystemBase::activateAllMatrixTags(), SystemBase::deactivateAllMatrixTags(), and SystemBase::reinitElem().

◆ _app

MooseApp& SystemBase::_app
protectedinherited

◆ _automatic_scaling

bool SystemBase::_automatic_scaling
protectedinherited

Whether to automatically scale the variables.

Definition at line 1100 of file SystemBase.h.

Referenced by SystemBase::automaticScaling(), SystemBase::automaticScaling(), NonlinearSystemBase::initialSetup(), and NonlinearSystemBase::preSolve().

◆ _aux_scalar_storage

ExecuteMooseObjectWarehouse<AuxScalarKernel> AuxiliarySystem::_aux_scalar_storage
protected

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MaterialOutputAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), FEProblemBase::adaptMesh(), Adaptivity::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonConformingFaces(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), MeshDiagnosticsGenerator::checkPolygons(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkResidualConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), CoarsenSurfaceMeshAlongSidesetGenerator::coarsenAlongSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeLinearSystemTags(), LinearSystem::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), TimeStepper::constrainStep(), IterationAdaptiveDT::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), MessageFromInput::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), SidesetAroundSubdomainUpdater::finalize(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), CoarsenBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), OrientSurfaceMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), StitchMeshGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), SubProblem::initialSetup(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), SurfaceDelaunayGeneratorBase::meshNormalDeviation2D(), MooseBase::mooseDeprecated(), MooseBase::mooseDeprecatedNoTrace(), MooseBase::mooseInfo(), MooseBase::mooseWarning(), MooseBase::mooseWarningNonPrefixed(), NEML2Action::NEML2Action(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), Console::output(), DOFMapOutput::output(), MaterialPropertyDebugOutput::output(), PerfGraphOutput::output(), ReporterDebugOutput::output(), SolutionInvalidityOutput::output(), VariableResidualNormsDebugOutput::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), WebServerControl::outputMessage(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), DefaultMultiAppFixedPointConvergence::preLoop(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), PicardSolve::printFixedPointConvergenceHistory(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), LinearSystem::solve(), NonlinearSystem::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), EigenProblem::solve(), FixedPointSolve::solveStep(), TransientMultiApp::solveStep(), MeshRepairGenerator::splitNonConvexPolygons(), PerfGraphLivePrint::start(), WebServerControl::startServer(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), MFEMTransient::takeStep(), TerminateChainControl::terminate(), SubProblem::timestepSetup(), FEProblemBase::updateMeshXFEM(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _current_solution

const NumericVector<Number>* AuxiliarySystem::_current_solution
protected

solution vector from nonlinear solver

Definition at line 195 of file AuxiliarySystem.h.

Referenced by currentSolution(), initialSetup(), and reinit().

◆ _du_dot_du

std::vector<Real> SystemBase::_du_dot_du
protectedinherited

Derivative of time derivative of u with respect to uj.

This depends on the time integration scheme

Definition at line 1062 of file SystemBase.h.

Referenced by SystemBase::duDotDu(), and SystemBase::duDotDus().

◆ _du_dotdot_du

Real SystemBase::_du_dotdot_du
protectedinherited

Definition at line 1063 of file SystemBase.h.

Referenced by SystemBase::duDotDotDu(), and SystemBase::duDotDotDu().

◆ _elem_vars

std::vector<std::vector<MooseVariableFieldBase *> > AuxiliarySystem::_elem_vars
protected

Elemental variables.

These may be either finite element or finite volume variables

Definition at line 207 of file AuxiliarySystem.h.

Referenced by addVariable(), ComputeIndicatorThread::onElement(), ComputeMarkerThread::onElement(), ComputeIndicatorThread::onInternalSide(), reinitElem(), reinitElemFace(), and ComputeMarkerThread::subdomainChanged().

◆ _elemental_array_aux_storage

ExecuteMooseObjectWarehouse<ArrayAuxKernel> AuxiliarySystem::_elemental_array_aux_storage
protected

◆ _elemental_aux_storage

ExecuteMooseObjectWarehouse<AuxKernel> AuxiliarySystem::_elemental_aux_storage
protected

◆ _elemental_vec_aux_storage

ExecuteMooseObjectWarehouse<VectorAuxKernel> AuxiliarySystem::_elemental_vec_aux_storage
protected

◆ _factory

Factory& SystemBase::_factory
protectedinherited

◆ _fe_problem

FEProblemBase& SystemBase::_fe_problem
protectedinherited

the governing finite element/volume problem

Definition at line 1031 of file SystemBase.h.

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addConstraint(), NonlinearSystemBase::addDGKernel(), NonlinearSystemBase::addDiracKernel(), SystemBase::addDotVectors(), NonlinearSystemBase::addHDGKernel(), NonlinearSystemBase::addInterfaceKernel(), NonlinearSystemBase::addKernel(), NonlinearSystemBase::addNodalKernel(), NonlinearSystemBase::addScalarKernel(), NonlinearSystemBase::addSplit(), NonlinearSystemBase::augmentSparsity(), SolverSystem::checkInvalidSolution(), NonlinearSystemBase::checkKernelCoverage(), clearScalarVariableCoupleableTags(), compute(), LinearSystem::compute(), SolverSystem::compute(), NonlinearSystemBase::computeDamping(), NonlinearSystemBase::computeDiracContributions(), computeElementalVarsHelper(), NonlinearSystemBase::computeJacobian(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), LinearSystem::computeLinearSystemTags(), computeMortarNodalVars(), NonlinearSystemBase::computeNodalBCsJacobian(), NonlinearSystemBase::computeNodalBCsResidual(), NonlinearSystemBase::computeNodalBCsResidual(), NonlinearSystemBase::computeNodalBCsResidualAndJacobian(), computeNodalVarsHelper(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), NonlinearSystemBase::computeResidualTags(), NonlinearSystemBase::computeScalarKernelsJacobians(), computeScalarVars(), NonlinearSystemBase::computeScaling(), NonlinearSystem::computeScalingJacobian(), NonlinearSystem::computeScalingResidual(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), LinearSystem::containsTimeKernel(), NonlinearSystem::converged(), NonlinearSystemBase::convergence(), NonlinearSystemBase::customSetup(), MooseEigenSystem::eigenKernelOnCurrent(), MooseEigenSystem::eigenKernelOnOld(), NonlinearSystemBase::enforceNodalConstraintsJacobian(), NonlinearSystemBase::enforceNodalConstraintsResidual(), SystemBase::feProblem(), SystemBase::feProblem(), NonlinearSystemBase::getFVSetupObjects(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), LinearSystem::initialSetup(), NonlinearSystemBase::initialSetup(), NonlinearSystemBase::jacobianSetup(), LinearSystem::LinearSystem(), NonlinearSystemBase::NonlinearSystemBase(), NonlinearSystemBase::overwriteNodeFace(), NonlinearSystem::potentiallySetupFiniteDifferencing(), LinearSystem::preInit(), NonlinearSystemBase::preInit(), NonlinearSystemBase::reinitNodeFace(), NonlinearSystem::residualAndJacobianTogether(), NonlinearSystemBase::residualSetup(), NonlinearSystemBase::setConstraintSecondaryValues(), NonlinearSystemBase::setInitialSolution(), LinearSystem::setMatrixOptions(), NonlinearSystemBase::setMatrixOptions(), setScalarVariableCoupleableTags(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), NonlinearSystem::solve(), and NonlinearSystemBase::timestepSetup().

◆ _kokkos_aux_stages

std::map<ExecFlagType, std::vector<KokkosAuxStage> > AuxiliarySystem::_kokkos_aux_stages
protected

Active Kokkos auxiliary kernels of each execution flag grouped into stages, where a kernel coupling the current value of a variable runs in a later stage than the kernels writing it.

Definition at line 244 of file AuxiliarySystem.h.

◆ _kokkos_elemental_aux_storage

ExecuteMooseObjectWarehouse<AuxKernelBase> AuxiliarySystem::_kokkos_elemental_aux_storage
protected

◆ _kokkos_nodal_aux_storage

ExecuteMooseObjectWarehouse<AuxKernelBase> AuxiliarySystem::_kokkos_nodal_aux_storage
protected

◆ _linear_fv_gradient_container_by_method

std::unordered_map<const FVGradientMethod *, LinearFVGradientContainer> LinearFVGradientManager::_linear_fv_gradient_container_by_method
protectedinherited

◆ _linear_fv_gradient_methods

std::vector<const FVGradientMethod *> LinearFVGradientManager::_linear_fv_gradient_methods
protectedinherited

Registered gradient methods in registration order.

Definition at line 212 of file LinearFVGradientManager.h.

Referenced by LinearFVGradientManager::computeGradients(), LinearFVGradientManager::computeGradientsExcept(), and updateFVGradient().

◆ _matrix_tag_active_flags

std::vector<bool> SystemBase::_matrix_tag_active_flags
protectedinherited

Active flags for tagged matrices.

Definition at line 1072 of file SystemBase.h.

Referenced by SystemBase::activateAllMatrixTags(), SystemBase::deactivateAllMatrixTags(), and SystemBase::matrixTagActive().

◆ _max_var_n_dofs_per_elem

size_t SystemBase::_max_var_n_dofs_per_elem
protectedinherited

Maximum number of dofs for any one variable on any one element.

Definition at line 1088 of file SystemBase.h.

Referenced by SystemBase::assignMaxVarNDofsPerElem(), and SystemBase::getMaxVarNDofsPerElem().

◆ _max_var_n_dofs_per_node

size_t SystemBase::_max_var_n_dofs_per_node
protectedinherited

Maximum number of dofs for any one variable on any one node.

Definition at line 1091 of file SystemBase.h.

Referenced by SystemBase::assignMaxVarNDofsPerNode(), and SystemBase::getMaxVarNDofsPerNode().

◆ _max_var_number

unsigned int SystemBase::_max_var_number
protectedinherited

Maximum variable number.

Definition at line 1045 of file SystemBase.h.

Referenced by SystemBase::getMaxVariableNumber().

◆ _mesh

MooseMesh& SystemBase::_mesh
protectedinherited

◆ _mortar_nodal_aux_storage

ExecuteMooseObjectWarehouse<AuxKernel> AuxiliarySystem::_mortar_nodal_aux_storage
protected

◆ _name

std::string SystemBase::_name
protectedinherited

The name of this system.

Definition at line 1038 of file SystemBase.h.

◆ _nodal_array_aux_storage

ExecuteMooseObjectWarehouse<ArrayAuxKernel> AuxiliarySystem::_nodal_array_aux_storage
protected

◆ _nodal_aux_storage

ExecuteMooseObjectWarehouse<AuxKernel> AuxiliarySystem::_nodal_aux_storage
protected

◆ _nodal_vars

std::vector<std::vector<MooseVariableFEBase *> > AuxiliarySystem::_nodal_vars
protected

◆ _nodal_vec_aux_storage

ExecuteMooseObjectWarehouse<VectorAuxKernel> AuxiliarySystem::_nodal_vec_aux_storage
protected

◆ _numbered_vars

std::vector<std::vector<MooseVariableFieldBase *> > SystemBase::_numbered_vars
protectedinherited

Map variable number to its pointer.

Definition at line 1097 of file SystemBase.h.

Referenced by SystemBase::addVariable(), and SystemBase::getVariable().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 135 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _prefix

const std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 138 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _saved_dot_old

NumericVector<Real>* SystemBase::_saved_dot_old
protectedinherited

Definition at line 1079 of file SystemBase.h.

Referenced by SystemBase::restoreOldSolutions(), and SystemBase::saveOldSolutions().

◆ _saved_dotdot_old

NumericVector<Real>* SystemBase::_saved_dotdot_old
protectedinherited

Definition at line 1080 of file SystemBase.h.

Referenced by SystemBase::restoreOldSolutions(), and SystemBase::saveOldSolutions().

◆ _saved_old

NumericVector<Real>* SystemBase::_saved_old
protectedinherited

Definition at line 1075 of file SystemBase.h.

◆ _saved_older

NumericVector<Real>* SystemBase::_saved_older
protectedinherited

Definition at line 1076 of file SystemBase.h.

◆ _saved_solution_states

std::vector<NumericVector<Number> *> SystemBase::_saved_solution_states
privateinherited

The saved solution states (0 = current, 1 = old, 2 = older, etc)

Definition at line 1145 of file SystemBase.h.

Referenced by SystemBase::restoreOldSolutions(), and SystemBase::saveOldSolutions().

◆ _serialized_solution

std::unique_ptr<NumericVector<Number> > SystemBase::_serialized_solution
protectedinherited

Serialized version of the solution vector, or nullptr if a serialized solution is not needed.

Definition at line 1113 of file SystemBase.h.

Referenced by compute(), SolverSystem::preInit(), SystemBase::serializedSolution(), serializeSolution(), SolverSystem::serializeSolution(), and SolverSystem::setSolution().

◆ _skip_next_solution_to_old_copy

bool SystemBase::_skip_next_solution_to_old_copy
privateinherited

Whether to skip the next copy from the solution to the old vector.

Definition at line 1147 of file SystemBase.h.

Referenced by SystemBase::advanceStateHistory(), SystemBase::copyPreviousSolutions(), and SystemBase::skipNextSolutionToOldCopy().

◆ _solution_state

std::vector<NumericVector<Number> *> AuxiliarySystem::_solution_state
protected

The current states of the solution (0 = current, 1 = old, etc)

Definition at line 198 of file AuxiliarySystem.h.

◆ _solution_states

std::array<std::vector<NumericVector<Number> *>, static_cast<size_t>(Moose::SolutionIterationType::Count)> SystemBase::_solution_states
privateinherited

2D array of solution state vector pointers.

Outer (array) index: SolutionIterationType (Time, Nonlinear, ...) Inner (vector) index: State (0=current, 1=old, ...)

Should only be accessed through getSolutionStates() when possible for bounds checking.

Definition at line 1143 of file SystemBase.h.

Referenced by SystemBase::getSolutionStates().

◆ _solution_states_initialized

bool SystemBase::_solution_states_initialized
protectedinherited

Whether or not the solution states have been initialized.

Definition at line 1106 of file SystemBase.h.

Referenced by SystemBase::initSolutionState(), and SystemBase::solutionStatesInitialized().

◆ _subproblem

SubProblem& SystemBase::_subproblem
protectedinherited

◆ _sys

libMesh::System& AuxiliarySystem::_sys
protected

◆ _tagged_matrices

std::vector<libMesh::SparseMatrix<Number> *> SystemBase::_tagged_matrices
protectedinherited

◆ _tagged_vectors

std::vector<NumericVector<Number> *> SystemBase::_tagged_vectors
protectedinherited

◆ _time_integrators

std::vector<std::shared_ptr<TimeIntegrator> > SystemBase::_time_integrators
protectedinherited

◆ _u_dot

NumericVector<Number>* SystemBase::_u_dot
protectedinherited

◆ _u_dot_old

NumericVector<Number>* SystemBase::_u_dot_old
protectedinherited

◆ _u_dotdot

NumericVector<Number>* SystemBase::_u_dotdot
protectedinherited

◆ _u_dotdot_old

NumericVector<Number>* SystemBase::_u_dotdot_old
protectedinherited

◆ _var_all_dof_indices

std::vector<dof_id_type> SystemBase::_var_all_dof_indices
protectedinherited

Container for the dof indices of a given variable.

Definition at line 1109 of file SystemBase.h.

Referenced by SystemBase::getVariableGlobalDoFs(), and SystemBase::setVariableGlobalDoFs().

◆ _var_kind

Moose::VarKindType SystemBase::_var_kind
protectedinherited

default kind of variables in this system

Definition at line 1083 of file SystemBase.h.

Referenced by SystemBase::varKind().

◆ _var_map

std::map<unsigned int, std::set<SubdomainID> > SystemBase::_var_map
protectedinherited

Map of variables (variable id -> array of subdomains where it lives)

Definition at line 1043 of file SystemBase.h.

Referenced by SystemBase::getSubdomainsForVar(), and SystemBase::getVariableBlocks().

◆ _var_to_copy

std::vector<VarCopyInfo> SystemBase::_var_to_copy
protectedinherited

◆ _vars

std::vector<VariableWarehouse> SystemBase::_vars
protectedinherited

Variable warehouses (one for each thread)

Definition at line 1041 of file SystemBase.h.

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addInterfaceKernel(), addVariable(), SystemBase::applyScalingFactors(), SystemBase::clearAllDofIndices(), compute(), SystemBase::customSetup(), SystemBase::getActualFieldVariable(), SystemBase::getActualFieldVariable(), SystemBase::getFieldVariable(), SystemBase::getFieldVariable(), SystemBase::getFVVariable(), SystemBase::getMinQuadratureOrder(), getMinQuadratureOrder(), SystemBase::getScalarVariable(), SystemBase::getScalarVariable(), SystemBase::getScalarVariables(), SystemBase::getVariable(), SystemBase::getVariableNames(), SystemBase::getVariables(), SystemBase::initialSetup(), LinearSystem::initialSetup(), SystemBase::jacobianSetup(), SystemBase::nFieldVariables(), SystemBase::nFVVariables(), SystemBase::nVariables(), SystemBase::prepare(), SystemBase::prepareFace(), SystemBase::prepareLowerD(), SystemBase::prepareNeighbor(), SystemBase::reinitElem(), SystemBase::reinitElemFace(), SystemBase::reinitLowerD(), SystemBase::reinitNeighbor(), SystemBase::reinitNeighborFace(), SystemBase::reinitNode(), SystemBase::reinitNodeFace(), SystemBase::reinitNodes(), SystemBase::reinitNodesNeighbor(), SystemBase::reinitScalars(), SystemBase::residualSetup(), SystemBase::setActiveScalarVariableCoupleableVectorTags(), SystemBase::setActiveVariableCoupleableVectorTags(), NonlinearSystemBase::setupScalingData(), SystemBase::sizeVariableMatrixData(), SystemBase::subdomainSetup(), SystemBase::timestepSetup(), and SystemBase::variableWarehouse().

◆ _vars_to_be_zeroed_on_jacobian

std::vector<std::string> SystemBase::_vars_to_be_zeroed_on_jacobian
protectedinherited

◆ _vars_to_be_zeroed_on_residual

std::vector<std::string> SystemBase::_vars_to_be_zeroed_on_residual
protectedinherited

◆ _verbose

bool SystemBase::_verbose
protectedinherited

True if printing out additional information.

Definition at line 1103 of file SystemBase.h.

Referenced by SystemBase::applyScalingFactors(), and SystemBase::setVerboseFlag().


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