https://mooseframework.inl.gov
FEProblemBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #ifdef MOOSE_KOKKOS_ENABLED
13 #include "KokkosAssembly.h"
14 #include "KokkosSystem.h"
15 #endif
16 
17 // MOOSE includes
18 #include "SubProblem.h"
19 #include "GeometricSearchData.h"
20 #include "MeshDivision.h"
21 #include "ReporterData.h"
22 #include "Adaptivity.h"
26 #include "Restartable.h"
27 #include "SolverParams.h"
28 #include "PetscSupport.h"
29 #include "MooseApp.h"
31 #include "MaterialWarehouse.h"
32 #include "MooseVariableFE.h"
33 #include "MultiAppTransfer.h"
34 #include "Postprocessor.h"
35 #include "HashMap.h"
36 #include "VectorPostprocessor.h"
37 #include "PerfGraphInterface.h"
38 #include "Attributes.h"
39 #include "MooseObjectWarehouse.h"
42 #include "SolutionInvalidity.h"
43 #include "PetscSupport.h"
44 
45 #include "libmesh/enum_quadrature_type.h"
46 #include "libmesh/equation_systems.h"
47 
48 #include <unordered_map>
49 #include <memory>
50 
51 // Forward declarations
52 class AuxiliarySystem;
53 class DisplacedProblem;
54 class MooseMesh;
56 class LinearSystem;
57 class SolverSystem;
58 class NonlinearSystem;
59 class RandomInterface;
60 class RandomData;
63 class MultiMooseEnum;
65 class MaterialData;
66 class MooseEnum;
68 class Assembly;
69 class JacobianBlock;
70 class Control;
71 class MultiApp;
72 class TransientMultiApp;
74 class Indicator;
76 class Marker;
77 class Material;
78 class Transfer;
79 class XFEMInterface;
80 class SideUserObject;
81 class NodalUserObject;
82 class ElementUserObject;
85 class GeneralUserObject;
86 class Positions;
87 class Function;
88 class Distribution;
89 class Sampler;
90 class KernelBase;
91 class IntegratedBCBase;
92 class LineSearch;
93 class UserObject;
96 class Convergence;
98 class MortarUserObject;
99 class SolutionInvalidity;
100 
101 namespace Moose
102 {
103 class FunctionBase;
104 }
105 
106 #ifdef MOOSE_KOKKOS_ENABLED
107 namespace Moose::Kokkos
108 {
110 class Function;
111 }
112 #endif
113 
114 // libMesh forward declarations
115 namespace libMesh
116 {
117 class CouplingMatrix;
118 class NonlinearImplicitSystem;
119 class LinearImplicitSystem;
120 } // namespace libMesh
121 
123 {
124  ITERATING = 0,
125  // CONVERGED_RTOL_NORMAL = 1,
126  // CONVERGED_ATOL_NORMAL = 9,
127  CONVERGED_RTOL = 2,
128  CONVERGED_ATOL = 3,
129  CONVERGED_ITS = 4,
130  // CONVERGED_CG_NEG_CURVE = 5,
131  // CONVERGED_CG_CONSTRAINED = 6,
132  // CONVERGED_STEP_LENGTH = 7,
133  // CONVERGED_HAPPY_BREAKDOWN = 8,
134  DIVERGED_NULL = -2,
135  // DIVERGED_ITS = -3,
136  // DIVERGED_DTOL = -4,
137  // DIVERGED_BREAKDOWN = -5,
138  // DIVERGED_BREAKDOWN_BICG = -6,
139  // DIVERGED_NONSYMMETRIC = -7,
140  // DIVERGED_INDEFINITE_PC = -8,
141  DIVERGED_NANORINF = -9,
142  // DIVERGED_INDEFINITE_MAT = -10
144 };
145 
150 class FEProblemBase : public SubProblem, public Restartable
151 {
152 public:
153  static InputParameters validParams();
154 
156  virtual ~FEProblemBase();
157 
158  enum class CoverageCheckMode
159  {
160  FALSE,
161  TRUE,
162  OFF,
163  ON,
164  SKIP_LIST,
165  ONLY_LIST,
166  };
167 
168  virtual libMesh::EquationSystems & es() override { return _req.set().es(); }
169  virtual MooseMesh & mesh() override { return _mesh; }
170  virtual const MooseMesh & mesh() const override { return _mesh; }
171  const MooseMesh & mesh(bool use_displaced) const override;
172 
173  void setCoordSystem(const std::vector<SubdomainName> & blocks, const MultiMooseEnum & coord_sys);
174  void setAxisymmetricCoordAxis(const MooseEnum & rz_coord_axis);
175 
182 
184 
190  void setCouplingMatrix(std::unique_ptr<libMesh::CouplingMatrix> cm,
191  const unsigned int nl_sys_num);
192 
193  // DEPRECATED METHOD
194  void setCouplingMatrix(libMesh::CouplingMatrix * cm, const unsigned int nl_sys_num);
195 
196  const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const override;
197 
200 
201  bool
202  areCoupled(const unsigned int ivar, const unsigned int jvar, const unsigned int nl_sys_num) const;
203 
207  bool hasUOAuxStateCheck() const { return _uo_aux_state_check; }
208 
216 
223 
224  std::vector<std::pair<MooseVariableFEBase *, MooseVariableFEBase *>> &
225  couplingEntries(const THREAD_ID tid, const unsigned int nl_sys_num);
226  std::vector<std::pair<MooseVariableFEBase *, MooseVariableFEBase *>> &
227  nonlocalCouplingEntries(const THREAD_ID tid, const unsigned int nl_sys_num);
228 
229  virtual bool hasVariable(const std::string & var_name) const override;
230  // NOTE: hasAuxiliaryVariable defined in parent class
231  bool hasSolverVariable(const std::string & var_name) const;
233  virtual const MooseVariableFieldBase &
234  getVariable(const THREAD_ID tid,
235  const std::string & var_name,
237  Moose::VarFieldType expected_var_field_type =
238  Moose::VarFieldType::VAR_FIELD_ANY) const override;
240  const std::string & var_name) override;
241  virtual MooseVariable & getStandardVariable(const THREAD_ID tid,
242  const std::string & var_name) override;
243  virtual VectorMooseVariable & getVectorVariable(const THREAD_ID tid,
244  const std::string & var_name) override;
245  virtual ArrayMooseVariable & getArrayVariable(const THREAD_ID tid,
246  const std::string & var_name) override;
247 
248  virtual bool hasScalarVariable(const std::string & var_name) const override;
249  virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid,
250  const std::string & var_name) override;
251  virtual libMesh::System & getSystem(const std::string & var_name) override;
252 
255 
262  virtual void setActiveElementalMooseVariables(const std::set<MooseVariableFEBase *> & moose_vars,
263  const THREAD_ID tid) override;
264 
272  virtual void clearActiveElementalMooseVariables(const THREAD_ID tid) override;
273 
274  virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) override;
275 
276  virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid) override;
277 
278  virtual void setActiveFEVariableCoupleableVectorTags(std::set<TagID> & vtags,
279  const THREAD_ID tid) override;
280 
281  virtual void setActiveFEVariableCoupleableMatrixTags(std::set<TagID> & mtags,
282  const THREAD_ID tid) override;
283 
284  virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) override;
285 
286  virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid) override;
287 
288  virtual void setActiveScalarVariableCoupleableVectorTags(std::set<TagID> & vtags,
289  const THREAD_ID tid) override;
290 
291  virtual void setActiveScalarVariableCoupleableMatrixTags(std::set<TagID> & mtags,
292  const THREAD_ID tid) override;
293 
295  libMesh::Order order,
296  libMesh::Order volume_order = libMesh::INVALID_ORDER,
299  bool allow_negative_qweights = true);
300 
309 
310  void bumpAllQRuleOrder(libMesh::Order order, SubdomainID block);
311 
315  unsigned int getMaxQps() const;
316 
321 
325  void checkNonlocalCoupling();
327  void setVariableAllDoFMap(const std::vector<const MooseVariableFEBase *> & moose_vars);
328 
329  const std::vector<const MooseVariableFEBase *> &
331  {
332  return _uo_jacobian_moose_vars[tid];
333  }
334 
335  virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override;
336  virtual const Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) const override;
337 
338 #ifdef MOOSE_KOKKOS_ENABLED
341 #endif
342 
346  virtual std::vector<VariableName> getVariableNames();
347 
348  void initialSetup() override;
350  void timestepSetup() override;
351  void customSetup(const ExecFlagType & exec_type) override;
352  void residualSetup() override;
353  void jacobianSetup() override;
354 
355  virtual void prepare(const Elem * elem, const THREAD_ID tid) override;
356  virtual void prepareFace(const Elem * elem, const THREAD_ID tid) override;
357  virtual void prepare(const Elem * elem,
358  unsigned int ivar,
359  unsigned int jvar,
360  const std::vector<dof_id_type> & dof_indices,
361  const THREAD_ID tid) override;
362 
363  virtual void setCurrentSubdomainID(const Elem * elem, const THREAD_ID tid) override;
364  virtual void
365  setNeighborSubdomainID(const Elem * elem, unsigned int side, const THREAD_ID tid) override;
366  virtual void setNeighborSubdomainID(const Elem * elem, const THREAD_ID tid);
367  virtual void prepareAssembly(const THREAD_ID tid) override;
368 
369  virtual void addGhostedElem(dof_id_type elem_id) override;
370  virtual void addGhostedBoundary(BoundaryID boundary_id) override;
371  virtual void ghostGhostedBoundaries() override;
372 
373  virtual void sizeZeroes(unsigned int size, const THREAD_ID tid);
374  virtual bool reinitDirac(const Elem * elem, const THREAD_ID tid) override;
375 
376  virtual void reinitElem(const Elem * elem, const THREAD_ID tid) override;
377  virtual void reinitElemPhys(const Elem * elem,
378  const std::vector<Point> & phys_points_in_elem,
379  const THREAD_ID tid) override;
380  void reinitElemFace(const Elem * elem, unsigned int side, BoundaryID, const THREAD_ID tid);
381  virtual void reinitElemFace(const Elem * elem, unsigned int side, const THREAD_ID tid) override;
382  virtual void reinitLowerDElem(const Elem * lower_d_elem,
383  const THREAD_ID tid,
384  const std::vector<Point> * const pts = nullptr,
385  const std::vector<Real> * const weights = nullptr) override;
386  virtual void reinitNode(const Node * node, const THREAD_ID tid) override;
387  virtual void reinitNodeFace(const Node * node, BoundaryID bnd_id, const THREAD_ID tid) override;
388  virtual void reinitNodes(const std::vector<dof_id_type> & nodes, const THREAD_ID tid) override;
389  virtual void reinitNodesNeighbor(const std::vector<dof_id_type> & nodes,
390  const THREAD_ID tid) override;
391  virtual void reinitNeighbor(const Elem * elem, unsigned int side, const THREAD_ID tid) override;
392  virtual void reinitNeighborPhys(const Elem * neighbor,
393  unsigned int neighbor_side,
394  const std::vector<Point> & physical_points,
395  const THREAD_ID tid) override;
396  virtual void reinitNeighborPhys(const Elem * neighbor,
397  const std::vector<Point> & physical_points,
398  const THREAD_ID tid) override;
399  virtual void
400  reinitElemNeighborAndLowerD(const Elem * elem, unsigned int side, const THREAD_ID tid) override;
401  virtual void reinitScalars(const THREAD_ID tid,
402  bool reinit_for_derivative_reordering = false) override;
403  virtual void reinitOffDiagScalars(const THREAD_ID tid) override;
404 
406  virtual void getDiracElements(std::set<const Elem *> & elems) override;
407  virtual void clearDiracInfo() override;
408 
409  virtual void subdomainSetup(SubdomainID subdomain, const THREAD_ID tid);
410  virtual void neighborSubdomainSetup(SubdomainID subdomain, const THREAD_ID tid);
411 
412  virtual void newAssemblyArray(std::vector<std::shared_ptr<SolverSystem>> & solver_systems);
413  virtual void initNullSpaceVectors(const InputParameters & parameters,
414  std::vector<std::shared_ptr<NonlinearSystemBase>> & nl);
415 
416  virtual void init() override;
417  virtual void solve(const unsigned int nl_sys_num);
418 
419 #ifdef MOOSE_KOKKOS_ENABLED
420 
423  void initKokkos();
424 #endif
425 
431  virtual void solveLinearSystem(const unsigned int linear_sys_num,
432  const Moose::PetscSupport::PetscOptions * po = nullptr);
433 
435 
454 
456 
471 
473 
494 
503  virtual void setException(const std::string & message);
504 
508  virtual bool hasException() { return _has_exception; }
509 
526  virtual void checkExceptionAndStopSolve(bool print_message = true);
527 
528  virtual bool solverSystemConverged(const unsigned int solver_sys_num) override;
529  virtual unsigned int nNonlinearIterations(const unsigned int nl_sys_num) const override;
530  virtual unsigned int nLinearIterations(const unsigned int nl_sys_num) const override;
531  virtual Real finalNonlinearResidual(const unsigned int nl_sys_num) const override;
532  virtual bool computingPreSMOResidual(const unsigned int nl_sys_num) const override;
533 
537  virtual std::string solverTypeString(unsigned int solver_sys_num = 0);
538 
542  virtual bool startedInitialSetup() { return _started_initial_setup; }
543 
544  virtual void onTimestepBegin() override;
545  virtual void onTimestepEnd() override;
546 
547  virtual Real & time() const { return _time; }
548  virtual Real & timeOld() const { return _time_old; }
549  virtual int & timeStep() const { return _t_step; }
550  virtual Real & dt() const { return _dt; }
551  virtual Real & dtOld() const { return _dt_old; }
555  Real getTimeFromStateArg(const Moose::StateArg & state) const;
556 
557  virtual void transient(bool trans) { _transient = trans; }
558  virtual bool isTransient() const override { return _transient; }
559 
560  virtual void addTimeIntegrator(const std::string & type,
561  const std::string & name,
563  virtual void
564  addPredictor(const std::string & type, const std::string & name, InputParameters & parameters);
565 
566  virtual void copySolutionsBackwards();
567 
572  virtual void advanceState();
573 
574  virtual void restoreSolutions();
575 
579  virtual void saveOldSolutions();
580 
584  virtual void restoreOldSolutions();
585 
591  void needSolutionState(unsigned int oldest_needed, Moose::SolutionIterationType iteration_type);
592 
599  virtual void outputStep(ExecFlagType type);
600 
604  virtual void postExecute();
605 
607 
613  void allowOutput(bool state);
614  template <typename T>
615  void allowOutput(bool state);
617 
626  void forceOutput();
627 
633 
638 
642  void logAdd(const std::string & system,
643  const std::string & name,
644  const std::string & type,
645  const InputParameters & params) const;
646 
647  // Function /////
648  virtual void
649  addFunction(const std::string & type, const std::string & name, InputParameters & parameters);
650  virtual bool hasFunction(const std::string & name, const THREAD_ID tid = 0);
651  virtual Function & getFunction(const std::string & name, const THREAD_ID tid = 0);
652 
653 #ifdef MOOSE_KOKKOS_ENABLED
654 
660  virtual void addKokkosFunction(const std::string & type,
661  const std::string & name,
668  virtual bool hasKokkosFunction(const std::string & name);
674  virtual Moose::Kokkos::Function getKokkosFunction(const std::string & name);
681  template <typename T>
682  T & getKokkosFunction(const std::string & name);
683 #endif
684 
686  virtual void
687  addMeshDivision(const std::string & type, const std::string & name, InputParameters & params);
689  MeshDivision & getMeshDivision(const std::string & name, const THREAD_ID tid = 0) const;
690 
692  virtual void
693  addConvergence(const std::string & type, const std::string & name, InputParameters & parameters);
695  virtual Convergence & getConvergence(const std::string & name, const THREAD_ID tid = 0) const;
697  virtual const std::vector<std::shared_ptr<Convergence>> &
698  getConvergenceObjects(const THREAD_ID tid = 0) const;
700  virtual bool hasConvergence(const std::string & name, const THREAD_ID tid = 0) const;
703  {
705  }
708  {
710  }
713  {
715  }
718  {
720  }
723  {
725  }
728  {
730  }
733  {
734  return _multiapp_fixed_point_convergence_name.has_value();
735  }
738  {
739  return _steady_state_convergence_name.has_value();
740  }
748  virtual void addDefaultNonlinearConvergence(const InputParameters & params);
756  virtual bool onlyAllowDefaultNonlinearConvergence() const { return false; }
773 
777  virtual void addLineSearch(const InputParameters & /*parameters*/)
778  {
779  mooseError("Line search not implemented for this problem type yet.");
780  }
781 
785  virtual void lineSearch();
786 
790  LineSearch * getLineSearch() override { return _line_search.get(); }
791 
795  virtual void
796  addDistribution(const std::string & type, const std::string & name, InputParameters & parameters);
797  virtual Distribution & getDistribution(const std::string & name);
798 
802  virtual void
803  addSampler(const std::string & type, const std::string & name, InputParameters & parameters);
804  virtual Sampler & getSampler(const std::string & name, const THREAD_ID tid = 0);
805 
806  // NL /////
807  NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num);
808  const NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num) const;
809  void setCurrentNonlinearSystem(const unsigned int nl_sys_num);
812 
813  virtual const SystemBase & systemBaseNonlinear(const unsigned int sys_num) const override;
814  virtual SystemBase & systemBaseNonlinear(const unsigned int sys_num) override;
815 
816  virtual const SystemBase & systemBaseSolver(const unsigned int sys_num) const override;
817  virtual SystemBase & systemBaseSolver(const unsigned int sys_num) override;
818 
819  virtual const SystemBase & systemBaseAuxiliary() const override;
820  virtual SystemBase & systemBaseAuxiliary() override;
821 
822  virtual NonlinearSystem & getNonlinearSystem(const unsigned int sys_num);
823 
824 #ifdef MOOSE_KOKKOS_ENABLED
825 
832  {
833  return _kokkos_systems;
834  }
836 
842  Moose::Kokkos::System & getKokkosSystem(const unsigned int sys_num);
844  const Moose::Kokkos::System & getKokkosSystem(const unsigned int sys_num) const;
846 #endif
847 
852  virtual const SystemBase & getSystemBase(const unsigned int sys_num) const;
853 
858  virtual SystemBase & getSystemBase(const unsigned int sys_num);
859 
864  SystemBase & getSystemBase(const std::string & sys_name);
865 
870  LinearSystem & getLinearSystem(unsigned int sys_num);
871 
876  const LinearSystem & getLinearSystem(unsigned int sys_num) const;
877 
882  SolverSystem & getSolverSystem(unsigned int sys_num);
883 
888  const SolverSystem & getSolverSystem(unsigned int sys_num) const;
889 
894  void setCurrentLinearSystem(unsigned int sys_num);
895 
899  const LinearSystem & currentLinearSystem() const;
900 
905  virtual const SystemBase & systemBaseLinear(unsigned int sys_num) const override;
906 
911  virtual SystemBase & systemBaseLinear(unsigned int sys_num) override;
912 
919  virtual void
920  addVariable(const std::string & var_type, const std::string & var_name, InputParameters & params);
921 
922  virtual void addKernel(const std::string & kernel_name,
923  const std::string & name,
925  virtual void addHDGKernel(const std::string & kernel_name,
926  const std::string & name,
928  virtual void addNodalKernel(const std::string & kernel_name,
929  const std::string & name,
931  virtual void addScalarKernel(const std::string & kernel_name,
932  const std::string & name,
934  virtual void addBoundaryCondition(const std::string & bc_name,
935  const std::string & name,
937 
938 #ifdef MOOSE_KOKKOS_ENABLED
939  virtual void addKokkosKernel(const std::string & kernel_name,
940  const std::string & name,
942  virtual void addKokkosNodalKernel(const std::string & kernel_name,
943  const std::string & name,
945  virtual void addKokkosBoundaryCondition(const std::string & bc_name,
946  const std::string & name,
948 #endif
949 
950  virtual void
951  addConstraint(const std::string & c_name, const std::string & name, InputParameters & parameters);
952 
954  {
955  parameters.set<FEProblemBase *>("_fe_problem_base") = this;
956  }
957 
958  // Aux /////
959 
966  virtual void addAuxVariable(const std::string & var_type,
967  const std::string & var_name,
968  InputParameters & params);
969 
970  virtual void addAuxVariable(const std::string & var_name,
971  const libMesh::FEType & type,
972  const std::set<SubdomainID> * const active_subdomains = NULL);
973  virtual void addAuxArrayVariable(const std::string & var_name,
974  const libMesh::FEType & type,
975  unsigned int components,
976  const std::set<SubdomainID> * const active_subdomains = NULL);
977  virtual void addAuxScalarVariable(const std::string & var_name,
978  libMesh::Order order,
979  Real scale_factor = 1.,
980  const std::set<SubdomainID> * const active_subdomains = NULL);
981  virtual void addAuxKernel(const std::string & kernel_name,
982  const std::string & name,
984  virtual void addAuxScalarKernel(const std::string & kernel_name,
985  const std::string & name,
987 
988 #ifdef MOOSE_KOKKOS_ENABLED
989  virtual void addKokkosAuxKernel(const std::string & kernel_name,
990  const std::string & name,
992 #endif
993 
995 
996  // Dirac /////
997  virtual void addDiracKernel(const std::string & kernel_name,
998  const std::string & name,
1000 
1001  // DG /////
1002  virtual void addDGKernel(const std::string & kernel_name,
1003  const std::string & name,
1005  // FV /////
1006  virtual void addFVKernel(const std::string & kernel_name,
1007  const std::string & name,
1009 
1010  virtual void addLinearFVKernel(const std::string & kernel_name,
1011  const std::string & name,
1013  virtual void
1014  addFVBC(const std::string & fv_bc_name, const std::string & name, InputParameters & parameters);
1015  virtual void addLinearFVBC(const std::string & fv_bc_name,
1016  const std::string & name,
1018 
1019  virtual void addFVInterfaceKernel(const std::string & fv_ik_name,
1020  const std::string & name,
1022 
1023  // Interface /////
1024  virtual void addInterfaceKernel(const std::string & kernel_name,
1025  const std::string & name,
1027 
1028  // IC /////
1029  virtual void addInitialCondition(const std::string & ic_name,
1030  const std::string & name,
1038  virtual void addFVInitialCondition(const std::string & ic_name,
1039  const std::string & name,
1041 
1042  void projectSolution();
1043 
1048  unsigned short getCurrentICState();
1049 
1059  libMesh::ConstElemRange & elem_range,
1060  ConstBndNodeRange & bnd_node_range,
1061  const std::optional<std::set<VariableName>> & target_vars = std::nullopt);
1062 
1077  void projectFunctionOnCustomRange(ConstElemRange & elem_range,
1078  Number (*func)(const Point &,
1079  const libMesh::Parameters &,
1080  const std::string &,
1081  const std::string &),
1082  Gradient (*func_grad)(const Point &,
1083  const libMesh::Parameters &,
1084  const std::string &,
1085  const std::string &),
1086  const libMesh::Parameters & params,
1087  const VariableName & target_var);
1088 
1089  // Materials
1090  virtual void addMaterial(const std::string & material_name,
1091  const std::string & name,
1093  virtual void addMaterialHelper(std::vector<MaterialWarehouse *> warehouse,
1094  const std::string & material_name,
1095  const std::string & name,
1097  virtual void addInterfaceMaterial(const std::string & material_name,
1098  const std::string & name,
1100  virtual void addFunctorMaterial(const std::string & functor_material_name,
1101  const std::string & name,
1103 
1104 #ifdef MOOSE_KOKKOS_ENABLED
1105  virtual void addKokkosMaterial(const std::string & material_name,
1106  const std::string & name,
1108 #endif
1109 
1121  void prepareMaterials(const std::unordered_set<unsigned int> & consumer_needed_mat_props,
1122  const SubdomainID blk_id,
1123  const THREAD_ID tid);
1124 
1125  void reinitMaterials(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful = true);
1126 
1136  void reinitMaterialsFace(SubdomainID blk_id,
1137  const THREAD_ID tid,
1138  bool swap_stateful = true,
1139  const std::deque<MaterialBase *> * reinit_mats = nullptr);
1140 
1152  void
1153  reinitMaterialsFaceOnBoundary(const BoundaryID boundary_id,
1154  const SubdomainID blk_id,
1155  const THREAD_ID tid,
1156  const bool swap_stateful = true,
1157  const std::deque<MaterialBase *> * const reinit_mats = nullptr);
1158 
1170  void
1172  const SubdomainID blk_id,
1173  const THREAD_ID tid,
1174  const bool swap_stateful = true,
1175  const std::deque<MaterialBase *> * const reinit_mats = nullptr);
1176 
1187  const THREAD_ID tid,
1188  bool swap_stateful = true,
1189  const std::deque<MaterialBase *> * reinit_mats = nullptr);
1190 
1203  void reinitMaterialsBoundary(BoundaryID boundary_id,
1204  const THREAD_ID tid,
1205  bool swap_stateful = true,
1206  const std::deque<MaterialBase *> * reinit_mats = nullptr);
1207 
1208  void
1209  reinitMaterialsInterface(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful = true);
1210 
1211 #ifdef MOOSE_KOKKOS_ENABLED
1212  void prepareKokkosMaterials(const std::unordered_set<unsigned int> & consumer_needed_mat_props);
1213  void reinitKokkosMaterials();
1214 #endif
1215 
1216  /*
1217  * Swap back underlying data storing stateful material properties
1218  */
1219  virtual void swapBackMaterials(const THREAD_ID tid);
1220  virtual void swapBackMaterialsFace(const THREAD_ID tid);
1221  virtual void swapBackMaterialsNeighbor(const THREAD_ID tid);
1222 
1229  void setActiveMaterialProperties(const std::unordered_set<unsigned int> & mat_prop_ids,
1230  const THREAD_ID tid);
1231 
1240  bool hasActiveMaterialProperties(const THREAD_ID tid) const;
1241 
1247  void clearActiveMaterialProperties(const THREAD_ID tid);
1248 
1260  template <typename T>
1261  std::vector<std::shared_ptr<T>> addObject(const std::string & type,
1262  const std::string & name,
1264  const bool threaded = true,
1265  const std::string & var_param_name = "variable");
1266 
1267  // Postprocessors /////
1268  virtual void addPostprocessor(const std::string & pp_name,
1269  const std::string & name,
1271 
1272  // VectorPostprocessors /////
1273  virtual void addVectorPostprocessor(const std::string & pp_name,
1274  const std::string & name,
1276 
1285  virtual void
1286  addReporter(const std::string & type, const std::string & name, InputParameters & parameters);
1287 
1295  const ReporterData & getReporterData() const { return _reporter_data; }
1296 
1303 
1304  // UserObjects /////
1305  virtual std::vector<std::shared_ptr<UserObject>> addUserObject(
1306  const std::string & user_object_name, const std::string & name, InputParameters & parameters);
1307 
1308  // TODO: delete this function after apps have been updated to not call it
1310  {
1312  "This function is deprecated, use theWarehouse().query() to construct a query instead");
1313  return _all_user_objects;
1314  }
1315 
1321  template <class T>
1322  T & getUserObject(const std::string & name, unsigned int tid = 0) const
1323  {
1324  std::vector<T *> objs;
1325  theWarehouse()
1326  .query()
1327  .condition<AttribSystem>("UserObject")
1328  .condition<AttribThread>(tid)
1329  .condition<AttribName>(name)
1330  .queryInto(objs);
1331  if (objs.empty())
1332  mooseError("Unable to find user object with name '" + name + "'");
1333  return *(objs[0]);
1334  }
1341  const UserObject & getUserObjectBase(const std::string & name, const THREAD_ID tid = 0) const;
1342 
1348  const Positions & getPositionsObject(const std::string & name) const;
1349 
1355  bool hasUserObject(const std::string & name) const;
1356 
1365  bool hasPostprocessorValueByName(const PostprocessorName & name) const;
1366 
1377  const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName & name,
1378  std::size_t t_index = 0) const;
1379 
1394  void setPostprocessorValueByName(const PostprocessorName & name,
1395  const PostprocessorValue & value,
1396  std::size_t t_index = 0);
1397 
1401  bool hasPostprocessor(const std::string & name) const;
1402 
1413  const VectorPostprocessorValue &
1414  getVectorPostprocessorValueByName(const std::string & object_name,
1415  const std::string & vector_name,
1416  std::size_t t_index = 0) const;
1417 
1425  void setVectorPostprocessorValueByName(const std::string & object_name,
1426  const std::string & vector_name,
1427  const VectorPostprocessorValue & value,
1428  std::size_t t_index = 0);
1429 
1438  const VectorPostprocessor & getVectorPostprocessorObjectByName(const std::string & object_name,
1439  const THREAD_ID tid = 0) const;
1440 
1442 
1445  bool hasMultiApps() const { return _multi_apps.hasActiveObjects(); }
1446  bool hasMultiApps(ExecFlagType type) const;
1447  bool hasMultiApp(const std::string & name) const;
1449 
1450  // Dampers /////
1451  virtual void addDamper(const std::string & damper_name,
1452  const std::string & name,
1454  void setupDampers();
1455 
1459  bool hasDampers() { return _has_dampers; }
1460 
1461  // Indicators /////
1462  virtual void addIndicator(const std::string & indicator_name,
1463  const std::string & name,
1465 
1466  // Markers //////
1467  virtual void addMarker(const std::string & marker_name,
1468  const std::string & name,
1470 
1474  virtual void addMultiApp(const std::string & multi_app_name,
1475  const std::string & name,
1477 
1481  std::shared_ptr<MultiApp> getMultiApp(const std::string & multi_app_name) const;
1482 
1486  std::vector<std::shared_ptr<Transfer>> getTransfers(ExecFlagType type,
1487  Transfer::DIRECTION direction) const;
1488  std::vector<std::shared_ptr<Transfer>> getTransfers(Transfer::DIRECTION direction) const;
1489 
1495 
1502 
1506  bool execMultiApps(ExecFlagType type, bool auto_advance = true);
1507 
1508  void finalizeMultiApps();
1509 
1514 
1520  {
1521  mooseDeprecated("Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep "
1522  "depending on your purpose");
1524  }
1525 
1530  void finishMultiAppStep(ExecFlagType type, bool recurse_through_multiapp_levels = false);
1531 
1536 
1541  void restoreMultiApps(ExecFlagType type, bool force = false);
1542 
1547 
1551  virtual void addTransfer(const std::string & transfer_name,
1552  const std::string & name,
1554 
1562 
1568 
1574 
1581  virtual Real computeResidualL2Norm();
1582 
1587  const NumericVector<libMesh::Number> & soln,
1588  NumericVector<libMesh::Number> & residual);
1594  const NumericVector<libMesh::Number> & soln,
1595  NumericVector<libMesh::Number> & residual);
1596 
1600  virtual void computeResidual(const NumericVector<libMesh::Number> & soln,
1601  NumericVector<libMesh::Number> & residual,
1602  const unsigned int nl_sys_num);
1603 
1607  void computeResidualAndJacobian(const NumericVector<libMesh::Number> & soln,
1608  NumericVector<libMesh::Number> & residual,
1610 
1614  virtual void computeResidualTag(const NumericVector<libMesh::Number> & soln,
1615  NumericVector<libMesh::Number> & residual,
1616  TagID tag);
1620  virtual void computeResidualType(const NumericVector<libMesh::Number> & soln,
1621  NumericVector<libMesh::Number> & residual,
1622  TagID tag);
1623 
1628  virtual void computeResidualInternal(const NumericVector<libMesh::Number> & soln,
1629  NumericVector<libMesh::Number> & residual,
1630  const std::set<TagID> & tags);
1634  virtual void computeResidualTags(const std::set<TagID> & tags);
1635 
1640  const NumericVector<libMesh::Number> & soln,
1645  virtual void computeJacobian(const NumericVector<libMesh::Number> & soln,
1647  const unsigned int nl_sys_num);
1648 
1652  virtual void computeJacobianTag(const NumericVector<libMesh::Number> & soln,
1654  TagID tag);
1655 
1659  virtual void computeJacobianInternal(const NumericVector<libMesh::Number> & soln,
1661  const std::set<TagID> & tags);
1662 
1666  virtual void computeJacobianTags(const std::set<TagID> & tags);
1667 
1676  virtual void computeJacobianBlocks(std::vector<JacobianBlock *> & blocks,
1677  const unsigned int nl_sys_num);
1678 
1693  libMesh::System & precond_system,
1694  unsigned int ivar,
1695  unsigned int jvar);
1696 
1708  NumericVector<libMesh::Number> & rhs,
1709  const bool compute_gradients = true);
1710 
1720  void computeLinearSystemTags(const NumericVector<libMesh::Number> & soln,
1721  const std::set<TagID> & vector_tags,
1722  const std::set<TagID> & matrix_tags,
1723  const bool compute_gradients = true);
1724 
1725  virtual Real computeDamping(const NumericVector<libMesh::Number> & soln,
1726  const NumericVector<libMesh::Number> & update);
1727 
1732  virtual bool shouldUpdateSolution();
1733 
1740  virtual bool updateSolution(NumericVector<libMesh::Number> & vec_solution,
1741  NumericVector<libMesh::Number> & ghosted_solution);
1742 
1747  virtual void predictorCleanup(NumericVector<libMesh::Number> & ghosted_solution);
1748 
1750  NumericVector<libMesh::Number> & lower,
1751  NumericVector<libMesh::Number> & upper);
1753  std::vector<NumericVector<libMesh::Number> *> & sp);
1755  std::vector<NumericVector<libMesh::Number> *> & sp);
1757  std::vector<NumericVector<libMesh::Number> *> & sp);
1759  const NumericVector<libMesh::Number> & old_soln,
1760  NumericVector<libMesh::Number> & search_direction,
1761  NumericVector<libMesh::Number> & new_soln,
1762  bool & changed_search_direction,
1763  bool & changed_new_soln);
1764 
1765  virtual void computeIndicatorsAndMarkers();
1766  virtual void computeIndicators();
1767  virtual void computeMarkers();
1768 
1769  virtual void addResidual(const THREAD_ID tid) override;
1770  virtual void addResidualNeighbor(const THREAD_ID tid) override;
1771  virtual void addResidualLower(const THREAD_ID tid) override;
1772  virtual void addResidualScalar(const THREAD_ID tid = 0);
1773 
1774  virtual void cacheResidual(const THREAD_ID tid) override;
1775  virtual void cacheResidualNeighbor(const THREAD_ID tid) override;
1776  virtual void addCachedResidual(const THREAD_ID tid) override;
1777 
1785  virtual void addCachedResidualDirectly(NumericVector<libMesh::Number> & residual,
1786  const THREAD_ID tid);
1787 
1788  virtual void setResidual(NumericVector<libMesh::Number> & residual, const THREAD_ID tid) override;
1789  virtual void setResidualNeighbor(NumericVector<libMesh::Number> & residual,
1790  const THREAD_ID tid) override;
1791 
1792  virtual void addJacobian(const THREAD_ID tid) override;
1793  virtual void addJacobianNeighbor(const THREAD_ID tid) override;
1794  virtual void addJacobianNeighborLowerD(const THREAD_ID tid) override;
1795  virtual void addJacobianLowerD(const THREAD_ID tid) override;
1797  unsigned int ivar,
1798  unsigned int jvar,
1799  const DofMap & dof_map,
1800  std::vector<dof_id_type> & dof_indices,
1801  const std::set<TagID> & tags,
1802  const THREAD_ID tid);
1804  unsigned int ivar,
1805  unsigned int jvar,
1806  const DofMap & dof_map,
1807  std::vector<dof_id_type> & dof_indices,
1808  std::vector<dof_id_type> & neighbor_dof_indices,
1809  const std::set<TagID> & tags,
1810  const THREAD_ID tid) override;
1811  virtual void addJacobianScalar(const THREAD_ID tid = 0);
1812  virtual void addJacobianOffDiagScalar(unsigned int ivar, const THREAD_ID tid = 0);
1813 
1814  virtual void cacheJacobian(const THREAD_ID tid) override;
1815  virtual void cacheJacobianNeighbor(const THREAD_ID tid) override;
1816  virtual void addCachedJacobian(const THREAD_ID tid) override;
1817 
1818  virtual void prepareShapes(unsigned int var, const THREAD_ID tid) override;
1819  virtual void prepareFaceShapes(unsigned int var, const THREAD_ID tid) override;
1820  virtual void prepareNeighborShapes(unsigned int var, const THREAD_ID tid) override;
1821 
1822  // Displaced problem /////
1823  virtual void addDisplacedProblem(std::shared_ptr<DisplacedProblem> displaced_problem);
1824  virtual std::shared_ptr<const DisplacedProblem> getDisplacedProblem() const
1825  {
1826  return _displaced_problem;
1827  }
1828  virtual std::shared_ptr<DisplacedProblem> getDisplacedProblem() { return _displaced_problem; }
1829 
1830  virtual void updateGeomSearch(
1832  virtual void updateMortarMesh();
1833 
1834  void createMortarInterface(
1835  const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
1836  const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
1837  bool on_displaced,
1838  bool periodic,
1839  const bool debug,
1840  const bool correct_edge_dropping,
1841  const Real minimum_projection_angle);
1842 
1849  getMortarInterface(const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
1850  const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
1851  bool on_displaced) const;
1852 
1854  getMortarInterface(const std::pair<BoundaryID, BoundaryID> & primary_secondary_boundary_pair,
1855  const std::pair<SubdomainID, SubdomainID> & primary_secondary_subdomain_pair,
1856  bool on_displaced);
1858 
1859  const std::unordered_map<std::pair<BoundaryID, BoundaryID>,
1860  std::unique_ptr<AutomaticMortarGeneration>> &
1861  getMortarInterfaces(bool on_displaced) const;
1862 
1863  virtual void possiblyRebuildGeomSearchPatches();
1864 
1866 
1871  void setRestartFile(const std::string & file_name);
1872 
1877  {
1878  return _material_prop_registry;
1879  }
1880 
1889  {
1890  return _neighbor_material_props;
1891  }
1892 
1893 #ifdef MOOSE_KOKKOS_ENABLED
1895  {
1896  return _kokkos_material_props;
1897  }
1899  {
1901  }
1903  {
1905  }
1906 #endif
1907 
1915  {
1917  }
1920 
1925 
1930 
1934  SolverParams & solverParams(unsigned int solver_sys_num = 0);
1935 
1939  const SolverParams & solverParams(unsigned int solver_sys_num = 0) const;
1940 
1941 #ifdef LIBMESH_ENABLE_AMR
1942  // Adaptivity /////
1944  virtual void initialAdaptMesh();
1945 
1949  virtual bool adaptMesh();
1950 
1954  unsigned int getNumCyclesCompleted() { return _cycles_completed; }
1955 
1959  bool hasInitialAdaptivity() const { return _adaptivity.getInitialSteps() > 0; }
1960 #else
1961 
1964  bool hasInitialAdaptivity() const { return false; }
1965 #endif // LIBMESH_ENABLE_AMR
1966 
1968  void initXFEM(std::shared_ptr<XFEMInterface> xfem);
1969 
1971  std::shared_ptr<XFEMInterface> getXFEM() { return _xfem; }
1972 
1974  bool haveXFEM() { return _xfem != nullptr; }
1975 
1977  virtual bool updateMeshXFEM();
1978 
1993  virtual void
1994  meshChanged(bool intermediate_change, bool contract_mesh, bool clean_refinement_flags);
1995 
2001 
2007 
2013  void initElementStatefulProps(const libMesh::ConstElemRange & elem_range, const bool threaded);
2014 
2015 #ifdef MOOSE_KOKKOS_ENABLED
2016  void initKokkosStatefulProps();
2017 #endif
2018 
2023  virtual void checkProblemIntegrity();
2024 
2025  void registerRandomInterface(RandomInterface & random_interface, const std::string & name);
2026 
2031  void setConstJacobian(bool state) { _const_jacobian = state; }
2032 
2038 
2043  void setKernelCoverageCheck(bool flag)
2044  {
2046  }
2047 
2055 
2063  {
2065  }
2066 
2071 
2073  void setVerboseProblem(bool verbose);
2074 
2078  bool verboseMultiApps() const { return _verbose_multiapps; }
2079 
2084 
2086 
2103  bool needBoundaryMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid);
2104  bool needInterfaceMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid);
2105  bool needInternalNeighborSideMaterial(SubdomainID subdomain_id, const THREAD_ID tid);
2107 
2112  unsigned int subspaceDim(const std::string & prefix) const
2113  {
2114  if (_subspace_dim.count(prefix))
2115  return _subspace_dim.find(prefix)->second;
2116  else
2117  return 0;
2118  }
2119 
2120  /*
2121  * Return a reference to the material warehouse of *all* Material objects.
2122  */
2124 
2125  /*
2126  * Return a reference to the material warehouse of Material objects to be computed.
2127  */
2131 
2132 #ifdef MOOSE_KOKKOS_ENABLED
2133  /*
2134  * Return a reference to the material warehouse of Kokkos Material objects to be computed.
2135  */
2137 #endif
2138 
2146  std::shared_ptr<MaterialBase> getMaterial(std::string name,
2148  const THREAD_ID tid = 0,
2149  bool no_warn = false);
2150 
2155  const THREAD_ID tid = 0,
2156  const MooseObject * object = nullptr) const;
2157 
2158 #ifdef MOOSE_KOKKOS_ENABLED
2159 
2163  const MooseObject * object = nullptr) const;
2164 #endif
2165 
2169  const std::set<const MooseObject *> &
2171 
2172 #ifdef MOOSE_KOKKOS_ENABLED
2173 
2176  const std::set<const MooseObject *> &
2178 #endif
2179 
2184 
2190  {
2192  }
2193 
2195  {
2197  }
2198 
2204 
2208  void setPreserveMatrixSparsityPattern(bool preserve);
2209 
2215 
2218 
2225  bool acceptInvalidSolution() const;
2230 
2235 
2240 
2242  bool hasTimeIntegrator() const { return _has_time_integrator; }
2243 
2245 
2251  const ExecFlagType & getCurrentExecuteOnFlag() const;
2252  void setCurrentExecuteOnFlag(const ExecFlagType &);
2254 
2258  virtual void execute(const ExecFlagType & exec_type);
2259  virtual void executeAllObjects(const ExecFlagType & exec_type);
2260 
2261  virtual Executor & getExecutor(const std::string & name) { return _app.getExecutor(name); }
2262 
2266  virtual void computeUserObjects(const ExecFlagType & type, const Moose::AuxGroup & group);
2267 
2271  virtual void computeUserObjectByName(const ExecFlagType & type,
2272  const Moose::AuxGroup & group,
2273  const std::string & name);
2274 
2278  void needsPreviousNewtonIteration(bool state);
2279 
2284  bool needsPreviousNewtonIteration() const;
2285 
2287 
2290  std::vector<Real> _real_zero;
2291  std::vector<VariableValue> _scalar_zero;
2292  std::vector<VariableValue> _zero;
2293  std::vector<VariablePhiValue> _phi_zero;
2294  std::vector<MooseArray<ADReal>> _ad_zero;
2295  std::vector<VariableGradient> _grad_zero;
2296  std::vector<MooseArray<ADRealVectorValue>> _ad_grad_zero;
2297  std::vector<VariablePhiGradient> _grad_phi_zero;
2298  std::vector<VariableSecond> _second_zero;
2299  std::vector<MooseArray<ADRealTensorValue>> _ad_second_zero;
2300  std::vector<VariablePhiSecond> _second_phi_zero;
2301  std::vector<Point> _point_zero;
2302  std::vector<VectorVariableValue> _vector_zero;
2303  std::vector<VectorVariableCurl> _vector_curl_zero;
2305 
2310 
2314  void executeControls(const ExecFlagType & exec_type);
2315 
2319  void executeSamplers(const ExecFlagType & exec_type);
2320 
2324  virtual void updateActiveObjects();
2325 
2332 
2334 
2338  bool hasJacobian() const;
2339 
2344  bool constJacobian() const;
2345 
2349  void addOutput(const std::string &, const std::string &, InputParameters &);
2350 
2351  inline TheWarehouse & theWarehouse() const { return _app.theWarehouse(); }
2352 
2356  void setSNESMFReuseBase(bool reuse, bool set_by_user)
2357  {
2358  _snesmf_reuse_base = reuse, _snesmf_reuse_base_set_by_user = set_by_user;
2359  }
2360 
2365 
2369  void skipExceptionCheck(bool skip_exception_check)
2370  {
2371  _skip_exception_check = skip_exception_check;
2372  }
2373 
2378 
2383 
2384 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
2385  PetscOptions & petscOptionsDatabase() { return _petsc_option_data_base; }
2386 #endif
2387 
2389  virtual void setUDotRequested(const bool u_dot_requested) { _u_dot_requested = u_dot_requested; }
2390 
2392  virtual void setUDotDotRequested(const bool u_dotdot_requested)
2393  {
2394  _u_dotdot_requested = u_dotdot_requested;
2395  }
2396 
2398  virtual void setUDotOldRequested(const bool u_dot_old_requested)
2399  {
2400  _u_dot_old_requested = u_dot_old_requested;
2401  }
2402 
2404  virtual void setUDotDotOldRequested(const bool u_dotdot_old_requested)
2405  {
2406  _u_dotdot_old_requested = u_dotdot_old_requested;
2407  }
2408 
2410  virtual bool uDotRequested() { return _u_dot_requested; }
2411 
2413  virtual bool uDotDotRequested() { return _u_dotdot_requested; }
2414 
2416  virtual bool uDotOldRequested()
2417  {
2419  mooseError("FEProblemBase: When requesting old time derivative of solution, current time "
2420  "derivative of solution should also be stored. Please set `u_dot_requested` to "
2421  "true using setUDotRequested.");
2422 
2423  return _u_dot_old_requested;
2424  }
2425 
2427  virtual bool uDotDotOldRequested()
2428  {
2430  mooseError("FEProblemBase: When requesting old second time derivative of solution, current "
2431  "second time derivation of solution should also be stored. Please set "
2432  "`u_dotdot_requested` to true using setUDotDotRequested.");
2433  return _u_dotdot_old_requested;
2434  }
2435 
2437  void haveADObjects(bool have_ad_objects) override;
2438 
2439  // Whether or not we should solve this system
2440  bool shouldSolve() const { return _solve; }
2441 
2445  const MortarInterfaceWarehouse & mortarData() const { return *_mortar_data; }
2447 
2452 
2456  virtual bool hasMortarCoupling() const { return _has_mortar; }
2457 
2459  void computingNonlinearResid(bool computing_nonlinear_residual) final;
2460 
2462  void setCurrentlyComputingResidual(bool currently_computing_residual) final;
2463 
2467  void numGridSteps(unsigned int num_grid_steps) { _num_grid_steps = num_grid_steps; }
2468 
2473  void uniformRefine();
2474 
2476  void automaticScaling(bool automatic_scaling) override;
2477 
2479 
2482  template <typename T>
2483  static void objectSetupHelper(const std::vector<T *> & objects, const ExecFlagType & exec_flag);
2484  template <typename T>
2485  static void objectExecuteHelper(const std::vector<T *> & objects);
2487 
2494  virtual void reinitElemFaceRef(const Elem * elem,
2495  unsigned int side,
2496  Real tolerance,
2497  const std::vector<Point> * const pts,
2498  const std::vector<Real> * const weights = nullptr,
2499  const THREAD_ID tid = 0) override;
2500 
2507  virtual void reinitNeighborFaceRef(const Elem * neighbor_elem,
2508  unsigned int neighbor_side,
2509  Real tolerance,
2510  const std::vector<Point> * const pts,
2511  const std::vector<Real> * const weights = nullptr,
2512  const THREAD_ID tid = 0) override;
2513 
2518 
2523  void fvBCsIntegrityCheck(bool fv_bcs_integrity_check);
2524 
2533  void getFVMatsAndDependencies(SubdomainID block_id,
2534  std::vector<std::shared_ptr<MaterialBase>> & face_materials,
2535  std::vector<std::shared_ptr<MaterialBase>> & neighbor_materials,
2536  std::set<MooseVariableFieldBase *> & variables,
2537  const THREAD_ID tid);
2538 
2545  void resizeMaterialData(Moose::MaterialDataType data_type, unsigned int nqp, const THREAD_ID tid);
2546 
2547  bool haveDisplaced() const override final { return _displaced_problem.get(); }
2548 
2550  bool hasLinearConvergenceObjects() const;
2554  void setNonlinearConvergenceNames(const std::vector<ConvergenceName> & convergence_names);
2558  void setLinearConvergenceNames(const std::vector<ConvergenceName> & convergence_names);
2562  void setMultiAppFixedPointConvergenceName(const ConvergenceName & convergence_name);
2566  void setSteadyStateConvergenceName(const ConvergenceName & convergence_name);
2567 
2571  const std::vector<ConvergenceName> & getNonlinearConvergenceNames() const;
2575  const std::vector<ConvergenceName> & getLinearConvergenceNames() const;
2579  const ConvergenceName & getMultiAppFixedPointConvergenceName() const;
2583  const ConvergenceName & getSteadyStateConvergenceName() const;
2584 
2588  void computingScalingJacobian(bool computing_scaling_jacobian)
2589  {
2590  _computing_scaling_jacobian = computing_scaling_jacobian;
2591  }
2592 
2593  bool computingScalingJacobian() const override final { return _computing_scaling_jacobian; }
2594 
2598  void computingScalingResidual(bool computing_scaling_residual)
2599  {
2600  _computing_scaling_residual = computing_scaling_residual;
2601  }
2602 
2606  bool computingScalingResidual() const override final { return _computing_scaling_residual; }
2607 
2613 
2614  virtual std::size_t numNonlinearSystems() const override { return _num_nl_sys; }
2615 
2616  virtual std::size_t numLinearSystems() const override { return _num_linear_sys; }
2617 
2618  virtual std::size_t numSolverSystems() const override { return _num_nl_sys + _num_linear_sys; }
2619 
2621  bool isSolverSystemNonlinear(const unsigned int sys_num) { return sys_num < _num_nl_sys; }
2622 
2623  virtual unsigned int currentNlSysNum() const override;
2624 
2625  virtual unsigned int currentLinearSysNum() const override;
2626 
2630  virtual unsigned int nlSysNum(const NonlinearSystemName & nl_sys_name) const override;
2631 
2635  unsigned int linearSysNum(const LinearSystemName & linear_sys_name) const override;
2636 
2640  unsigned int solverSysNum(const SolverSystemName & solver_sys_name) const override;
2641 
2646  unsigned int systemNumForVariable(const VariableName & variable_name) const;
2647 
2652 
2657 
2662 
2663  /*
2664  * Set the status of loop order of execution printing
2665  * @param print_exec set of execution flags to print on
2666  */
2667  void setExecutionPrinting(const ExecFlagEnum & print_exec) { _print_execution_on = print_exec; }
2668 
2672  bool shouldPrintExecution(const THREAD_ID tid) const;
2677  void reinitMortarUserObjects(BoundaryID primary_boundary_id,
2678  BoundaryID secondary_boundary_id,
2679  bool displaced);
2680 
2681  virtual const std::vector<VectorTag> & currentResidualVectorTags() const override;
2682 
2688  {
2689  friend class CrankNicolson;
2690  friend class FEProblemBase;
2693  };
2694 
2698  void setCurrentResidualVectorTags(const std::set<TagID> & vector_tags);
2699 
2704 
2709 
2710  virtual void needFV() override { _have_fv = true; }
2711  virtual bool haveFV() const override { return _have_fv; }
2712 
2713  virtual bool hasNonlocalCoupling() const override { return _has_nonlocal_coupling; }
2714 
2719 
2720  virtual void setCurrentLowerDElem(const Elem * const lower_d_elem, const THREAD_ID tid) override;
2721  virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid) override;
2722 
2726  const std::vector<NonlinearSystemName> & getNonlinearSystemNames() const { return _nl_sys_names; }
2730  const std::vector<LinearSystemName> & getLinearSystemNames() const { return _linear_sys_names; }
2734  const std::vector<SolverSystemName> & getSolverSystemNames() const { return _solver_sys_names; }
2735 
2736  virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const override;
2737 
2738  virtual bool checkNonlocalCouplingRequirement() const override;
2739 
2741 
2743  {
2746 
2748  };
2749 
2751 
2752 #ifdef MOOSE_KOKKOS_ENABLED
2753 
2756  bool hasKokkosObjects() const { return _has_kokkos_objects; }
2761 #endif
2762 
2763 protected:
2767  virtual void meshChanged() {}
2768 
2770  void createTagVectors();
2771 
2773  void createTagSolutions();
2774 
2778  virtual void meshDisplaced();
2779 
2783  void computeSystems(const ExecFlagType & type);
2784 
2786 
2787 private:
2790 
2802  void setResidualObjectParamsAndLog(const std::string & ro_name,
2803  const std::string & name,
2805  const unsigned int nl_sys_num,
2806  const std::string & base_name,
2807  bool & reinit_displaced);
2808 
2816  void setAuxKernelParamsAndLog(const std::string & ak_name,
2817  const std::string & name,
2819  const std::string & base_name);
2820 
2825 
2826 protected:
2828 
2830  std::optional<std::vector<ConvergenceName>> _nonlinear_convergence_names;
2832  std::optional<std::vector<ConvergenceName>> _linear_convergence_names;
2834  std::optional<ConvergenceName> _multiapp_fixed_point_convergence_name;
2836  std::optional<ConvergenceName> _steady_state_convergence_name;
2837 
2838  std::set<TagID> _fe_vector_tags;
2839 
2840  std::set<TagID> _fe_matrix_tags;
2841 
2843  std::set<TagID> _linear_vector_tags;
2844 
2846  std::set<TagID> _linear_matrix_tags;
2847 
2849  const bool & _solve;
2850 
2854  int & _t_step;
2857 
2864 
2866  const std::vector<LinearSystemName> _linear_sys_names;
2867 
2869  const std::size_t _num_linear_sys;
2870 
2872  std::vector<std::shared_ptr<LinearSystem>> _linear_systems;
2873 
2875  std::map<LinearSystemName, unsigned int> _linear_sys_name_to_num;
2876 
2879 
2881  const bool _using_default_nl;
2882 
2884  const std::vector<NonlinearSystemName> _nl_sys_names;
2885 
2887  const std::size_t _num_nl_sys;
2888 
2890  std::vector<std::shared_ptr<NonlinearSystemBase>> _nl;
2891 
2893  std::map<NonlinearSystemName, unsigned int> _nl_sys_name_to_num;
2894 
2897 
2900 
2902  std::vector<std::shared_ptr<SolverSystem>> _solver_systems;
2903 
2905  std::map<SolverVariableName, unsigned int> _solver_var_to_sys_num;
2906 
2908  std::map<SolverSystemName, unsigned int> _solver_sys_name_to_num;
2909 
2911  std::vector<SolverSystemName> _solver_sys_names;
2912 
2914  std::shared_ptr<AuxiliarySystem> _aux;
2915 
2917  std::vector<std::unique_ptr<libMesh::CouplingMatrix>> _cm;
2918 
2919 #ifdef MOOSE_KOKKOS_ENABLED
2921 #endif
2922 
2924  std::map<std::string, unsigned int> _subspace_dim;
2925 
2928  std::vector<std::vector<std::unique_ptr<Assembly>>> _assembly;
2929 
2930 #ifdef MOOSE_KOKKOS_ENABLED
2932 #endif
2933 
2938 
2941 
2942 #ifdef MOOSE_KOKKOS_ENABLED
2944 #endif
2945 
2948 
2951 
2954 
2959  ScalarInitialConditionWarehouse _scalar_ics; // use base b/c of setup methods
2961 
2962  // material properties
2967 
2968 #ifdef MOOSE_KOKKOS_ENABLED
2972 #endif
2973  // Material Warehouses
2975  MaterialWarehouse _materials; // regular materials
2976  MaterialWarehouse _interface_materials; // interface materials
2977  MaterialWarehouse _discrete_materials; // Materials that the user must compute
2978  MaterialWarehouse _all_materials; // All materials for error checking and MaterialData storage
2979 
2980 #ifdef MOOSE_KOKKOS_ENABLED
2982 #endif
2983 
2986  // Indicator Warehouses
2990 
2991  // Marker Warehouse
2993 
2994  // Helper class to access Reporter object values
2996 
2997  // TODO: delete this after apps have been updated to not call getUserObjects
2999 
3002 
3005 
3008 
3011 
3014 
3017 
3019  std::map<std::string, std::unique_ptr<RandomData>> _random_data_objects;
3020 
3022  std::vector<std::unordered_map<SubdomainID, bool>> _block_mat_side_cache;
3023 
3025  std::vector<std::unordered_map<BoundaryID, bool>> _bnd_mat_side_cache;
3026 
3028  std::vector<std::unordered_map<BoundaryID, bool>> _interface_mat_side_cache;
3029 
3031  std::vector<MeshChangedInterface *> _notify_when_mesh_changes;
3032 
3034  std::vector<MeshDisplacedInterface *> _notify_when_mesh_displaces;
3035 
3037  bool duplicateVariableCheck(const std::string & var_name,
3038  const libMesh::FEType & type,
3039  bool is_aux,
3040  const std::set<SubdomainID> * const active_subdomains);
3041 
3043  const Moose::AuxGroup & group,
3044  TheWarehouse::Query & query);
3045 
3047  void checkDisplacementOrders();
3048 
3049  void checkUserObjects();
3050 
3057  const std::map<SubdomainID, std::vector<std::shared_ptr<MaterialBase>>> & materials_map);
3058 
3060  void checkCoordinateSystems();
3061 
3067  void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed = false);
3068 
3075  void addObjectParamsHelper(InputParameters & params,
3076  const std::string & object_name,
3077  const std::string & var_param_name = "variable");
3078 
3079 #ifdef LIBMESH_ENABLE_AMR
3081  unsigned int _cycles_completed;
3082 #endif
3083 
3085  std::shared_ptr<XFEMInterface> _xfem;
3086 
3087  // Displaced mesh /////
3089  std::shared_ptr<DisplacedProblem> _displaced_problem;
3091  std::unique_ptr<MortarInterfaceWarehouse> _mortar_data;
3092 
3099 
3102 
3105 
3108 
3111 
3114 
3117 
3120 
3123 
3126 
3129 
3132 
3136 
3137  std::vector<std::vector<const MooseVariableFEBase *>> _uo_jacobian_moose_vars;
3138 
3140  std::vector<unsigned char> _has_active_material_properties;
3141 
3142  std::vector<SolverParams> _solver_params;
3143 
3146  std::vector<SubdomainName> _kernel_coverage_blocks;
3147 
3151 
3155 
3158  std::vector<SubdomainName> _material_coverage_blocks;
3159 
3162 
3165 
3168 
3170  unsigned int _max_qps;
3171 
3174 
3177 
3180 
3183 
3186 
3189 
3192 
3194  std::string _exception_message;
3195 
3198 
3201 
3204 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
3206 #endif
3207 
3210 
3211  std::shared_ptr<LineSearch> _line_search;
3212 
3213  std::unique_ptr<libMesh::ConstElemRange> _evaluable_local_elem_range;
3214  std::unique_ptr<libMesh::ConstElemRange> _nl_evaluable_local_elem_range;
3215  std::unique_ptr<libMesh::ConstElemRange> _aux_evaluable_local_elem_range;
3216 
3217  std::unique_ptr<libMesh::ConstElemRange> _current_algebraic_elem_range;
3218  std::unique_ptr<libMesh::ConstNodeRange> _current_algebraic_node_range;
3219  std::unique_ptr<ConstBndNodeRange> _current_algebraic_bnd_node_range;
3220 
3224 
3225  // loop state during projection of initial conditions
3226  unsigned short _current_ic_state;
3227 
3231 
3232 private:
3237  void handleException(const std::string & calling_method);
3238 
3243  std::vector<MortarUserObject *>
3244  getMortarUserObjects(BoundaryID primary_boundary_id,
3245  BoundaryID secondary_boundary_id,
3246  bool displaced,
3247  const std::vector<MortarUserObject *> & mortar_uo_superset);
3248 
3253  std::vector<MortarUserObject *> getMortarUserObjects(BoundaryID primary_boundary_id,
3254  BoundaryID secondary_boundary_id,
3255  bool displaced);
3256 
3266  virtual std::pair<bool, unsigned int>
3267  determineSolverSystem(const std::string & var_name,
3268  bool error_if_not_found = false) const override;
3269 
3276  void checkICRestartError(const std::string & ic_name,
3277  const std::string & name,
3278  const VariableName & var_name);
3279 
3280  /*
3281  * Test if stateful property redistribution is expected to be
3282  * necessary, and set it up if so.
3283  */
3284  void addAnyRedistributers();
3285 
3286  void updateMaxQps();
3287 
3288  void joinAndFinalize(TheWarehouse::Query query, bool isgen = false);
3289 
3293  virtual void resetState();
3294 
3295  // Parameters handling Jacobian sparsity pattern behavior
3307 
3308  const bool _force_restart;
3315 
3318 
3321 
3324 
3327 
3330 
3333 
3334  friend class AuxiliarySystem;
3335  friend class NonlinearSystemBase;
3336  friend class MooseEigenSystem;
3337  friend class Resurrector;
3338  friend class Restartable;
3339  friend class DisplacedProblem;
3340 
3343 
3345  unsigned int _num_grid_steps;
3346 
3350 
3353 
3356 
3359 
3362 
3365 
3369  std::vector<VectorTag> _current_residual_vector_tags;
3370 
3372  bool _have_fv = false;
3373 
3377 
3379  std::vector<libMesh::CouplingMatrix> _nonlocal_cm;
3380 
3383 
3384 #ifdef MOOSE_KOKKOS_ENABLED
3385  bool _has_kokkos_objects = false;
3387 
3390 #endif
3391 
3392  friend void Moose::PetscSupport::setSinglePetscOption(const std::string & name,
3393  const std::string & value,
3394  FEProblemBase * const problem);
3395 };
3396 
3398 
3399 template <typename T>
3400 void
3402 {
3403  _app.getOutputWarehouse().allowOutput<T>(state);
3404 }
3405 
3406 template <typename T>
3407 void
3408 FEProblemBase::objectSetupHelper(const std::vector<T *> & objects, const ExecFlagType & exec_flag)
3409 {
3410  if (exec_flag == EXEC_INITIAL)
3411  {
3412  for (T * obj_ptr : objects)
3413  obj_ptr->initialSetup();
3414  }
3415 
3416  else if (exec_flag == EXEC_TIMESTEP_BEGIN)
3417  {
3418  for (const auto obj_ptr : objects)
3419  obj_ptr->timestepSetup();
3420  }
3421  else if (exec_flag == EXEC_SUBDOMAIN)
3422  {
3423  for (const auto obj_ptr : objects)
3424  obj_ptr->subdomainSetup();
3425  }
3426 
3427  else if (exec_flag == EXEC_NONLINEAR)
3428  {
3429  for (const auto obj_ptr : objects)
3430  obj_ptr->jacobianSetup();
3431  }
3432 
3433  else if (exec_flag == EXEC_LINEAR)
3434  {
3435  for (const auto obj_ptr : objects)
3436  obj_ptr->residualSetup();
3437  }
3438 }
3439 
3440 template <typename T>
3441 void
3442 FEProblemBase::objectExecuteHelper(const std::vector<T *> & objects)
3443 {
3444  for (T * obj_ptr : objects)
3445  obj_ptr->execute();
3446 }
3447 
3448 template <typename T>
3449 std::vector<std::shared_ptr<T>>
3450 FEProblemBase::addObject(const std::string & type,
3451  const std::string & name,
3453  const bool threaded,
3454  const std::string & var_param_name)
3455 {
3456  parallel_object_only();
3457 
3458  logAdd(MooseUtils::prettyCppType<T>(), name, type, parameters);
3459  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
3460  addObjectParamsHelper(parameters, name, var_param_name);
3461 
3462  const auto n_threads = threaded ? libMesh::n_threads() : 1;
3463  std::vector<std::shared_ptr<T>> objects(n_threads);
3464  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
3465  {
3466  std::shared_ptr<T> obj = _factory.create<T>(type, name, parameters, tid);
3467  theWarehouse().add(obj);
3468  objects[tid] = std::move(obj);
3469  }
3470 
3471  return objects;
3472 }
3473 
3474 inline NonlinearSystemBase &
3475 FEProblemBase::getNonlinearSystemBase(const unsigned int sys_num)
3476 {
3477  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
3478  return *_nl[sys_num];
3479 }
3480 
3481 inline const NonlinearSystemBase &
3482 FEProblemBase::getNonlinearSystemBase(const unsigned int sys_num) const
3483 {
3484  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
3485  return *_nl[sys_num];
3486 }
3487 
3488 inline SolverSystem &
3489 FEProblemBase::getSolverSystem(const unsigned int sys_num)
3490 {
3491  mooseAssert(sys_num < _solver_systems.size(),
3492  "System number greater than the number of solver systems");
3493  return *_solver_systems[sys_num];
3494 }
3495 
3496 inline const SolverSystem &
3497 FEProblemBase::getSolverSystem(const unsigned int sys_num) const
3498 {
3499  mooseAssert(sys_num < _solver_systems.size(),
3500  "System number greater than the number of solver systems");
3501  return *_solver_systems[sys_num];
3502 }
3503 
3504 inline NonlinearSystemBase &
3506 {
3507  mooseAssert(_current_nl_sys, "The nonlinear system is not currently set");
3508  return *_current_nl_sys;
3509 }
3510 
3511 inline const NonlinearSystemBase &
3513 {
3514  mooseAssert(_current_nl_sys, "The nonlinear system is not currently set");
3515  return *_current_nl_sys;
3516 }
3517 
3518 inline LinearSystem &
3519 FEProblemBase::getLinearSystem(const unsigned int sys_num)
3520 {
3521  mooseAssert(sys_num < _linear_systems.size(),
3522  "System number greater than the number of linear systems");
3523  return *_linear_systems[sys_num];
3524 }
3525 
3526 inline const LinearSystem &
3527 FEProblemBase::getLinearSystem(const unsigned int sys_num) const
3528 {
3529  mooseAssert(sys_num < _linear_systems.size(),
3530  "System number greater than the number of linear systems");
3531  return *_linear_systems[sys_num];
3532 }
3533 
3534 inline LinearSystem &
3536 {
3537  mooseAssert(_current_linear_sys, "The linear system is not currently set");
3538  return *_current_linear_sys;
3539 }
3540 
3541 inline const LinearSystem &
3543 {
3544  mooseAssert(_current_linear_sys, "The linear system is not currently set");
3545  return *_current_linear_sys;
3546 }
3547 
3548 inline Assembly &
3549 FEProblemBase::assembly(const THREAD_ID tid, const unsigned int sys_num)
3550 {
3551  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
3552  mooseAssert(sys_num < _assembly[tid].size(),
3553  "System number larger than the assembly container size");
3554  return *_assembly[tid][sys_num];
3555 }
3556 
3557 inline const Assembly &
3558 FEProblemBase::assembly(const THREAD_ID tid, const unsigned int sys_num) const
3559 {
3560  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
3561  mooseAssert(sys_num < _assembly[tid].size(),
3562  "System number larger than the assembly container size");
3563  return *_assembly[tid][sys_num];
3564 }
3565 
3566 inline const libMesh::CouplingMatrix *
3567 FEProblemBase::couplingMatrix(const unsigned int i) const
3568 {
3569  return _cm[i].get();
3570 }
3571 
3572 inline void
3573 FEProblemBase::fvBCsIntegrityCheck(const bool fv_bcs_integrity_check)
3574 {
3576  // the user has requested that we don't check integrity so we will honor that
3577  return;
3578 
3579  _fv_bcs_integrity_check = fv_bcs_integrity_check;
3580 }
3581 
3582 inline const std::vector<VectorTag> &
3584 {
3586 }
3587 
3588 inline void
3589 FEProblemBase::setCurrentResidualVectorTags(const std::set<TagID> & vector_tags)
3590 {
3592 }
3593 
3594 inline void
3596 {
3598 }
3599 
3600 #ifdef MOOSE_KOKKOS_ENABLED
3601 template <typename T>
3602 T &
3604 {
3605  if (!hasKokkosFunction(name))
3606  {
3607  // If we didn't find a function, it might be a default function, attempt to construct one now
3608  std::istringstream ss(name);
3609  Real real_value;
3610 
3611  // First see if it's just a constant. If it is, build a ConstantFunction
3612  if (ss >> real_value && ss.eof())
3613  {
3614  InputParameters params = _factory.getValidParams("KokkosConstantFunction");
3615  params.set<Real>("value") = real_value;
3616  addKokkosFunction("KokkosConstantFunction", ss.str(), params);
3617  }
3618 
3619  // Try once more
3620  if (!hasKokkosFunction(name))
3621  mooseError("Unable to find Kokkos function '" + name, "'");
3622  }
3623 
3624  auto * const ret = dynamic_cast<T *>(_kokkos_functions.getActiveObject(name).get());
3625  if (!ret)
3626  mooseError("No Kokkos function named '", name, "' of appropriate type");
3627 
3628  return *ret;
3629 }
3630 #endif
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
virtual void addInterfaceMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
Map from nonlinear system name to number.
void setCurrentAlgebraicElementRange(libMesh::ConstElemRange *range)
These functions allow setting custom ranges for the algebraic elements, nodes, and boundary nodes tha...
std::vector< Point > _point_zero
Interface for objects that need parallel consistent random numbers without patterns over the course o...
virtual void computeJacobianTag(const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, TagID tag)
Form a Jacobian matrix for a given tag.
unsigned short getCurrentICState()
Retrieves the current initial condition state.
void resetFailNextNonlinearConvergenceCheck()
Tell the problem that the nonlinear convergence check(s) may proceed as normal.
bool _u_dot_requested
Whether solution time derivative needs to be stored.
void finalizeMultiApps()
Warehouse for storing scalar initial conditions.
virtual void addFVInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)
Add an initial condition for a finite volume variables.
VarFieldType
Definition: MooseTypes.h:770
virtual void addMaterialHelper(std::vector< MaterialWarehouse *> warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)
virtual bool hasNeighborCoupling() const
Whether the simulation has neighbor coupling.
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
MortarInterfaceWarehouse & mortarData()
void setActiveMaterialProperties(const std::unordered_set< unsigned int > &mat_prop_ids, const THREAD_ID tid)
Record and set the material properties required by the current computing thread.
bool shouldSolve() const
const bool _regard_general_exceptions_as_errors
If we catch an exception during residual/Jacobian evaluaton for which we don&#39;t have specific handling...
const std::vector< NonlinearSystemName > & getNonlinearSystemNames() const
const std::size_t _num_nl_sys
The number of nonlinear systems.
void setVariableAllDoFMap(const std::vector< const MooseVariableFEBase *> &moose_vars)
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
void setKernelCoverageCheck(CoverageCheckMode mode)
Set flag to indicate whether kernel coverage checks should be performed.
const std::vector< ConvergenceName > & getNonlinearConvergenceNames() const
Gets the nonlinear system convergence object name(s).
void timestepSetup() override
virtual void addSampler(const std::string &type, const std::string &name, InputParameters &parameters)
The following functions will enable MOOSE to have the capability to import Samplers.
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.
virtual void setUDotDotOldRequested(const bool u_dotdot_old_requested)
Set boolean flag to true to store old solution second time derivative.
Helper class for holding the preconditioning blocks to fill.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
virtual void meshChanged()
Deprecated.
virtual void addDamper(const std::string &damper_name, const std::string &name, InputParameters &parameters)
std::map< LinearSystemName, unsigned int > _linear_sys_name_to_num
Map from linear system name to number.
The Kokkos assembly class.
Moose::PetscSupport::PetscOptions & getPetscOptions()
Retrieve a writable reference the PETSc options (used by PetscSupport)
void getFVMatsAndDependencies(SubdomainID block_id, std::vector< std::shared_ptr< MaterialBase >> &face_materials, std::vector< std::shared_ptr< MaterialBase >> &neighbor_materials, std::set< MooseVariableFieldBase *> &variables, const THREAD_ID tid)
Get the materials and variables potentially needed for FV.
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
virtual Real & dtOld() const
bool _need_to_add_default_steady_state_convergence
Flag that the problem needs to add the default steady convergence.
virtual void prepareFace(const Elem *elem, const THREAD_ID tid) override
Base class for function objects.
Definition: Function.h:29
void setPreserveMatrixSparsityPattern(bool preserve)
Set whether the sparsity pattern of the matrices being formed during the solve (usually the Jacobian)...
void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed=false)
Call when it is possible that the needs for ghosted elements has changed.
virtual void addTransfer(const std::string &transfer_name, const std::string &name, InputParameters &parameters)
Add a Transfer to the problem.
virtual libMesh::System & getSystem(const std::string &var_name) override
Returns the equation system containing the variable provided.
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
static SolverParams makeLinearSolverParams()
Make basic solver params for linear solves.
bool _snesmf_reuse_base_set_by_user
If or not _snesmf_reuse_base is set by user.
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
virtual void addResidualLower(const THREAD_ID tid) override
bool _computing_scaling_jacobian
Flag used to indicate whether we are computing the scaling Jacobian.
A class for creating restricted objects.
Definition: Restartable.h:28
virtual void addJacobianLowerD(const THREAD_ID tid) override
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid) override
MaterialPropertyStorage & _bnd_material_props
virtual void addGhostedElem(dof_id_type elem_id) override
Will make sure that all dofs connected to elem_id are ghosted to this processor.
void setNonlocalCouplingMatrix()
Set custom coupling matrix for variables requiring nonlocal contribution.
void setExecutionPrinting(const ExecFlagEnum &print_exec)
virtual Real & time() const
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & couplingEntries(const THREAD_ID tid, const unsigned int nl_sys_num)
void checkDependMaterialsHelper(const std::map< SubdomainID, std::vector< std::shared_ptr< MaterialBase >>> &materials_map)
Helper method for checking Material object dependency.
unsigned int n_threads()
void setNeedToAddDefaultSteadyStateConvergence()
Sets _need_to_add_default_steady_state_convergence to true.
void projectFunctionOnCustomRange(ConstElemRange &elem_range, Number(*func)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &), Gradient(*func_grad)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &), const libMesh::Parameters &params, const VariableName &target_var)
Project a function onto a range of elements for a given variable.
virtual void cacheResidualNeighbor(const THREAD_ID tid) override
virtual void setInputParametersFEProblem(InputParameters &parameters)
bool identifyVariableGroupsInNL() const
Whether to identify variable groups in nonlinear systems.
ExecFlagType _current_execute_on_flag
Current execute_on flag.
void clearCurrentResidualVectorTags()
Clear the current residual vector tag data structure.
QueryCache is a convenient way to construct and pass around (possible partially constructed) warehous...
Definition: TheWarehouse.h:208
T & getUserObject(const std::string &name, unsigned int tid=0) const
Get the user object by its name.
std::shared_ptr< DisplacedProblem > displaced_problem
virtual bool hasNonlocalCoupling() const override
Whether the simulation has active nonlocal coupling which should be accounted for in the Jacobian...
void setNeedToAddDefaultMultiAppFixedPointConvergence()
Sets _need_to_add_default_multiapp_fixed_point_convergence to true.
virtual void checkExceptionAndStopSolve(bool print_message=true)
Check to see if an exception has occurred on any processor and, if possible, force the solve to fail...
virtual void meshDisplaced()
Update data after a mesh displaced.
virtual bool uDotDotOldRequested()
Get boolean flag to check whether old solution second time derivative needs to be stored...
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
MultiApp fixed point convergence name.
Keeps track of stuff related to assembling.
Definition: Assembly.h:109
MooseAppCoordTransform & coordTransform()
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid) override
void setCurrentAlgebraicNodeRange(libMesh::ConstNodeRange *range)
bool _error_on_jacobian_nonzero_reallocation
Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed...
unsigned int TagID
Definition: MooseTypes.h:238
virtual void reinitNode(const Node *node, const THREAD_ID tid) override
virtual std::size_t numNonlinearSystems() const override
virtual void predictorCleanup(NumericVector< libMesh::Number > &ghosted_solution)
Perform cleanup tasks after application of predictor to solution vector.
virtual void prepare(const Elem *elem, const THREAD_ID tid) override
MPI_Datatype data_type
bool verboseMultiApps() const
Whether or not to use verbose printing for MultiApps.
bool _has_jacobian
Indicates if the Jacobian was computed.
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
char ** blocks
Interface for objects acting when the mesh has been displaced.
virtual void addKokkosMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
const Moose::Kokkos::Assembly & kokkosAssembly() const
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
bool _has_dampers
Whether or not this system has any Dampers associated with it.
std::vector< SubdomainName > _kernel_coverage_blocks
virtual void setUDotDotRequested(const bool u_dotdot_requested)
Set boolean flag to true to store solution second time derivative.
virtual Distribution & getDistribution(const std::string &name)
bool haveDisplaced() const override final
Whether we have a displaced problem in our simulation.
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
void setCurrentAlgebraicBndNodeRange(ConstBndNodeRange *range)
This is the base class for Samplers as used within the Stochastic Tools module.
Definition: Sampler.h:43
bool areCoupled(const unsigned int ivar, const unsigned int jvar, const unsigned int nl_sys_num) const
Registry class for material property IDs and names.
void setPostprocessorValueByName(const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
Set the value of a PostprocessorValue.
virtual void addKokkosNodalKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) override
virtual void postExecute()
Method called at the end of the simulation.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
void prepareKokkosMaterials(const std::unordered_set< unsigned int > &consumer_needed_mat_props)
void joinAndFinalize(TheWarehouse::Query query, bool isgen=false)
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
Warehouse for storing initial conditions.
std::vector< SolverParams > _solver_params
virtual void addKokkosBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters &parameters)
const std::vector< SolverSystemName > & getSolverSystemNames() const
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
void reinitMaterialsFaceOnBoundary(const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase *> *const reinit_mats=nullptr)
reinit materials on element faces on a boundary (internal or external) This specific routine helps us...
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
std::unique_ptr< libMesh::ConstNodeRange > _current_algebraic_node_range
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid) override
void setCoupling(Moose::CouplingType type)
Set the coupling between variables TODO: allow user-defined coupling.
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
unsigned int _cycles_completed
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
virtual bool uDotRequested()
Get boolean flag to check whether solution time derivative needs to be stored.
virtual void init() override
void add(std::shared_ptr< MooseObject > obj)
add adds a new object to the warehouse and stores attributes/metadata about it for running queries/fi...
Definition: TheWarehouse.C:116
virtual void needFV() override
marks this problem as including/needing finite volume functionality.
virtual void getDiracElements(std::set< const Elem *> &elems) override
Fills "elems" with the elements that should be looped over for Dirac Kernels.
void parentOutputPositionChanged()
Calls parentOutputPositionChanged() on all sub apps.
virtual void addInterfaceKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.
void setCurrentlyComputingResidual(bool currently_computing_residual) final
Set whether or not the problem is in the process of computing the residual.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
virtual void lineSearch()
execute MOOSE line search
virtual bool checkNonlocalCouplingRequirement() const override
virtual bool uDotDotRequested()
Get boolean flag to check whether solution second time derivative needs to be stored.
bool _has_kokkos_objects
Whether we have any Kokkos objects.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
unsigned short _current_ic_state
const MortarInterfaceWarehouse & mortarData() const
Returns the mortar data object.
virtual void reinitNeighborPhys(const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, const THREAD_ID tid) override
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
Objects to be notified when the mesh displaces.
void trustUserCouplingMatrix()
Whether to trust the user coupling matrix even if we want to do things like be paranoid and create a ...
virtual void newAssemblyArray(std::vector< std::shared_ptr< SolverSystem >> &solver_systems)
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.
virtual void addMeshDivision(const std::string &type, const std::string &name, InputParameters &params)
Add a MeshDivision.
bool _computing_scaling_residual
Flag used to indicate whether we are computing the scaling Residual.
A struct for storing the various types of petsc options and values.
Definition: PetscSupport.h:44
virtual void computeMarkers()
void reportMooseObjectDependency(MooseObject *a, MooseObject *b)
Register a MOOSE object dependency so we can either order operations properly or report when we canno...
void residualSetup() override
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:740
void computeUserObjectsInternal(const ExecFlagType &type, const Moose::AuxGroup &group, TheWarehouse::Query &query)
virtual bool hasKokkosFunction(const std::string &name)
Get whether a Kokkos function exists.
virtual bool onlyAllowDefaultNonlinearConvergence() const
Returns true if an error will result if the user supplies &#39;nonlinear_convergence&#39;.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Positions objects are under the hood Reporters.
Definition: Positions.h:20
void reinitMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced)
Call reinit on mortar user objects with matching primary boundary ID, secondary boundary ID...
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition: Factory.C:142
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
virtual void updateActiveObjects()
Update the active objects in the warehouses.
Stores the stateful material properties computed by materials.
const RestartableEquationSystems & getRestartableEquationSystems() const
Get the RestartableEquationSystems object.
virtual void computeIndicatorsAndMarkers()
void reinitMaterialsBoundary(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on a boundary
Definition: Marker.h:41
virtual void addJacobianOffDiagScalar(unsigned int ivar, const THREAD_ID tid=0)
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
virtual void addJacobian(const THREAD_ID tid) override
CreateTaggedMatrixKey(const CreateTaggedMatrixKey &)
virtual void addAuxScalarKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition: Factory.C:68
void setErrorOnJacobianNonzeroReallocation(bool state)
bool _has_kokkos_residual_objects
Whether we have any Kokkos residual objects.
PetscOptions _petsc_option_data_base
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
bool needBoundaryMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
These methods are used to determine whether stateful material properties need to be stored on interna...
Moose::Kokkos::MaterialPropertyStorage & getKokkosNeighborMaterialPropertyStorage()
std::vector< VectorTag > _current_residual_vector_tags
A data member to store the residual vector tag(s) passed into computeResidualTag(s).
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::vector< SubdomainName > _material_coverage_blocks
void setSteadyStateConvergenceName(const ConvergenceName &convergence_name)
Sets the steady-state detection convergence object name if there is one.
virtual void addAuxScalarVariable(const std::string &var_name, libMesh::Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
virtual const SystemBase & systemBaseLinear(unsigned int sys_num) const override
Get a constant base class reference to a linear system.
void logAdd(const std::string &system, const std::string &name, const std::string &type, const InputParameters &params) const
Output information about the object just added to the problem.
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
MultiApp Implementation for Transient Apps.
Moose::Kokkos::MaterialPropertyStorage & getKokkosBndMaterialPropertyStorage()
void resizeMaterialData(Moose::MaterialDataType data_type, unsigned int nqp, const THREAD_ID tid)
Resize material data.
Warehouse for storing finite volume initial conditions.
void finishMultiAppStep(ExecFlagType type, bool recurse_through_multiapp_levels=false)
Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.
virtual void addFunctorMaterial(const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
std::vector< VariableSecond > _second_zero
std::map< SolverVariableName, unsigned int > _solver_var_to_sys_num
Map connecting variable names with their respective solver systems.
std::vector< MooseArray< ADReal > > _ad_zero
Moose::Kokkos::MaterialPropertyStorage & getKokkosMaterialPropertyStorage()
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
virtual void onTimestepEnd() override
virtual void computeNearNullSpace(libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > *> &sp)
virtual void addNodalKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
All Distributions should inherit from this class.
Definition: Distribution.h:18
MaterialWarehouse _kokkos_materials
std::vector< VectorVariableCurl > _vector_curl_zero
virtual bool hasMortarCoupling() const
Whether the simulation has mortar coupling.
Base class for user objects executed one or more sidesets, which may be on the outer boundary of the ...
bool _has_exception
Whether or not an exception has occurred.
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool _needs_old_newton_iter
Indicates that we need to compute variable values for previous Newton iteration.
bool haveXFEM()
Find out whether the current analysis is using XFEM.
virtual void addJacobianBlockTags(libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)
void registerRandomInterface(RandomInterface &random_interface, const std::string &name)
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
This class provides an interface for common operations on field variables of both FE and FV types wit...
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse()
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
MaterialPropertyRegistry _material_prop_registry
Moose::Kokkos::Assembly & kokkosAssembly()
void clearActiveMaterialProperties(const THREAD_ID tid)
Clear the active material properties.
virtual unsigned int nLinearIterations(const unsigned int nl_sys_num) const override
MaterialBase objects are special in that they have additional objects created automatically (see FEPr...
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
Moose::Kokkos::Assembly _kokkos_assembly
MaterialWarehouse _interface_materials
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
bool _ignore_zeros_in_jacobian
Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern.
const libMesh::ConstElemRange & getCurrentAlgebraicElementRange()
These are the element and nodes that contribute to the jacobian and residual for this local processor...
void setCurrentExecuteOnFlag(const ExecFlagType &)
const MaterialWarehouse & getMaterialWarehouse() const
virtual void computeResidualInternal(const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, const std::set< TagID > &tags)
Form a residual vector for a set of tags.
void initElementStatefulProps(const libMesh::ConstElemRange &elem_range, const bool threaded)
Initialize stateful properties for elements in a specific elem_range This is needed when elements/bou...
const libMesh::ConstNodeRange & getCurrentAlgebraicNodeRange()
void computingScalingJacobian(bool computing_scaling_jacobian)
Setter for whether we&#39;re computing the scaling jacobian.
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
Base class for a system (of equations)
Definition: SystemBase.h:84
const InitialConditionWarehouse & getInitialConditionWarehouse() const
Return InitialCondition storage.
const std::set< const MooseObject * > & getKokkosMaterialPropertyStorageConsumers(Moose::MaterialDataType type) const
virtual void addAuxVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
Canonical method for adding an auxiliary variable.
The Kokkos system class.
Definition: KokkosSystem.h:35
std::optional< ConvergenceName > _steady_state_convergence_name
Steady-state detection convergence name.
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
const MaterialPropertyStorage & getBndMaterialPropertyStorage()
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
bool computingNonlinearResid() const
Returns true if the problem is in the process of computing the nonlinear residual.
Definition: SubProblem.h:707
virtual void addFVInterfaceKernel(const std::string &fv_ik_name, const std::string &name, InputParameters &parameters)
MeshDivision & getMeshDivision(const std::string &name, const THREAD_ID tid=0) const
Get a MeshDivision.
unsigned int getNumCyclesCompleted()
Base class for creating new nodally-based mortar user objects.
bool hasDampers()
Whether or not this system has dampers.
const Positions & getPositionsObject(const std::string &name) const
Get the Positions object by its name.
std::map< SolverSystemName, unsigned int > _solver_sys_name_to_num
Map connecting solver system names with their respective systems.
FEProblemBase(const InputParameters &parameters)
void setFailNextNonlinearConvergenceCheck()
Skip further residual evaluations and fail the next nonlinear convergence check(s) ...
virtual Executor & getExecutor(const std::string &name)
virtual void cacheJacobianNeighbor(const THREAD_ID tid) override
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool needToAddDefaultSteadyStateConvergence() const
Returns true if the problem needs to add the default steady-state detection convergence.
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
Cache for calculating materials on side.
bool _have_fv
Whether we are performing some calculations with finite volume discretizations.
bool hasLinearConvergenceObjects() const
Whether we have linear convergence objects.
ExecFlagEnum _print_execution_on
When to print the execution of loops.
virtual void setResidual(NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
bool & petscOptionsInserted()
If PETSc options are already inserted.
virtual void solve(const unsigned int nl_sys_num)
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid) override
Set the current lower dimensional element.
std::set< TagID > _linear_matrix_tags
Temporary storage for filtered matrix tags for linear systems.
void bumpAllQRuleOrder(libMesh::Order order, SubdomainID block)
Real computeMultiAppsDT(ExecFlagType type)
Find the smallest timestep over all MultiApps.
void setParallelBarrierMessaging(bool flag)
Toggle parallel barrier messaging (defaults to on).
void projectSolution()
const MaterialWarehouse & getRegularMaterialsWarehouse() const
virtual const MooseVariableFieldBase & getVariable(const 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) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
void reinitMaterialsFace(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on element faces
std::unique_ptr< libMesh::ConstElemRange > _nl_evaluable_local_elem_range
virtual void computeResidualTags(const std::set< TagID > &tags)
Form multiple residual vectors and each is associated with one tag.
const bool & currentlyComputingResidual() const
Returns true if the problem is in the process of computing the residual.
Definition: SubProblem.h:720
void setMaterialCoverageCheck(CoverageCheckMode mode)
Set flag to indicate whether material coverage checks should be performed.
virtual void computeJacobianSys(libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian)
Form a Jacobian matrix.
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
virtual void reinitElemNeighborAndLowerD(const Elem *elem, unsigned int side, const THREAD_ID tid) override
bool hasSolverVariable(const std::string &var_name) const
AuxGroup
Flag for AuxKernel related execution type.
Definition: MooseTypes.h:752
virtual void addMarker(const std::string &marker_name, const std::string &name, InputParameters &parameters)
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.
virtual GeometricSearchData & geomSearchData() override
virtual void setUDotOldRequested(const bool u_dot_old_requested)
Set boolean flag to true to store old solution time derivative.
bool needsPreviousNewtonIteration() const
Check to see whether we need to compute the variable values of the previous Newton iterate...
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters &parameters)
const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const override
The coupling matrix defining what blocks exist in the preconditioning matrix.
virtual bool computingPreSMOResidual(const unsigned int nl_sys_num) const override
Returns true if the problem is in the process of computing it&#39;s initial residual. ...
This class is a container/interface for the objects involved in automatic generation of mortar spaces...
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
The abstract class that provides polymorphic interfaces for a function.
void createTagMatrices(CreateTaggedMatrixKey)
const bool _skip_nl_system_check
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
virtual void addCachedResidualDirectly(NumericVector< libMesh::Number > &residual, const THREAD_ID tid)
Allows for all the residual contributions that are currently cached to be added directly into the vec...
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)
ScalarInitialConditionWarehouse _scalar_ics
virtual void computeLinearSystemSys(libMesh::LinearImplicitSystem &sys, libMesh::SparseMatrix< libMesh::Number > &system_matrix, NumericVector< libMesh::Number > &rhs, const bool compute_gradients=true)
Assemble both the right hand side and the system matrix of a given linear system. ...
Nonlinear system to be solved.
void skipExceptionCheck(bool skip_exception_check)
Set a flag that indicates if we want to skip exception and stop solve.
Moose::Kokkos::System & getKokkosSystem(const unsigned int sys_num)
Get the Kokkos system of a specified number that is associated with MOOSE nonlinear and auxiliary sys...
virtual void swapBackMaterialsFace(const THREAD_ID tid)
virtual void addDistribution(const std::string &type, const std::string &name, InputParameters &parameters)
The following functions will enable MOOSE to have the capability to import distributions.
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
A user object that runs over all the nodes and does an aggregation step to compute a single value...
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
void setAuxKernelParamsAndLog(const std::string &ak_name, const std::string &name, InputParameters &parameters, const std::string &base_name)
Set the subproblem and system parameters for auxiliary kernels and log their addition.
const VectorPostprocessorValue & getVectorPostprocessorValueByName(const std::string &object_name, const std::string &vector_name, std::size_t t_index=0) const
Get a read-only reference to the vector value associated with the VectorPostprocessor.
MooseLinearConvergenceReason
virtual Function & getFunction(const std::string &name, const THREAD_ID tid=0)
virtual void addPredictor(const std::string &type, const std::string &name, InputParameters &parameters)
virtual void computeJacobianBlocks(std::vector< JacobianBlock *> &blocks, const unsigned int nl_sys_num)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...
virtual void addLineSearch(const InputParameters &)
add a MOOSE line search
virtual void copySolutionsBackwards()
const ConstBndNodeRange & getCurrentAlgebraicBndNodeRange()
bool _calculate_jacobian_in_uo
virtual void reinitElemFaceRef(const Elem *elem, unsigned int side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0) override
reinitialize FE objects on a given element on a given side at a given set of reference points and the...
virtual void prepareFaceShapes(unsigned int var, const THREAD_ID tid) override
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters &parameters)
virtual Real finalNonlinearResidual(const unsigned int nl_sys_num) const override
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool automaticScaling() const
Automatic scaling getter.
Definition: SubProblem.C:1163
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFEBase *> &moose_vars, const THREAD_ID tid) override
Set the MOOSE variables to be reinited on each element.
const MaterialWarehouse & getInterfaceMaterialsWarehouse() const
std::vector< VariablePhiGradient > _grad_phi_zero
const std::vector< const MooseVariableFEBase * > & getUserObjectJacobianVariables(const THREAD_ID tid) const
const MaterialWarehouse & getDiscreteMaterialWarehouse() const
bool hasJacobian() const
Returns _has_jacobian.
void notifyWhenMeshDisplaces(MeshDisplacedInterface *mdi)
Register an object that derives from MeshDisplacedInterface to be notified when the displaced mesh ge...
void createTagSolutions()
Create extra tagged solution vectors.
std::vector< SolverSystemName > _solver_sys_names
The union of nonlinear and linear system names.
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
bool _verbose_restore
Whether or not to be verbose on solution restoration post a failed time step.
bool _previous_nl_solution_required
Indicates we need to save the previous NL iteration variable values.
bool _trust_user_coupling_matrix
Whether to trust the user coupling matrix no matter what.
const ConvergenceName & getSteadyStateConvergenceName() const
Gets the steady-state detection convergence object name.
void handleException(const std::string &calling_method)
Handle exceptions.
virtual std::vector< VariableName > getVariableNames()
Returns a list of all the variables in the problem (both from the NL and Aux systems.
ReporterData _reporter_data
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
void uniformRefine()
uniformly refine the problem mesh(es).
bool hasSetMultiAppFixedPointConvergenceName() const
Returns true if the problem has set the fixed point convergence name.
virtual void computeResidualSys(libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
This function is called by Libmesh to form a residual.
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const override
std::unique_ptr< libMesh::ConstElemRange > _current_algebraic_elem_range
const bool & _immediately_print_invalid_solution
std::vector< std::shared_ptr< Transfer > > getTransfers(ExecFlagType type, Transfer::DIRECTION direction) const
Get Transfers by ExecFlagType and direction.
bool hasSetSteadyStateConvergenceName() const
Returns true if the problem has set the steady-state detection convergence name.
virtual void addConvergence(const std::string &type, const std::string &name, InputParameters &parameters)
Adds a Convergence object.
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
const bool & _solve
Whether or not to actually solve the nonlinear system.
virtual const SystemBase & systemBaseSolver(const unsigned int sys_num) const override
Return the solver system object as a base class reference given the system number.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
MooseObjectWarehouse< Convergence > _convergences
convergence warehouse
Interface for notifications that the mesh has changed.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
virtual std::shared_ptr< DisplacedProblem > getDisplacedProblem()
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
This is the common base class for the three main kernel types implemented in MOOSE, Kernel, VectorKernel and ArrayKernel.
Definition: KernelBase.h:23
void numGridSteps(unsigned int num_grid_steps)
Set the number of steps in a grid sequences.
Base class for convergence criteria.
Definition: Convergence.h:21
bool _input_file_saved
whether input file has been written
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override
virtual Convergence & getConvergence(const std::string &name, const THREAD_ID tid=0) const
Gets a Convergence object.
TheWarehouse & theWarehouse() const
void createTagVectors()
Create extra tagged vectors and matrices.
virtual void createQRules(libMesh::QuadratureType type, libMesh::Order order, libMesh::Order volume_order=libMesh::INVALID_ORDER, libMesh::Order face_order=libMesh::INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)
void reinitMaterialsNeighbor(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on the neighboring element face
void setMultiAppFixedPointConvergenceName(const ConvergenceName &convergence_name)
Sets the MultiApp fixed point convergence object name if there is one.
void checkUserObjects()
Moose::CouplingType _coupling
Type of variable coupling.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
virtual bool shouldUpdateSolution()
Check to see whether the problem should update the solution.
const ConvergenceName & getMultiAppFixedPointConvergenceName() const
Gets the MultiApp fixed point convergence object name.
Real getTimeFromStateArg(const Moose::StateArg &state) const
Returns the time associated with the requested state.
virtual std::string solverTypeString(unsigned int solver_sys_num=0)
Return solver type as a human readable string.
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:37
void executeSamplers(const ExecFlagType &exec_type)
Performs setup and execute calls for Sampler objects.
virtual void computeJacobianInternal(const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, const std::set< TagID > &tags)
Form a Jacobian matrix for multiple tags.
virtual void computeJacobian(const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, const unsigned int nl_sys_num)
Form a Jacobian matrix with the default tag (system).
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, std::unique_ptr< AutomaticMortarGeneration > > & getMortarInterfaces(bool on_displaced) const
void reinitMaterialsNeighborOnBoundary(const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase *> *const reinit_mats=nullptr)
reinit materials on neighbor element (usually faces) on a boundary (internal or external) This specif...
void addOutput(const std::string &, const std::string &, InputParameters &)
Adds an Output object.
boundary_id_type BoundaryID
const MooseObjectWarehouse< InternalSideIndicatorBase > & getInternalSideIndicatorWarehouse()
virtual void setUDotRequested(const bool u_dot_requested)
Set boolean flag to true to store solution time derivative.
const bool _allow_ics_during_restart
bool constJacobian() const
Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the pr...
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) override
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.
void checkNonlocalCoupling()
void addDefaultSteadyStateConvergence(const InputParameters &params)
Adds the default steady-state detection Convergence.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:763
NonlinearSystemBase & currentNonlinearSystem()
void computingScalingResidual(bool computing_scaling_residual)
Setter for whether we&#39;re computing the scaling residual.
void checkDisplacementOrders()
Verify that SECOND order mesh uses SECOND order displacements.
virtual void addFunction(const std::string &type, const std::string &name, InputParameters &parameters)
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:230
virtual void addJacobianNeighbor(const THREAD_ID tid) override
virtual libMesh::EquationSystems & es() override
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
Cache for calculating materials on side.
bool hasTimeIntegrator() const
Returns whether or not this Problem has a TimeIntegrator.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
NumberVectorValue Gradient
TheWarehouse is a container for MooseObjects that allows querying/filtering over various customizeabl...
Definition: TheWarehouse.h:185
virtual void addVectorPostprocessor(const std::string &pp_name, const std::string &name, InputParameters &parameters)
const bool _allow_invalid_solution
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:92
virtual unsigned int currentNlSysNum() const override
const MaterialPropertyStorage & getMaterialPropertyStorage()
Return a reference to the material property storage.
virtual void computeIndicators()
bool hasInitialAdaptivity() const
Return a Boolean indicating whether initial AMR is turned on.
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
static void objectSetupHelper(const std::vector< T *> &objects, const ExecFlagType &exec_flag)
Helpers for calling the necessary setup/execute functions for the supplied objects.
const bool _boundary_restricted_node_integrity_check
whether to perform checking of boundary restricted nodal object variable dependencies, e.g.
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
MooseMesh & _mesh
virtual bool uDotOldRequested()
Get boolean flag to check whether old solution time derivative needs to be stored.
virtual bool updateMeshXFEM()
Update the mesh due to changing XFEM cuts.
virtual const SystemBase & systemBaseNonlinear(const unsigned int sys_num) const override
Return the nonlinear system object as a base class reference given the system number.
std::vector< MortarUserObject * > getMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject *> &mortar_uo_superset)
Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID...
virtual void restoreSolutions()
bool fvBCsIntegrityCheck() const
virtual bool hasConvergence(const std::string &name, const THREAD_ID tid=0) const
Returns true if the problem has a Convergence object of the given name.
bool _u_dotdot_old_requested
Whether old solution second time derivative needs to be stored.
void setFailNextSystemConvergenceCheck()
Tell the problem that the system(s) cannot be considered converged next time convergence is checked...
void addAnyRedistributers()
void mooseDeprecated(Args &&... args) const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
bool hasPostprocessorValueByName(const PostprocessorName &name) const
Whether or not a Postprocessor value exists by a given name.
const ExecuteMooseObjectWarehouse< UserObject > & getUserObjects() const
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
void initialSetup() override
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
Adaptivity _adaptivity
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:173
bool allowInvalidSolution() const
Whether to accept / allow an invalid solution.
bool needInternalNeighborSideMaterial(SubdomainID subdomain_id, const THREAD_ID tid)
virtual const SystemBase & systemBaseAuxiliary() const override
Return the auxiliary system object as a base class reference.
void setLinearConvergenceNames(const std::vector< ConvergenceName > &convergence_names)
Sets the linear convergence object name(s) if there is one.
void checkUserObjectJacobianRequirement(THREAD_ID tid)
MooseVariableFieldBase & getActualFieldVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariableField which may be in any system...
LineSearch * getLineSearch() override
getter for the MOOSE line search
void reinitKokkosMaterials()
virtual void computeNullSpace(libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > *> &sp)
virtual void addTimeIntegrator(const std::string &type, const std::string &name, InputParameters &parameters)
LinearSystem * _current_linear_sys
The current linear system that we are solving.
virtual void cacheResidual(const THREAD_ID tid) override
virtual void computeResidualType(const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, TagID tag)
Form a residual vector for a given tag and "residual" tag.
const bool _force_restart
void forceOutput()
Indicates that the next call to outputStep should be forced.
const VectorPostprocessor & getVectorPostprocessorObjectByName(const std::string &object_name, const THREAD_ID tid=0) const
Return the VPP object given the name.
std::vector< VariablePhiSecond > _second_phi_zero
bool _started_initial_setup
At or beyond initialSteup stage.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
bool errorOnJacobianNonzeroReallocation() const
Will return True if the user wants to get an error when a nonzero is reallocated in the Jacobian by P...
std::unique_ptr< ConstBndNodeRange > _current_algebraic_bnd_node_range
virtual void addResidual(const THREAD_ID tid) override
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
virtual void addResidualNeighbor(const THREAD_ID tid) override
virtual void addKokkosAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
virtual void reinitNeighborFaceRef(const Elem *neighbor_elem, unsigned int neighbor_side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0) override
reinitialize FE objects on a given neighbor element on a given side at a given set of reference point...
void needSolutionState(unsigned int oldest_needed, Moose::SolutionIterationType iteration_type)
Declare that we need up to old (1) or older (2) solution states for a given type of iteration...
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
Moose::CouplingType coupling() const
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid) override
void setCouplingMatrix(std::unique_ptr< libMesh::CouplingMatrix > cm, const unsigned int nl_sys_num)
Set custom coupling matrix.
virtual void addDefaultNonlinearConvergence(const InputParameters &params)
Adds the default nonlinear Convergence associated with the problem.
virtual const MooseVariableFieldBase & getVariable(const 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) const =0
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
void setNonlinearConvergenceNames(const std::vector< ConvergenceName > &convergence_names)
Sets the nonlinear convergence object name(s) if there is one.
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:31
virtual bool solverSystemConverged(const unsigned int solver_sys_num) override
std::string _exception_message
The error message to go with an exception.
void setNeedToAddDefaultNonlinearConvergence()
Sets _need_to_add_default_nonlinear_convergence to true.
virtual void checkProblemIntegrity()
Method called to perform a series of sanity checks before a simulation is run.
AuxiliarySystem & getAuxiliarySystem()
virtual void updateGeomSearch(GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
MooseObjectWarehouse< MeshDivision > _mesh_divisions
Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the ...
virtual void addConstraint(const std::string &c_name, const std::string &name, InputParameters &parameters)
MooseObjectWarehouse< Indicator > _indicators
virtual void addMultiApp(const std::string &multi_app_name, const std::string &name, InputParameters &parameters)
Add a MultiApp to the problem.
The Kokkos class responsible for allocating and storing Kokkos material properties.
virtual void prepareAssembly(const THREAD_ID tid) override
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:771
unsigned int systemNumForVariable(const VariableName &variable_name) const
bool _checking_uo_aux_state
Flag used to indicate whether we are doing the uo/aux state check in execute.
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name, std::size_t t_index=0) const
Get a read-only reference to the value associated with a Postprocessor that exists.
bool _fv_bcs_integrity_check
Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset...
const MooseObjectWarehouse< Indicator > & getIndicatorWarehouse()
Return indicator/marker storage.
InitialConditions are objects that set the initial value of variables.
bool showInvalidSolutionConsole() const
Whether or not to print out the invalid solutions summary table in console.
Base class for user objects executed on all element sides internal to one or more blocks...
virtual void initNullSpaceVectors(const InputParameters &parameters, std::vector< std::shared_ptr< NonlinearSystemBase >> &nl)
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid) override
MaterialData & getMaterialData(Moose::MaterialDataType type, const THREAD_ID tid=0, const MooseObject *object=nullptr) const
bool getFailNextSystemConvergenceCheck() const
Whether it will fail the next system convergence check(s), triggering failed step behavior...
virtual void clearDiracInfo() override
Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in...
virtual void addIndicator(const std::string &indicator_name, const std::string &name, InputParameters &parameters)
virtual void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
bool duplicateVariableCheck(const std::string &var_name, const libMesh::FEType &type, bool is_aux, const std::set< SubdomainID > *const active_subdomains)
Helper to check for duplicate variable names across systems or within a single system.
GeometricSearchType
Used to select groups of geometric search objects to update.
void backupMultiApps(ExecFlagType type)
Backup the MultiApps associated with the ExecFlagType.
virtual ~FEProblemBase()
The SolutionInvalidity will contain all the information about the occurrence(s) of solution invalidit...
MaterialData & getKokkosMaterialData(Moose::MaterialDataType type, const MooseObject *object=nullptr) const
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
Canonical method for adding a non-linear variable.
const std::vector< LinearSystemName > & getLinearSystemNames() const
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
virtual int & timeStep() const
virtual Moose::FEBackend feBackend() const
LinearSystem & getLinearSystem(unsigned int sys_num)
Get non-constant reference to a linear system.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
virtual void addDisplacedProblem(std::shared_ptr< DisplacedProblem > displaced_problem)
void computeResidual(libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
This function is called by Libmesh to form a residual.
static void objectExecuteHelper(const std::vector< T *> &objects)
void setResidualObjectParamsAndLog(const std::string &ro_name, const std::string &name, InputParameters &parameters, const unsigned int nl_sys_num, const std::string &base_name, bool &reinit_displaced)
Set the subproblem and system parameters for residual objects and log their addition.
void setVectorPostprocessorValueByName(const std::string &object_name, const std::string &vector_name, const VectorPostprocessorValue &value, std::size_t t_index=0)
Set the value of a VectorPostprocessor vector.
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariable which may be in any system.
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
Materials compute MaterialProperties.
Definition: Material.h:34
virtual void swapBackMaterialsNeighbor(const THREAD_ID tid)
const bool _show_invalid_solution_console
virtual void addLinearFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
std::unique_ptr< libMesh::ConstElemRange > _aux_evaluable_local_elem_range
virtual NonlinearSystem & getNonlinearSystem(const unsigned int sys_num)
bool _snesmf_reuse_base
If or not to resuse the base vector for matrix-free calculation.
virtual bool reinitDirac(const Elem *elem, const THREAD_ID tid) override
Returns true if the Problem has Dirac kernels it needs to compute on elem.
void setKernelCoverageCheck(bool flag)
Set flag to indicate whether kernel coverage checks should be performed.
This is the XFEMInterface class.
Definition: XFEMInterface.h:37
bool _need_to_add_default_multiapp_fixed_point_convergence
Flag that the problem needs to add the default fixed point convergence.
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:33
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:231
const FVInitialConditionWarehouse & getFVInitialConditionWarehouse() const
Return FVInitialCondition storage.
virtual void updateMortarMesh()
Adds tagged matrices.
void addDefaultMultiAppFixedPointConvergence(const InputParameters &params)
Adds the default fixed point Convergence associated with the problem.
std::set< TagID > _fe_matrix_tags
Moose::Kokkos::MaterialPropertyStorage & _kokkos_material_props
virtual void addAuxArrayVariable(const std::string &var_name, const libMesh::FEType &type, unsigned int components, const std::set< SubdomainID > *const active_subdomains=NULL)
const ExecuteMooseObjectWarehouse< Transfer > & getMultiAppTransferWarehouse(Transfer::DIRECTION direction) const
Return the complete warehouse for MultiAppTransfer object for the given direction.
virtual const SystemBase & getSystemBase(const unsigned int sys_num) const
Get constant reference to a system in this problem.
virtual void reinitLowerDElem(const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
bool isSNESMFReuseBaseSetbyUser()
Return a flag to indicate if _snesmf_reuse_base is set by users.
virtual void addReporter(const std::string &type, const std::string &name, InputParameters &parameters)
Add a Reporter object to the simulation.
virtual void swapBackMaterials(const THREAD_ID tid)
std::vector< VariablePhiValue > _phi_zero
InitialConditionWarehouse _ics
std::vector< unsigned char > _has_active_material_properties
Whether there are active material properties on each thread.
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19
MaterialWarehouse _discrete_materials
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
void setSinglePetscOption(const std::string &name, const std::string &value="", FEProblemBase *const problem=nullptr)
A wrapper function for dealing with different versions of PetscOptionsSetValue.
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
virtual void addDGKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid) override
sets the current boundary ID in assembly
SolverSystem * _current_solver_sys
The current solver system.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
Takes care of everything related to mesh adaptivity.
Definition: Adaptivity.h:49
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
Nonlinear system(s) convergence name(s)
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void setConstJacobian(bool state)
Set flag that Jacobian is constant (for optimization purposes)
Class for containing MooseEnum item information.
Definition: MooseEnumItem.h:18
unsigned int solverSysNum(const SolverSystemName &solver_sys_name) const override
Class that is used as a parameter to set/clearCurrentResidualVectorTags that allows only blessed clas...
Base class for Control objects.
Definition: Control.h:34
std::shared_ptr< MaterialBase > getMaterial(std::string name, Moose::MaterialDataType type, const THREAD_ID tid=0, bool no_warn=false)
Return a pointer to a MaterialBase object.
std::vector< VariableGradient > _grad_zero
bool hasActiveObjects(THREAD_ID tid=0) const
void clearCurrentJacobianMatrixTags()
Clear the current Jacobian matrix tag data structure ...
virtual void subdomainSetup(SubdomainID subdomain, const THREAD_ID tid)
virtual void restoreOldSolutions()
Restore old solutions from the backup vectors and deallocate them.
unsigned int getInitialSteps() const
Pull out the number of initial steps previously set by calling init()
Definition: Adaptivity.h:98
void reinitMaterials(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true)
const bool _identify_variable_groups_in_nl
Whether to identify variable groups in nonlinear systems. This affects dof ordering.
PetscOptions & petscOptionsDatabase()
bool acceptInvalidSolution() const
Whether or not to accept the solution based on its invalidity.
const AutomaticMortarGeneration & getMortarInterface(const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
Return the undisplaced or displaced mortar generation object associated with the provided boundaries ...
const bool _restore_original_nonzero_pattern
Whether we should restore the original nonzero pattern for every Jacobian evaluation.
void execMultiAppTransfers(ExecFlagType type, Transfer::DIRECTION direction)
Execute MultiAppTransfers associated with execution flag and direction.
bool hasKokkosResidualObjects() const
Wrapper class that owns a libMesh EquationSystem and adds advanced restart capability to it...
void restoreMultiApps(ExecFlagType type, bool force=false)
Restore the MultiApps associated with the ExecFlagType.
virtual void addLinearFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
void customSetup(const ExecFlagType &exec_type) override
void setRestartFile(const std::string &file_name)
Communicate to the Resurector the name of the restart filer.
void setCurrentLinearSystem(unsigned int sys_num)
Set the current linear system pointer.
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
virtual void onTimestepBegin() override
virtual void computeBounds(libMesh::NonlinearImplicitSystem &sys, NumericVector< libMesh::Number > &lower, NumericVector< libMesh::Number > &upper)
Nonlinear system to be solved.
virtual void addKokkosFunction(const std::string &type, const std::string &name, InputParameters &parameters)
Add a Kokkos function to the problem.
void initKokkos()
Construct Kokkos assembly and systems and allocate Kokkos material property storages.
virtual void computePostCheck(libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &old_soln, NumericVector< libMesh::Number > &search_direction, NumericVector< libMesh::Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln)
void checkDuplicatePostprocessorVariableNames()
void computeResidualAndJacobian(const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, libMesh::SparseMatrix< libMesh::Number > &jacobian)
Form a residual and Jacobian with default tags.
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & nonlocalCouplingEntries(const THREAD_ID tid, const unsigned int nl_sys_num)
bool _using_ad_mat_props
Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material ...
std::vector< VariableValue > _scalar_zero
virtual Real computeResidualL2Norm()
Computes the residual using whatever is sitting in the current solution vector then returns the L2 no...
const std::vector< LinearSystemName > _linear_sys_names
The linear system names.
Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems()
Get all Kokkos systems that are associated with MOOSE nonlinear and auxiliary systems.
std::shared_ptr< XFEMInterface > getXFEM()
Get a pointer to the XFEM controller object.
bool getFailNextNonlinearConvergenceCheck() const
Whether it will skip further residual evaluations and fail the next nonlinear convergence check(s) ...
void incrementMultiAppTStep(ExecFlagType type)
Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType.
Class for scalar variables (they are different).
void computeLinearSystemTags(const NumericVector< libMesh::Number > &soln, const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags, const bool compute_gradients=true)
Assemble the current linear system given a set of vector and matrix tags.
void bumpVolumeQRuleOrder(libMesh::Order order, SubdomainID block)
Increases the element/volume quadrature order for the specified mesh block if and only if the current...
const bool _material_dependency_check
Determines whether a check to verify material dependencies on every subdomain.
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
virtual MooseMesh & mesh() override
std::vector< VariableValue > _zero
CouplingType
Definition: MooseTypes.h:779
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
unsigned int linearSysNum(const LinearSystemName &linear_sys_name) const override
LinearSystem & currentLinearSystem()
Get a non-constant reference to the current linear system.
void resetFailNextSystemConvergenceCheck()
Tell the problem that the system convergence check(s) may proceed as normal.
libMesh::EquationSystems & es()
std::set< TagID > _fe_vector_tags
const std::set< const MooseObject * > & getMaterialPropertyStorageConsumers(Moose::MaterialDataType type) const
void addObjectParamsHelper(InputParameters &params, const std::string &object_name, const std::string &var_param_name="variable")
Helper for setting the "_subproblem" and "_sys" parameters in addObject() and in addUserObject().
Base class for deriving any boundary condition of a integrated type.
SolverParams & solverParams(unsigned int solver_sys_num=0)
Get the solver parameters.
SolverSystem & getSolverSystem(unsigned int sys_num)
Get non-constant reference to a solver system.
virtual void saveOldSolutions()
Allocate vectors and save old solutions into them.
virtual void computeTransposeNullSpace(libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > *> &sp)
bool hasPostprocessor(const std::string &name) const
Deprecated.
virtual bool updateSolution(NumericVector< libMesh::Number > &vec_solution, NumericVector< libMesh::Number > &ghosted_solution)
Update the solution.
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data
State argument for evaluating functors.
void setCurrentResidualVectorTags(const std::set< TagID > &vector_tags)
Set the current residual vector tag data structure based on the passed in tag IDs.
MooseObjectWarehouse< Function > _functions
functions
virtual Real & timeOld() const
Proxy for accessing MaterialPropertyStorage.
Definition: MaterialData.h:37
std::vector< VectorVariableValue > _vector_zero
bool hasMultiApp(const std::string &name) const
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.
bool ignoreZerosInJacobian() const
Will return true if zeros in the Jacobian are to be dropped from the sparsity pattern.
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
Coupling matrix for variables.
void createMortarInterface(const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle)
bool needInterfaceMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
void reinitElemFace(const Elem *elem, unsigned int side, BoundaryID, const THREAD_ID tid)
Linear system to be solved.
Definition: LinearSystem.h:35
bool needToAddDefaultNonlinearConvergence() const
Returns true if the problem needs to add the default nonlinear convergence.
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
Linear system(s) convergence name(s) (if any)
bool useSNESMFReuseBase()
Return a flag that indicates if we are reusing the vector base.
std::vector< std::shared_ptr< T > > addObject(const std::string &type, const std::string &name, InputParameters &parameters, const bool threaded=true, const std::string &var_param_name="variable")
Method for creating and adding an object to the warehouse.
bool _has_initialized_stateful
Whether nor not stateful materials have been initialized.
void checkICRestartError(const std::string &ic_name, const std::string &name, const VariableName &var_name)
Checks if the variable of the initial condition is getting restarted and errors for specific cases...
virtual void setResidualNeighbor(NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
unsigned int _max_qps
Maximum number of quadrature points used in the problem.
void setMaterialCoverageCheck(bool flag)
Set flag to indicate whether material coverage checks should be performed.
static InputParameters validParams()
virtual void addScalarKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
TheWarehouse & theWarehouse()
Definition: MooseApp.h:137
bool _preserve_matrix_sparsity_pattern
Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually...
Base class for implementing interface user objects.
virtual unsigned int nNonlinearIterations(const unsigned int nl_sys_num) const override
CoverageCheckMode _material_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active material...
virtual std::size_t numLinearSystems() const override
MaterialPropertyStorage & _neighbor_material_props
Moose::Kokkos::Array< Moose::Kokkos::System > _kokkos_systems
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const std::size_t _num_linear_sys
The number of linear systems.
bool hasKokkosObjects() const
std::map< std::string, unsigned int > _subspace_dim
Dimension of the subspace spanned by the vectors with a given prefix.
ReporterData & getReporterData(ReporterData::WriteKey)
Provides non-const access the ReporterData object that is used to store reporter values.
const libMesh::ConstElemRange & getEvaluableElementRange()
In general, {evaluable elements} >= {local elements} U {algebraic ghosting elements}.
const bool _use_hash_table_matrix_assembly
Whether to assemble matrices using hash tables instead of preallocating matrix memory.
friend class Resurrector
bool restoreOriginalNonzeroPattern() const
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.
virtual void addKokkosKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
bool computingScalingJacobian() const override final
Getter for whether we&#39;re computing the scaling jacobian.
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse()
Reference to the control logic warehouse.
const ExecFlagType EXEC_SUBDOMAIN
Definition: Moose.C:50
virtual ArrayMooseVariable & getArrayVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested ArrayMooseVariable which may be in any system...
const MooseObjectWarehouse< Marker > & getMarkerWarehouse()
bool _has_constraints
Whether or not this system has any Constraints.
virtual bool isTransient() const override
bool _need_to_add_default_nonlinear_convergence
Flag that the problem needs to add the default nonlinear convergence.
bool hasMultiApps() const
Returns whether or not the current simulation has any multiapps.
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid) override
void notifyWhenMeshChanges(MeshChangedInterface *mci)
Register an object that derives from MeshChangedInterface to be notified when the mesh changes...
void setSNESMFReuseBase(bool reuse, bool set_by_user)
If or not to reuse the base vector for matrix-free calculation.
std::unique_ptr< libMesh::ConstElemRange > _evaluable_local_elem_range
bool computingScalingResidual() const override final
virtual void executeAllObjects(const ExecFlagType &exec_type)
CoverageCheckMode _kernel_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active kernel...
virtual void setActiveFEVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
Real Number
bool _fail_next_system_convergence_check
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.
const bool _boundary_restricted_elem_integrity_check
whether to perform checking of boundary restricted elemental object variable dependencies, e.g.
virtual void prepareShapes(unsigned int var, const THREAD_ID tid) override
void reinitMaterialsInterface(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true)
bool _const_jacobian
true if the Jacobian is constant
virtual void computeJacobianBlock(libMesh::SparseMatrix< libMesh::Number > &jacobian, libMesh::System &precond_system, unsigned int ivar, unsigned int jvar)
Really not a good idea to use this.
virtual void solveLinearSystem(const unsigned int linear_sys_num, const Moose::PetscSupport::PetscOptions *po=nullptr)
Build and solve a linear system.
virtual void computeUserObjectByName(const ExecFlagType &type, const Moose::AuxGroup &group, const std::string &name)
Compute an user object with the given name.
const MaterialPropertyRegistry & getMaterialPropertyRegistry() const
virtual void possiblyRebuildGeomSearchPatches()
std::set< TagID > _linear_vector_tags
Temporary storage for filtered vector tags for linear systems.
Moose::Kokkos::MaterialPropertyStorage & _kokkos_bnd_material_props
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition: MultiApp.h:112
bool checkingUOAuxState() const
Return a flag to indicate whether we are executing user objects and auxliary kernels for state check ...
const libMesh::ConstElemRange & getNonlinearEvaluableElementRange()
MaterialPropertyStorage & _material_props
Base class for Postprocessors that produce a vector of values.
void prepareMaterials(const std::unordered_set< unsigned int > &consumer_needed_mat_props, const SubdomainID blk_id, const THREAD_ID tid)
Add the MooseVariables and the material properties that the current materials depend on to the depend...
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
libMesh::Order _max_scalar_order
Maximum scalar variable order.
virtual void addGhostedBoundary(BoundaryID boundary_id) override
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)
Adaptivity & adaptivity()
bool hasActiveMaterialProperties(const THREAD_ID tid) const
Method to check whether or not a list of active material roperties has been set.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
bool hasUOAuxStateCheck() const
Whether or not MOOSE will perform a user object/auxiliary kernel state check.
virtual void cacheJacobian(const THREAD_ID tid) override
void jacobianSetup() override
virtual std::size_t numSolverSystems() const override
virtual void addHDGKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
Executor * getExecutor() const
Definition: MooseApp.h:335
const Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems() const
virtual Real & dt() const
void advanceMultiApps(ExecFlagType type)
Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep depending on your purpose...
bool immediatelyPrintInvalidSolution() const
Whether or not the solution invalid warnings are printed out immediately.
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.
virtual unsigned int currentLinearSysNum() const override
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
nonlocal coupling matrix
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
virtual void reinitOffDiagScalars(const THREAD_ID tid) override
virtual void reinitElemPhys(const Elem *elem, const std::vector< Point > &phys_points_in_elem, const THREAD_ID tid) override
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
Cache for calculating materials on interface.
void initKokkosStatefulProps()
virtual void addJacobianNeighborLowerD(const THREAD_ID tid) override
virtual void prepareNeighborShapes(unsigned int var, const THREAD_ID tid) override
MooseObjectWarehouse< Marker > _markers
FVInitialConditionWarehouse _fv_ics
void setVerboseProblem(bool verbose)
Make the problem be verbose.
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid) override
virtual bool hasException()
Whether or not an exception has occurred.
CurrentResidualVectorTagsKey(const CurrentResidualVectorTagsKey &)
virtual void initialAdaptMesh()
virtual void addResidualScalar(const THREAD_ID tid=0)
Moose::Kokkos::MaterialPropertyStorage & _kokkos_neighbor_material_props
const bool _using_default_nl
Boolean to check if we have the default nonlinear system.
MaterialWarehouse _all_materials
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.
virtual void addCachedResidual(const THREAD_ID tid) override
A system that holds auxiliary variables.
Moose::PetscSupport::PetscOptions _petsc_options
PETSc option storage.
Crank-Nicolson time integrator.
Definition: CrankNicolson.h:22
virtual const std::vector< std::shared_ptr< Convergence > > & getConvergenceObjects(const THREAD_ID tid=0) const
Gets the Convergence objects.
bool preserveMatrixSparsityPattern() const
Will return True if the executioner in use requires preserving the sparsity pattern of the matrices b...
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid) override
Clear the active elemental MooseVariableFEBase.
Base class for user-specific data.
Definition: UserObject.h:40
void allowOutput(bool state)
Ability to enable/disable all output calls.
virtual Sampler & getSampler(const std::string &name, const THREAD_ID tid=0)
virtual void outputStep(ExecFlagType type)
Output the current step.
virtual Moose::Kokkos::Function getKokkosFunction(const std::string &name)
Get a Kokkos function in an abstract type.
void projectInitialConditionOnCustomRange(libMesh::ConstElemRange &elem_range, ConstBndNodeRange &bnd_node_range, const std::optional< std::set< VariableName >> &target_vars=std::nullopt)
Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boun...
virtual unsigned int nlSysNum(const NonlinearSystemName &nl_sys_name) const override
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525
MooseEnum _verbose_setup
Whether or not to be verbose during setup.
bool needToAddDefaultMultiAppFixedPointConvergence() const
Returns true if the problem needs to add the default fixed point convergence.
void setIgnoreZerosInJacobian(bool state)
Set whether the zeros in the Jacobian should be dropped from the sparsity pattern.
void computeSystems(const ExecFlagType &type)
Do generic system computations.
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.
SolutionIterationType
Definition: MooseTypes.h:269
MooseMesh * _displaced_mesh
const MaterialWarehouse & getKokkosMaterialsWarehouse() const
bool _has_mortar
Whether the simulation requires mortar coupling.
libMesh::Order getMaxScalarOrder() const
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
const std::vector< ConvergenceName > & getLinearConvergenceNames() const
Gets the linear convergence object name(s).
unsigned int THREAD_ID
Definition: MooseTypes.h:237
virtual void ghostGhostedBoundaries() override
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
The Executor class directs the execution flow of simulations.
Definition: Executor.h:26
MaterialWarehouse _materials
uint8_t dof_id_type
virtual bool adaptMesh()
virtual void addJacobianScalar(const THREAD_ID tid=0)
const MaterialPropertyStorage & getNeighborMaterialPropertyStorage()
virtual void addDiracKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
virtual const MooseMesh & mesh() const override
virtual void computeResidualTag(const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, TagID tag)
Form a residual vector for a given tag.
virtual bool startedInitialSetup()
Returns true if we are in or beyond the initialSetup stage.
virtual VectorMooseVariable & getVectorVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested VectorMooseVariable which may be in any system...
std::shared_ptr< LineSearch > _line_search
void initXFEM(std::shared_ptr< XFEMInterface > xfem)
Create XFEM controller object.
Base class for all Transfer objects.
Definition: Transfer.h:36
virtual void neighborSubdomainSetup(SubdomainID subdomain, const THREAD_ID tid)
virtual void addCachedJacobian(const THREAD_ID tid) override
virtual void sizeZeroes(unsigned int size, const THREAD_ID tid)
virtual Real computeDamping(const NumericVector< libMesh::Number > &soln, const NumericVector< libMesh::Number > &update)
std::vector< Real > _real_zero
Convenience zeros.
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels
void checkCoordinateSystems()
Verify that there are no element type/coordinate type conflicts.
unsigned int getMaxQps() const
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:30
bool _verbose_multiapps
Whether or not to be verbose with multiapps.
This is a helper class for managing the storage of declared Reporter object values.
Definition: ReporterData.h:48