www.mooseframework.org
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DumpObjectsProblem Class Reference

Specialization of SubProblem for dumping generated objects as input file syntax. More...

#include <DumpObjectsProblem.h>

Inheritance diagram for DumpObjectsProblem:
[legend]

Public Member Functions

 DumpObjectsProblem (const InputParameters &parameters)
 
void addVariable (const std::string &var_name, const FEType &type, Real scale_factor, const std::set< SubdomainID > *const active_subdomains=NULL) override
 
void addScalarVariable (const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL) override
 
void addAuxVariable (const std::string &var_name, const FEType &type, const std::set< SubdomainID > *const active_subdomains=NULL) override
 
void addAuxScalarVariable (const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL) override
 
void addFunction (std::string type, const std::string &name, InputParameters parameters) override
 
void addKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addNodalKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addScalarKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addBoundaryCondition (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addConstraint (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addAuxKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addAuxScalarKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addDiracKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addDGKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addInterfaceKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addInitialCondition (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addMaterial (const std::string &type, const std::string &name, InputParameters parameters) override
 
void dumpGeneratedSyntax (const std::string path)
 output input blocks for a given action path More...
 
virtual void solve () override
 output data in solve More...
 
virtual void initialSetup () override
 
virtual void advanceState () override
 Advance all of the state holding vectors / datastructures so that we can move to the next timestep. More...
 
virtual void timestepSetup () override
 
virtual void execute (const ExecFlagType &) override
 Convenience function for performing execution of MOOSE systems. More...
 
virtual void outputStep (ExecFlagType) override
 Output the current step. More...
 
virtual void updateActiveObjects () override
 Update the active objects in the warehouses. More...
 
virtual void onTimestepEnd () override
 
virtual void computeIndicators () override
 
virtual void computeMarkers () override
 
virtual bool adaptMesh () override
 
virtual void addLineSearch (const InputParameters &) override
 add a MOOSE line search More...
 
virtual EquationSystems & es () override
 
virtual MooseMeshmesh () override
 
virtual Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) override
 
virtual void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 
void setCoupling (Moose::CouplingType type)
 Set the coupling between variables TODO: allow user-defined coupling. More...
 
Moose::CouplingType coupling ()
 
void setCouplingMatrix (std::unique_ptr< CouplingMatrix > cm)
 Set custom coupling matrix. More...
 
void setCouplingMatrix (CouplingMatrix *cm)
 
const CouplingMatrix * couplingMatrix ()
 
void setNonlocalCouplingMatrix ()
 Set custom coupling matrix for variables requiring nonlocal contribution. More...
 
bool areCoupled (unsigned int ivar, unsigned int jvar)
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & couplingEntries (THREAD_ID tid)
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & nonlocalCouplingEntries (THREAD_ID tid)
 
virtual MooseNonlinearConvergenceReason checkNonlinearConvergence (std::string &msg, const PetscInt it, const Real xnorm, const Real snorm, const Real fnorm, const Real rtol, const Real stol, const Real abstol, const PetscInt nfuncs, const PetscInt max_funcs, const PetscBool force_iteration, const Real initial_residual_before_preset_bcs, const Real div_threshold)
 Check for converence of the nonlinear solution. More...
 
virtual MooseLinearConvergenceReason checkLinearConvergence (std::string &msg, const PetscInt n, const Real rnorm, const Real rtol, const Real atol, const Real dtol, const PetscInt maxits)
 Check for convergence of the linear solution. More...
 
virtual bool hasVariable (const std::string &var_name) const override
 
virtual MooseVariableFEBasegetVariable (THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) override
 Returns the variable reference for requested variable which must be of the expected_var_type (Nonlinear vs. More...
 
virtual MooseVariablegetStandardVariable (THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested MooseVariable which may be in any system. More...
 
virtual VectorMooseVariablegetVectorVariable (THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested VectorMooseVariable which may be in any system. More...
 
virtual bool hasScalarVariable (const std::string &var_name) const override
 Returns a Boolean indicating whether any system contains a variable with the name provided. More...
 
virtual MooseVariableScalargetScalarVariable (THREAD_ID tid, const std::string &var_name) override
 Returns the scalar variable reference from whichever system contains it. More...
 
virtual System & getSystem (const std::string &var_name) override
 Returns the equation system containing the variable provided. More...
 
virtual void setActiveElementalMooseVariables (const std::set< MooseVariableFEBase *> &moose_vars, THREAD_ID tid) override
 Set the MOOSE variables to be reinited on each element. More...
 
virtual void clearActiveElementalMooseVariables (THREAD_ID tid) override
 Clear the active elemental MooseVariableFEBase. More...
 
virtual void clearActiveFEVariableCoupleableMatrixTags (THREAD_ID tid) override
 
virtual void clearActiveFEVariableCoupleableVectorTags (THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableVectorTags (std::set< TagID > &vtags, THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableMatrixTags (std::set< TagID > &mtags, THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableMatrixTags (THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableVectorTags (THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableVectorTags (std::set< TagID > &vtags, THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableMatrixTags (std::set< TagID > &mtags, THREAD_ID tid) override
 
virtual void setActiveMaterialProperties (const std::set< unsigned int > &mat_prop_ids, THREAD_ID tid) override
 Record and set the material properties required by the current computing thread. More...
 
virtual void clearActiveMaterialProperties (THREAD_ID tid) override
 Clear the active material properties. More...
 
virtual void createQRules (QuadratureType type, Order order, Order volume_order=INVALID_ORDER, Order face_order=INVALID_ORDER)
 
unsigned int getMaxQps () const
 
unsigned int getMaxShapeFunctions () const
 
Order getMaxScalarOrder () const
 
void checkNonlocalCoupling ()
 
void checkUserObjectJacobianRequirement (THREAD_ID tid)
 
void setVariableAllDoFMap (const std::vector< MooseVariableFEBase *> moose_vars)
 
const std::vector< MooseVariableFEBase * > & getUserObjectJacobianVariables (THREAD_ID tid) const
 
virtual Assemblyassembly (THREAD_ID tid) override
 
virtual std::vector< VariableName > getVariableNames ()
 Returns a list of all the variables in the problem (both from the NL and Aux systems. More...
 
virtual void addExtraVectors ()
 A place to add extra vectors to the simulation. More...
 
virtual void prepare (const Elem *elem, THREAD_ID tid) override
 
virtual void prepare (const Elem *elem, unsigned int ivar, unsigned int jvar, const std::vector< dof_id_type > &dof_indices, THREAD_ID tid) override
 
virtual void prepareFace (const Elem *elem, THREAD_ID tid) override
 
virtual void setCurrentSubdomainID (const Elem *elem, THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, unsigned int side, THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, THREAD_ID tid)
 
virtual void prepareAssembly (THREAD_ID tid) override
 
virtual void addGhostedElem (dof_id_type elem_id) override
 Will make sure that all dofs connected to elem_id are ghosted to this processor. More...
 
virtual void addGhostedBoundary (BoundaryID boundary_id) override
 Will make sure that all necessary elements from boundary_id are ghosted to this processor. More...
 
virtual void ghostGhostedBoundaries () override
 Causes the boundaries added using addGhostedBoundary to actually be ghosted. More...
 
virtual void sizeZeroes (unsigned int size, THREAD_ID tid)
 
virtual bool reinitDirac (const Elem *elem, THREAD_ID tid) override
 Returns true if the Problem has Dirac kernels it needs to compute on elem. More...
 
virtual void reinitElem (const Elem *elem, THREAD_ID tid) override
 
virtual void reinitElemPhys (const Elem *elem, const std::vector< Point > &phys_points_in_elem, THREAD_ID tid, bool suppress_displaced_init=false) override
 
virtual void reinitElemFace (const Elem *elem, unsigned int side, BoundaryID bnd_id, THREAD_ID tid) override
 
virtual void reinitNode (const Node *node, THREAD_ID tid) override
 
virtual void reinitNodeFace (const Node *node, BoundaryID bnd_id, THREAD_ID tid) override
 
virtual void reinitNodes (const std::vector< dof_id_type > &nodes, THREAD_ID tid) override
 
virtual void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes, THREAD_ID tid) override
 
virtual void reinitNeighbor (const Elem *elem, unsigned int side, THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, const std::vector< Point > &physical_points, THREAD_ID tid) override
 
virtual void reinitScalars (THREAD_ID tid) override
 
virtual void reinitOffDiagScalars (THREAD_ID tid) override
 
virtual void getDiracElements (std::set< const Elem *> &elems) override
 Fills "elems" with the elements that should be looped over for Dirac Kernels. More...
 
virtual void clearDiracInfo () override
 Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in. More...
 
virtual void subdomainSetup (SubdomainID subdomain, THREAD_ID tid)
 
virtual void neighborSubdomainSetup (SubdomainID subdomain, THREAD_ID tid)
 
virtual void newAssemblyArray (NonlinearSystemBase &nl)
 
virtual void initNullSpaceVectors (const InputParameters &parameters, NonlinearSystemBase &nl)
 
virtual void init () override
 
const ConstElemRange & getEvaluableElementRange ()
 
virtual void setException (const std::string &message)
 Set an exception. More...
 
virtual bool hasException ()
 Whether or not an exception has occurred. More...
 
virtual void checkExceptionAndStopSolve ()
 Check to see if an exception has occurred on any processor and stop the solve. More...
 
virtual bool converged () override
 
virtual unsigned int nNonlinearIterations () const override
 
virtual unsigned int nLinearIterations () const override
 
virtual Real finalNonlinearResidual () const override
 
virtual bool computingInitialResidual () const override
 Returns true if the problem is in the process of computing it's initial residual. More...
 
virtual bool startedInitialSetup ()
 Returns true if we are in or beyond the initialSetup stage. More...
 
virtual void onTimestepBegin () override
 
virtual Real & time () const
 
virtual Real & timeOld () const
 
virtual int & timeStep () const
 
virtual Real & dt () const
 
virtual Real & dtOld () const
 
virtual void transient (bool trans)
 
virtual bool isTransient () const override
 
virtual void addTimeIntegrator (const std::string &type, const std::string &name, InputParameters parameters)
 
virtual void addPredictor (const std::string &type, const std::string &name, InputParameters parameters)
 
virtual void copySolutionsBackwards ()
 
virtual void restoreSolutions ()
 
virtual void saveOldSolutions ()
 Allocate vectors and save old solutions into them. More...
 
virtual void restoreOldSolutions ()
 Restore old solutions from the backup vectors and deallocate them. More...
 
virtual void postExecute ()
 Method called at the end of the simulation. More...
 
void forceOutput ()
 Indicates that the next call to outputStep should be forced. More...
 
void initPetscOutput ()
 Reinitialize petsc output for proper linear/nonlinear iteration display. More...
 
Moose::PetscSupport::PetscOptionsgetPetscOptions ()
 Retrieve a writable reference the PETSc options (used by PetscSupport) More...
 
virtual bool hasFunction (const std::string &name, THREAD_ID tid=0)
 
virtual FunctiongetFunction (const std::string &name, THREAD_ID tid=0)
 
virtual void lineSearch ()
 execute MOOSE line search More...
 
std::shared_ptr< LineSearchgetLineSearch ()
 getter for the MOOSE line search More...
 
virtual void addDistribution (std::string type, const std::string &name, InputParameters parameters)
 The following functions will enable MOOSE to have the capability to import distributions. More...
 
virtual DistributiongetDistribution (const std::string &name)
 
virtual void addSampler (std::string type, const std::string &name, InputParameters parameters)
 The following functions will enable MOOSE to have the capability to import Samplers. More...
 
virtual SamplergetSampler (const std::string &name, THREAD_ID tid=0)
 
NonlinearSystemBasegetNonlinearSystemBase ()
 
const NonlinearSystemBasegetNonlinearSystemBase () const
 
virtual NonlinearSystemgetNonlinearSystem ()
 
virtual void setInputParametersFEProblem (InputParameters &parameters)
 
AuxiliarySystemgetAuxiliarySystem ()
 
void projectSolution ()
 
virtual void addADResidualMaterial (const std::string &kernel_name, const std::string &name, InputParameters parameters)
 
virtual void addADJacobianMaterial (const std::string &kernel_name, const std::string &name, InputParameters parameters)
 
virtual void addMaterialHelper (MaterialWarehouse &warehouse, const std::string &kernel_name, const std::string &name, InputParameters parameters)
 
virtual void prepareMaterials (SubdomainID blk_id, THREAD_ID tid)
 Add the MooseVariables that the current materials depend on to the dependency list. More...
 
virtual void reinitMaterials (SubdomainID blk_id, THREAD_ID tid, bool swap_stateful=true)
 
virtual void reinitMaterialsFace (SubdomainID blk_id, THREAD_ID tid, bool swap_stateful=true)
 
virtual void reinitMaterialsNeighbor (SubdomainID blk_id, THREAD_ID tid, bool swap_stateful=true)
 
virtual void reinitMaterialsBoundary (BoundaryID boundary_id, THREAD_ID tid, bool swap_stateful=true)
 
virtual void swapBackMaterials (THREAD_ID tid)
 
virtual void swapBackMaterialsFace (THREAD_ID tid)
 
virtual void swapBackMaterialsNeighbor (THREAD_ID tid)
 
virtual void addPostprocessor (std::string pp_name, const std::string &name, InputParameters parameters)
 
virtual void addVectorPostprocessor (std::string pp_name, const std::string &name, InputParameters parameters)
 
void initPostprocessorData (const std::string &name)
 Initializes the postprocessor data. More...
 
void initVectorPostprocessorData (const std::string &name)
 Initialize the VectorPostprocessor data. More...
 
virtual void addUserObject (std::string user_object_name, const std::string &name, InputParameters parameters)
 
const ExecuteMooseObjectWarehouse< UserObject > & getUserObjects () const
 
template<class T >
T & getUserObject (const std::string &name, unsigned int tid=0) const
 Get the user object by its name. More...
 
const UserObjectgetUserObjectBase (const std::string &name) const
 Get the user object by its name. More...
 
bool hasUserObject (const std::string &name) const
 Check if there if a user object of given name. More...
 
bool hasPostprocessor (const std::string &name)
 Check existence of the postprocessor. More...
 
PostprocessorValuegetPostprocessorValue (const PostprocessorName &name)
 Get a reference to the value associated with the postprocessor. More...
 
PostprocessorValuegetPostprocessorValueOld (const std::string &name)
 Get the reference to the old value of a post-processor. More...
 
PostprocessorValuegetPostprocessorValueOlder (const std::string &name)
 Get the reference to the older value of a post-processor. More...
 
bool hasMultiApps () const
 Returns whether or not the current simulation has any multiapps. More...
 
bool hasMultiApp (const std::string &name) const
 
bool hasVectorPostprocessor (const std::string &name)
 Check existence of the VectorPostprocessor. More...
 
VectorPostprocessorValuegetVectorPostprocessorValue (const VectorPostprocessorName &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
VectorPostprocessorValuegetVectorPostprocessorValue (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast)
 Get a reference to the value associated with the VectorPostprocessor. More...
 
VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name, bool needs_broadcast)
 Get the reference to the old value of a post-processor. More...
 
ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const VectorPostprocessorName &vpp_name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const VectorPostprocessorName &vpp_name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
VectorPostprocessorValuedeclareVectorPostprocessorVector (const VectorPostprocessorName &name, const std::string &vector_name, bool contains_complete_history, bool is_broadcast)
 Declare a new VectorPostprocessor vector. More...
 
bool vectorPostprocessorHasVectors (const std::string &vpp_name)
 Whether or not the specified VectorPostprocessor has declared any vectors. More...
 
const std::vector< std::pair< std::string, VectorPostprocessorData::VectorPostprocessorState > > & getVectorPostprocessorVectors (const std::string &vpp_name)
 Get the vectors for a specific VectorPostprocessor. More...
 
virtual void addDamper (std::string damper_name, const std::string &name, InputParameters parameters)
 
void setupDampers ()
 
bool hasDampers ()
 Whether or not this system has dampers. More...
 
void addIndicator (std::string indicator_name, const std::string &name, InputParameters parameters)
 
virtual void addMarker (std::string marker_name, const std::string &name, InputParameters parameters)
 
virtual void addMultiApp (const std::string &multi_app_name, const std::string &name, InputParameters parameters)
 Add a MultiApp to the problem. More...
 
std::shared_ptr< MultiAppgetMultiApp (const std::string &multi_app_name) const
 Get a MultiApp object by name. More...
 
std::vector< std::shared_ptr< Transfer > > getTransfers (ExecFlagType type, MultiAppTransfer::DIRECTION direction) const
 Get Transfers by ExecFlagType and direction. More...
 
void execMultiAppTransfers (ExecFlagType type, MultiAppTransfer::DIRECTION direction)
 Execute MultiAppTransfers associate with execution flag and direction. More...
 
bool execMultiApps (ExecFlagType type, bool auto_advance=true)
 Execute the MultiApps associated with the ExecFlagType. More...
 
void incrementMultiAppTStep (ExecFlagType type)
 Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType. More...
 
void advanceMultiApps (ExecFlagType type)
 Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep depending on your purpose. More...
 
void finishMultiAppStep (ExecFlagType type)
 Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType. More...
 
void backupMultiApps (ExecFlagType type)
 Backup the MultiApps associated with the ExecFlagType. More...
 
void restoreMultiApps (ExecFlagType type, bool force=false)
 Restore the MultiApps associated with the ExecFlagType. More...
 
Real computeMultiAppsDT (ExecFlagType type)
 Find the smallest timestep over all MultiApps. More...
 
virtual void addTransfer (const std::string &transfer_name, const std::string &name, InputParameters parameters)
 Add a Transfer to the problem. More...
 
void execTransfers (ExecFlagType type)
 Execute the Transfers associated with the ExecFlagType. More...
 
void computeTransientImplicitResidual (Real time, const NumericVector< Number > &u, const NumericVector< Number > &udot, const NumericVector< Number > &udotdot, NumericVector< Number > &residual)
 Evaluates transient residual G in canonical semidiscrete form G(t,U,Udot,Udotdot) = F(t,U) More...
 
void computeTransientImplicitJacobian (Real time, const NumericVector< Number > &u, const NumericVector< Number > &udot, const NumericVector< Number > &udotdot, Real duDotDu_shift, Real duDotDotDu_shift, SparseMatrix< Number > &jacobian)
 Evaluates transient Jacobian J_a = dG/dU + a*dG/dUdot from canonical semidiscrete form G(t,U,Udot) = F(t,U) More...
 
virtual Real computeResidualL2Norm ()
 Computes the residual using whatever is sitting in the current solution vector then returns the L2 norm. More...
 
virtual void computeResidualSys (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
 This function is called by Libmesh to form a residual. More...
 
void computeResidual (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
 This function is called by Libmesh to form a residual. More...
 
virtual void computeResidual (const NumericVector< Number > &soln, NumericVector< Number > &residual)
 Form a residual with default tags (nontime, time, residual). More...
 
virtual void computeResidualTag (const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag)
 Form a residual vector for a given tag. More...
 
virtual void computeResidualType (const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag)
 Form a residual vector for a given tag and "residual" tag. More...
 
virtual void computeResidualInternal (const NumericVector< Number > &soln, NumericVector< Number > &residual, const std::set< TagID > &tags)
 Form a residual vector for a set of tags. More...
 
virtual void computeResidualTags (const std::set< TagID > &tags)
 Form multiple residual vectors and each is associated with one tag. More...
 
virtual void computeJacobianSys (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
 Form a Jacobian matrix. More...
 
virtual void computeJacobian (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
 Form a Jacobian matrix with the default tag (system). More...
 
virtual void computeJacobianTag (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, TagID tag)
 Form a Jacobian matrix for a given tag. More...
 
virtual void computeJacobianInternal (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const std::set< TagID > &tags)
 Form a Jacobian matrix for multiple tags. More...
 
virtual void computeJacobianTags (const std::set< TagID > &tags)
 Form multiple matrices, and each is associated with a tag. More...
 
virtual void computeJacobianBlocks (std::vector< JacobianBlock *> &blocks)
 Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditioning matrices. More...
 
virtual void computeJacobianBlock (SparseMatrix< Number > &jacobian, libMesh::System &precond_system, unsigned int ivar, unsigned int jvar)
 Really not a good idea to use this. More...
 
virtual Real computeDamping (const NumericVector< Number > &soln, const NumericVector< Number > &update)
 
virtual bool shouldUpdateSolution ()
 Check to see whether the problem should update the solution. More...
 
virtual bool updateSolution (NumericVector< Number > &vec_solution, NumericVector< Number > &ghosted_solution)
 Update the solution. More...
 
virtual void predictorCleanup (NumericVector< Number > &ghosted_solution)
 Perform cleanup tasks after application of predictor to solution vector. More...
 
virtual void computeBounds (NonlinearImplicitSystem &sys, NumericVector< Number > &lower, NumericVector< Number > &upper)
 
virtual void computeNearNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computeNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computeTransposeNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computePostCheck (NonlinearImplicitSystem &sys, const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln)
 
virtual void computeIndicatorsAndMarkers ()
 
virtual void addResidual (THREAD_ID tid) override
 
virtual void addResidualNeighbor (THREAD_ID tid) override
 
virtual void addResidualScalar (THREAD_ID tid=0)
 
virtual void cacheResidual (THREAD_ID tid) override
 
virtual void cacheResidualNeighbor (THREAD_ID tid) override
 
virtual void addCachedResidual (THREAD_ID tid) override
 
virtual void addCachedResidualDirectly (NumericVector< Number > &residual, THREAD_ID tid)
 Allows for all the residual contributions that are currently cached to be added directly into the vector passed in. More...
 
virtual void setResidual (NumericVector< Number > &residual, THREAD_ID tid) override
 
virtual void setResidualNeighbor (NumericVector< Number > &residual, THREAD_ID tid) override
 
virtual void addJacobian (THREAD_ID tid) override
 
virtual void addJacobianNeighbor (THREAD_ID tid) override
 
virtual void addJacobianNeighbor (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, THREAD_ID tid) override
 
virtual void addJacobianBlock (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, THREAD_ID tid) override
 
virtual void addJacobianScalar (THREAD_ID tid=0)
 
virtual void addJacobianOffDiagScalar (unsigned int ivar, THREAD_ID tid=0)
 
virtual void cacheJacobian (THREAD_ID tid) override
 
virtual void cacheJacobianNeighbor (THREAD_ID tid) override
 
virtual void addCachedJacobian (THREAD_ID tid) override
 
virtual void prepareShapes (unsigned int var, THREAD_ID tid) override
 
virtual void prepareFaceShapes (unsigned int var, THREAD_ID tid) override
 
virtual void prepareNeighborShapes (unsigned int var, THREAD_ID tid) override
 
virtual void addDisplacedProblem (std::shared_ptr< DisplacedProblem > displaced_problem)
 
virtual std::shared_ptr< DisplacedProblemgetDisplacedProblem ()
 
virtual void updateGeomSearch (GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
 
virtual void possiblyRebuildGeomSearchPatches ()
 
virtual GeometricSearchDatageomSearchData () override
 
void setRestartFile (const std::string &file_name)
 Communicate to the Resurector the name of the restart filer. More...
 
const InitialConditionWarehousegetInitialConditionWarehouse () const
 Return InitialCondition storage. More...
 
SolverParamssolverParams ()
 Get the solver parameters. More...
 
Adaptivityadaptivity ()
 
virtual void initialAdaptMesh ()
 
unsigned int getNumCyclesCompleted ()
 
bool hasInitialAdaptivity () const
 Return a Boolean indicating whether initial AMR is turned on. More...
 
bool hasInitialAdaptivity () const
 Return a Boolean indicating whether initial AMR is turned on. More...
 
void initXFEM (std::shared_ptr< XFEMInterface > xfem)
 Create XFEM controller object. More...
 
std::shared_ptr< XFEMInterfacegetXFEM ()
 Get a pointer to the XFEM controller object. More...
 
bool haveXFEM ()
 Find out whether the current analysis is using XFEM. More...
 
virtual bool updateMeshXFEM ()
 Update the mesh due to changing XFEM cuts. More...
 
virtual void meshChanged () override
 Update data after a mesh change. More...
 
void notifyWhenMeshChanges (MeshChangedInterface *mci)
 Register an object that derives from MeshChangedInterface to be notified when the mesh changes. More...
 
virtual void checkProblemIntegrity ()
 Method called to perform a series of sanity checks before a simulation is run. More...
 
void serializeSolution ()
 
void registerRandomInterface (RandomInterface &random_interface, const std::string &name)
 
void setConstJacobian (bool state)
 Set flag that Jacobian is constant (for optimization purposes) More...
 
void setKernelCoverageCheck (bool flag)
 Set flag to indicate whether kernel coverage checks should be performed. More...
 
void setMaterialCoverageCheck (bool flag)
 Set flag to indicate whether material coverage checks should be performed. More...
 
void setParallelBarrierMessaging (bool flag)
 Toggle parallel barrier messaging (defaults to on). More...
 
void parentOutputPositionChanged ()
 Calls parentOutputPositionChanged() on all sub apps. More...
 
unsigned int subspaceDim (const std::string &prefix) const
 Dimension of the subspace spanned by vectors with a given prefix. More...
 
const MaterialWarehousegetMaterialWarehouse () const
 
const MaterialWarehousegetComputeMaterialWarehouse () const
 
const MaterialWarehousegetResidualMaterialsWarehouse () const
 
const MaterialWarehousegetJacobianMaterialsWarehouse () const
 
const MaterialWarehousegetDiscreteMaterialWarehouse () const
 
std::shared_ptr< MaterialgetMaterial (std::string name, Moose::MaterialDataType type, THREAD_ID tid=0, bool no_warn=false)
 Return a pointer to a Material object. More...
 
std::shared_ptr< MaterialDatagetMaterialData (Moose::MaterialDataType type, THREAD_ID tid=0)
 
bool errorOnJacobianNonzeroReallocation () const
 Will return True if the user wants to get an error when a nonzero is reallocated in the Jacobian by PETSc. More...
 
void setErrorOnJacobianNonzeroReallocation (bool state)
 
bool ignoreZerosInJacobian () const
 
void setIgnoreZerosInJacobian (bool state)
 
bool hasTimeIntegrator () const
 Returns whether or not this Problem has a TimeIntegrator. More...
 
virtual void computeUserObjects (const ExecFlagType &type, const Moose::AuxGroup &group)
 Call compute methods on UserObjects. More...
 
virtual void computeAuxiliaryKernels (const ExecFlagType &type)
 Call compute methods on AuxKernels. More...
 
void needsPreviousNewtonIteration (bool state)
 Set a flag that indicated that user required values for the previous Newton iterate. More...
 
bool needsPreviousNewtonIteration () const
 Check to see whether we need to compute the variable values of the previous Newton iterate. More...
 
bool skipAdditionalRestartData () const
 Whether or not to skip loading the additional data when restarting. More...
 
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse ()
 Reference to the control logic warehouse. More...
 
void executeControls (const ExecFlagType &exec_type)
 Performs setup and execute calls for Control objects. More...
 
void executeSamplers (const ExecFlagType &exec_type)
 Performs setup and execute calls for Sampler objects. More...
 
void reportMooseObjectDependency (MooseObject *a, MooseObject *b)
 Register a MOOSE object dependency so we can either order operations properly or report when we cannot. More...
 
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse ()
 
const VectorPostprocessorDatagetVectorPostprocessorData () const
 
bool hasJacobian () const
 Returns _has_jacobian. More...
 
bool constJacobian () const
 Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the previous time it was computed) More...
 
void addOutput (const std::string &, const std::string &, InputParameters)
 Adds an Output object. More...
 
TheWarehousetheWarehouse () const
 
void setSNESMFReuseBase (bool reuse, bool set_by_user)
 If or not to reuse the base vector for matrix-free calculation. More...
 
bool useSNESMFReuseBase ()
 Return a flag that indicates if we are reusing the vector base. More...
 
bool isSNESMFReuseBaseSetbyUser ()
 Return a flag to indicate if _snesmf_reuse_base is set by users. More...
 
void setUsingADFlag (bool using_ad)
 Set the global automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material property or whether any suppier has declared an AD material property. More...
 
bool usingAD () const
 Whether any object has requested/supplied an AD material property. More...
 
virtual void setUDotRequested (const bool u_dot_requested)
 Set boolean flag to true to store solution time derivative. More...
 
virtual void setUDotDotRequested (const bool u_dotdot_requested)
 Set boolean flag to true to store solution second time derivative. More...
 
virtual void setUDotOldRequested (const bool u_dot_old_requested)
 Set boolean flag to true to store old solution time derivative. More...
 
virtual void setUDotDotOldRequested (const bool u_dotdot_old_requested)
 Set boolean flag to true to store old solution second time derivative. More...
 
virtual bool uDotRequested ()
 Get boolean flag to check whether solution time derivative needs to be stored. More...
 
virtual bool uDotDotRequested ()
 Get boolean flag to check whether solution second time derivative needs to be stored. More...
 
virtual bool uDotOldRequested ()
 Get boolean flag to check whether old solution time derivative needs to be stored. More...
 
virtual bool uDotDotOldRequested ()
 Get boolean flag to check whether old solution second time derivative needs to be stored. More...
 
virtual bool checkNonlocalCouplingRequirement ()
 
virtual TagID addVectorTag (TagName tag_name)
 Create a Tag. More...
 
virtual TagID getVectorTagID (const TagName &tag_name)
 Get a TagID from a TagName. More...
 
virtual TagName vectorTagName (TagID tag)
 Retrieve the name associated with a TagID. More...
 
virtual std::map< TagName, TagID > & getVectorTags ()
 Return all vector tags, where a tag is represented by a map from name to ID. More...
 
virtual bool vectorTagExists (TagID tag)
 Check to see if a particular Tag exists. More...
 
bool vectorTagExists (const TagName &tag_name)
 Check to see if a particular Tag exists by using Tag name. More...
 
virtual unsigned int numVectorTags ()
 The total number of tags. More...
 
virtual TagID addMatrixTag (TagName tag_name)
 Create a Tag. More...
 
virtual TagID getMatrixTagID (const TagName &tag_name)
 Get a TagID from a TagName. More...
 
virtual TagName matrixTagName (TagID tag)
 Retrieve the name associated with a TagID. More...
 
virtual bool matrixTagExists (const TagName &tag_name)
 Check to see if a particular Tag exists. More...
 
virtual bool matrixTagExists (TagID tag_id)
 Check to see if a particular Tag exists. More...
 
virtual unsigned int numMatrixTags ()
 The total number of tags. More...
 
virtual std::map< TagName, TagID > & getMatrixTags ()
 Return all matrix tags in the sytem, where a tag is represented by a map from name to ID. More...
 
virtual const std::set< MooseVariableFEBase * > & getActiveElementalMooseVariables (THREAD_ID tid) const
 Get the MOOSE variables to be reinited on each element. More...
 
virtual bool hasActiveElementalMooseVariables (THREAD_ID tid) const
 Whether or not a list of active elemental moose variables has been set. More...
 
virtual const std::set< unsigned int > & getActiveMaterialProperties (THREAD_ID tid) const
 Get the material properties required by the current computing thread. More...
 
virtual bool hasActiveMaterialProperties (THREAD_ID tid) const
 Method to check whether or not a list of active material roperties has been set. More...
 
unsigned int getAxisymmetricRadialCoord () const
 Returns the desired radial direction for RZ coordinate transformation. More...
 
virtual DiracKernelInfodiracKernelInfo ()
 
virtual void storeSubdomainMatPropName (SubdomainID block_id, const std::string &name)
 Adds the given material property to a storage map based on block ids. More...
 
virtual void storeBoundaryMatPropName (BoundaryID boundary_id, const std::string &name)
 Adds the given material property to a storage map based on boundary ids. More...
 
virtual void storeSubdomainZeroMatProp (SubdomainID block_id, const MaterialPropertyName &name)
 Adds to a map based on block ids of material properties for which a zero value can be returned. More...
 
virtual void storeBoundaryZeroMatProp (BoundaryID boundary_id, const MaterialPropertyName &name)
 Adds to a map based on boundary ids of material properties for which a zero value can be returned. More...
 
virtual void storeSubdomainDelayedCheckMatProp (const std::string &requestor, SubdomainID block_id, const std::string &name)
 Adds to a map based on block ids of material properties to validate. More...
 
virtual void storeBoundaryDelayedCheckMatProp (const std::string &requestor, BoundaryID boundary_id, const std::string &name)
 Adds to a map based on boundary ids of material properties to validate. More...
 
virtual void checkBlockMatProps ()
 Checks block material properties integrity. More...
 
virtual void checkBoundaryMatProps ()
 Checks boundary material properties integrity. More...
 
virtual void markMatPropRequested (const std::string &)
 Helper method for adding a material property name to the _material_property_requested set. More...
 
virtual bool isMatPropRequested (const std::string &prop_name) const
 Find out if a material property has been requested by any object. More...
 
virtual std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &prop_name)
 Get a vector containing the block ids the material property is defined on. More...
 
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &prop_name)
 Get a vector of block id equivalences that the material property is defined on. More...
 
virtual bool hasBlockMaterialProperty (SubdomainID block_id, const std::string &prop_name)
 Check if a material property is defined on a block. More...
 
virtual std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &prop_name)
 Get a vector containing the block ids the material property is defined on. More...
 
virtual std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &prop_name)
 Get a vector of block id equivalences that the material property is defined on. More...
 
virtual bool hasBoundaryMaterialProperty (BoundaryID boundary_id, const std::string &prop_name)
 Check if a material property is defined on a block. More...
 
virtual std::set< dof_id_type > & ghostedElems ()
 Return the list of elements that should have their DoFs ghosted to this processor. More...
 
const CouplingMatrix & nonlocalCouplingMatrix () const
 
virtual bool currentlyComputingJacobian () const
 Returns true if the problem is in the process of computing Jacobian. More...
 
bool & computingNonlinearResid ()
 Check whether residual being evaulated is non-linear. More...
 
bool safeAccessTaggedMatrices ()
 Is it safe to access the tagged matrices. More...
 
bool safeAccessTaggedVectors ()
 Is it safe to access the tagged vectors. More...
 
std::set< TagID > & getActiveScalarVariableCoupleableVectorTags (THREAD_ID tid)
 
std::set< TagID > & getActiveScalarVariableCoupleableMatrixTags (THREAD_ID tid)
 
std::set< TagID > & getActiveFEVariableCoupleableVectorTags (THREAD_ID tid)
 
std::set< TagID > & getActiveFEVariableCoupleableMatrixTags (THREAD_ID tid)
 
void _setCLIOption ()
 For Internal Use. More...
 
virtual void terminateSolve ()
 Allow objects to request clean termination of the solve. More...
 
virtual bool isSolveTerminationRequested ()
 Check of termination has been requested. More...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
void allowOutput (bool state)
 Ability to enable/disable all output calls. More...
 
template<typename T >
void allowOutput (bool state)
 
const MaterialPropertyStoragegetMaterialPropertyStorage ()
 Return a reference to the material property storage. More...
 
const MaterialPropertyStoragegetBndMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetNeighborMaterialPropertyStorage ()
 
const MooseObjectWarehouse< Indicator > & getIndicatorWarehouse ()
 Return indicator/marker storage. More...
 
const MooseObjectWarehouse< InternalSideIndicator > & getInternalSideIndicatorWarehouse ()
 
const MooseObjectWarehouse< Marker > & getMarkerWarehouse ()
 
bool needBoundaryMaterialOnSide (BoundaryID bnd_id, THREAD_ID tid)
 These methods are used to determine whether stateful material properties need to be stored on internal sides. More...
 
bool needSubdomainMaterialOnSide (SubdomainID subdomain_id, THREAD_ID tid)
 
const ExecFlagTypegetCurrentExecuteOnFlag () const
 Return/set the current execution flag. More...
 
void setCurrentExecuteOnFlag (const ExecFlagType &)
 

Public Attributes

std::map< std::string, std::vector< dof_id_type > > _var_dof_map
 
const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 
std::vector< Real > _real_zero
 Convenience zeros. More...
 
std::vector< VariableValue_scalar_zero
 
std::vector< VariableValue_zero
 
std::vector< MooseArray< ADReal > > _ad_zero
 
std::vector< VariableGradient_grad_zero
 
std::vector< MooseArray< ADRealGradient > > _ad_grad_zero
 
std::vector< VariableSecond_second_zero
 
std::vector< VariablePhiSecond_second_phi_zero
 
std::vector< Point > _point_zero
 
std::vector< VectorVariableValue_vector_zero
 
std::vector< VectorVariableCurl_vector_curl_zero
 

Protected Member Functions

void dumpObjectHelper (const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
 
void dumpVariableHelper (const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)
 
std::string deduceNecessaryParameters (const std::string &type, const InputParameters &parameters)
 build a text snippet of the minimal set of parameters that need to be specified More...
 
std::map< std::string, std::string > stringifyParameters (const InputParameters &parameters)
 create a string map form parameter names to stringified parameter values More...
 
void createTagVectors ()
 Create extra tagged vectors and matrices. More...
 
void meshChangedHelper (bool intermediate_change=false)
 Helper method to update some or all data after a mesh change. More...
 
bool duplicateVariableCheck (const std::string &var_name, const FEType &type, bool is_aux)
 Helper to check for duplicate variable names across systems or within a single system. More...
 
void checkDisplacementOrders ()
 Verify that SECOND order mesh uses SECOND order displacements. More...
 
void checkUserObjects ()
 
void checkDependMaterialsHelper (const std::map< SubdomainID, std::vector< std::shared_ptr< Material >>> &materials_map)
 Helper method for checking Material object dependency. More...
 
void checkCoordinateSystems ()
 Verify that there are no element type/coordinate type conflicts. More...
 
void reinitBecauseOfGhostingOrNewGeomObjects ()
 Call when it is possible that the needs for ghosted elements has changed. More...
 
MooseVariableFEBasegetVariableHelper (THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, SystemBase &nl, SystemBase &aux)
 Helper function called by getVariable that handles the logic for checking whether Variables of the requested type are available. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 

Protected Attributes

std::map< std::string, std::map< std::string, std::string > > _generated_syntax
 store input syntax to build objects generated by a specific action More...
 
std::shared_ptr< DumpObjectsNonlinearSystem_nl_sys
 
MooseMesh_mesh
 
EquationSystems _eq
 
bool _initialized
 
std::set< TagID_fe_vector_tags
 
std::set< TagID_fe_matrix_tags
 
bool _solve
 Whether or not to actually solve the nonlinear system. More...
 
bool _transient
 
Real & _time
 
Real & _time_old
 
int & _t_step
 
Real & _dt
 
Real & _dt_old
 
std::shared_ptr< NonlinearSystemBase_nl
 
std::shared_ptr< AuxiliarySystem_aux
 
Moose::CouplingType _coupling
 Type of variable coupling. More...
 
std::unique_ptr< CouplingMatrix > _cm
 Coupling matrix for variables. More...
 
std::map< std::string, unsigned int > _subspace_dim
 
std::vector< std::unique_ptr< Assembly > > _assembly
 
MooseObjectWarehouse< Function_functions
 functions More...
 
MooseObjectWarehouseBase< Distribution_distributions
 distributions More...
 
ExecuteMooseObjectWarehouse< Sampler_samplers
 Samplers. More...
 
MooseObjectWarehouse< KernelBase_nonlocal_kernels
 nonlocal kernels More...
 
MooseObjectWarehouse< IntegratedBCBase_nonlocal_integrated_bcs
 nonlocal integrated_bcs More...
 
MaterialPropertyStorage_material_props
 
MaterialPropertyStorage_bnd_material_props
 
MaterialPropertyStorage_neighbor_material_props
 
std::vector< std::shared_ptr< MaterialData > > _material_data
 
std::vector< std::shared_ptr< MaterialData > > _bnd_material_data
 
std::vector< std::shared_ptr< MaterialData > > _neighbor_material_data
 
MooseObjectWarehouse< Marker_markers
 
PostprocessorData _pps_data
 
VectorPostprocessorData _vpps_data
 
ExecuteMooseObjectWarehouse< UserObject_all_user_objects
 
ExecuteMooseObjectWarehouse< MultiApp_multi_apps
 MultiApp Warehouse. More...
 
ExecuteMooseObjectWarehouse< TransientMultiApp_transient_multi_apps
 Storage for TransientMultiApps (only needed for calling 'computeDT') More...
 
ExecuteMooseObjectWarehouse< Transfer_transfers
 Normal Transfers. More...
 
ExecuteMooseObjectWarehouse< Transfer_to_multi_app_transfers
 Transfers executed just before MultiApps to transfer data to them. More...
 
ExecuteMooseObjectWarehouse< Transfer_from_multi_app_transfers
 Transfers executed just after MultiApps to transfer data from them. More...
 
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
 A map of objects that consume random numbers. More...
 
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
 Cache for calculating materials on side. More...
 
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
 Cache for calculating materials on side. More...
 
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
 Objects to be notified when the mesh changes. More...
 
Adaptivity _adaptivity
 
unsigned int _cycles_completed
 
std::shared_ptr< XFEMInterface_xfem
 Pointer to XFEM controller. More...
 
MooseMesh_displaced_mesh
 
std::shared_ptr< DisplacedProblem_displaced_problem
 
GeometricSearchData _geometric_search_data
 
bool _reinit_displaced_elem
 
bool _reinit_displaced_face
 
bool _input_file_saved
 whether input file has been written More...
 
bool _has_dampers
 Whether or not this system has any Dampers associated with it. More...
 
bool _has_constraints
 Whether or not this system has any Constraints. More...
 
bool _snesmf_reuse_base
 If or not to resuse the base vector for matrix-free calculation. More...
 
bool _snesmf_reuse_base_set_by_user
 If or not _snesmf_reuse_base is set by user. More...
 
bool _has_initialized_stateful
 Whether nor not stateful materials have been initialized. More...
 
std::unique_ptr< Resurrector_resurrector
 Object responsible for restart (read/write) More...
 
bool _const_jacobian
 true if the Jacobian is constant More...
 
bool _has_jacobian
 Indicates if the Jacobian was computed. More...
 
bool _needs_old_newton_iter
 Indicates that we need to compute variable values for previous Newton iteration. More...
 
bool _has_nonlocal_coupling
 Indicates if nonlocal coupling is required/exists. More...
 
bool _calculate_jacobian_in_uo
 
std::vector< std::vector< MooseVariableFEBase * > > _uo_jacobian_moose_vars
 
SolverParams _solver_params
 
bool _kernel_coverage_check
 Determines whether a check to verify an active kernel on every subdomain. More...
 
bool _material_coverage_check
 Determines whether a check to verify an active material on every subdomain. More...
 
unsigned int _max_qps
 Maximum number of quadrature points used in the problem. More...
 
unsigned int _max_shape_funcs
 Maximum number of shape functions on any element in the problem. More...
 
Order _max_scalar_order
 Maximum scalar variable order. More...
 
bool _has_time_integrator
 Indicates whether or not this executioner has a time integrator (during setup) More...
 
bool _has_exception
 Whether or not an exception has occurred. More...
 
bool _parallel_barrier_messaging
 Whether or not information about how many transfers have completed is printed. More...
 
std::string _exception_message
 The error message to go with an exception. More...
 
ExecFlagType _current_execute_on_flag
 Current execute_on flag. More...
 
ExecuteMooseObjectWarehouse< Control_control_warehouse
 The control logic warehouse. More...
 
Moose::PetscSupport::PetscOptions _petsc_options
 PETSc option storage. More...
 
std::shared_ptr< LineSearch_line_search
 
std::unique_ptr< ConstElemRange > _evaluable_local_elem_range
 
bool _using_ad
 Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material property or whether any suppier has declared an AD material property. More...
 
std::map< TagName, TagID_vector_tag_name_to_tag_id
 The currently declared tags. More...
 
std::map< TagID, TagName > _vector_tag_id_to_tag_name
 Reverse map. More...
 
std::map< TagName, TagID_matrix_tag_name_to_tag_id
 The currently declared tags. More...
 
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
 Reverse map. More...
 
Factory_factory
 The Factory for building objects. More...
 
CouplingMatrix _nonlocal_cm
 
std::map< SubdomainID, Moose::CoordinateSystemType_coord_sys
 nonlocal coupling matrix; More...
 
DiracKernelInfo _dirac_kernel_info
 
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
 Map of material properties (block_id -> list of properties) More...
 
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
 Map for boundary material properties (boundary_id -> list of properties) More...
 
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
 Set of properties returned as zero properties. More...
 
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
 
std::set< std::string > _material_property_requested
 set containing all material property names that have been requested by getMaterialProperty* More...
 
std::vector< std::set< MooseVariableFEBase * > > _active_elemental_moose_variables
 This is the set of MooseVariableFEBases that will actually get reinited by a call to reinit(elem) More...
 
std::vector< unsigned int > _has_active_elemental_moose_variables
 Whether or not there is currently a list of active elemental moose variables. More...
 
std::vector< std::set< unsigned int > > _active_material_property_ids
 Set of material property ids that determine whether materials get reinited. More...
 
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
 
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
 
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
 
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
 
bool _requires_nonlocal_coupling
 nonlocal coupling requirement flag More...
 
std::set< dof_id_type > _ghosted_elems
 Elements that should have Dofs ghosted to the local processor. More...
 
unsigned int _rz_coord_axis
 Storage for RZ axis selection. More...
 
bool _currently_computing_jacobian
 Flag to determine whether the problem is currently computing Jacobian. More...
 
bool _computing_nonlinear_residual
 Whether residual being evaulated is non-linear. More...
 
bool _safe_access_tagged_matrices
 Is it safe to retrieve data from tagged matrices. More...
 
bool _safe_access_tagged_vectors
 Is it safe to retrieve data from tagged vectors. More...
 
bool _cli_option_found
 True if the CLI option is found. More...
 
bool _color_output
 True if we're going to attempt to write color output. More...
 
bool _termination_requested
 True if termination of the solve has been requested. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
const InputParameters_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 
InitialConditionWarehouse _ics
 
MooseObjectWarehouseBase< ScalarInitialCondition_scalar_ics
 
MaterialWarehouse _materials
 
MaterialWarehouse _residual_materials
 
MaterialWarehouse _jacobian_materials
 
MaterialWarehouse _discrete_materials
 
MaterialWarehouse _all_materials
 
MooseObjectWarehouse< Indicator_indicators
 
MooseObjectWarehouse< InternalSideIndicator_internal_side_indicators
 
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
 Data structures of the requested material properties. More...
 
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
 

Detailed Description

Specialization of SubProblem for dumping generated objects as input file syntax.

Definition at line 24 of file DumpObjectsProblem.h.

Constructor & Destructor Documentation

◆ DumpObjectsProblem()

DumpObjectsProblem::DumpObjectsProblem ( const InputParameters parameters)

Definition at line 32 of file DumpObjectsProblem.C.

33  : FEProblemBase(parameters), _nl_sys(std::make_shared<DumpObjectsNonlinearSystem>(*this, "nl0"))
34 {
35  _nl = _nl_sys;
36  _aux = std::make_shared<AuxiliarySystem>(*this, "aux0");
38 
39  // Create extra vectors and matrices if any
41 }
std::shared_ptr< NonlinearSystemBase > _nl
std::shared_ptr< DumpObjectsNonlinearSystem > _nl_sys
FEProblemBase(const InputParameters &parameters)
virtual void newAssemblyArray(NonlinearSystemBase &nl)
void createTagVectors()
Create extra tagged vectors and matrices.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::shared_ptr< AuxiliarySystem > _aux

Member Function Documentation

◆ _setCLIOption()

void Problem::_setCLIOption ( )
inlineinherited

For Internal Use.

Definition at line 36 of file Problem.h.

36 { _cli_option_found = true; }
bool _cli_option_found
True if the CLI option is found.
Definition: Problem.h:47

◆ adaptivity()

Adaptivity& FEProblemBase::adaptivity ( )
inlineinherited

Definition at line 1247 of file FEProblemBase.h.

Referenced by Steady::execute(), FEProblemBase::initialAdaptMesh(), and FEProblemBase::initialSetup().

1247 { return _adaptivity; }
Adaptivity _adaptivity

◆ adaptMesh()

virtual bool DumpObjectsProblem::adaptMesh ( )
inlineoverridevirtual
Returns
Whether or not the mesh was changed

Reimplemented from FEProblemBase.

Definition at line 99 of file DumpObjectsProblem.h.

99 { return false; }

◆ addADJacobianMaterial()

void FEProblemBase::addADJacobianMaterial ( const std::string &  kernel_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 2351 of file FEProblemBase.C.

2354 {
2356 }
MaterialWarehouse _jacobian_materials
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addMaterialHelper(MaterialWarehouse &warehouse, const std::string &kernel_name, const std::string &name, InputParameters parameters)

◆ addADResidualMaterial()

void FEProblemBase::addADResidualMaterial ( const std::string &  kernel_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 2343 of file FEProblemBase.C.

2346 {
2348 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
MaterialWarehouse _residual_materials
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addMaterialHelper(MaterialWarehouse &warehouse, const std::string &kernel_name, const std::string &name, InputParameters parameters)

◆ addAuxKernel()

void DumpObjectsProblem::addAuxKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 138 of file DumpObjectsProblem.C.

141 {
142  dumpObjectHelper("AuxKernels", type, name, parameters);
144 }
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addAuxScalarKernel()

void DumpObjectsProblem::addAuxScalarKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 147 of file DumpObjectsProblem.C.

150 {
151  dumpObjectHelper("AuxScalarKernels", type, name, parameters);
153 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
virtual void addAuxScalarKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addAuxScalarVariable()

void DumpObjectsProblem::addAuxScalarVariable ( const std::string &  var_name,
Order  order,
Real  scale_factor = 1.,
const std::set< SubdomainID > *const  active_subdomains = NULL 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 74 of file DumpObjectsProblem.C.

78 {
79  dumpVariableHelper("AuxVariables", var_name, SCALAR, order, 1.0, active_subdomains);
80  FEProblemBase::addScalarVariable(var_name, order, scale_factor, active_subdomains);
81 }
virtual void addScalarVariable(const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
void dumpVariableHelper(const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)

◆ addAuxVariable()

void DumpObjectsProblem::addAuxVariable ( const std::string &  var_name,
const FEType &  type,
const std::set< SubdomainID > *const  active_subdomains = NULL 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 65 of file DumpObjectsProblem.C.

68 {
69  dumpVariableHelper("AuxVariables", var_name, type.family, type.order, 1.0, active_subdomains);
70  FEProblemBase::addAuxVariable(var_name, type, active_subdomains);
71 }
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
void dumpVariableHelper(const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)
virtual void addAuxVariable(const std::string &var_name, const FEType &type, const std::set< SubdomainID > *const active_subdomains=NULL)

◆ addBoundaryCondition()

void DumpObjectsProblem::addBoundaryCondition ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 120 of file DumpObjectsProblem.C.

123 {
126 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters parameters)

◆ addCachedJacobian()

void FEProblemBase::addCachedJacobian ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1260 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::enforceNodalConstraintsJacobian(), and ComputeJacobianThread::postElement().

1261 {
1262  _assembly[tid]->addCachedJacobian();
1263  if (_displaced_problem)
1264  _displaced_problem->addCachedJacobian(tid);
1265 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addCachedResidual()

void FEProblemBase::addCachedResidual ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1169 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeResidualInternal(), NonlinearSystemBase::constraintResiduals(), ComputeNodalKernelBcsThread::onNode(), ComputeNodalKernelsThread::onNode(), and ComputeResidualThread::postElement().

1170 {
1171  _assembly[tid]->addCachedResiduals();
1172 
1173  if (_displaced_problem)
1174  _displaced_problem->addCachedResidual(tid);
1175 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addCachedResidualDirectly()

void FEProblemBase::addCachedResidualDirectly ( NumericVector< Number > &  residual,
THREAD_ID  tid 
)
virtualinherited

Allows for all the residual contributions that are currently cached to be added directly into the vector passed in.

Parameters
residualThe vector to add the cached contributions to.
tidThe thread id.

Definition at line 1178 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals(), and NonlinearSystemBase::enforceNodalConstraintsResidual().

1179 {
1180  _assembly[tid]->addCachedResidual(residual, _nl->timeVectorTag());
1181  _assembly[tid]->addCachedResidual(residual, _nl->nonTimeVectorTag());
1182 
1183  if (_displaced_problem)
1184  _displaced_problem->addCachedResidualDirectly(residual, tid);
1185 }
std::shared_ptr< NonlinearSystemBase > _nl
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addConstraint()

void DumpObjectsProblem::addConstraint ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 129 of file DumpObjectsProblem.C.

132 {
133  dumpObjectHelper("Constraints", type, name, parameters);
135 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
virtual void addConstraint(const std::string &c_name, const std::string &name, InputParameters parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addDamper()

void FEProblemBase::addDamper ( std::string  damper_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 3335 of file FEProblemBase.C.

3338 {
3339  parameters.set<SubProblem *>("_subproblem") = this;
3340  parameters.set<SystemBase *>("_sys") = _nl.get();
3341 
3342  _has_dampers = true;
3343  _nl->addDamper(damper_name, name, parameters);
3344 }
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_dampers
Whether or not this system has any Dampers associated with it.
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:91
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addDGKernel()

void DumpObjectsProblem::addDGKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 165 of file DumpObjectsProblem.C.

168 {
169  dumpObjectHelper("DGKernels", type, name, parameters);
171 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
virtual void addDGKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addDiracKernel()

void DumpObjectsProblem::addDiracKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 156 of file DumpObjectsProblem.C.

159 {
160  dumpObjectHelper("DiracKernels", type, name, parameters);
162 }
virtual void addDiracKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addDisplacedProblem()

void FEProblemBase::addDisplacedProblem ( std::shared_ptr< DisplacedProblem displaced_problem)
virtualinherited

Definition at line 4953 of file FEProblemBase.C.

4954 {
4955  _displaced_mesh = &displaced_problem->mesh();
4956  _displaced_problem = displaced_problem;
4957 }
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ addDistribution()

void FEProblemBase::addDistribution ( std::string  type,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

The following functions will enable MOOSE to have the capability to import distributions.

Definition at line 1735 of file FEProblemBase.C.

1738 {
1739  parameters.set<std::string>("type") = type;
1740  std::shared_ptr<Distribution> dist = _factory.create<Distribution>(type, name, parameters);
1741  _distributions.addObject(dist);
1742 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
All Distributions should inherit from this class.
Definition: Distribution.h:23
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
MooseObjectWarehouseBase< Distribution > _distributions
distributions

◆ addExtraVectors()

void FEProblemBase::addExtraVectors ( )
virtualinherited

A place to add extra vectors to the simulation.

It is called early during initialSetup.

Definition at line 546 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

547 {
548  _nl->addExtraVectors();
549  _aux->addExtraVectors();
550 }
std::shared_ptr< NonlinearSystemBase > _nl
std::shared_ptr< AuxiliarySystem > _aux

◆ addFunction()

void DumpObjectsProblem::addFunction ( std::string  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 84 of file DumpObjectsProblem.C.

87 {
88  dumpObjectHelper("Functions", type, name, parameters);
90 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
virtual void addFunction(std::string type, const std::string &name, InputParameters parameters)
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addGhostedBoundary()

void FEProblemBase::addGhostedBoundary ( BoundaryID  boundary_id)
overridevirtualinherited

Will make sure that all necessary elements from boundary_id are ghosted to this processor.

Implements SubProblem.

Definition at line 1339 of file FEProblemBase.C.

Referenced by DisplacedProblem::addGhostedBoundary().

1340 {
1341  _mesh.addGhostedBoundary(boundary_id);
1342  if (_displaced_problem)
1343  _displaced_mesh->addGhostedBoundary(boundary_id);
1344 }
MooseMesh & _mesh
std::shared_ptr< DisplacedProblem > _displaced_problem
void addGhostedBoundary(BoundaryID boundary_id)
This will add the boundary ids to be ghosted to this processor.
Definition: MooseMesh.C:2318
MooseMesh * _displaced_mesh

◆ addGhostedElem()

void FEProblemBase::addGhostedElem ( dof_id_type  elem_id)
overridevirtualinherited

Will make sure that all dofs connected to elem_id are ghosted to this processor.

Implements SubProblem.

Definition at line 1332 of file FEProblemBase.C.

Referenced by DisplacedProblem::addGhostedElem(), and NodalPatchRecovery::NodalPatchRecovery().

1333 {
1334  if (_mesh.elemPtr(elem_id)->processor_id() != processor_id())
1335  _ghosted_elems.insert(elem_id);
1336 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2219
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:615
MooseMesh & _mesh

◆ addIndicator()

void FEProblemBase::addIndicator ( std::string  indicator_name,
const std::string &  name,
InputParameters  parameters 
)
inherited

Definition at line 3353 of file FEProblemBase.C.

3356 {
3357  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
3358  {
3359  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3360  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3361  _reinit_displaced_elem = true;
3362  }
3363  else
3364  {
3365  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
3366  {
3367  // We allow Indicators to request that they use_displaced_mesh,
3368  // but then be overridden when no displacements variables are
3369  // provided in the Mesh block. If that happened, update the value
3370  // of use_displaced_mesh appropriately for this Indicator.
3371  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3372  parameters.set<bool>("use_displaced_mesh") = false;
3373  }
3374 
3375  parameters.set<SubProblem *>("_subproblem") = this;
3376  parameters.set<SystemBase *>("_sys") = _aux.get();
3377  }
3378 
3379  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3380  {
3381  std::shared_ptr<Indicator> indicator =
3382  _factory.create<Indicator>(indicator_name, name, parameters, tid);
3383 
3384  std::shared_ptr<InternalSideIndicator> isi =
3386  if (isi)
3388  else
3389  _indicators.addObject(indicator, tid);
3390  }
3391 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
Base class for a system (of equations)
Definition: SystemBase.h:91
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::shared_ptr< AuxiliarySystem > _aux
MooseObjectWarehouse< Indicator > _indicators
The InternalSideIndicator class is responsible for calculating the residuals for various physics on i...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:97

◆ addInitialCondition()

void DumpObjectsProblem::addInitialCondition ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 183 of file DumpObjectsProblem.C.

186 {
189 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters parameters)

◆ addInterfaceKernel()

void DumpObjectsProblem::addInterfaceKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 174 of file DumpObjectsProblem.C.

177 {
178  dumpObjectHelper("InterfaceKernels", type, name, parameters);
180 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addInterfaceKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)

◆ addJacobian()

void FEProblemBase::addJacobian ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1204 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1205 {
1206  _assembly[tid]->addJacobian();
1208  _assembly[tid]->addJacobianNonlocal();
1209  if (_displaced_problem)
1210  {
1211  _displaced_problem->addJacobian(tid);
1213  _displaced_problem->addJacobianNonlocal(tid);
1214  }
1215 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianBlock()

void FEProblemBase::addJacobianBlock ( SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1268 of file FEProblemBase.C.

Referenced by ComputeJacobianBlocksThread::postElement().

1274 {
1275  _assembly[tid]->addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices);
1277  if (_nonlocal_cm(ivar, jvar) != 0)
1278  {
1279  MooseVariableFEBase & jv = _nl->getVariable(tid, jvar);
1280  _assembly[tid]->addJacobianBlockNonlocal(
1281  jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices());
1282  }
1283 
1284  if (_displaced_problem)
1285  {
1286  _displaced_problem->addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices, tid);
1288  if (_nonlocal_cm(ivar, jvar) != 0)
1289  {
1290  MooseVariableFEBase & jv = _nl->getVariable(tid, jvar);
1291  _displaced_problem->addJacobianBlockNonlocal(
1292  jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices(), tid);
1293  }
1294  }
1295 }
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
DofMap & dof_map
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.
std::shared_ptr< DisplacedProblem > _displaced_problem
CouplingMatrix _nonlocal_cm
Definition: SubProblem.h:563
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianNeighbor() [1/2]

void FEProblemBase::addJacobianNeighbor ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1218 of file FEProblemBase.C.

Referenced by ComputeJacobianThread::onInterface(), and ComputeJacobianThread::onInternalSide().

1219 {
1220  _assembly[tid]->addJacobianNeighbor();
1221  if (_displaced_problem)
1222  _displaced_problem->addJacobianNeighbor(tid);
1223 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianNeighbor() [2/2]

void FEProblemBase::addJacobianNeighbor ( SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
std::vector< dof_id_type > &  neighbor_dof_indices,
THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1298 of file FEProblemBase.C.

1305 {
1306  _assembly[tid]->addJacobianNeighbor(
1307  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices);
1308  if (_displaced_problem)
1309  _displaced_problem->addJacobianNeighbor(
1310  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, tid);
1311 }
DofMap & dof_map
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianOffDiagScalar()

void FEProblemBase::addJacobianOffDiagScalar ( unsigned int  ivar,
THREAD_ID  tid = 0 
)
virtualinherited

Definition at line 1232 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

1233 {
1234  _assembly[tid]->addJacobianOffDiagScalar(ivar);
1235 }
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianScalar()

void FEProblemBase::addJacobianScalar ( THREAD_ID  tid = 0)
virtualinherited

Definition at line 1226 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

1227 {
1228  _assembly[tid]->addJacobianScalar();
1229 }
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addKernel()

void DumpObjectsProblem::addKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 93 of file DumpObjectsProblem.C.

96 {
97  dumpObjectHelper("Kernels", type, name, parameters);
99 }
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addLineSearch()

virtual void DumpObjectsProblem::addLineSearch ( const InputParameters )
inlineoverridevirtual

add a MOOSE line search

Reimplemented from FEProblemBase.

Definition at line 100 of file DumpObjectsProblem.h.

100 {}

◆ addMarker()

void FEProblemBase::addMarker ( std::string  marker_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 3394 of file FEProblemBase.C.

3397 {
3398  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
3399  {
3400  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3401  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3402  _reinit_displaced_elem = true;
3403  }
3404  else
3405  {
3406  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
3407  {
3408  // We allow Markers to request that they use_displaced_mesh,
3409  // but then be overridden when no displacements variables are
3410  // provided in the Mesh block. If that happened, update the value
3411  // of use_displaced_mesh appropriately for this Marker.
3412  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3413  parameters.set<bool>("use_displaced_mesh") = false;
3414  }
3415 
3416  parameters.set<SubProblem *>("_subproblem") = this;
3417  parameters.set<SystemBase *>("_sys") = _aux.get();
3418  }
3419 
3420  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3421  {
3422  std::shared_ptr<Marker> marker = _factory.create<Marker>(marker_name, name, parameters, tid);
3423  _markers.addObject(marker, tid);
3424  }
3425 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Definition: Marker.h:40
Base class for a system (of equations)
Definition: SystemBase.h:91
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::shared_ptr< AuxiliarySystem > _aux
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MooseObjectWarehouse< Marker > _markers
unsigned int THREAD_ID
Definition: MooseTypes.h:97

◆ addMaterial()

void DumpObjectsProblem::addMaterial ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 192 of file DumpObjectsProblem.C.

195 {
196  dumpObjectHelper("Materials", type, name, parameters);
198 }
virtual void addMaterial(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addMaterialHelper()

void FEProblemBase::addMaterialHelper ( MaterialWarehouse warehouse,
const std::string &  kernel_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 2359 of file FEProblemBase.C.

Referenced by FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), and FEProblemBase::addMaterial().

2363 {
2364  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
2365  {
2366  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2367  _reinit_displaced_elem = true;
2368  }
2369  else
2370  {
2371  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
2372  {
2373  // We allow Materials to request that they use_displaced_mesh,
2374  // but then be overridden when no displacements variables are
2375  // provided in the Mesh block. If that happened, update the value
2376  // of use_displaced_mesh appropriately for this Material.
2377  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2378  parameters.set<bool>("use_displaced_mesh") = false;
2379  }
2380 
2381  parameters.set<SubProblem *>("_subproblem") = this;
2382  }
2383 
2384  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2385  {
2386  // Create the general Block/Boundary Material object
2387  std::shared_ptr<Material> material = _factory.create<Material>(mat_name, name, parameters, tid);
2388  bool discrete = !material->getParam<bool>("compute");
2389 
2390  // If the object is boundary restricted do not create the neighbor and face objects
2391  if (material->boundaryRestricted())
2392  {
2393  _all_materials.addObject(material, tid);
2394  if (discrete)
2395  _discrete_materials.addObject(material, tid);
2396  else
2397  warehouse.addObject(material, tid);
2398  }
2399 
2400  // Non-boundary restricted require face and neighbor objects
2401  else
2402  {
2403  // The name of the object being created, this is changed multiple times as objects are created
2404  // below
2405  std::string object_name;
2406 
2407  // Create a copy of the supplied parameters to the setting for "_material_data_type" isn't
2408  // used from a previous tid loop
2409  InputParameters current_parameters = parameters;
2410 
2411  // face material
2412  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
2414  object_name = name + "_face";
2415  std::shared_ptr<Material> face_material =
2416  _factory.create<Material>(mat_name, object_name, current_parameters, tid);
2417 
2418  // neighbor material
2419  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
2421  current_parameters.set<bool>("_neighbor") = true;
2422  object_name = name + "_neighbor";
2423  std::shared_ptr<Material> neighbor_material =
2424  _factory.create<Material>(mat_name, object_name, current_parameters, tid);
2425 
2426  // Store the material objects
2427  _all_materials.addObjects(material, neighbor_material, face_material, tid);
2428 
2429  if (discrete)
2430  _discrete_materials.addObjects(material, neighbor_material, face_material, tid);
2431  else
2432  warehouse.addObjects(material, neighbor_material, face_material, tid);
2433 
2434  // link parameters of face and neighbor materials
2435  MooseObjectParameterName name(MooseObjectName("Material", material->name()), "*");
2436  MooseObjectParameterName face_name(MooseObjectName("Material", face_material->name()), "*");
2437  MooseObjectParameterName neighbor_name(MooseObjectName("Material", neighbor_material->name()),
2438  "*");
2441  name, neighbor_name, false);
2442  }
2443  }
2444 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:1328
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:331
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:185
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
Materials compute MaterialProperties.
Definition: Material.h:47
void addControllableParameterConnection(const MooseObjectParameterName &master, const MooseObjectParameterName &slave, bool error_on_empty=true)
Method for linking control parameters of different names.
MaterialWarehouse _discrete_materials
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
std::shared_ptr< DisplacedProblem > _displaced_problem
A class for storing an input parameter name.
void addObjects(std::shared_ptr< Material > block, std::shared_ptr< Material > neighbor, std::shared_ptr< Material > face, THREAD_ID tid=0)
A special method unique to this class for adding Block, Neighbor, and Face material objects...
A class for storing the names of MooseObject by tag and object name.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:97

◆ addMatrixTag()

TagID SubProblem::addMatrixTag ( TagName  tag_name)
virtualinherited

Create a Tag.

Tags can be associated with Vectors and Matrices and allow objects (such as Kernels) to arbitrarily contribute values to any set of vectors/matrics

Note: If the tag is already present then this will simply return the TagID of that Tag

Parameters
tag_nameThe name of the tag to create, the TagID will get automatically generated

Reimplemented in DisplacedProblem.

Definition at line 101 of file SubProblem.C.

Referenced by DisplacedProblem::addMatrixTag(), FEProblemBase::createTagVectors(), NonlinearEigenSystem::NonlinearEigenSystem(), and NonlinearSystemBase::NonlinearSystemBase().

102 {
103  auto tag_name_upper = MooseUtils::toUpper(tag_name);
104  auto existing_tag = _matrix_tag_name_to_tag_id.find(tag_name_upper);
105  if (existing_tag == _matrix_tag_name_to_tag_id.end())
106  {
107  auto tag_id = _matrix_tag_name_to_tag_id.size();
108 
109  _matrix_tag_name_to_tag_id[tag_name_upper] = tag_id;
110 
111  _matrix_tag_id_to_tag_name[tag_id] = tag_name_upper;
112  }
113 
114  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
115 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:555
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:708
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:558

◆ addMultiApp()

void FEProblemBase::addMultiApp ( const std::string &  multi_app_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Add a MultiApp to the problem.

Definition at line 3428 of file FEProblemBase.C.

3431 {
3432  parameters.set<MPI_Comm>("_mpi_comm") = _communicator.get();
3433  parameters.set<std::shared_ptr<CommandLine>>("_command_line") = _app.commandLine();
3434 
3435  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
3436  {
3437  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3438  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3439  _reinit_displaced_elem = true;
3440  }
3441  else
3442  {
3443  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
3444  {
3445  // We allow MultiApps to request that they use_displaced_mesh,
3446  // but then be overridden when no displacements variables are
3447  // provided in the Mesh block. If that happened, update the value
3448  // of use_displaced_mesh appropriately for this MultiApp.
3449  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3450  parameters.set<bool>("use_displaced_mesh") = false;
3451  }
3452 
3453  parameters.set<SubProblem *>("_subproblem") = this;
3454  parameters.set<SystemBase *>("_sys") = _aux.get();
3455  }
3456 
3457  std::shared_ptr<MultiApp> multi_app = _factory.create<MultiApp>(multi_app_name, name, parameters);
3458 
3459  multi_app->setupPositions();
3460 
3461  _multi_apps.addObject(multi_app);
3462 
3463  // Store TranseintMultiApp objects in another container, this is needed for calling computeDT
3464  std::shared_ptr<TransientMultiApp> trans_multi_app =
3466  if (trans_multi_app)
3467  _transient_multi_apps.addObject(trans_multi_app);
3468 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
void setupPositions()
Called just after construction to allow derived classes to set _positions;.
Definition: MultiApp.C:195
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
Definition: MooseApp.h:293
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
MultiApp Implementation for Transient Apps.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
Base class for a system (of equations)
Definition: SystemBase.h:91
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::shared_ptr< AuxiliarySystem > _aux
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
std::shared_ptr< DisplacedProblem > _displaced_problem
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition: MultiApp.h:57

◆ addNodalKernel()

void DumpObjectsProblem::addNodalKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 102 of file DumpObjectsProblem.C.

105 {
106  dumpObjectHelper("NodalKernel", type, name, parameters);
108 }
virtual void addNodalKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addOutput()

void FEProblemBase::addOutput ( const std::string &  object_type,
const std::string &  object_name,
InputParameters  parameters 
)
inherited

Adds an Output object.

Definition at line 5838 of file FEProblemBase.C.

5841 {
5842  // Get a reference to the OutputWarehouse
5843  OutputWarehouse & output_warehouse = _app.getOutputWarehouse();
5844 
5845  // Reject the reserved names for objects not built by MOOSE
5846  if (!parameters.get<bool>("_built_by_moose") && output_warehouse.isReservedName(object_name))
5847  mooseError("The name '", object_name, "' is a reserved name for output objects");
5848 
5849  // Check that an object by the same name does not already exist; this must be done before the
5850  // object is created to avoid getting misleading errors from the Parser
5851  if (output_warehouse.hasOutput(object_name))
5852  mooseError("An output object named '", object_name, "' already exists");
5853 
5854  // Add a pointer to the FEProblemBase class
5855  parameters.addPrivateParam<FEProblemBase *>("_fe_problem_base", this);
5856 
5857  // Create common parameter exclude list
5858  std::vector<std::string> exclude;
5859  if (object_type == "Console")
5860  {
5861  exclude.push_back("execute_on");
5862 
5863  // --show-input should enable the display of the input file on the screen
5864  if (_app.getParam<bool>("show_input") && parameters.get<bool>("output_screen"))
5865  parameters.set<ExecFlagEnum>("execute_input_on") = EXEC_INITIAL;
5866  }
5867 
5868  // Apply the common parameters
5869  InputParameters * common = output_warehouse.getCommonParameters();
5870  if (common != NULL)
5871  parameters.applyParameters(*common, exclude);
5872 
5873  // Set the correct value for the binary flag for XDA/XDR output
5874  if (object_type == "XDR")
5875  parameters.set<bool>("_binary") = true;
5876  else if (object_type == "XDA")
5877  parameters.set<bool>("_binary") = false;
5878 
5879  // Adjust the checkpoint suffix if auto recovery was enabled
5880  if (object_name == "auto_recovery_checkpoint")
5881  parameters.set<std::string>("suffix") = "auto_recovery";
5882 
5883  // Create the object and add it to the warehouse
5884  std::shared_ptr<Output> output = _factory.create<Output>(object_type, object_name, parameters);
5885  output_warehouse.addOutput(output);
5886 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:25
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
void addOutput(std::shared_ptr< Output > &output)
Adds an existing output object to the warehouse.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
bool isReservedName(const std::string &name)
Test if the given name is reserved.
bool hasOutput(const std::string &name) const
Returns true if the output object exists.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Based class for output objects.
Definition: Output.h:42
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
Class for storing and utilizing output objects.
void applyParameters(const InputParameters &common, std::vector< std::string > exclude=std::vector< std::string >())
Method for applying common parameters.
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:903
InputParameters * getCommonParameters()
Get a reference to the common output parameters.
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1056
const ExecFlagType EXEC_INITIAL

◆ addPostprocessor()

void FEProblemBase::addPostprocessor ( std::string  pp_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 2710 of file FEProblemBase.C.

2713 {
2714  // Check for name collision
2715  if (hasUserObject(name))
2716  mooseError(std::string("A UserObject with the name \"") + name +
2717  "\" already exists. You may not add a Postprocessor by the same name.");
2718 
2719  addUserObject(pp_name, name, parameters);
2721 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
void initPostprocessorData(const std::string &name)
Initializes the postprocessor data.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addUserObject(std::string user_object_name, const std::string &name, InputParameters parameters)

◆ addPredictor()

void FEProblemBase::addPredictor ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 4365 of file FEProblemBase.C.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector().

4368 {
4369  parameters.set<SubProblem *>("_subproblem") = this;
4370  std::shared_ptr<Predictor> predictor = _factory.create<Predictor>(type, name, parameters);
4371  _nl->setPredictor(predictor);
4372 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
std::shared_ptr< NonlinearSystemBase > _nl
Base class for predictors.
Definition: Predictor.h:34
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addResidual()

void FEProblemBase::addResidual ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1129 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1130 {
1131  _assembly[tid]->addResidual(getVectorTags());
1132 
1133  if (_displaced_problem)
1134  _displaced_problem->addResidual(tid);
1135 }
virtual std::map< TagName, TagID > & getVectorTags()
Return all vector tags, where a tag is represented by a map from name to ID.
Definition: SubProblem.h:95
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addResidualNeighbor()

void FEProblemBase::addResidualNeighbor ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1138 of file FEProblemBase.C.

Referenced by ComputeResidualThread::onInterface(), and ComputeResidualThread::onInternalSide().

1139 {
1140  _assembly[tid]->addResidualNeighbor(getVectorTags());
1141 
1142  if (_displaced_problem)
1143  _displaced_problem->addResidualNeighbor(tid);
1144 }
virtual std::map< TagName, TagID > & getVectorTags()
Return all vector tags, where a tag is represented by a map from name to ID.
Definition: SubProblem.h:95
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addResidualScalar()

void FEProblemBase::addResidualScalar ( THREAD_ID  tid = 0)
virtualinherited

Definition at line 1147 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeResidualInternal().

1148 {
1149  _assembly[tid]->addResidualScalar(getVectorTags());
1150 }
virtual std::map< TagName, TagID > & getVectorTags()
Return all vector tags, where a tag is represented by a map from name to ID.
Definition: SubProblem.h:95
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addSampler()

void FEProblemBase::addSampler ( std::string  type,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

The following functions will enable MOOSE to have the capability to import Samplers.

Definition at line 1754 of file FEProblemBase.C.

1755 {
1756  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
1757  {
1758  std::shared_ptr<Sampler> dist = _factory.create<Sampler>(type, name, parameters, tid);
1759  _samplers.addObject(dist, tid);
1760  }
1761 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
This is the base class for Samplers.
Definition: Sampler.h:41
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
ExecuteMooseObjectWarehouse< Sampler > _samplers
Samplers.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
unsigned int THREAD_ID
Definition: MooseTypes.h:97

◆ addScalarKernel()

void DumpObjectsProblem::addScalarKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 111 of file DumpObjectsProblem.C.

114 {
115  dumpObjectHelper("ScalarKernels", type, name, parameters);
117 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addScalarKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)

◆ addScalarVariable()

void DumpObjectsProblem::addScalarVariable ( const std::string &  var_name,
Order  order,
Real  scale_factor = 1.,
const std::set< SubdomainID > *const  active_subdomains = NULL 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 55 of file DumpObjectsProblem.C.

59 {
60  dumpVariableHelper("Variables", var_name, SCALAR, order, scale_factor, active_subdomains);
61  FEProblemBase::addScalarVariable(var_name, order, scale_factor, active_subdomains);
62 }
virtual void addScalarVariable(const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
void dumpVariableHelper(const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)

◆ addTimeIntegrator()

void FEProblemBase::addTimeIntegrator ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 4349 of file FEProblemBase.C.

Referenced by Transient::setupTimeIntegrator().

4352 {
4353  parameters.set<SubProblem *>("_subproblem") = this;
4354  _aux->addTimeIntegrator(type, name + ":aux", parameters);
4355  _nl->addTimeIntegrator(type, name, parameters);
4356  _has_time_integrator = true;
4357 
4358  // add vectors to store u_dot, u_dotdot, udot_old and u_dotdot_old if requested by the time
4359  // integrator
4360  _aux->addDotVectors();
4361  _nl->addDotVectors();
4362 }
std::shared_ptr< NonlinearSystemBase > _nl
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::shared_ptr< AuxiliarySystem > _aux
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ addTransfer()

void FEProblemBase::addTransfer ( const std::string &  transfer_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Add a Transfer to the problem.

Definition at line 3682 of file FEProblemBase.C.

3685 {
3686  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
3687  {
3688  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3689  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3690  _reinit_displaced_elem = true;
3691  }
3692  else
3693  {
3694  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
3695  {
3696  // We allow Transfers to request that they use_displaced_mesh,
3697  // but then be overridden when no displacements variables are
3698  // provided in the Mesh block. If that happened, update the value
3699  // of use_displaced_mesh appropriately for this Transfer.
3700  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3701  parameters.set<bool>("use_displaced_mesh") = false;
3702  }
3703 
3704  parameters.set<SubProblem *>("_subproblem") = this;
3705  parameters.set<SystemBase *>("_sys") = _aux.get();
3706  }
3707 
3708  // Handle the "SAME_AS_MULTIAPP" execute option
3709  ExecFlagEnum & exec_enum = parameters.set<ExecFlagEnum>("execute_on", true);
3710  if (exec_enum.contains(EXEC_SAME_AS_MULTIAPP))
3711  {
3712  std::shared_ptr<MultiApp> multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app"));
3713  exec_enum = multiapp->getParam<ExecFlagEnum>("execute_on");
3714  }
3715 
3716  // Create the Transfer objects
3717  std::shared_ptr<Transfer> transfer = _factory.create<Transfer>(transfer_name, name, parameters);
3718 
3719  // Add MultiAppTransfer object
3720  std::shared_ptr<MultiAppTransfer> multi_app_transfer =
3722  if (multi_app_transfer)
3723  {
3724  if (multi_app_transfer->direction() == MultiAppTransfer::TO_MULTIAPP)
3725  _to_multi_app_transfers.addObject(multi_app_transfer);
3726  else
3727  _from_multi_app_transfers.addObject(multi_app_transfer);
3728  }
3729  else
3730  _transfers.addObject(transfer);
3731 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:25
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
Base class for a system (of equations)
Definition: SystemBase.h:91
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::shared_ptr< AuxiliarySystem > _aux
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
Base class for all MultiAppTransfer objects.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
const ExecFlagType EXEC_SAME_AS_MULTIAPP
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
std::shared_ptr< DisplacedProblem > _displaced_problem
Base class for all Transfer objects.
Definition: Transfer.h:41

◆ addUserObject()

void FEProblemBase::addUserObject ( std::string  user_object_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 2738 of file FEProblemBase.C.

Referenced by FEProblemBase::addPostprocessor(), and FEProblemBase::addVectorPostprocessor().

2741 {
2742  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
2743  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2744  else
2745  {
2746  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
2747  {
2748  // We allow UserObjects to request that they use_displaced_mesh,
2749  // but then be overridden when no displacements variables are
2750  // provided in the Mesh block. If that happened, update the value
2751  // of use_displaced_mesh appropriately for this UserObject.
2752  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2753  parameters.set<bool>("use_displaced_mesh") = false;
2754  }
2755 
2756  parameters.set<SubProblem *>("_subproblem") = this;
2757  }
2758 
2759  UserObject * primary = nullptr;
2760  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
2761  {
2762  // Create the UserObject
2763  std::shared_ptr<UserObject> user_object =
2764  _factory.create<UserObject>(user_object_name, name, parameters, tid);
2765  if (tid == 0)
2766  primary = user_object.get();
2767  else
2768  user_object->setPrimaryThreadCopy(primary);
2769 
2770  // TODO: delete this line after apps have been updated to not call getUserObjects
2771  _all_user_objects.addObject(user_object, tid);
2772 
2773  theWarehouse().add(user_object, "UserObject");
2774 
2775  // Attempt to create all the possible UserObject types
2776  auto euo = std::dynamic_pointer_cast<ElementUserObject>(user_object);
2777  auto suo = std::dynamic_pointer_cast<SideUserObject>(user_object);
2778  auto isuo = std::dynamic_pointer_cast<InternalSideUserObject>(user_object);
2779  auto nuo = std::dynamic_pointer_cast<NodalUserObject>(user_object);
2780  auto guo = std::dynamic_pointer_cast<GeneralUserObject>(user_object);
2781  auto tguo = std::dynamic_pointer_cast<ThreadedGeneralUserObject>(user_object);
2782 
2783  // Account for displaced mesh use
2784  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
2785  {
2786  if (euo || nuo)
2787  _reinit_displaced_elem = true;
2788  else if (suo)
2789  _reinit_displaced_face = true;
2790  }
2791 
2792  if (guo && !tguo)
2793  break;
2794  }
2795 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:561
void setPrimaryThreadCopy(UserObject *primary)
Definition: UserObject.h:141
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
A user object that runs over all the nodes and does an aggregation step to compute a single value...
TheWarehouse & theWarehouse() const
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
bool _reinit_displaced_face
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
void add(std::shared_ptr< MooseObject > obj, const std::string &system)
add adds a new object to the warehouse and stores attributes/metadata about it for running queries/fi...
Definition: TheWarehouse.C:94
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
std::shared_ptr< DisplacedProblem > _displaced_problem
Base class for user-specific data.
Definition: UserObject.h:38
unsigned int THREAD_ID
Definition: MooseTypes.h:97
An instance of this object type has one copy per thread that runs on each thread. ...

◆ addVariable()

void DumpObjectsProblem::addVariable ( const std::string &  var_name,
const FEType &  type,
Real  scale_factor,
const std::set< SubdomainID > *const  active_subdomains = NULL 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 44 of file DumpObjectsProblem.C.

48 {
50  "Variables", var_name, type.family, type.order, scale_factor, active_subdomains);
51  FEProblemBase::addVariable(var_name, type, scale_factor, active_subdomains);
52 }
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
virtual void addVariable(const std::string &var_name, const FEType &type, Real scale_factor, const std::set< SubdomainID > *const active_subdomains=NULL)
void dumpVariableHelper(const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)

◆ addVectorPostprocessor()

void FEProblemBase::addVectorPostprocessor ( std::string  pp_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Definition at line 2724 of file FEProblemBase.C.

2727 {
2728  // Check for name collision
2729  if (hasUserObject(name))
2730  mooseError(std::string("A UserObject with the name \"") + name +
2731  "\" already exists. You may not add a VectorPostprocessor by the same name.");
2732 
2733  addUserObject(pp_name, name, parameters);
2735 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
void initVectorPostprocessorData(const std::string &name)
Initialize the VectorPostprocessor data.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual void addUserObject(std::string user_object_name, const std::string &name, InputParameters parameters)

◆ addVectorTag()

TagID SubProblem::addVectorTag ( TagName  tag_name)
virtualinherited

Create a Tag.

Tags can be associated with Vectors and Matrices and allow objects (such as Kernels) to arbitrarily contribute values to any set of vectors/matrics

Note: If the tag is already present then this will simply return the TagID of that Tag

Parameters
tag_nameThe name of the tag to create, the TagID will get automatically generated

Reimplemented in DisplacedProblem.

Definition at line 55 of file SubProblem.C.

Referenced by DisplacedProblem::addVectorTag(), FEProblemBase::createTagVectors(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), NonlinearEigenSystem::NonlinearEigenSystem(), and NonlinearSystemBase::NonlinearSystemBase().

56 {
57  auto tag_name_upper = MooseUtils::toUpper(tag_name);
58  auto existing_tag = _vector_tag_name_to_tag_id.find(tag_name_upper);
59  if (existing_tag == _vector_tag_name_to_tag_id.end())
60  {
61  auto tag_id = _vector_tag_name_to_tag_id.size();
62 
63  _vector_tag_name_to_tag_id[tag_name_upper] = tag_id;
64 
65  _vector_tag_id_to_tag_name[tag_id] = tag_name_upper;
66  }
67 
68  return _vector_tag_name_to_tag_id.at(tag_name_upper);
69 }
std::map< TagName, TagID > _vector_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:549
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:708
std::map< TagID, TagName > _vector_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:552

◆ advanceMultiApps()

void FEProblemBase::advanceMultiApps ( ExecFlagType  type)
inlineinherited

Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep depending on your purpose.

Definition at line 933 of file FEProblemBase.h.

934  {
935  mooseDeprecated("Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep "
936  "depending on your purpose");
938  }
void finishMultiAppStep(ExecFlagType type)
Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:155

◆ advanceState()

virtual void DumpObjectsProblem::advanceState ( )
inlineoverridevirtual

Advance all of the state holding vectors / datastructures so that we can move to the next timestep.

Reimplemented from FEProblemBase.

Definition at line 91 of file DumpObjectsProblem.h.

91 {}

◆ allowOutput() [1/2]

void FEProblemBase::allowOutput ( bool  state)
inherited

Ability to enable/disable all output calls.

This is needed by Multiapps and applications to disable output for cases when executioners call other executions and when Multiapps are sub cycling.

Definition at line 4317 of file FEProblemBase.C.

Referenced by TransientMultiApp::resetApp(), and TransientMultiApp::solveStep().

4318 {
4320 }
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1056

◆ allowOutput() [2/2]

template<typename T >
void FEProblemBase::allowOutput ( bool  state)
inherited

Definition at line 1940 of file FEProblemBase.h.

1941 {
1942  _app.getOutputWarehouse().allowOutput<T>(state);
1943 }
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1056

◆ areCoupled()

bool FEProblemBase::areCoupled ( unsigned int  ivar,
unsigned int  jvar 
)
inherited

Definition at line 4036 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

4037 {
4038  return (*_cm)(ivar, jvar);
4039 }
std::unique_ptr< CouplingMatrix > _cm
Coupling matrix for variables.

◆ assembly()

virtual Assembly& FEProblemBase::assembly ( THREAD_ID  tid)
inlineoverridevirtualinherited

◆ backupMultiApps()

void FEProblemBase::backupMultiApps ( ExecFlagType  type)
inherited

Backup the MultiApps associated with the ExecFlagType.

Definition at line 3613 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup(), and Transient::takeStep().

3614 {
3615  const auto & multi_apps = _multi_apps[type].getActiveObjects();
3616 
3617  if (multi_apps.size())
3618  {
3619  TIME_SECTION(_backup_multi_apps_timer);
3620 
3621  _console << COLOR_CYAN << "\nBacking Up MultiApps" << COLOR_DEFAULT << std::endl;
3622 
3623  for (const auto & multi_app : multi_apps)
3624  multi_app->backup();
3625 
3626  _console << "Waiting For Other Processors To Finish" << std::endl;
3628 
3629  _console << COLOR_CYAN << "Finished Backing Up MultiApps\n" << COLOR_DEFAULT << std::endl;
3630  }
3631 }
const PerfID _backup_multi_apps_timer
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
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...
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ cacheJacobian()

void FEProblemBase::cacheJacobian ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1238 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), and ComputeJacobianThread::postElement().

1239 {
1240  _assembly[tid]->cacheJacobian();
1242  _assembly[tid]->cacheJacobianNonlocal();
1243  if (_displaced_problem)
1244  {
1245  _displaced_problem->cacheJacobian(tid);
1247  _displaced_problem->cacheJacobianNonlocal(tid);
1248  }
1249 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ cacheJacobianNeighbor()

void FEProblemBase::cacheJacobianNeighbor ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1252 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

1253 {
1254  _assembly[tid]->cacheJacobianNeighbor();
1255  if (_displaced_problem)
1256  _displaced_problem->cacheJacobianNeighbor(tid);
1257 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ cacheResidual()

void FEProblemBase::cacheResidual ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1153 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals(), and ComputeResidualThread::postElement().

1154 {
1155  _assembly[tid]->cacheResidual();
1156  if (_displaced_problem)
1157  _displaced_problem->cacheResidual(tid);
1158 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ cacheResidualNeighbor()

void FEProblemBase::cacheResidualNeighbor ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1161 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1162 {
1163  _assembly[tid]->cacheResidualNeighbor();
1164  if (_displaced_problem)
1165  _displaced_problem->cacheResidualNeighbor(tid);
1166 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ checkBlockMatProps()

void SubProblem::checkBlockMatProps ( )
virtualinherited

Checks block material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 435 of file SubProblem.C.

Referenced by FEProblemBase::checkProblemIntegrity().

436 {
437  // Variable for storing the value for ANY_BLOCK_ID/ANY_BOUNDARY_ID
439 
440  // Variable for storing all available blocks/boundaries from the mesh
441  std::set<SubdomainID> all_ids(mesh().meshSubdomains());
442 
443  // Loop through the properties to check
444  for (const auto & check_it : _map_block_material_props_check)
445  {
446  // The current id for the property being checked (BoundaryID || BlockID)
447  SubdomainID check_id = check_it.first;
448 
449  // In the case when the material being checked has an ID is set to ANY, then loop through all
450  // the possible ids and verify that the material property is defined.
451  std::set<SubdomainID> check_ids = {check_id};
452  if (check_id == any_id)
453  check_ids = all_ids;
454 
455  // Loop through all the block/boundary ids
456  for (const auto & id : check_ids)
457  {
458  // Loop through all the stored properties
459  for (const auto & prop_it : check_it.second)
460  {
461  // Produce an error if the material property is not defined on the current block/boundary
462  // and any block/boundary
463  // and not is not a zero material property.
464  if (_map_block_material_props[id].count(prop_it.second) == 0 &&
465  _map_block_material_props[any_id].count(prop_it.second) == 0 &&
466  _zero_block_material_props[id].count(prop_it.second) == 0 &&
467  _zero_block_material_props[any_id].count(prop_it.second) == 0)
468  {
469  std::string check_name = restrictionSubdomainCheckName(id);
470  if (check_name.empty())
471  check_name = std::to_string(id);
472  mooseError("Material property '",
473  prop_it.second,
474  "', requested by '",
475  prop_it.first,
476  "' is not defined on block ",
477  check_name);
478  }
479  }
480  }
481  }
482 }
virtual MooseMesh & mesh()=0
subdomain_id_type SubdomainID
Definition: MooseTypes.h:95
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::string restrictionSubdomainCheckName(SubdomainID check_id)
Helper functions for checking MaterialProperties.
Definition: SubProblem.C:577
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.h:319
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:577
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:589
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:571

◆ checkBoundaryMatProps()

void SubProblem::checkBoundaryMatProps ( )
virtualinherited

Checks boundary material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 485 of file SubProblem.C.

Referenced by FEProblemBase::checkProblemIntegrity().

486 {
487  // Variable for storing the value for ANY_BLOCK_ID/ANY_BOUNDARY_ID
489 
490  // Variable for storing all available blocks/boundaries from the mesh
491  std::set<BoundaryID> all_ids(mesh().getBoundaryIDs());
492 
493  // Loop through the properties to check
494  for (const auto & check_it : _map_boundary_material_props_check)
495  {
496  // The current id for the property being checked (BoundaryID || BlockID)
497  BoundaryID check_id = check_it.first;
498 
499  // In the case when the material being checked has an ID is set to ANY, then loop through all
500  // the possible ids and verify that the material property is defined.
501  std::set<BoundaryID> check_ids{check_id};
502  if (check_id == any_id)
503  check_ids = all_ids;
504 
505  // Loop through all the block/boundary ids
506  for (const auto & id : check_ids)
507  {
508  // Loop through all the stored properties
509  for (const auto & prop_it : check_it.second)
510  {
511  // Produce an error if the material property is not defined on the current block/boundary
512  // and any block/boundary
513  // and not is not a zero material property.
514  if (_map_boundary_material_props[id].count(prop_it.second) == 0 &&
515  _map_boundary_material_props[any_id].count(prop_it.second) == 0 &&
516  _zero_boundary_material_props[id].count(prop_it.second) == 0 &&
517  _zero_boundary_material_props[any_id].count(prop_it.second) == 0)
518  {
519  std::string check_name = restrictionBoundaryCheckName(id);
520  if (check_name.empty())
521  check_name = std::to_string(id);
522  mooseError("Material property '",
523  prop_it.second,
524  "', requested by '",
525  prop_it.first,
526  "' is not defined on boundary ",
527  check_name);
528  }
529  }
530  }
531  }
532 }
virtual MooseMesh & mesh()=0
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:590
std::string restrictionBoundaryCheckName(BoundaryID check_id)
Definition: SubProblem.C:588
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:578
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:574
std::vector< libMesh::boundary_id_type > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown)
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.h:321
boundary_id_type BoundaryID
Definition: MooseTypes.h:93

◆ checkCoordinateSystems()

void FEProblemBase::checkCoordinateSystems ( )
protectedinherited

Verify that there are no element type/coordinate type conflicts.

Definition at line 5576 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

5577 {
5578  for (const auto & elem : _mesh.getMesh().element_ptr_range())
5579  {
5580  SubdomainID sid = elem->subdomain_id();
5581  if (_coord_sys[sid] == Moose::COORD_RZ && elem->dim() == 3)
5582  mooseError("An RZ coordinate system was requested for subdomain " + Moose::stringify(sid) +
5583  " which contains 3D elements.");
5584  if (_coord_sys[sid] == Moose::COORD_RSPHERICAL && elem->dim() > 1)
5585  mooseError("An RSPHERICAL coordinate system was requested for subdomain " +
5586  Moose::stringify(sid) + " which contains 2D or 3D elements.");
5587  }
5588 }
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
nonlocal coupling matrix;
Definition: SubProblem.h:566
subdomain_id_type SubdomainID
Definition: MooseTypes.h:95
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
MooseMesh & _mesh
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:58

◆ checkDependMaterialsHelper()

void FEProblemBase::checkDependMaterialsHelper ( const std::map< SubdomainID, std::vector< std::shared_ptr< Material >>> &  materials_map)
protectedinherited

Helper method for checking Material object dependency.

See also
checkProblemIntegrity

These two sets are used to make sure that all dependent props on a block are actually supplied

Definition at line 5451 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

5453 {
5454  auto & prop_names = _material_props.statefulPropNames();
5455 
5456  for (const auto & it : materials_map)
5457  {
5459  std::set<std::string> block_depend_props, block_supplied_props;
5460 
5461  for (const auto & mat1 : it.second)
5462  {
5463  const std::set<std::string> & depend_props = mat1->getRequestedItems();
5464  block_depend_props.insert(depend_props.begin(), depend_props.end());
5465 
5466  auto & alldeps = mat1->getMatPropDependencies(); // includes requested stateful props
5467  for (auto & dep : alldeps)
5468  {
5469  if (prop_names.count(dep) > 0)
5470  block_depend_props.insert(prop_names.at(dep));
5471  }
5472 
5473  // See if any of the active materials supply this property
5474  for (const auto & mat2 : it.second)
5475  {
5476  const std::set<std::string> & supplied_props = mat2->Material::getSuppliedItems();
5477  block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
5478  }
5479  }
5480 
5481  // Add zero material properties specific to this block and unrestricted
5482  block_supplied_props.insert(_zero_block_material_props[it.first].begin(),
5483  _zero_block_material_props[it.first].end());
5484  block_supplied_props.insert(_zero_block_material_props[Moose::ANY_BLOCK_ID].begin(),
5486 
5487  // Error check to make sure all properties consumed by materials are supplied on this block
5488  std::set<std::string> difference;
5489  std::set_difference(block_depend_props.begin(),
5490  block_depend_props.end(),
5491  block_supplied_props.begin(),
5492  block_supplied_props.end(),
5493  std::inserter(difference, difference.end()));
5494 
5495  if (!difference.empty())
5496  {
5497  std::ostringstream oss;
5498  oss << "One or more Material Properties were not supplied on block " << it.first << ":\n";
5499  for (const auto & name : difference)
5500  oss << name << "\n";
5501  mooseError(oss.str());
5502  }
5503  }
5504 
5505  // This loop checks that materials are not supplied by multiple Material objects
5506  for (const auto & it : materials_map)
5507  {
5508  const auto & materials = it.second;
5509  std::set<std::string> inner_supplied, outer_supplied;
5510 
5511  for (const auto & outer_mat : materials)
5512  {
5513  // Storage for properties for this material (outer) and all other materials (inner)
5514  outer_supplied = outer_mat->getSuppliedItems();
5515  inner_supplied.clear();
5516 
5517  // Property to material map for error reporting
5518  std::map<std::string, std::set<std::string>> prop_to_mat;
5519  for (const auto & name : outer_supplied)
5520  prop_to_mat[name].insert(outer_mat->name());
5521 
5522  for (const auto & inner_mat : materials)
5523  {
5524  if (outer_mat == inner_mat)
5525  continue;
5526 
5527  // Check whether these materials are an AD pair
5528  auto outer_mat_type = outer_mat->type();
5529  auto inner_mat_type = inner_mat->type();
5530  removeSubstring(outer_mat_type, "<RESIDUAL>");
5531  removeSubstring(outer_mat_type, "<JACOBIAN>");
5532  removeSubstring(inner_mat_type, "<RESIDUAL>");
5533  removeSubstring(inner_mat_type, "<JACOBIAN>");
5534  if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
5535  inner_mat_type != inner_mat->type())
5536  continue;
5537 
5538  inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
5539  inner_mat->getSuppliedItems().end());
5540 
5541  for (const auto & inner_supplied_name : inner_supplied)
5542  prop_to_mat[inner_supplied_name].insert(inner_mat->name());
5543  }
5544 
5545  // Test that a property isn't supplied on multiple blocks
5546  std::set<std::string> intersection;
5547  std::set_intersection(outer_supplied.begin(),
5548  outer_supplied.end(),
5549  inner_supplied.begin(),
5550  inner_supplied.end(),
5551  std::inserter(intersection, intersection.end()));
5552 
5553  if (!intersection.empty())
5554  {
5555  std::ostringstream oss;
5556  oss << "The following material properties are declared on block " << it.first
5557  << " by multiple materials:\n";
5558  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << "Material Property"
5559  << "Material Objects\n";
5560  for (const auto & outer_name : intersection)
5561  {
5562  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << outer_name;
5563  for (const auto & inner_name : prop_to_mat[outer_name])
5564  oss << inner_name << " ";
5565  oss << '\n';
5566  }
5567 
5568  mooseError(oss.str());
5569  break;
5570  }
5571  }
5572  }
5573 }
std::string indent(unsigned int spaces)
Create empty string for indenting.
Definition: ConsoleUtils.C:29
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::map< unsigned int, std::string > statefulPropNames() const
void removeSubstring(std::string &main, const std::string &sub)
find, erase, length algorithm for removing a substring from a string
Definition: MooseUtils.C:861
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.h:319
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:577
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
MaterialPropertyStorage & _material_props

◆ checkDisplacementOrders()

void FEProblemBase::checkDisplacementOrders ( )
protectedinherited

Verify that SECOND order mesh uses SECOND order displacements.

Definition at line 5367 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

5368 {
5369  if (_displaced_problem)
5370  {
5371  bool mesh_has_second_order_elements = false;
5372  for (const auto & elem : as_range(_displaced_mesh->activeLocalElementsBegin(),
5374  {
5375  if (elem->default_order() == SECOND)
5376  {
5377  mesh_has_second_order_elements = true;
5378  break;
5379  }
5380  }
5381 
5382  // We checked our local elements, so take the max over all processors.
5383  _displaced_mesh->comm().max(mesh_has_second_order_elements);
5384 
5385  // If the Mesh has second order elements, make sure the
5386  // displacement variables are second-order.
5387  if (mesh_has_second_order_elements)
5388  {
5389  const std::vector<std::string> & displacement_variables =
5390  _displaced_problem->getDisplacementVarNames();
5391 
5392  for (const auto & var_name : displacement_variables)
5393  {
5394  MooseVariableFEBase & mv =
5395  _displaced_problem->getVariable(/*tid=*/0,
5396  var_name,
5399  if (mv.order() != SECOND)
5400  mooseError("Error: mesh has SECOND order elements, so all displacement variables must be "
5401  "SECOND order.");
5402  }
5403  }
5404  }
5405 }
MeshBase::const_element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2169
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
std::shared_ptr< DisplacedProblem > _displaced_problem
const MeshBase::const_element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:2175
MooseMesh * _displaced_mesh

◆ checkExceptionAndStopSolve()

void FEProblemBase::checkExceptionAndStopSolve ( )
virtualinherited

Check to see if an exception has occurred on any processor and stop the solve.

Note: Collective on MPI! Must be called simultaneously by all processors!

Also: This will throw a MooseException!

Note: DO NOT CALL THIS IN A THREADED REGION! This is meant to be called just after a threaded section.

Definition at line 4169 of file FEProblemBase.C.

Referenced by FEProblemBase::computeBounds().

4170 {
4172 
4173  // See if any processor had an exception. If it did, get back the
4174  // processor that the exception occurred on.
4175  unsigned int processor_id;
4176 
4177  _communicator.maxloc(_has_exception, processor_id);
4178 
4179  if (_has_exception)
4180  {
4181  _communicator.broadcast(_exception_message, processor_id);
4182 
4183  // Print the message
4184  if (_communicator.rank() == 0)
4185  Moose::err << _exception_message << std::endl;
4186 
4187  // Stop the solve -- this entails setting
4188  // SNESSetFunctionDomainError() or directly inserting NaNs in the
4189  // residual vector to let PETSc >= 3.6 return DIVERGED_NANORINF.
4190  _nl->stopSolve();
4191 
4192  // and close Aux system (we MUST do this here; see #11525)
4193  _aux->solution().close();
4194 
4195  // We've handled this exception, so we no longer have one.
4196  _has_exception = false;
4197 
4198  // Force the next linear convergence check to fail.
4200 
4201  // Repropagate the exception, so it can be caught at a higher level, typically
4202  // this is NonlinearSystem::computeResidual().
4204  }
4205 }
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_exception
Whether or not an exception has occurred.
std::shared_ptr< AuxiliarySystem > _aux
std::string _exception_message
The error message to go with an exception.
const PerfID _check_exception_and_stop_solve_timer
Provides a way for users to bail out of the current solve.
bool _fail_next_linear_convergence_check

◆ checkLinearConvergence()

MooseLinearConvergenceReason FEProblemBase::checkLinearConvergence ( std::string &  msg,
const PetscInt  n,
const Real  rnorm,
const Real  rtol,
const Real  atol,
const Real  dtol,
const PetscInt  maxits 
)
virtualinherited

Check for convergence of the linear solution.

Parameters
msgError message that gets sent back to the solver
nIteration counter
rnormNorm of the residual vector
rtolRelative residual convergence tolerance
atolAbsolute residual convergence tolerance
dtolDivergence tolerance
maxitsMaximum number of linear iterations allowed

Definition at line 5704 of file FEProblemBase.C.

Referenced by Moose::PetscSupport::petscConverged().

5711 {
5712  TIME_SECTION(_check_linear_convergence_timer);
5713 
5715  {
5716  // Unset the flag
5718  return MOOSE_DIVERGED_NANORINF;
5719  }
5720 
5721  // We initialize the reason to something that basically means MOOSE
5722  // has not made a decision on convergence yet.
5724 
5725  // Get a reference to our Nonlinear System
5727 
5728  // If it's the beginning of a new set of iterations, reset
5729  // last_rnorm, otherwise record the most recent linear residual norm
5730  // in the NonlinearSystem.
5731  if (n == 0)
5732  system._last_rnorm = 1e99;
5733  else
5734  system._last_rnorm = rnorm;
5735 
5736  // If the linear residual norm is less than the System's linear absolute
5737  // step tolerance, we consider it to be converged and set the reason as
5738  // MOOSE_CONVERGED_RTOL.
5739  if (std::abs(rnorm - system._last_rnorm) < system._l_abs_step_tol)
5740  reason = MOOSE_CONVERGED_RTOL;
5741 
5742  // If we hit max its, then we consider that converged (rather than
5743  // KSP_DIVERGED_ITS).
5744  if (n >= maxits)
5745  reason = MOOSE_CONVERGED_ITS;
5746 
5747  // If either of our convergence criteria is met, store the number of linear
5748  // iterations in the System.
5749  if (reason == MOOSE_CONVERGED_ITS || reason == MOOSE_CONVERGED_RTOL)
5750  system._current_l_its.push_back(static_cast<unsigned int>(n));
5751 
5752  return reason;
5753 }
const PerfID _check_linear_convergence_timer
NonlinearSystemBase & getNonlinearSystemBase()
Nonlinear system to be solved.
MooseLinearConvergenceReason
nl system()
PetscInt n
bool _fail_next_linear_convergence_check

◆ checkNonlinearConvergence()

MooseNonlinearConvergenceReason FEProblemBase::checkNonlinearConvergence ( std::string &  msg,
const PetscInt  it,
const Real  xnorm,
const Real  snorm,
const Real  fnorm,
const Real  rtol,
const Real  stol,
const Real  abstol,
const PetscInt  nfuncs,
const PetscInt  max_funcs,
const PetscBool  force_iteration,
const Real  initial_residual_before_preset_bcs,
const Real  div_threshold 
)
virtualinherited

Check for converence of the nonlinear solution.

Parameters
msgError message that gets sent back to the solver
itIteration counter
xnormNorm of the solution vector
snormNorm of the change in the solution vector
fnormNorm of the residual vector
rtolRelative residual convergence tolerance
stolSolution change convergence tolerance
abstolAbsolute residual convergence tolerance
nfuncsNumber of function evaluations
max_funcsMaximum Number of function evaluations
initial_residual_before_preset_bcsResidual norm prior to imposition of PresetBC values on solution vector
div_thresholdMaximum value of residual before triggering divergence check

Definition at line 5623 of file FEProblemBase.C.

Referenced by Moose::PetscSupport::petscNonlinearConverged().

5636 {
5637  TIME_SECTION(_check_nonlinear_convergence_timer);
5638 
5641 
5642  // This is the first residual before any iterations have been done,
5643  // but after PresetBCs (if any) have been imposed on the solution
5644  // vector. We save it, and use it to detect convergence if
5645  // compute_initial_residual_before_preset_bcs=false.
5646  if (it == 0)
5647  system._initial_residual_after_preset_bcs = fnorm;
5648 
5649  std::ostringstream oss;
5650  if (fnorm != fnorm)
5651  {
5652  oss << "Failed to converge, function norm is NaN\n";
5653  reason = MOOSE_DIVERGED_FNORM_NAN;
5654  }
5655  else if (fnorm < abstol && (it || !force_iteration))
5656  {
5657  oss << "Converged due to function norm " << fnorm << " < " << abstol << '\n';
5658  reason = MOOSE_CONVERGED_FNORM_ABS;
5659  }
5660  else if (nfuncs >= max_funcs)
5661  {
5662  oss << "Exceeded maximum number of function evaluations: " << nfuncs << " > " << max_funcs
5663  << '\n';
5665  }
5666  else if (it && fnorm > system._last_nl_rnorm && fnorm >= div_threshold)
5667  {
5668  oss << "Nonlinear solve was blowing up!\n";
5669  reason = MOOSE_DIVERGED_LINE_SEARCH;
5670  }
5671 
5672  if (it && !reason)
5673  {
5674  // If compute_initial_residual_before_preset_bcs==false, then use the
5675  // first residual computed by Petsc to determine convergence.
5676  Real the_residual = system._compute_initial_residual_before_preset_bcs
5677  ? initial_residual_before_preset_bcs
5678  : system._initial_residual_after_preset_bcs;
5679  if (fnorm <= the_residual * rtol)
5680  {
5681  oss << "Converged due to function norm " << fnorm << " < "
5682  << " (relative tolerance)\n";
5684  }
5685  else if (snorm < stol * xnorm)
5686  {
5687  oss << "Converged due to small update length: " << snorm << " < " << stol << " * " << xnorm
5688  << '\n';
5690  }
5691  }
5692 
5693  system._last_nl_rnorm = fnorm;
5694  system._current_nl_its = static_cast<unsigned int>(it);
5695 
5696  msg = oss.str();
5697  if (_app.multiAppLevel() > 0)
5699 
5700  return (reason);
5701 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:72
NonlinearSystemBase & getNonlinearSystemBase()
void indentMessage(const std::string &prefix, std::string &message, const char *color=COLOR_CYAN)
Indents the supplied message given the prefix and color.
Definition: MooseUtils.C:488
unsigned int multiAppLevel() const
The MultiApp Level.
Definition: MooseApp.h:515
Nonlinear system to be solved.
nl system()
const PerfID _check_nonlinear_convergence_timer
MooseNonlinearConvergenceReason
Definition: FEProblemBase.h:89
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171

◆ checkNonlocalCoupling()

void FEProblemBase::checkNonlocalCoupling ( )
inherited
Returns
Flag indicating nonlocal coupling exists or not.

Definition at line 940 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

941 {
942  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
943  {
944  const auto & all_kernels = _nl->getKernelWarehouse();
945  const auto & kernels = all_kernels.getObjects(tid);
946  for (const auto & kernel : kernels)
947  {
948  std::shared_ptr<NonlocalKernel> nonlocal_kernel =
950  if (nonlocal_kernel)
951  {
954  _nonlocal_kernels.addObject(kernel, tid);
955  }
956  }
957  const MooseObjectWarehouse<IntegratedBCBase> & all_integrated_bcs =
958  _nl->getIntegratedBCWarehouse();
959  const auto & integrated_bcs = all_integrated_bcs.getObjects(tid);
960  for (const auto & integrated_bc : integrated_bcs)
961  {
962  std::shared_ptr<NonlocalIntegratedBC> nonlocal_integrated_bc =
964  if (nonlocal_integrated_bc)
965  {
968  _nonlocal_integrated_bcs.addObject(integrated_bc, tid);
969  }
970  }
971  }
972 }
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
Definition: SubProblem.h:612
std::shared_ptr< NonlinearSystemBase > _nl
NonlocalIntegratedBC is used for solving integral terms in integro-differential equations.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
bool _calculate_jacobian_in_uo
const std::vector< std::shared_ptr< T > > & getObjects(THREAD_ID tid=0) const
Retrieve complete vector to the all/block/boundary restricted objects for a given thread...
NonlocalKernel is used for solving integral terms in integro-differential equations.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:97
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels

◆ checkNonlocalCouplingRequirement()

virtual bool SubProblem::checkNonlocalCouplingRequirement ( )
inlinevirtualinherited

◆ checkProblemIntegrity()

void FEProblemBase::checkProblemIntegrity ( )
virtualinherited

Method called to perform a series of sanity checks before a simulation is run.

This method doesn't return when errors are found, instead it generally calls mooseError() directly.

If a material is specified for any block in the simulation, then all blocks must have a material specified.

unsigned int is necessary to print SubdomainIDs in the statement below

Reimplemented in EigenProblem.

Definition at line 5260 of file FEProblemBase.C.

Referenced by EigenProblem::checkProblemIntegrity().

5261 {
5262  TIME_SECTION(_check_problem_integrity_timer);
5263 
5264  // Check for unsatisfied actions
5265  const std::set<SubdomainID> & mesh_subdomains = _mesh.meshSubdomains();
5266 
5267  // Check kernel coverage of subdomains (blocks) in the mesh
5269  _nl->checkKernelCoverage(mesh_subdomains);
5270 
5271  // Check materials
5272  {
5273 #ifdef LIBMESH_ENABLE_AMR
5274  if (_adaptivity.isOn() &&
5277  {
5278  _console << "Using EXPERIMENTAL Stateful Material Property projection with Adaptivity!\n";
5279 
5280  if (n_processors() > 1)
5281  {
5282  if (_mesh.uniformRefineLevel() > 0 && _mesh.getMesh().skip_partitioning() == false)
5283  mooseError("This simulation is using uniform refinement on the mesh, with stateful "
5284  "properties and adaptivity. "
5285  "You must skip partitioning to run this case:\nMesh/skip_partitioning=true");
5286 
5287  _console << "\nWarning! Mesh re-partitioning is disabled while using stateful material "
5288  "properties! This can lead to large load imbalances and degraded "
5289  "performance!!\n\n";
5290  _mesh.getMesh().skip_partitioning(true);
5291 
5292  _mesh.errorIfDistributedMesh("StatefulMaterials + Adaptivity");
5293 
5294  if (_displaced_problem)
5295  _displaced_problem->mesh().getMesh().skip_partitioning(true);
5296  }
5297  }
5298 #endif
5299 
5300  std::set<SubdomainID> local_mesh_subs(mesh_subdomains);
5301 
5303  {
5308  bool check_material_coverage = false;
5309  std::set<SubdomainID> ids = _all_materials.getActiveBlocks();
5310  for (const auto & id : ids)
5311  {
5312  local_mesh_subs.erase(id);
5313  check_material_coverage = true;
5314  }
5315 
5316  // also exclude mortar spaces from the material check
5317  auto & mortar_ifaces = _mesh.getMortarInterfaces();
5318  for (const auto & mortar_iface : mortar_ifaces)
5319  local_mesh_subs.erase(mortar_iface->_id);
5320 
5321  // Check Material Coverage
5322  if (check_material_coverage && !local_mesh_subs.empty())
5323  {
5324  std::stringstream extra_subdomain_ids;
5326  std::copy(local_mesh_subs.begin(),
5327  local_mesh_subs.end(),
5328  std::ostream_iterator<unsigned int>(extra_subdomain_ids, " "));
5329 
5330  mooseError("The following blocks from your input mesh do not contain an active material: " +
5331  extra_subdomain_ids.str() +
5332  "\nWhen ANY mesh block contains a Material object, "
5333  "all blocks must contain a Material object.\n");
5334  }
5335  }
5336 
5337  // Check material properties on blocks and boundaries
5340 
5341  // Check that material properties exist when requested by other properties on a given block
5342  const auto & materials = _all_materials.getActiveObjects();
5343  for (const auto & material : materials)
5344  material->checkStatefulSanity();
5345 
5346  // auto mats_to_check = _materials.getActiveBlockObjects();
5347  // const auto & discrete_materials = _discrete_materials.getActiveBlockObjects();
5348  // for (const auto & map_it : discrete_materials)
5349  // for (const auto & container_element : map_it.second)
5350  // mats_to_check[map_it.first].push_back(container_element);
5352  }
5353 
5354  // Check UserObjects and Postprocessors
5355  checkUserObjects();
5356 
5357  // Verify that we don't have any Element type/Coordinate Type conflicts
5359 
5360  // If using displacements, verify that the order of the displacement
5361  // variables matches the order of the elements in the displaced
5362  // mesh.
5364 }
MaterialPropertyStorage & _bnd_material_props
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
std::shared_ptr< NonlinearSystemBase > _nl
const PerfID _check_problem_integrity_timer
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
bool isOn()
Is adaptivity on?
Definition: Adaptivity.h:167
const bool _skip_nl_system_check
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
Definition: SubProblem.C:485
std::vector< std::unique_ptr< MooseMesh::MortarInterface > > & getMortarInterfaces()
Definition: MooseMesh.h:790
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:2630
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...
std::set< SubdomainID > getActiveBlocks(THREAD_ID tid=0) const
Return a set of active SubdomainsIDs.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
void checkUserObjects()
void checkDisplacementOrders()
Verify that SECOND order mesh uses SECOND order displacements.
void checkDependMaterialsHelper(const std::map< SubdomainID, std::vector< std::shared_ptr< Material >>> &materials_map)
Helper method for checking Material object dependency.
MooseMesh & _mesh
virtual void checkBlockMatProps()
Checks block material properties integrity.
Definition: SubProblem.C:435
Adaptivity _adaptivity
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:2306
bool _kernel_coverage_check
Determines whether a check to verify an active kernel on every subdomain.
bool _solve
Whether or not to actually solve the nonlinear system.
std::shared_ptr< DisplacedProblem > _displaced_problem
MaterialPropertyStorage & _neighbor_material_props
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
MaterialPropertyStorage & _material_props
bool _material_coverage_check
Determines whether a check to verify an active material on every subdomain.
MaterialWarehouse _all_materials
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2261
void checkCoordinateSystems()
Verify that there are no element type/coordinate type conflicts.

◆ checkUserObjectJacobianRequirement()

void FEProblemBase::checkUserObjectJacobianRequirement ( THREAD_ID  tid)
inherited

Definition at line 975 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

976 {
977  std::set<MooseVariableFEBase *> uo_jacobian_moose_vars;
978  {
979  std::vector<ShapeElementUserObject *> objs;
980  theWarehouse()
981  .query()
983  .condition<AttribThread>(tid)
984  .queryInto(objs);
985 
986  for (const auto & uo : objs)
987  {
988  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
989  const std::set<MooseVariableFEBase *> & mv_deps = uo->jacobianMooseVariables();
990  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
991  }
992  }
993  {
994  std::vector<ShapeSideUserObject *> objs;
995  theWarehouse()
996  .query()
998  .condition<AttribThread>(tid)
999  .queryInto(objs);
1000  for (const auto & uo : objs)
1001  {
1002  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1003  const std::set<MooseVariableFEBase *> & mv_deps = uo->jacobianMooseVariables();
1004  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1005  }
1006  }
1007 
1008  _uo_jacobian_moose_vars[tid].assign(uo_jacobian_moose_vars.begin(), uo_jacobian_moose_vars.end());
1009  std::sort(
1010  _uo_jacobian_moose_vars[tid].begin(), _uo_jacobian_moose_vars[tid].end(), sortMooseVariables);
1011 }
Query & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:184
bool _calculate_jacobian_in_uo
TheWarehouse & theWarehouse() const
std::vector< std::vector< MooseVariableFEBase * > > _uo_jacobian_moose_vars
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:266

◆ checkUserObjects()

void FEProblemBase::checkUserObjects ( )
protectedinherited

Definition at line 5408 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

5409 {
5410  // Check user_objects block coverage
5411  std::set<SubdomainID> mesh_subdomains = _mesh.meshSubdomains();
5412  std::set<SubdomainID> user_objects_blocks;
5413 
5414  // gather names of all user_objects that were defined in the input file
5415  // and the blocks that they are defined on
5416  std::set<std::string> names;
5417 
5418  std::vector<UserObject *> objects;
5420 
5421  for (const auto & obj : objects)
5422  names.insert(obj->name());
5423 
5424  // See if all referenced blocks are covered
5425  mesh_subdomains.insert(Moose::ANY_BLOCK_ID);
5426  std::set<SubdomainID> difference;
5427  std::set_difference(user_objects_blocks.begin(),
5428  user_objects_blocks.end(),
5429  mesh_subdomains.begin(),
5430  mesh_subdomains.end(),
5431  std::inserter(difference, difference.end()));
5432 
5433  if (!difference.empty())
5434  {
5435  std::ostringstream oss;
5436  oss << "One or more UserObjects is referencing a nonexistent block:\n";
5437  for (const auto & id : difference)
5438  oss << id << "\n";
5439  mooseError(oss.str());
5440  }
5441 
5442  // check that all requested UserObjects were defined in the input file
5443  for (const auto & it : _pps_data.values())
5444  {
5445  if (names.find(it.first) == names.end())
5446  mooseError("Postprocessor '" + it.first + "' requested but not specified in the input file.");
5447  }
5448 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
Query & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:184
TheWarehouse & theWarehouse() const
PostprocessorData _pps_data
MooseMesh & _mesh
const std::map< std::string, PostprocessorValue * > & values() const
Get the map of names -> Postprocessor values.
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.h:319
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:266
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2261

◆ clearActiveElementalMooseVariables()

void FEProblemBase::clearActiveElementalMooseVariables ( THREAD_ID  tid)
overridevirtualinherited

Clear the active elemental MooseVariableFEBase.

If there are no active variables then they will all be reinited. Call this after finishing the computation that was using a restricted set of MooseVariableFEBases

Parameters
tidThe thread id

Reimplemented from SubProblem.

Definition at line 3855 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::post(), ComputeElemAuxVarsThread::post(), ComputeMaterialsObjectThread::post(), ComputeJacobianThread::post(), ComputeDiracThread::post(), ComputeIndicatorThread::post(), ComputeResidualThread::post(), and ComputeUserObjectsThread::post().

3856 {
3858 
3859  if (_displaced_problem)
3860  _displaced_problem->clearActiveElementalMooseVariables(tid);
3861 }
virtual void clearActiveElementalMooseVariables(THREAD_ID tid)
Clear the active elemental MooseVariableFEBase.
Definition: SubProblem.C:248
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveFEVariableCoupleableMatrixTags ( THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 3864 of file FEProblemBase.C.

Referenced by ComputeElemAuxVarsThread::post(), and ComputeNodalAuxVarsThread::post().

3865 {
3867 
3868  if (_displaced_problem)
3869  _displaced_problem->clearActiveFEVariableCoupleableMatrixTags(tid);
3870 }
virtual void clearActiveFEVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:171
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableVectorTags()

void FEProblemBase::clearActiveFEVariableCoupleableVectorTags ( THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 3873 of file FEProblemBase.C.

Referenced by ComputeElemAuxVarsThread::post(), and ComputeNodalAuxVarsThread::post().

3874 {
3876 
3877  if (_displaced_problem)
3878  _displaced_problem->clearActiveFEVariableCoupleableVectorTags(tid);
3879 }
virtual void clearActiveFEVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:165
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveMaterialProperties()

void FEProblemBase::clearActiveMaterialProperties ( THREAD_ID  tid)
overridevirtualinherited

Clear the active material properties.

Should be called at the end of every computing thread

Parameters
tidThe thread id

Reimplemented from SubProblem.

Definition at line 3910 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeElemAuxBcsThread::operator()(), ComputeElemAuxVarsThread::post(), ComputeDiracThread::post(), ComputeIndicatorThread::post(), ComputeJacobianThread::post(), ComputeResidualThread::post(), and ComputeUserObjectsThread::post().

3911 {
3913 
3914  if (_displaced_problem)
3915  _displaced_problem->clearActiveMaterialProperties(tid);
3916 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void clearActiveMaterialProperties(THREAD_ID tid)
Clear the active material properties.
Definition: SubProblem.C:274

◆ clearActiveScalarVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveScalarVariableCoupleableMatrixTags ( THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 3882 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

3883 {
3885 
3886  if (_displaced_problem)
3887  _displaced_problem->clearActiveScalarVariableCoupleableMatrixTags(tid);
3888 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void clearActiveScalarVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:207

◆ clearActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::clearActiveScalarVariableCoupleableVectorTags ( THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 3891 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

3892 {
3894 
3895  if (_displaced_problem)
3896  _displaced_problem->clearActiveScalarVariableCoupleableVectorTags(tid);
3897 }
virtual void clearActiveScalarVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:201
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearDiracInfo()

void FEProblemBase::clearDiracInfo ( )
overridevirtualinherited

Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in.

Implements SubProblem.

Definition at line 1626 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

1627 {
1629 
1630  if (_displaced_problem)
1631  _displaced_problem->clearDiracInfo();
1632 }
void clearPoints()
Remove all of the current points and elements.
std::shared_ptr< DisplacedProblem > _displaced_problem
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:568

◆ computeAuxiliaryKernels()

void FEProblemBase::computeAuxiliaryKernels ( const ExecFlagType type)
virtualinherited

Call compute methods on AuxKernels.

Definition at line 3049 of file FEProblemBase.C.

Referenced by FEProblemBase::execute().

3050 {
3051  _aux->compute(type);
3052 }
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
std::shared_ptr< AuxiliarySystem > _aux

◆ computeBounds()

void FEProblemBase::computeBounds ( NonlinearImplicitSystem &  sys,
NumericVector< Number > &  lower,
NumericVector< Number > &  upper 
)
virtualinherited

Definition at line 4765 of file FEProblemBase.C.

Referenced by Moose::compute_bounds().

4768 {
4769  if (!_nl->hasVector("lower_bound") || !_nl->hasVector("upper_bound"))
4770  return;
4771 
4772  TIME_SECTION(_compute_bounds_timer);
4773 
4774  NumericVector<Number> & _lower = _nl->getVector("lower_bound");
4775  NumericVector<Number> & _upper = _nl->getVector("upper_bound");
4776  _lower.swap(lower);
4777  _upper.swap(upper);
4778  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
4780 
4781  _aux->residualSetup();
4782  _aux->compute(EXEC_LINEAR);
4783  _lower.swap(lower);
4784  _upper.swap(upper);
4785 
4787 }
const PerfID _compute_bounds_timer
std::shared_ptr< NonlinearSystemBase > _nl
std::shared_ptr< AuxiliarySystem > _aux
const ExecFlagType EXEC_LINEAR
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:97
virtual void checkExceptionAndStopSolve()
Check to see if an exception has occurred on any processor and stop the solve.
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeDamping()

Real FEProblemBase::computeDamping ( const NumericVector< Number > &  soln,
const NumericVector< Number > &  update 
)
virtualinherited

Definition at line 4906 of file FEProblemBase.C.

Referenced by FEProblemBase::computePostCheck().

4908 {
4909  // Default to no damping
4910  Real damping = 1.0;
4911 
4912  if (_has_dampers)
4913  {
4914  TIME_SECTION(_compute_damping_timer);
4915 
4916  // Save pointer to the current solution
4917  const NumericVector<Number> * _saved_current_solution = _nl->currentSolution();
4918 
4919  _nl->setSolution(soln);
4920  // For now, do not re-compute auxiliary variables. Doing so allows a wild solution increment
4921  // to get to the material models, which may not be able to cope with drastically different
4922  // values. Once more complete dependency checking is in place, auxiliary variables (and
4923  // material properties) will be computed as needed by dampers.
4924  // _aux.compute();
4925  damping = _nl->computeDamping(soln, update);
4926 
4927  // restore saved solution
4928  _nl->setSolution(*_saved_current_solution);
4929  }
4930 
4931  return damping;
4932 }
const PerfID _compute_damping_timer
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_dampers
Whether or not this system has any Dampers associated with it.

◆ computeIndicators()

virtual void DumpObjectsProblem::computeIndicators ( )
inlineoverridevirtual

Reimplemented from FEProblemBase.

Definition at line 97 of file DumpObjectsProblem.h.

97 {}

◆ computeIndicatorsAndMarkers()

void FEProblemBase::computeIndicatorsAndMarkers ( )
virtualinherited

Definition at line 2932 of file FEProblemBase.C.

2933 {
2935  computeMarkers();
2936 }
virtual void computeMarkers()
virtual void computeIndicators()

◆ computeJacobian()

void FEProblemBase::computeJacobian ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobian 
)
virtualinherited

Form a Jacobian matrix with the default tag (system).

Definition at line 4623 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobianSys(), and FEProblemBase::computeTransientImplicitJacobian().

4624 {
4625  _fe_matrix_tags.clear();
4626 
4627  auto & tags = getMatrixTags();
4628  for (auto & tag : tags)
4629  _fe_matrix_tags.insert(tag.second);
4630 
4631  computeJacobianInternal(soln, jacobian, _fe_matrix_tags);
4632 }
virtual std::map< TagName, TagID > & getMatrixTags()
Return all matrix tags in the sytem, where a tag is represented by a map from name to ID...
Definition: SubProblem.h:150
virtual void computeJacobianInternal(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const std::set< TagID > &tags)
Form a Jacobian matrix for multiple tags.
std::set< TagID > _fe_matrix_tags

◆ computeJacobianBlock()

void FEProblemBase::computeJacobianBlock ( SparseMatrix< Number > &  jacobian,
libMesh::System &  precond_system,
unsigned int  ivar,
unsigned int  jvar 
)
virtualinherited

Really not a good idea to use this.

It computes just one block of the Jacobian into a smaller matrix. Calling this in a loop is EXTREMELY ineffecient! Try to use computeJacobianBlocks() instead!

Parameters
jacobianThe matrix you want to fill
precond_systemThe libMesh::system of the preconditioning system
ivarthe block-row of the Jacobian
jvarthe block-column of the Jacobian

Definition at line 4754 of file FEProblemBase.C.

4758 {
4759  JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
4760  std::vector<JacobianBlock *> blocks = {&jac_block};
4761  computeJacobianBlocks(blocks);
4762 }
Helper class for holding the preconditioning blocks to fill.
virtual void computeJacobianBlocks(std::vector< JacobianBlock *> &blocks)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...

◆ computeJacobianBlocks()

void FEProblemBase::computeJacobianBlocks ( std::vector< JacobianBlock *> &  blocks)
virtualinherited

Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditioning matrices.

Used by Physics-based preconditioning

Parameters
blocksThe blocks to fill in (JacobianBlock is defined in ComputeJacobianBlocksThread)

Definition at line 4738 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobianBlock(), and PhysicsBasedPreconditioner::setup().

4739 {
4740  TIME_SECTION(_compute_jacobian_blocks_timer);
4741 
4742  if (_displaced_problem != NULL)
4743  {
4744  _aux->compute(EXEC_PRE_DISPLACE);
4745  _displaced_problem->updateMesh();
4746  }
4747 
4748  _aux->compute(EXEC_NONLINEAR);
4749 
4750  _nl->computeJacobianBlocks(blocks);
4751 }
std::shared_ptr< NonlinearSystemBase > _nl
const PerfID _compute_jacobian_blocks_timer
std::shared_ptr< AuxiliarySystem > _aux
const ExecFlagType EXEC_PRE_DISPLACE
const ExecFlagType EXEC_NONLINEAR
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ computeJacobianInternal()

void FEProblemBase::computeJacobianInternal ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobian,
const std::set< TagID > &  tags 
)
virtualinherited

Form a Jacobian matrix for multiple tags.

It should not be called directly by users.

Definition at line 4635 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobian().

4638 {
4639  TIME_SECTION(_compute_jacobian_internal_timer);
4640 
4641  _nl->setSolution(soln);
4642 
4643  _nl->associateMatrixToTag(jacobian, _nl->systemMatrixTag());
4644 
4645  computeJacobianTags(tags);
4646 
4647  _nl->disassociateMatrixFromTag(jacobian, _nl->systemMatrixTag());
4648 }
std::shared_ptr< NonlinearSystemBase > _nl
const PerfID _compute_jacobian_internal_timer
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianSys()

void FEProblemBase::computeJacobianSys ( NonlinearImplicitSystem &  sys,
const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobian 
)
virtualinherited

Form a Jacobian matrix.

It is called by Libmesh.

Definition at line 4601 of file FEProblemBase.C.

Referenced by Moose::compute_jacobian().

4604 {
4605  computeJacobian(soln, jacobian);
4606 }
virtual void computeJacobian(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
Form a Jacobian matrix with the default tag (system).

◆ computeJacobianTag()

void FEProblemBase::computeJacobianTag ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobian,
TagID  tag 
)
virtualinherited

Form a Jacobian matrix for a given tag.

Reimplemented in EigenProblem.

Definition at line 4609 of file FEProblemBase.C.

Referenced by ActuallyExplicitEuler::solve().

4612 {
4613  _nl->setSolution(soln);
4614 
4615  _nl->associateMatrixToTag(jacobian, tag);
4616 
4617  computeJacobianTags({tag});
4618 
4619  _nl->disassociateMatrixFromTag(jacobian, tag);
4620 }
std::shared_ptr< NonlinearSystemBase > _nl
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianTags()

void FEProblemBase::computeJacobianTags ( const std::set< TagID > &  tags)
virtualinherited

Form multiple matrices, and each is associated with a tag.

Definition at line 4651 of file FEProblemBase.C.

Referenced by EigenProblem::computeJacobianAB(), FEProblemBase::computeJacobianInternal(), EigenProblem::computeJacobianTag(), and FEProblemBase::computeJacobianTag().

4652 {
4653  if (!_has_jacobian || !_const_jacobian)
4654  {
4655  TIME_SECTION(_compute_jacobian_tags_timer);
4656 
4657  for (auto tag : tags)
4658  if (_nl->hasMatrix(tag))
4659  _nl->getMatrix(tag).zero();
4660 
4661  _nl->zeroVariablesForJacobian();
4662  _aux->zeroVariablesForJacobian();
4663 
4664  unsigned int n_threads = libMesh::n_threads();
4665 
4666  // Random interface objects
4667  for (const auto & it : _random_data_objects)
4668  it.second->updateSeeds(EXEC_NONLINEAR);
4669 
4672 
4675 
4676  for (unsigned int tid = 0; tid < n_threads; tid++)
4677  reinitScalars(tid);
4678 
4680 
4681  _aux->jacobianSetup();
4682 
4683  if (_displaced_problem != NULL)
4684  {
4685  _aux->compute(EXEC_PRE_DISPLACE);
4686  _displaced_problem->updateMesh();
4687  }
4688 
4689  for (unsigned int tid = 0; tid < n_threads; tid++)
4690  {
4693  }
4694 
4695  _aux->compute(EXEC_NONLINEAR);
4696 
4698 
4700 
4702 
4704 
4705  _nl->computeJacobianTags(tags);
4706 
4709  _has_jacobian = true;
4711  }
4712 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_jacobian
Indicates if the Jacobian was computed.
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:621
const ExecFlagType EXEC_NONE
void jacobianSetup()
Calls the jacobianSetup function for each of the output objects.