https://mooseframework.inl.gov
SubProblem.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 #include "Problem.h"
13 #include "DiracKernelInfo.h"
14 #include "GeometricSearchData.h"
15 #include "MooseTypes.h"
16 #include "VectorTag.h"
17 #include "MooseError.h"
19 #include "RawValueFunctor.h"
20 #include "ADWrapperFunctor.h"
21 
22 #include "libmesh/coupling_matrix.h"
23 #include "libmesh/parameters.h"
24 
25 #include <memory>
26 #include <unordered_map>
27 #include <map>
28 #include <vector>
29 
30 namespace libMesh
31 {
32 template <typename>
33 class VectorValue;
35 class GhostingFunctor;
36 }
37 
38 class MooseMesh;
39 class Factory;
40 class Assembly;
43 template <typename>
49 class SystemBase;
50 class LineSearch;
51 class FaceInfo;
52 class MooseObjectName;
53 namespace Moose
54 {
55 class FunctorEnvelopeBase;
56 }
57 
58 // libMesh forward declarations
59 namespace libMesh
60 {
61 class EquationSystems;
62 class DofMap;
63 class CouplingMatrix;
64 template <typename T>
65 class SparseMatrix;
66 template <typename T>
67 class NumericVector;
68 class System;
69 } // namespace libMesh
70 
73 
78 class SubProblem : public Problem
79 {
80 public:
82 
84  virtual ~SubProblem();
85 
86  virtual libMesh::EquationSystems & es() = 0;
87  virtual MooseMesh & mesh() = 0;
88  virtual const MooseMesh & mesh() const = 0;
89  virtual const MooseMesh & mesh(bool use_displaced) const = 0;
90 
95  virtual bool checkNonlocalCouplingRequirement() const = 0;
96 
100  virtual bool solverSystemConverged(const unsigned int sys_num) { return converged(sys_num); }
101 
105  virtual bool nlConverged(const unsigned int nl_sys_num);
106 
113  virtual bool converged(const unsigned int sys_num) { return solverSystemConverged(sys_num); }
114 
118  virtual unsigned int nlSysNum(const NonlinearSystemName & nl_sys_name) const = 0;
119 
123  virtual unsigned int linearSysNum(const LinearSystemName & linear_sys_name) const = 0;
124 
128  virtual unsigned int solverSysNum(const SolverSystemName & solver_sys_name) const = 0;
129 
130  virtual void onTimestepBegin() = 0;
131  virtual void onTimestepEnd() = 0;
132 
133  virtual bool isTransient() const = 0;
134 
136  virtual void needFV() = 0;
137 
139  virtual bool haveFV() const = 0;
140 
145 
156  virtual TagID addVectorTag(const TagName & tag_name,
158 
164  void addNotZeroedVectorTag(const TagID tag);
165 
173  bool vectorTagNotZeroed(const TagID tag) const;
174 
178  virtual const VectorTag & getVectorTag(const TagID tag_id) const;
179  std::vector<VectorTag> getVectorTags(const std::set<TagID> & tag_ids) const;
180 
184  virtual TagID getVectorTagID(const TagName & tag_name) const;
185 
189  virtual TagName vectorTagName(const TagID tag) const;
190 
195  virtual const std::vector<VectorTag> &
197 
201  virtual bool vectorTagExists(const TagID tag_id) const { return tag_id < _vector_tags.size(); }
202 
206  virtual bool vectorTagExists(const TagName & tag_name) const;
207 
211  virtual unsigned int numVectorTags(const Moose::VectorTagType type = Moose::VECTOR_TAG_ANY) const;
212 
213  virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const;
214 
223  virtual TagID addMatrixTag(TagName tag_name);
224 
228  virtual TagID getMatrixTagID(const TagName & tag_name) const;
229 
233  virtual TagName matrixTagName(TagID tag);
234 
238  virtual bool matrixTagExists(const TagName & tag_name) const;
239 
243  virtual bool matrixTagExists(TagID tag_id) const;
244 
248  virtual unsigned int numMatrixTags() const { return _matrix_tag_name_to_tag_id.size(); }
249 
253  virtual std::map<TagName, TagID> & getMatrixTags() { return _matrix_tag_name_to_tag_id; }
254 
256  virtual bool hasVariable(const std::string & var_name) const = 0;
257 
259  virtual bool hasLinearVariable(const std::string & var_name) const;
260 
262  virtual bool hasAuxiliaryVariable(const std::string & var_name) const;
263 
273  virtual const MooseVariableFieldBase & getVariable(
274  const THREAD_ID tid,
275  const std::string & var_name,
277  Moose::VarFieldType expected_var_field_type = Moose::VarFieldType::VAR_FIELD_ANY) const = 0;
278  virtual MooseVariableFieldBase &
280  const std::string & var_name,
283  {
284  return const_cast<MooseVariableFieldBase &>(const_cast<const SubProblem *>(this)->getVariable(
285  tid, var_name, expected_var_type, expected_var_field_type));
286  }
287 
289  virtual MooseVariable & getStandardVariable(const THREAD_ID tid,
290  const std::string & var_name) = 0;
291 
294  const std::string & var_name) = 0;
295 
297  virtual VectorMooseVariable & getVectorVariable(const THREAD_ID tid,
298  const std::string & var_name) = 0;
299 
301  virtual ArrayMooseVariable & getArrayVariable(const THREAD_ID tid,
302  const std::string & var_name) = 0;
303 
305  virtual bool hasScalarVariable(const std::string & var_name) const = 0;
306 
308  virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid,
309  const std::string & var_name) = 0;
310 
312  virtual libMesh::System & getSystem(const std::string & var_name) = 0;
313 
320  virtual void
321  setActiveElementalMooseVariables(const std::set<MooseVariableFieldBase *> & moose_vars,
322  const THREAD_ID tid);
323 
329  virtual const std::set<MooseVariableFieldBase *> &
331 
337  virtual bool hasActiveElementalMooseVariables(const THREAD_ID tid) const;
338 
346  virtual void clearActiveElementalMooseVariables(const THREAD_ID tid);
347 
348  virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) = 0;
349  virtual const Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) const = 0;
350 
354  virtual const SystemBase & systemBaseNonlinear(const unsigned int sys_num) const = 0;
355  virtual SystemBase & systemBaseNonlinear(const unsigned int sys_num) = 0;
359  virtual const SystemBase & systemBaseLinear(const unsigned int sys_num) const = 0;
360  virtual SystemBase & systemBaseLinear(const unsigned int sys_num) = 0;
364  virtual const SystemBase & systemBaseSolver(const unsigned int sys_num) const = 0;
365  virtual SystemBase & systemBaseSolver(const unsigned int sys_num) = 0;
369  virtual const SystemBase & systemBaseAuxiliary() const = 0;
370  virtual SystemBase & systemBaseAuxiliary() = 0;
371 
372  virtual void prepareShapes(unsigned int var, const THREAD_ID tid) = 0;
373  virtual void prepareFaceShapes(unsigned int var, const THREAD_ID tid) = 0;
374  virtual void prepareNeighborShapes(unsigned int var, const THREAD_ID tid) = 0;
376 
381  unsigned int getAxisymmetricRadialCoord() const;
382 
383  virtual DiracKernelInfo & diracKernelInfo();
384  virtual Real finalNonlinearResidual(const unsigned int nl_sys_num) const;
385  virtual unsigned int nNonlinearIterations(const unsigned int nl_sys_num) const;
386  virtual unsigned int nLinearIterations(const unsigned int nl_sys_num) const;
387 
388  virtual void addResidual(const THREAD_ID tid) = 0;
389  virtual void addResidualNeighbor(const THREAD_ID tid) = 0;
390  virtual void addResidualLower(const THREAD_ID tid) = 0;
391 
392  virtual void cacheResidual(const THREAD_ID tid);
393  virtual void cacheResidualNeighbor(const THREAD_ID tid);
394  virtual void addCachedResidual(const THREAD_ID tid);
395 
397  const THREAD_ID tid) = 0;
399  const THREAD_ID tid) = 0;
400 
401  virtual void addJacobian(const THREAD_ID tid) = 0;
402  virtual void addJacobianNeighbor(const THREAD_ID tid) = 0;
403  virtual void addJacobianNeighborLowerD(const THREAD_ID tid) = 0;
404  virtual void addJacobianLowerD(const THREAD_ID tid) = 0;
406  unsigned int ivar,
407  unsigned int jvar,
408  const libMesh::DofMap & dof_map,
409  std::vector<dof_id_type> & dof_indices,
410  std::vector<dof_id_type> & neighbor_dof_indices,
411  const std::set<TagID> & tags,
412  const THREAD_ID tid) = 0;
413 
414  virtual void cacheJacobian(const THREAD_ID tid);
415  virtual void cacheJacobianNeighbor(const THREAD_ID tid);
416  virtual void addCachedJacobian(const THREAD_ID tid);
417 
418  virtual void prepare(const Elem * elem, const THREAD_ID tid) = 0;
419  virtual void prepareFace(const Elem * elem, const THREAD_ID tid) = 0;
420  virtual void prepare(const Elem * elem,
421  unsigned int ivar,
422  unsigned int jvar,
423  const std::vector<dof_id_type> & dof_indices,
424  const THREAD_ID tid) = 0;
425  virtual void setCurrentSubdomainID(const Elem * elem, const THREAD_ID tid) = 0;
426  virtual void
427  setNeighborSubdomainID(const Elem * elem, unsigned int side, const THREAD_ID tid) = 0;
428  virtual void prepareAssembly(const THREAD_ID tid) = 0;
429 
430  virtual void reinitElem(const Elem * elem, const THREAD_ID tid) = 0;
431  virtual void reinitElemPhys(const Elem * elem,
432  const std::vector<Point> & phys_points_in_elem,
433  const THREAD_ID tid) = 0;
434  virtual void reinitElemFace(const Elem * elem, unsigned int side, const THREAD_ID tid) = 0;
435  virtual void reinitLowerDElem(const Elem * lower_d_elem,
436  const THREAD_ID tid,
437  const std::vector<Point> * const pts = nullptr,
438  const std::vector<Real> * const weights = nullptr);
439  virtual void reinitNode(const Node * node, const THREAD_ID tid) = 0;
440  virtual void reinitNodeFace(const Node * node, BoundaryID bnd_id, const THREAD_ID tid) = 0;
441  virtual void reinitNodes(const std::vector<dof_id_type> & nodes, const THREAD_ID tid) = 0;
442  virtual void reinitNodesNeighbor(const std::vector<dof_id_type> & nodes, const THREAD_ID tid) = 0;
443  virtual void reinitNeighbor(const Elem * elem, unsigned int side, const THREAD_ID tid) = 0;
444  virtual void reinitNeighborPhys(const Elem * neighbor,
445  unsigned int neighbor_side,
446  const std::vector<Point> & physical_points,
447  const THREAD_ID tid) = 0;
448  virtual void reinitNeighborPhys(const Elem * neighbor,
449  const std::vector<Point> & physical_points,
450  const THREAD_ID tid) = 0;
451  virtual void
452  reinitElemNeighborAndLowerD(const Elem * elem, unsigned int side, const THREAD_ID tid) = 0;
459  virtual void reinitScalars(const THREAD_ID tid,
460  bool reinit_for_derivative_reordering = false) = 0;
461  virtual void reinitOffDiagScalars(const THREAD_ID tid) = 0;
462 
464  virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid);
465 
472  virtual void reinitElemFaceRef(const Elem * elem,
473  unsigned int side,
474  Real tolerance,
475  const std::vector<Point> * const pts,
476  const std::vector<Real> * const weights = nullptr,
477  const THREAD_ID tid = 0);
478 
485  virtual void reinitNeighborFaceRef(const Elem * neighbor_elem,
486  unsigned int neighbor_side,
487  Real tolerance,
488  const std::vector<Point> * const pts,
489  const std::vector<Real> * const weights = nullptr,
490  const THREAD_ID tid = 0);
491 
495  void reinitNeighborLowerDElem(const Elem * elem, const THREAD_ID tid = 0);
496 
500  void reinitMortarElem(const Elem * elem, const THREAD_ID tid = 0);
501 
505  virtual bool reinitDirac(const Elem * elem, const THREAD_ID tid) = 0;
509  virtual void getDiracElements(std::set<const Elem *> & elems) = 0;
514  virtual void clearDiracInfo() = 0;
515 
516  // Geom Search
517  virtual void
519 
520  virtual GeometricSearchData & geomSearchData() = 0;
521 
530  virtual void storeSubdomainMatPropName(SubdomainID block_id, const std::string & name);
531 
540  virtual void storeBoundaryMatPropName(BoundaryID boundary_id, const std::string & name);
541 
550  virtual void storeSubdomainZeroMatProp(SubdomainID block_id, const MaterialPropertyName & name);
551 
560  virtual void storeBoundaryZeroMatProp(BoundaryID boundary_id, const MaterialPropertyName & name);
561 
568  virtual void storeSubdomainDelayedCheckMatProp(const std::string & requestor,
569  SubdomainID block_id,
570  const std::string & name);
571 
579  virtual void storeBoundaryDelayedCheckMatProp(const std::string & requestor,
580  BoundaryID boundary_id,
581  const std::string & name);
582 
588  virtual void checkBlockMatProps();
589 
595  virtual void checkBoundaryMatProps();
596 
600  virtual void markMatPropRequested(const std::string &);
601 
605  virtual bool isMatPropRequested(const std::string & prop_name) const;
606 
610  void addConsumedPropertyName(const MooseObjectName & obj_name, const std::string & prop_name);
611 
615  const std::map<MooseObjectName, std::set<std::string>> & getConsumedPropertyMap() const;
616 
620  virtual void addGhostedElem(dof_id_type elem_id) = 0;
621 
625  virtual void addGhostedBoundary(BoundaryID boundary_id) = 0;
626 
630  virtual void ghostGhostedBoundaries() = 0;
631 
635  virtual std::set<SubdomainID> getMaterialPropertyBlocks(const std::string & prop_name);
636 
640  virtual std::vector<SubdomainName> getMaterialPropertyBlockNames(const std::string & prop_name);
641 
645  virtual bool hasBlockMaterialProperty(SubdomainID block_id, const std::string & prop_name);
646 
650  virtual std::set<BoundaryID> getMaterialPropertyBoundaryIDs(const std::string & prop_name);
651 
655  virtual std::vector<BoundaryName> getMaterialPropertyBoundaryNames(const std::string & prop_name);
656 
660  virtual bool hasBoundaryMaterialProperty(BoundaryID boundary_id, const std::string & prop_name);
661 
666  virtual bool computingPreSMOResidual(const unsigned int nl_sys_num) const = 0;
667 
672  virtual std::set<dof_id_type> & ghostedElems() { return _ghosted_elems; }
673 
674  std::map<std::string, std::vector<dof_id_type>> _var_dof_map;
675 
679  virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const = 0;
680 
685 
689  void setCurrentlyComputingJacobian(const bool currently_computing_jacobian)
690  {
691  _currently_computing_jacobian = currently_computing_jacobian;
692  }
693 
697  const bool & currentlyComputingResidualAndJacobian() const;
698 
702  void setCurrentlyComputingResidualAndJacobian(bool currently_computing_residual_and_jacobian);
703 
708 
712  virtual void computingNonlinearResid(const bool computing_nonlinear_residual)
713  {
714  _computing_nonlinear_residual = computing_nonlinear_residual;
715  }
716 
721 
725  virtual void setCurrentlyComputingResidual(const bool currently_computing_residual)
726  {
727  _currently_computing_residual = currently_computing_residual;
728  }
729 
732 
734  virtual bool safeAccessTaggedVectors() const { return _safe_access_tagged_vectors; }
735 
737 
739 
740  virtual void setActiveFEVariableCoupleableVectorTags(std::set<TagID> & vtags,
741  const THREAD_ID tid);
742 
743  virtual void setActiveFEVariableCoupleableMatrixTags(std::set<TagID> & mtags,
744  const THREAD_ID tid);
745 
747 
749 
750  virtual void setActiveScalarVariableCoupleableVectorTags(std::set<TagID> & vtags,
751  const THREAD_ID tid);
752 
753  virtual void setActiveScalarVariableCoupleableMatrixTags(std::set<TagID> & mtags,
754  const THREAD_ID tid);
755 
756  const std::set<TagID> & getActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid) const;
757 
758  const std::set<TagID> & getActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) const;
759 
760  const std::set<TagID> & getActiveFEVariableCoupleableVectorTags(const THREAD_ID tid) const;
761 
762  const std::set<TagID> & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const;
763 
767  virtual void haveADObjects(bool have_ad_objects) { _have_ad_objects = have_ad_objects; }
771  bool haveADObjects() const { return _have_ad_objects; }
772 
773  virtual LineSearch * getLineSearch() = 0;
774 
778  virtual const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const = 0;
779 
780 private:
790  void cloneAlgebraicGhostingFunctor(libMesh::GhostingFunctor & algebraic_gf, bool to_mesh = true);
791 
801  void cloneCouplingGhostingFunctor(libMesh::GhostingFunctor & coupling_gf, bool to_mesh = true);
802 
803 public:
807  void addAlgebraicGhostingFunctor(libMesh::GhostingFunctor & algebraic_gf, bool to_mesh = true);
808 
812  void addCouplingGhostingFunctor(libMesh::GhostingFunctor & coupling_gf, bool to_mesh = true);
813 
818 
823 
828  virtual void automaticScaling(bool automatic_scaling);
829 
834  bool automaticScaling() const;
835 
840  void hasScalingVector(const unsigned int nl_sys_num);
841 
845  virtual bool haveDisplaced() const = 0;
846 
850  virtual bool computingScalingJacobian() const = 0;
851 
855  virtual bool computingScalingResidual() const = 0;
856 
860  void clearAllDofIndices();
861 
871  template <typename T>
872  const Moose::Functor<T> & getFunctor(const std::string & name,
873  const THREAD_ID tid,
874  const std::string & requestor_name,
875  bool requestor_is_ad);
876 
880  bool hasFunctor(const std::string & name, const THREAD_ID tid) const;
881 
885  template <typename T>
886  bool hasFunctorWithType(const std::string & name, const THREAD_ID tid) const;
887 
891  template <typename T>
892  void
893  addFunctor(const std::string & name, const Moose::FunctorBase<T> & functor, const THREAD_ID tid);
894 
908  template <typename T, typename PolymorphicLambda>
909  const Moose::FunctorBase<T> &
910  addPiecewiseByBlockLambdaFunctor(const std::string & name,
911  PolymorphicLambda my_lammy,
912  const std::set<ExecFlagType> & clearance_schedule,
913  const MooseMesh & mesh,
914  const std::set<SubdomainID> & block_ids,
915  const THREAD_ID tid);
916 
917  virtual void initialSetup();
918  virtual void timestepSetup();
919  virtual void customSetup(const ExecFlagType & exec_type);
920  virtual void residualSetup();
921  virtual void jacobianSetup();
922 
924  void setFunctorOutput(bool set_output) { _output_functors = set_output; }
925 
929  virtual std::size_t numNonlinearSystems() const = 0;
930 
934  virtual unsigned int currentNlSysNum() const = 0;
935 
939  virtual std::size_t numLinearSystems() const = 0;
940 
944  virtual std::size_t numSolverSystems() const = 0;
945 
949  virtual unsigned int currentLinearSysNum() const = 0;
950 
954  template <typename T>
955  void registerUnfilledFunctorRequest(T * functor_interface,
956  const std::string & functor_name,
957  const THREAD_ID tid);
958 
962  virtual const std::vector<VectorTag> & currentResidualVectorTags() const = 0;
963 
970  static void selectVectorTagsFromSystem(const SystemBase & system,
971  const std::vector<VectorTag> & input_vector_tags,
972  std::set<TagID> & selected_tags);
973 
980  static void selectMatrixTagsFromSystem(const SystemBase & system,
981  const std::map<TagName, TagID> & input_matrix_tags,
982  std::set<TagID> & selected_tags);
983 
987  void reinitFVFace(const THREAD_ID tid, const FaceInfo & fi);
988 
994  virtual bool hasNonlocalCoupling() const = 0;
995 
999  void preparePRefinement();
1000 
1004  [[nodiscard]] bool doingPRefinement() const;
1005 
1009  [[nodiscard]] bool havePRefinement() const { return _have_p_refinement; }
1010 
1014  virtual void setCurrentLowerDElem(const Elem * const lower_d_elem, const THREAD_ID tid);
1015 
1016 protected:
1021  template <typename T>
1023  const std::string & var_name,
1024  Moose::VarKindType expected_var_type,
1025  Moose::VarFieldType expected_var_field_type,
1026  const std::vector<T> & nls,
1027  const SystemBase & aux) const;
1028 
1032  bool verifyVectorTags() const;
1033 
1038  void markFamilyPRefinement(const InputParameters & params);
1039 
1041  std::map<TagName, TagID> _matrix_tag_name_to_tag_id;
1042 
1044  std::map<TagID, TagName> _matrix_tag_id_to_tag_name;
1045 
1048 
1050 
1052  std::map<SubdomainID, std::set<std::string>> _map_block_material_props;
1053 
1055  std::map<BoundaryID, std::set<std::string>> _map_boundary_material_props;
1056 
1058  std::map<SubdomainID, std::set<MaterialPropertyName>> _zero_block_material_props;
1059  std::map<BoundaryID, std::set<MaterialPropertyName>> _zero_boundary_material_props;
1060 
1062  std::set<std::string> _material_property_requested;
1063 
1065 
1070  std::map<SubdomainID, std::multimap<std::string, std::string>> _map_block_material_props_check;
1071  std::map<BoundaryID, std::multimap<std::string, std::string>> _map_boundary_material_props_check;
1073 
1075  std::vector<std::set<MooseVariableFieldBase *>> _active_elemental_moose_variables;
1076 
1078  /* This needs to remain <unsigned int> for threading purposes */
1079  std::vector<unsigned int> _has_active_elemental_moose_variables;
1080 
1081  std::vector<std::set<TagID>> _active_fe_var_coupleable_matrix_tags;
1082 
1083  std::vector<std::set<TagID>> _active_fe_var_coupleable_vector_tags;
1084 
1085  std::vector<std::set<TagID>> _active_sc_var_coupleable_matrix_tags;
1086 
1087  std::vector<std::set<TagID>> _active_sc_var_coupleable_vector_tags;
1088 
1091 
1093  std::set<dof_id_type> _ghosted_elems;
1094 
1097 
1100 
1103 
1106 
1109 
1112 
1115 
1117  std::unordered_set<TagID> _not_zeroed_tagged_vectors;
1118 
1119 private:
1126  virtual std::pair<bool, unsigned int>
1127  determineSolverSystem(const std::string & var_name, bool error_if_not_found = false) const = 0;
1128 
1129  enum class TrueFunctorIs
1130  {
1131  UNSET,
1132  NONAD,
1133  AD
1134  };
1135 
1140  std::vector<std::multimap<std::string,
1141  std::tuple<TrueFunctorIs,
1142  std::unique_ptr<Moose::FunctorEnvelopeBase>,
1143  std::unique_ptr<Moose::FunctorEnvelopeBase>>>>
1145 
1147  std::vector<std::map<std::string, std::unique_ptr<Moose::FunctorAbstract>>> _pbblf_functors;
1148 
1150  void showFunctors() const;
1151 
1153  void showFunctorRequestors() const;
1154 
1157  std::map<std::string, std::set<std::string>> _functor_to_requestors;
1158 
1161  std::vector<std::multimap<std::string, std::pair<bool, bool>>> _functor_to_request_info;
1162 
1165 
1167  std::vector<VectorTag> _vector_tags;
1168 
1174  std::vector<std::vector<VectorTag>> _typed_vector_tags;
1175 
1177  std::map<TagName, TagID> _vector_tags_name_map;
1178 
1180  std::string restrictionSubdomainCheckName(SubdomainID check_id);
1181  std::string restrictionBoundaryCheckName(BoundaryID check_id);
1183 
1184  // Contains properties consumed by objects, see addConsumedPropertyName
1185  std::map<MooseObjectName, std::set<std::string>> _consumed_material_properties;
1186 
1190  std::unordered_map<libMesh::GhostingFunctor *,
1191  std::vector<std::shared_ptr<libMesh::GhostingFunctor>>>
1193 
1197  std::unordered_map<libMesh::GhostingFunctor *,
1198  std::vector<std::shared_ptr<libMesh::GhostingFunctor>>>
1200 
1203 
1205  std::unordered_map<FEFamily, bool> _family_for_p_refinement;
1207  static const std::unordered_set<FEFamily> _default_families_without_p_refinement;
1208 
1209  friend class Restartable;
1210 };
1211 
1212 template <typename T>
1213 const Moose::Functor<T> &
1214 SubProblem::getFunctor(const std::string & name,
1215  const THREAD_ID tid,
1216  const std::string & requestor_name,
1217  const bool requestor_is_ad)
1218 {
1219  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1220 
1221  // Log the requestor
1222  _functor_to_requestors["wraps_" + name].insert(requestor_name);
1223 
1224  constexpr bool requested_functor_is_ad =
1225  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1226 
1227  auto & functor_to_request_info = _functor_to_request_info[tid];
1228 
1229  // Get the requested functor if we already have it
1230  auto & functors = _functors[tid];
1231  if (auto find_ret = functors.find("wraps_" + name); find_ret != functors.end())
1232  {
1233  if (functors.count("wraps_" + name) > 1)
1234  mooseError("Attempted to get a functor with the name '",
1235  name,
1236  "' but multiple (" + std::to_string(functors.count("wraps_" + name)) +
1237  ") functors match. Make sure that you do not have functor material "
1238  "properties, functions, postprocessors or variables with the same names.");
1239 
1240  auto & [true_functor_is, non_ad_functor, ad_functor] = find_ret->second;
1241  auto & functor_wrapper = requested_functor_is_ad ? *ad_functor : *non_ad_functor;
1242 
1243  auto * const functor = dynamic_cast<Moose::Functor<T> *>(&functor_wrapper);
1244  if (!functor)
1245  mooseError("A call to SubProblem::getFunctor requested a functor named '",
1246  name,
1247  "' that returns the type: '",
1248  libMesh::demangle(typeid(T).name()),
1249  "'. However, that functor already exists and returns a different type: '",
1250  functor_wrapper.returnType(),
1251  "'");
1252 
1253  if (functor->template wrapsType<Moose::NullFunctor<T>>())
1254  // Store for future checking when the actual functor gets added
1255  functor_to_request_info.emplace(name,
1256  std::make_pair(requested_functor_is_ad, requestor_is_ad));
1257  else
1258  {
1259  // We already have the actual functor
1260  if (true_functor_is == SubProblem::TrueFunctorIs::UNSET)
1261  mooseError("We already have the functor; it should not be unset");
1262 
1263  // Check for whether this is a valid request
1264  // We allow auxiliary variables and linear variables to be retrieved as non AD
1265  if (!requested_functor_is_ad && requestor_is_ad &&
1266  true_functor_is == SubProblem::TrueFunctorIs::AD &&
1268  mooseError("The AD object '",
1269  requestor_name,
1270  "' is requesting the functor '",
1271  name,
1272  "' as a non-AD functor even though it is truly an AD functor, which is not "
1273  "allowed, since this may unintentionally drop derivatives.");
1274  }
1275 
1276  return *functor;
1277  }
1278 
1279  // We don't have the functor yet but we could have it in the future. We'll create null functors
1280  // for now
1281  functor_to_request_info.emplace(name, std::make_pair(requested_functor_is_ad, requestor_is_ad));
1282  if constexpr (requested_functor_is_ad)
1283  {
1284  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1285  typedef T ADType;
1286 
1287  auto emplace_ret =
1288  functors.emplace("wraps_" + name,
1289  std::make_tuple(SubProblem::TrueFunctorIs::UNSET,
1290  std::make_unique<Moose::Functor<NonADType>>(
1291  std::make_unique<Moose::NullFunctor<NonADType>>()),
1292  std::make_unique<Moose::Functor<ADType>>(
1293  std::make_unique<Moose::NullFunctor<ADType>>())));
1294 
1295  return static_cast<Moose::Functor<T> &>(*(requested_functor_is_ad
1296  ? std::get<2>(emplace_ret->second)
1297  : std::get<1>(emplace_ret->second)));
1298  }
1299  else
1300  {
1301  typedef T NonADType;
1302  typedef typename Moose::ADType<T>::type ADType;
1303 
1304  auto emplace_ret =
1305  functors.emplace("wraps_" + name,
1306  std::make_tuple(SubProblem::TrueFunctorIs::UNSET,
1307  std::make_unique<Moose::Functor<NonADType>>(
1308  std::make_unique<Moose::NullFunctor<NonADType>>()),
1309  std::make_unique<Moose::Functor<ADType>>(
1310  std::make_unique<Moose::NullFunctor<ADType>>())));
1311 
1312  return static_cast<Moose::Functor<T> &>(*(requested_functor_is_ad
1313  ? std::get<2>(emplace_ret->second)
1314  : std::get<1>(emplace_ret->second)));
1315  }
1316 }
1317 
1318 template <typename T>
1319 bool
1320 SubProblem::hasFunctorWithType(const std::string & name, const THREAD_ID tid) const
1321 {
1322  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1323  auto & functors = _functors[tid];
1324 
1325  const auto & it = functors.find("wraps_" + name);
1326  constexpr bool requested_functor_is_ad =
1327  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1328 
1329  if (it == functors.end())
1330  return false;
1331  else
1332  return dynamic_cast<Moose::Functor<T> *>(
1333  requested_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get());
1334 }
1335 
1336 template <typename T, typename PolymorphicLambda>
1337 const Moose::FunctorBase<T> &
1339  PolymorphicLambda my_lammy,
1340  const std::set<ExecFlagType> & clearance_schedule,
1341  const MooseMesh & mesh,
1342  const std::set<SubdomainID> & block_ids,
1343  const THREAD_ID tid)
1344 {
1345  auto & pbblf_functors = _pbblf_functors[tid];
1346 
1347  auto [it, first_time_added] =
1348  pbblf_functors.emplace(name,
1349  std::make_unique<PiecewiseByBlockLambdaFunctor<T>>(
1350  name, my_lammy, clearance_schedule, mesh, block_ids));
1351 
1352  auto * functor = dynamic_cast<PiecewiseByBlockLambdaFunctor<T> *>(it->second.get());
1353  if (!functor)
1354  {
1355  if (first_time_added)
1356  mooseError("This should be impossible. If this was the first time we added the functor, then "
1357  "the dynamic cast absolutely should have succeeded");
1358  else
1359  mooseError("Attempted to add a lambda functor with the name '",
1360  name,
1361  "' but another lambda functor of that name returns a different type");
1362  }
1363 
1364  if (first_time_added)
1365  addFunctor(name, *functor, tid);
1366  else
1367  // The functor already exists
1368  functor->setFunctor(mesh, block_ids, my_lammy);
1369 
1370  return *functor;
1371 }
1372 
1373 template <typename T>
1374 void
1375 SubProblem::addFunctor(const std::string & name,
1376  const Moose::FunctorBase<T> & functor,
1377  const THREAD_ID tid)
1378 {
1379  constexpr bool added_functor_is_ad =
1380  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1381 
1382  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1383 
1384  auto & functor_to_request_info = _functor_to_request_info[tid];
1385  auto & functors = _functors[tid];
1386  auto it = functors.find("wraps_" + name);
1387  if (it != functors.end())
1388  {
1389  // We have this functor already. If it's a null functor, we want to replace it with the valid
1390  // functor we have now. If it's not then we'll add a new entry into the multimap and then we'll
1391  // error later if a user requests a functor because their request is ambiguous. This is the
1392  // reason that the functors container is a multimap: for nice error messages
1393  auto * const existing_wrapper_base =
1394  added_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get();
1395  auto * const existing_wrapper = dynamic_cast<Moose::Functor<T> *>(existing_wrapper_base);
1396  if (existing_wrapper && existing_wrapper->template wrapsType<Moose::NullFunctor<T>>())
1397  {
1398  // Sanity check
1399  auto [request_info_it, request_info_end_it] = functor_to_request_info.equal_range(name);
1400  if (request_info_it == request_info_end_it)
1401  mooseError("We are wrapping a NullFunctor but we don't have any unfilled functor request "
1402  "info. This doesn't make sense.");
1403 
1404  // Check for valid requests
1405  while (request_info_it != request_info_end_it)
1406  {
1407  auto & [requested_functor_is_ad, requestor_is_ad] = request_info_it->second;
1408  if (!requested_functor_is_ad && requestor_is_ad && added_functor_is_ad)
1409  mooseError("We are requesting a non-AD functor '" + name +
1410  "' from an AD object, but the true functor is AD. This means we could be "
1411  "dropping important derivatives. We will not allow this");
1412  // We're going to eventually check whether we've fulfilled all functor requests and our
1413  // check will be that the multimap is empty. This request is fulfilled, so erase it from the
1414  // map now
1415  request_info_it = functor_to_request_info.erase(request_info_it);
1416  }
1417 
1418  // Ok we didn't have the functor before, so we will add it now
1419  std::get<0>(it->second) =
1421  existing_wrapper->assign(functor);
1422  // Finally we create the non-AD or AD complement of the just added functor
1423  if constexpr (added_functor_is_ad)
1424  {
1425  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1426  auto * const existing_non_ad_wrapper_base = std::get<1>(it->second).get();
1427  auto * const existing_non_ad_wrapper =
1428  dynamic_cast<Moose::Functor<NonADType> *>(existing_non_ad_wrapper_base);
1429  mooseAssert(existing_non_ad_wrapper->template wrapsType<Moose::NullFunctor<NonADType>>(),
1430  "Both members of pair should have been wrapping a NullFunctor");
1431  existing_non_ad_wrapper->assign(
1432  std::make_unique<Moose::RawValueFunctor<NonADType>>(functor));
1433  }
1434  else
1435  {
1436  typedef typename Moose::ADType<T>::type ADType;
1437  auto * const existing_ad_wrapper_base = std::get<2>(it->second).get();
1438  auto * const existing_ad_wrapper =
1439  dynamic_cast<Moose::Functor<ADType> *>(existing_ad_wrapper_base);
1440  mooseAssert(existing_ad_wrapper->template wrapsType<Moose::NullFunctor<ADType>>(),
1441  "Both members of pair should have been wrapping a NullFunctor");
1442  existing_ad_wrapper->assign(std::make_unique<Moose::ADWrapperFunctor<ADType>>(functor));
1443  }
1444  return;
1445  }
1446  else if (!existing_wrapper)
1447  {
1448  // Functor was emplaced but the cast failed. This could be a double definition with
1449  // different types, or it could be a request with one type then a definition with another
1450  // type. Either way it is going to error later, but it is cleaner to catch it now
1451  mooseError("Functor '",
1452  name,
1453  "' is being added with return type '",
1454  MooseUtils::prettyCppType<T>(),
1455  "' but it has already been defined or requested with return type '",
1456  existing_wrapper_base->returnType(),
1457  "'.");
1458  }
1459  }
1460 
1461  // We are a new functor, create the opposite ADType one and store it with other functors
1462  if constexpr (added_functor_is_ad)
1463  {
1464  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1465  auto new_non_ad_wrapper = std::make_unique<Moose::Functor<NonADType>>(
1466  std::make_unique<Moose::RawValueFunctor<NonADType>>(functor));
1467  auto new_ad_wrapper = std::make_unique<Moose::Functor<T>>(functor);
1468  _functors[tid].emplace("wraps_" + name,
1469  std::make_tuple(SubProblem::TrueFunctorIs::AD,
1470  std::move(new_non_ad_wrapper),
1471  std::move(new_ad_wrapper)));
1472  }
1473  else
1474  {
1475  typedef typename Moose::ADType<T>::type ADType;
1476  auto new_non_ad_wrapper = std::make_unique<Moose::Functor<T>>((functor));
1477  auto new_ad_wrapper = std::make_unique<Moose::Functor<ADType>>(
1478  std::make_unique<Moose::ADWrapperFunctor<ADType>>(functor));
1479  _functors[tid].emplace("wraps_" + name,
1480  std::make_tuple(SubProblem::TrueFunctorIs::NONAD,
1481  std::move(new_non_ad_wrapper),
1482  std::move(new_ad_wrapper)));
1483  }
1484 }
1485 
1486 inline const bool &
1488 {
1490 }
1491 
1492 inline void
1494  const bool currently_computing_residual_and_jacobian)
1495 {
1496  _currently_computing_residual_and_jacobian = currently_computing_residual_and_jacobian;
1497 }
1498 
1499 namespace Moose
1500 {
1501 void initial_condition(libMesh::EquationSystems & es, const std::string & system_name);
1502 } // namespace Moose
virtual void prepareShapes(unsigned int var, const THREAD_ID tid)=0
virtual void getDiracElements(std::set< const Elem *> &elems)=0
Fills "elems" with the elements that should be looped over for Dirac Kernels.
virtual MooseMesh & mesh()=0
virtual void addCachedResidual(const THREAD_ID tid)
Definition: SubProblem.C:1305
virtual void reinitNeighborPhys(const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, const THREAD_ID tid)=0
virtual bool computingScalingResidual() const =0
Getter for whether we&#39;re computing the scaling residual.
void cloneCouplingGhostingFunctor(libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
Creates (n_sys - 1) clones of the provided coupling ghosting functor (corresponding to the nonlinear ...
Definition: SubProblem.C:1035
VarFieldType
Definition: MooseTypes.h:721
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: SubProblem.C:796
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
void reinitNeighborLowerDElem(const Elem *elem, const THREAD_ID tid=0)
reinitialize a neighboring lower dimensional element
Definition: SubProblem.C:987
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name)=0
Returns the scalar variable reference from whichever system contains it.
virtual const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const =0
The coupling matrix defining what blocks exist in the preconditioning matrix.
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1041
A material property that is evaluated on-the-fly via calls to various overloads of operator() ...
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:384
virtual unsigned int nNonlinearIterations(const unsigned int nl_sys_num) const
Definition: SubProblem.C:760
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:378
virtual bool hasBoundaryMaterialProperty(BoundaryID boundary_id, const std::string &prop_name)
Check if a material property is defined on a block.
Definition: SubProblem.C:570
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1114
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:402
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false)=0
fills the VariableValue arrays for scalar variables from the solution vector
MooseVariableFieldBase & getVariableHelper(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &nls, const SystemBase &aux) const
Helper function called by getVariable that handles the logic for checking whether Variables of the re...
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:1071
A class for creating restricted objects.
Definition: Restartable.h:28
The DiracKernelInfo object is a place where all the Dirac points added by different DiracKernels are ...
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
virtual VectorMooseVariable & getVectorVariable(const THREAD_ID tid, const std::string &var_name)=0
Returns the variable reference for requested VectorMooseVariable which may be in any system...
const std::set< TagID > & getActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid) const
Definition: SubProblem.C:437
void removeCouplingGhostingFunctor(libMesh::GhostingFunctor &coupling_gf)
Remove a coupling ghosting functor from this problem&#39;s DofMaps.
Definition: SubProblem.C:1110
virtual std::set< BoundaryID > getMaterialPropertyBoundaryIDs(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:525
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
Definition: SubProblem.h:767
virtual void addJacobianNeighborLowerD(const THREAD_ID tid)=0
const Moose::Functor< T > & getFunctor(const std::string &name, const THREAD_ID tid, const std::string &requestor_name, bool requestor_is_ad)
Definition: SubProblem.h:1214
virtual void addResidual(const THREAD_ID tid)=0
Base class template for functor objects.
Definition: MooseFunctor.h:137
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)
Definition: SubProblem.C:957
void addAlgebraicGhostingFunctor(libMesh::GhostingFunctor &algebraic_gf, bool to_mesh=true)
Add an algebraic ghosting functor to this problem&#39;s DofMaps.
Definition: SubProblem.C:1023
virtual MooseVariableFieldBase & getActualFieldVariable(const THREAD_ID tid, const std::string &var_name)=0
Returns the variable reference for requested MooseVariableField which may be in any system...
Keeps track of stuff related to assembling.
Definition: Assembly.h:101
Class for stuff related to variables.
Definition: Adaptivity.h:31
virtual void reinitOffDiagScalars(const THREAD_ID tid)=0
virtual void setCurrentlyComputingResidual(const bool currently_computing_residual)
Set whether or not the problem is in the process of computing the residual.
Definition: SubProblem.h:725
virtual void reinitElem(const Elem *elem, const THREAD_ID tid)=0
unsigned int TagID
Definition: MooseTypes.h:210
virtual void onTimestepEnd()=0
virtual void storeSubdomainZeroMatProp(SubdomainID block_id, const MaterialPropertyName &name)
Adds to a map based on block ids of material properties for which a zero value can be returned...
Definition: SubProblem.C:595
virtual bool checkNonlocalCouplingRequirement() const =0
virtual const std::vector< VectorTag > & currentResidualVectorTags() const =0
Return the residual vector tags we are currently computing.
virtual bool hasBlockMaterialProperty(SubdomainID block_id, const std::string &prop_name)
Check if a material property is defined on a block.
Definition: SubProblem.C:511
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:390
std::string restrictionBoundaryCheckName(BoundaryID check_id)
Definition: SubProblem.C:783
Generic factory class for build all sorts of objects.
Definition: Factory.h:28
virtual bool computingScalingJacobian() const =0
Getter for whether we&#39;re computing the scaling jacobian.
MooseVariableFE< RealVectorValue > VectorMooseVariable
Definition: SubProblem.h:46
void cloneAlgebraicGhostingFunctor(libMesh::GhostingFunctor &algebraic_gf, bool to_mesh=true)
Creates (n_sys - 1) clones of the provided algebraic ghosting functor (corresponding to the nonlinear...
Definition: SubProblem.C:1001
VectorValue< Real > RealVectorValue
Definition: SubProblem.h:33
virtual const SystemBase & systemBaseNonlinear(const unsigned int sys_num) const =0
Return the nonlinear system object as a base class reference given the system number.
const std::set< TagID > & getActiveFEVariableCoupleableVectorTags(const THREAD_ID tid) const
Definition: SubProblem.C:396
std::unordered_set< TagID > _not_zeroed_tagged_vectors
the list of vector tags that will not be zeroed when all other tags are
Definition: SubProblem.h:1117
virtual unsigned int currentNlSysNum() const =0
virtual bool safeAccessTaggedVectors() const
Is it safe to access the tagged vectors.
Definition: SubProblem.h:734
virtual void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes, const THREAD_ID tid)=0
void addConsumedPropertyName(const MooseObjectName &obj_name, const std::string &prop_name)
Helper for tracking the object that is consuming a property for MaterialPropertyDebugOutput.
Definition: SubProblem.C:736
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:1096
std::map< std::string, std::set< std::string > > _functor_to_requestors
The requestors of functors where the key is the prop name and the value is a set of names of requesto...
Definition: SubProblem.h:1157
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFieldBase *> &moose_vars, const THREAD_ID tid)
Set the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:443
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid)
sets the current boundary ID in assembly
Definition: SubProblem.C:789
virtual void storeSubdomainDelayedCheckMatProp(const std::string &requestor, SubdomainID block_id, const std::string &name)
Adds to a map based on block ids of material properties to validate.
Definition: SubProblem.C:607
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid)
Set the current lower dimensional element.
Definition: SubProblem.C:1380
virtual ~SubProblem()
Definition: SubProblem.C:89
virtual void prepareNeighborShapes(unsigned int var, const THREAD_ID tid)=0
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:92
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:454
virtual void addCachedJacobian(const THREAD_ID tid)
Definition: SubProblem.C:1326
void initial_condition(libMesh::EquationSystems &es, const std::string &system_name)
virtual void residualSetup()
Definition: SubProblem.C:1201
virtual void storeBoundaryZeroMatProp(BoundaryID boundary_id, const MaterialPropertyName &name)
Adds to a map based on boundary ids of material properties for which a zero value can be returned...
Definition: SubProblem.C:601
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
Class that hold the whole problem being solved.
Definition: Problem.h:19
void addFunctor(const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
add a functor to the problem functor container
Definition: SubProblem.h:1375
Wraps non-AD functors such that they can be used in objects that have requested the functor as AD...
bool vectorTagNotZeroed(const TagID tag) const
Checks if a vector tag is in the list of vectors that will not be zeroed when other tagged vectors ar...
Definition: SubProblem.C:155
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid)=0
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::unordered_map< libMesh::GhostingFunctor *, std::vector< std::shared_ptr< libMesh::GhostingFunctor > > > _root_coupling_gf_to_sys_clones
A map from a root coupling ghosting functor, e.g.
Definition: SubProblem.h:1199
virtual void storeBoundaryDelayedCheckMatProp(const std::string &requestor, BoundaryID boundary_id, const std::string &name)
Adds to a map based on boundary ids of material properties to validate.
Definition: SubProblem.C:615
virtual void addJacobianNeighbor(const THREAD_ID tid)=0
void reinitFVFace(const THREAD_ID tid, const FaceInfo &fi)
reinitialize the finite volume assembly data for the provided face and thread
Definition: SubProblem.C:1284
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid)=0
static void selectVectorTagsFromSystem(const SystemBase &system, const std::vector< VectorTag > &input_vector_tags, std::set< TagID > &selected_tags)
Select the vector tags which belong to a specific system.
Definition: SubProblem.C:289
bool _output_functors
Whether to output a list of the functors used and requested (currently only at initialSetup) ...
Definition: SubProblem.h:1164
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual void jacobianSetup()
Definition: SubProblem.C:1209
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
void setCurrentlyComputingResidualAndJacobian(bool currently_computing_residual_and_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:1493
void showFunctors() const
Lists all functors in the problem.
Definition: SubProblem.C:1247
Base class for a system (of equations)
Definition: SystemBase.h:84
const bool & currentlyComputingResidualAndJacobian() const
Returns true if the problem is in the process of computing the residual and the Jacobian.
Definition: SubProblem.h:1487
bool computingNonlinearResid() const
Returns true if the problem is in the process of computing the nonlinear residual.
Definition: SubProblem.h:707
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1167
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid)
Clear the active elemental MooseVariableFieldBase.
Definition: SubProblem.C:466
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1093
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual void markMatPropRequested(const std::string &)
Helper method for adding a material property name to the _material_property_requested set...
Definition: SubProblem.C:724
void clearAllDofIndices()
Clear dof indices from variables in nl and aux systems.
Definition: SubProblem.C:1177
virtual void addResidualLower(const THREAD_ID tid)=0
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
Definition: SubProblem.h:1087
virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const =0
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:1059
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)
reinitialize FE objects on a given neighbor element on a given side at a given set of reference point...
Definition: SubProblem.C:921
virtual void reinitElemFace(const Elem *elem, unsigned int side, const THREAD_ID tid)=0
virtual void addJacobian(const THREAD_ID tid)=0
const bool & currentlyComputingResidual() const
Returns true if the problem is in the process of computing the residual.
Definition: SubProblem.h:720
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
void preparePRefinement()
Prepare DofMap and Assembly classes with our p-refinement information.
Definition: SubProblem.C:1332
void setCurrentlyComputingJacobian(const bool currently_computing_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:689
const std::set< TagID > & getActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:431
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1102
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1055
virtual Real finalNonlinearResidual(const unsigned int nl_sys_num) const
Definition: SubProblem.C:754
virtual void customSetup(const ExecFlagType &exec_type)
Definition: SubProblem.C:1193
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition: SubProblem.h:674
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
Definition: SubProblem.C:665
virtual void ghostGhostedBoundaries()=0
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:409
bool automaticScaling() const
Automatic scaling getter.
Definition: SubProblem.C:1162
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:36
virtual libMesh::EquationSystems & es()=0
std::unordered_map< FEFamily, bool > _family_for_p_refinement
Indicate whether a family is disabled for p-refinement.
Definition: SubProblem.h:1205
virtual void reinitNode(const Node *node, const THREAD_ID tid)=0
virtual LineSearch * getLineSearch()=0
bool havePRefinement() const
Query whether p-refinement has been requested at any point during the simulation. ...
Definition: SubProblem.h:1009
virtual bool isMatPropRequested(const std::string &prop_name) const
Find out if a material property has been requested by any object.
Definition: SubProblem.C:730
virtual bool computingPreSMOResidual(const unsigned int nl_sys_num) const =0
Returns true if the problem is in the process of computing it&#39;s initial residual. ...
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1185
static const std::unordered_set< FEFamily > _default_families_without_p_refinement
The set of variable families by default disable p-refinement.
Definition: SubProblem.h:1207
virtual void clearDiracInfo()=0
Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in...
void removeAlgebraicGhostingFunctor(libMesh::GhostingFunctor &algebraic_gf)
Remove an algebraic ghosting functor from this problem&#39;s DofMaps.
Definition: SubProblem.C:1067
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1044
virtual bool hasNonlocalCoupling() const =0
Whether the simulation has active nonlocal coupling which should be accounted for in the Jacobian...
virtual DiracKernelInfo & diracKernelInfo()
Definition: SubProblem.C:748
virtual void setActiveFEVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:369
virtual TagID getMatrixTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:342
virtual const SystemBase & systemBaseAuxiliary() const =0
Return the auxiliary system object as a base class reference.
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:419
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1111
bool hasFunctorWithType(const std::string &name, const THREAD_ID tid) const
checks whether we have a functor of type T corresponding to name on the thread id tid ...
Definition: SubProblem.h:1320
std::vector< std::multimap< std::string, std::pair< bool, bool > > > _functor_to_request_info
A multimap (for each thread) from unfilled functor requests to whether the requests were for AD funct...
Definition: SubProblem.h:1161
boundary_id_type BoundaryID
virtual unsigned int nLinearIterations(const unsigned int nl_sys_num) const
Definition: SubProblem.C:766
void hasScalingVector(const unsigned int nl_sys_num)
Tells this problem that the assembly associated with the given nonlinear system number involves a sca...
Definition: SubProblem.C:1170
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
virtual std::size_t numSolverSystems() const =0
virtual void storeBoundaryMatPropName(BoundaryID boundary_id, const std::string &name)
Adds the given material property to a storage map based on boundary ids.
Definition: SubProblem.C:589
SubProblem(const InputParameters &parameters)
Definition: SubProblem.C:60
std::unordered_map< libMesh::GhostingFunctor *, std::vector< std::shared_ptr< libMesh::GhostingFunctor > > > _root_alg_gf_to_sys_clones
A map from a root algebraic ghosting functor, e.g.
Definition: SubProblem.h:1192
virtual bool isTransient() const =0
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
Definition: SubProblem.C:311
std::string restrictionSubdomainCheckName(SubdomainID check_id)
Helper functions for checking MaterialProperties.
Definition: SubProblem.C:772
virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const
Definition: SubProblem.C:231
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)
reinitialize FE objects on a given element on a given side at a given set of reference points and the...
Definition: SubProblem.C:882
virtual void onTimestepBegin()=0
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
virtual bool converged(const unsigned int sys_num)
Eventually we want to convert this virtual over to taking a solver system number argument.
Definition: SubProblem.h:113
void markFamilyPRefinement(const InputParameters &params)
Mark a variable family for either disabling or enabling p-refinement with valid parameters of a varia...
Definition: SubProblem.C:1367
virtual bool hasScalarVariable(const std::string &var_name) const =0
Returns a Boolean indicating whether any system contains a variable with the name provided...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
virtual void checkBlockMatProps()
Checks block material properties integrity.
Definition: SubProblem.C:623
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:172
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name)=0
Returns the variable reference for requested MooseVariable which may be in any system.
virtual std::set< dof_id_type > & ghostedElems()
Return the list of elements that should have their DoFs ghosted to this processor.
Definition: SubProblem.h:672
virtual ArrayMooseVariable & getArrayVariable(const THREAD_ID tid, const std::string &var_name)=0
Returns the variable reference for requested ArrayMooseVariable which may be in any system...
virtual void addJacobianLowerD(const THREAD_ID tid)=0
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames(const std::string &prop_name)
Get a vector of block id equivalences that the material property is defined on.
Definition: SubProblem.C:489
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
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...
virtual GeometricSearchData & geomSearchData()=0
std::string demangle(const char *name)
virtual void prepare(const Elem *elem, const THREAD_ID tid)=0
virtual bool hasVariable(const std::string &var_name) const =0
Whether or not this problem has the variable.
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:771
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:425
virtual std::map< TagName, TagID > & getMatrixTags()
Return all matrix tags in the system, where a tag is represented by a map from name to ID...
Definition: SubProblem.h:253
virtual libMesh::System & getSystem(const std::string &var_name)=0
Returns the equation system containing the variable provided.
void showFunctorRequestors() const
Lists all functors and all the objects that requested them.
Definition: SubProblem.C:1259
GeometricSearchType
Used to select groups of geometric search objects to update.
bool doingPRefinement() const
Definition: SubProblem.C:1361
VectorTagType
Definition: MooseTypes.h:978
virtual void cacheJacobianNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1320
std::vector< std::map< std::string, std::unique_ptr< Moose::FunctorAbstract > > > _pbblf_functors
Container to hold PiecewiseByBlockLambdaFunctors.
Definition: SubProblem.h:1147
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
Definition: SubProblem.h:1083
virtual void prepareFace(const Elem *elem, const THREAD_ID tid)=0
virtual void cacheResidual(const THREAD_ID tid)
Definition: SubProblem.C:1291
virtual void timestepSetup()
Definition: SubProblem.C:1185
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition: SubProblem.h:248
virtual unsigned int currentLinearSysNum() const =0
virtual void addResidualNeighbor(const THREAD_ID tid)=0
virtual bool reinitDirac(const Elem *elem, const THREAD_ID tid)=0
Returns true if the Problem has Dirac kernels it needs to compute on elem.
virtual void reinitElemPhys(const Elem *elem, const std::vector< Point > &phys_points_in_elem, const THREAD_ID tid)=0
void registerUnfilledFunctorRequest(T *functor_interface, const std::string &functor_name, const THREAD_ID tid)
Register an unfulfilled functor request.
std::vector< std::set< MooseVariableFieldBase * > > _active_elemental_moose_variables
This is the set of MooseVariableFieldBase that will actually get reinited by a call to reinit(elem) ...
Definition: SubProblem.h:1075
virtual bool nlConverged(const unsigned int nl_sys_num)
Definition: SubProblem.C:716
virtual void reinitElemNeighborAndLowerD(const Elem *elem, unsigned int side, const THREAD_ID tid)=0
bool _default_ghosting
Whether or not to use default libMesh coupling.
Definition: SubProblem.h:1090
virtual std::set< SubdomainID > getMaterialPropertyBlocks(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:473
void addCouplingGhostingFunctor(libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
Add a coupling functor to this problem&#39;s DofMaps.
Definition: SubProblem.C:1056
virtual void setResidualNeighbor(libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
virtual void initialSetup()
Definition: SubProblem.C:1217
bool _have_p_refinement
Whether p-refinement has been requested at any point during the simulation.
Definition: SubProblem.h:1202
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
virtual void needFV()=0
marks this problem as including/needing finite volume functionality.
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1058
CoordinateSystemType
Definition: MooseTypes.h:809
Class for containing MooseEnum item information.
Definition: MooseEnumItem.h:18
virtual std::vector< BoundaryName > getMaterialPropertyBoundaryNames(const std::string &prop_name)
Get a vector of block id equivalences that the material property is defined on.
Definition: SubProblem.C:541
virtual 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)
Definition: SubProblem.h:279
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1177
virtual void updateGeomSearch(GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL)=0
std::vector< unsigned int > _has_active_elemental_moose_variables
Whether or not there is currently a list of active elemental moose variables.
Definition: SubProblem.h:1079
virtual void addGhostedBoundary(BoundaryID boundary_id)=0
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
std::vector< std::vector< VectorTag > > _typed_vector_tags
The vector tags associated with each VectorTagType This is kept separate from _vector_tags for quick ...
Definition: SubProblem.h:1174
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid)=0
virtual void addGhostedElem(dof_id_type elem_id)=0
Will make sure that all dofs connected to elem_id are ghosted to this processor.
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
virtual const SystemBase & systemBaseSolver(const unsigned int sys_num) const =0
Return the solver system object as a base class reference given the system number.
static void selectMatrixTagsFromSystem(const SystemBase &system, const std::map< TagName, TagID > &input_matrix_tags, std::set< TagID > &selected_tags)
Select the matrix tags which belong to a specific system.
Definition: SubProblem.C:300
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const =0
Class for scalar variables (they are different).
virtual void prepareAssembly(const THREAD_ID tid)=0
const Moose::FunctorBase< T > & addPiecewiseByBlockLambdaFunctor(const std::string &name, PolymorphicLambda my_lammy, const std::set< ExecFlagType > &clearance_schedule, const MooseMesh &mesh, const std::set< SubdomainID > &block_ids, const THREAD_ID tid)
Add a functor that has block-wise lambda definitions, e.g.
Definition: SubProblem.h:1338
MooseVariableFE< RealEigenVector > ArrayMooseVariable
Definition: SubProblem.h:47
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:1062
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual unsigned int numVectorTags(const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
The total number of tags, which can be limited to the tag type.
Definition: SubProblem.C:195
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:363
virtual unsigned int linearSysNum(const LinearSystemName &linear_sys_name) const =0
const InputParameters & parameters() const
Get the parameters of the object.
std::vector< std::multimap< std::string, std::tuple< TrueFunctorIs, std::unique_ptr< Moose::FunctorEnvelopeBase >, std::unique_ptr< Moose::FunctorEnvelopeBase > > > > _functors
A container holding pointers to all the functors in our problem.
Definition: SubProblem.h:1144
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1278
virtual void cacheResidualNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1298
virtual bool hasLinearVariable(const std::string &var_name) const
Whether or not this problem has this linear variable.
Definition: SubProblem.C:802
virtual TagName vectorTagName(const TagID tag) const
Retrieve the name associated with a TagID.
Definition: SubProblem.C:221
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
virtual bool hasActiveElementalMooseVariables(const THREAD_ID tid) const
Whether or not a list of active elemental moose variables has been set.
Definition: SubProblem.C:460
static InputParameters validParams()
Definition: SubProblem.C:36
bool _currently_computing_residual
Whether the residual is being evaluated.
Definition: SubProblem.h:1105
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:1070
void setFunctorOutput(bool set_output)
Setter for debug functor output.
Definition: SubProblem.h:924
virtual bool haveDisplaced() const =0
Whether we have a displaced problem in our simulation.
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:684
virtual void computingNonlinearResid(const bool computing_nonlinear_residual)
Set whether or not the problem is in the process of computing the nonlinear residual.
Definition: SubProblem.h:712
virtual bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
Definition: SubProblem.h:731
virtual std::size_t numNonlinearSystems() const =0
virtual bool haveFV() const =0
returns true if this problem includes/needs finite volume functionality.
bool hasFunctor(const std::string &name, const THREAD_ID tid) const
checks whether we have a functor corresponding to name on the thread id tid
Definition: SubProblem.C:1270
const std::map< MooseObjectName, std::set< std::string > > & getConsumedPropertyMap() const
Return the map that tracks the object with consumed material properties.
Definition: SubProblem.C:742
Storage for all of the information pretaining to a vector tag.
Definition: VectorTag.h:17
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1108
MooseVariableFE< Real > MooseVariable
Definition: SubProblem.h:44
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1049
virtual bool solverSystemConverged(const unsigned int sys_num)
Definition: SubProblem.h:100
virtual void prepareFaceShapes(unsigned int var, const THREAD_ID tid)=0
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1052
A class for storing the names of MooseObject by tag and object name.
bool defaultGhosting()
Whether or not the user has requested default ghosting ot be on.
Definition: SubProblem.h:144
virtual const SystemBase & systemBaseLinear(const unsigned int sys_num) const =0
Return the linear system object as a base class reference given the system number.
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
Definition: SubProblem.h:1081
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:161
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
Definition: SubProblem.h:1085
A functor that serves as a placeholder during the simulation setup phase if a functor consumer reques...
virtual void storeSubdomainMatPropName(SubdomainID block_id, const std::string &name)
Adds the given material property to a storage map based on block ids.
Definition: SubProblem.C:583
virtual void cacheJacobian(const THREAD_ID tid)
Definition: SubProblem.C:1312
Abstract definition of a RestartableData value.
void reinitMortarElem(const Elem *elem, const THREAD_ID tid=0)
Reinit a mortar element to obtain a valid JxW.
Definition: SubProblem.C:994
virtual std::size_t numLinearSystems() const =0
virtual bool hasAuxiliaryVariable(const std::string &var_name) const
Whether or not this problem has this auxiliary variable.
Definition: SubProblem.C:811
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328
virtual void setResidual(libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
virtual TagName matrixTagName(TagID tag)
Retrieve the name associated with a TagID.
Definition: SubProblem.C:357
void addNotZeroedVectorTag(const TagID tag)
Adds a vector tag to the list of vectors that will not be zeroed when other tagged vectors are...
Definition: SubProblem.C:149
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, const THREAD_ID tid)=0
virtual unsigned int solverSysNum(const SolverSystemName &solver_sys_name) const =0
unsigned int THREAD_ID
Definition: MooseTypes.h:209
uint8_t dof_id_type
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1099
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, const THREAD_ID tid)=0
virtual unsigned int nlSysNum(const NonlinearSystemName &nl_sys_name) const =0