https://mooseframework.inl.gov
SubProblem.C
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 #include "SubProblem.h"
11 #include "Factory.h"
12 #include "MooseMesh.h"
13 #include "Conversion.h"
14 #include "Function.h"
15 #include "MooseApp.h"
16 #include "MooseVariableFE.h"
17 #include "MooseArray.h"
18 #include "Assembly.h"
19 #include "MooseObjectName.h"
20 #include "RelationshipManager.h"
21 #include "MooseUtils.h"
22 #include "DisplacedSystem.h"
23 #include "NonlinearSystemBase.h"
24 #include "LinearSystem.h"
25 
26 #include "libmesh/equation_systems.h"
27 #include "libmesh/system.h"
28 #include "libmesh/dof_map.h"
29 #include "libmesh/string_to_enum.h"
30 
31 #include <regex>
32 
33 using namespace libMesh;
34 
37 {
39 
40  params.addParam<bool>(
41  "default_ghosting",
42  false,
43  "Whether or not to use libMesh's default amount of algebraic and geometric ghosting");
44 
45  params.addParamNamesToGroup("default_ghosting", "Advanced");
46 
47  return params;
48 }
49 
50 const std::unordered_set<FEFamily> SubProblem::_default_families_without_p_refinement = {
58 
59 // SubProblem /////
61  : Problem(parameters),
62  _factory(_app.getFactory()),
63  _default_ghosting(getParam<bool>("default_ghosting")),
64  _currently_computing_jacobian(false),
65  _currently_computing_residual_and_jacobian(false),
66  _computing_nonlinear_residual(false),
67  _currently_computing_residual(false),
68  _safe_access_tagged_matrices(false),
69  _safe_access_tagged_vectors(false),
70  _have_ad_objects(false),
71  _show_functors(false),
72  _show_chain_control_data(false),
73  _typed_vector_tags(2),
74  _have_p_refinement(false)
75 {
76  unsigned int n_threads = libMesh::n_threads();
79 
84 
85  _functors.resize(n_threads);
86  _pbblf_functors.resize(n_threads);
88 }
89 
91 
92 TagID
93 SubProblem::addVectorTag(const TagName & tag_name,
94  const Moose::VectorTagType type /* = Moose::VECTOR_TAG_RESIDUAL */)
95 {
97  mooseError("Vector tag type cannot be VECTOR_TAG_ANY");
98 
99  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
100 
101  // First, see if the tag exists already
102  for (const auto & vector_tag : _vector_tags)
103  {
104  mooseAssert(_vector_tags[vector_tag._id] == vector_tag, "Vector tags index mismatch");
105  if (vector_tag._name == tag_name_upper)
106  {
107  if (vector_tag._type != type)
108  mooseError("While attempting to add vector tag with name '",
109  tag_name_upper,
110  "' and type ",
111  type,
112  ",\na tag with the same name but type ",
113  vector_tag._type,
114  " was found.\n\nA tag can only exist with one type.");
115 
116  return vector_tag._id;
117  }
118  }
119 
120  // Doesn't exist - create it
121  const TagID new_tag_id = _vector_tags.size();
122  const TagTypeID new_tag_type_id = _typed_vector_tags[type].size();
123  // Primary storage for all tags where the index in the vector == the tag ID
124  _vector_tags.emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
125  // Secondary storage for each type so that we can have quick access to all tags of a type
126  _typed_vector_tags[type].emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
127  // Name map storage for quick name access
128  _vector_tags_name_map.emplace(tag_name_upper, new_tag_id);
129 
130  // Make sure that _vector_tags, _typed_vector_tags, and _vector_tags_name_map are sane
132 
133  return new_tag_id;
134 }
135 
136 bool
137 SubProblem::vectorTagExists(const TagName & tag_name) const
138 {
139  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
140 
141  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
142  for (const auto & vector_tag : _vector_tags)
143  if (vector_tag._name == tag_name_upper)
144  return true;
145 
146  return false;
147 }
148 
149 void
151 {
152  _not_zeroed_tagged_vectors.insert(tag);
153 }
154 
155 bool
157 {
158  return _not_zeroed_tagged_vectors.count(tag);
159 }
160 
161 const VectorTag &
162 SubProblem::getVectorTag(const TagID tag_id) const
163 {
164  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
165 
166  if (!vectorTagExists(tag_id))
167  mooseError("Vector tag with ID ", tag_id, " does not exist");
168 
169  return _vector_tags[tag_id];
170 }
171 
172 std::vector<VectorTag>
173 SubProblem::getVectorTags(const std::set<TagID> & tag_ids) const
174 {
175  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
176 
177  std::vector<VectorTag> tags;
178  tags.reserve(tag_ids.size());
179  for (const auto & tag_id : tag_ids)
180  tags.push_back(getVectorTag(tag_id));
181  return tags;
182 }
183 
184 const std::vector<VectorTag> &
185 SubProblem::getVectorTags(const Moose::VectorTagType type /* = Moose::VECTOR_TAG_ANY */) const
186 {
187  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
188 
190  return _vector_tags;
191  else
192  return _typed_vector_tags[type];
193 }
194 
195 unsigned int
196 SubProblem::numVectorTags(const Moose::VectorTagType type /* = Moose::VECTOR_TAG_ANY */) const
197 {
198  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
199 
200  return getVectorTags(type).size();
201 }
202 
203 TagID
204 SubProblem::getVectorTagID(const TagName & tag_name) const
205 {
206  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
207 
208  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
209  const auto search = _vector_tags_name_map.find(tag_name_upper);
210  if (search != _vector_tags_name_map.end())
211  return search->second;
212 
213  std::string message =
214  tag_name_upper == "TIME"
215  ? ".\n\nThis may occur if "
216  "you have a TimeKernel in your problem but did not specify a transient executioner."
217  : "";
218  mooseError("Vector tag '", tag_name_upper, "' does not exist", message);
219 }
220 
221 TagName
222 SubProblem::vectorTagName(const TagID tag_id) const
223 {
224  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
225  if (!vectorTagExists(tag_id))
226  mooseError("Vector tag with ID ", tag_id, " does not exist");
227 
228  return _vector_tags[tag_id]._name;
229 }
230 
232 SubProblem::vectorTagType(const TagID tag_id) const
233 {
234  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
235  if (!vectorTagExists(tag_id))
236  mooseError("Vector tag with ID ", tag_id, " does not exist");
237 
238  return _vector_tags[tag_id]._type;
239 }
240 
241 bool
243 {
244  for (TagID tag_id = 0; tag_id < _vector_tags.size(); ++tag_id)
245  {
246  const auto & vector_tag = _vector_tags[tag_id];
247 
248  if (vector_tag._id != tag_id)
249  mooseError("Vector tag ", vector_tag._id, " id mismatch in _vector_tags");
250  if (vector_tag._type == Moose::VECTOR_TAG_ANY)
251  mooseError("Vector tag '", vector_tag._name, "' has type VECTOR_TAG_ANY");
252 
253  const auto search = _vector_tags_name_map.find(vector_tag._name);
254  if (search == _vector_tags_name_map.end())
255  mooseError("Vector tag ", vector_tag._id, " is not in _vector_tags_name_map");
256  else if (search->second != tag_id)
257  mooseError("Vector tag ", vector_tag._id, " has incorrect id in _vector_tags_name_map");
258 
259  unsigned int found_in_type = 0;
260  for (TagTypeID tag_type_id = 0; tag_type_id < _typed_vector_tags[vector_tag._type].size();
261  ++tag_type_id)
262  {
263  const auto & vector_tag_type = _typed_vector_tags[vector_tag._type][tag_type_id];
264  if (vector_tag_type == vector_tag)
265  {
266  ++found_in_type;
267  if (vector_tag_type._type_id != tag_type_id)
268  mooseError("Type ID for Vector tag ", tag_id, " is incorrect");
269  }
270  }
271 
272  if (found_in_type == 0)
273  mooseError("Vector tag ", tag_id, " not found in _typed_vector_tags");
274  if (found_in_type > 1)
275  mooseError("Vector tag ", tag_id, " found multiple times in _typed_vector_tags");
276  }
277 
278  unsigned int num_typed_vector_tags = 0;
279  for (const auto & typed_vector_tags : _typed_vector_tags)
280  num_typed_vector_tags += typed_vector_tags.size();
281  if (num_typed_vector_tags != _vector_tags.size())
282  mooseError("Size mismatch between _vector_tags and _typed_vector_tags");
283  if (_vector_tags_name_map.size() != _vector_tags.size())
284  mooseError("Size mismatch between _vector_tags and _vector_tags_name_map");
285 
286  return true;
287 }
288 
289 void
291  const std::vector<VectorTag> & input_vector_tags,
292  std::set<TagID> & selected_tags)
293 {
294  selected_tags.clear();
295  for (const auto & vector_tag : input_vector_tags)
296  if (system.hasVector(vector_tag._id))
297  selected_tags.insert(vector_tag._id);
298 }
299 
300 void
302  const std::map<TagName, TagID> & input_matrix_tags,
303  std::set<TagID> & selected_tags)
304 {
305  selected_tags.clear();
306  for (const auto & matrix_tag_pair : input_matrix_tags)
307  if (system.hasMatrix(matrix_tag_pair.second))
308  selected_tags.insert(matrix_tag_pair.second);
309 }
310 
311 TagID
312 SubProblem::addMatrixTag(TagName tag_name)
313 {
314  auto tag_name_upper = MooseUtils::toUpper(tag_name);
315  auto existing_tag = _matrix_tag_name_to_tag_id.find(tag_name_upper);
316  if (existing_tag == _matrix_tag_name_to_tag_id.end())
317  {
318  auto tag_id = _matrix_tag_name_to_tag_id.size();
319 
320  _matrix_tag_name_to_tag_id[tag_name_upper] = tag_id;
321 
322  _matrix_tag_id_to_tag_name[tag_id] = tag_name_upper;
323  }
324 
325  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
326 }
327 
328 bool
329 SubProblem::matrixTagExists(const TagName & tag_name) const
330 {
331  auto tag_name_upper = MooseUtils::toUpper(tag_name);
332 
333  return _matrix_tag_name_to_tag_id.find(tag_name_upper) != _matrix_tag_name_to_tag_id.end();
334 }
335 
336 bool
338 {
339  return _matrix_tag_id_to_tag_name.find(tag_id) != _matrix_tag_id_to_tag_name.end();
340 }
341 
342 TagID
343 SubProblem::getMatrixTagID(const TagName & tag_name) const
344 {
345  auto tag_name_upper = MooseUtils::toUpper(tag_name);
346 
347  if (!matrixTagExists(tag_name))
348  mooseError("Matrix tag: ",
349  tag_name,
350  " does not exist. ",
351  "If this is a TimeKernel then this may have happened because you didn't "
352  "specify a Transient Executioner.");
353 
354  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
355 }
356 
357 TagName
359 {
360  return _matrix_tag_id_to_tag_name[tag];
361 }
362 
363 void
365 {
367 }
368 
369 void
371 {
373  for (const auto sys_num : make_range(numSolverSystems()))
376 }
377 
378 void
380 {
382 }
383 
384 void
386 {
388 }
389 
390 const std::set<TagID> &
392 {
394 }
395 
396 const std::set<TagID> &
398 {
400 }
401 
402 void
404  const THREAD_ID tid)
405 {
407 }
408 
409 void
411  const THREAD_ID tid)
412 {
414  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
417 }
418 
419 void
421 {
423 }
424 
425 void
427 {
429 }
430 
431 const std::set<TagID> &
433 {
435 }
436 
437 const std::set<TagID> &
439 {
441 }
442 
443 void
444 SubProblem::setActiveElementalMooseVariables(const std::set<MooseVariableFEBase *> & moose_vars,
445  const THREAD_ID tid)
446 {
447  if (!moose_vars.empty())
448  {
450  _active_elemental_moose_variables[tid] = moose_vars;
451  }
452 }
453 
454 const std::set<MooseVariableFEBase *> &
456 {
458 }
459 
460 bool
462 {
464 }
465 
466 void
468 {
471 }
472 
473 std::set<SubdomainID>
474 SubProblem::getMaterialPropertyBlocks(const std::string & prop_name)
475 {
476  std::set<SubdomainID> blocks;
477 
478  for (const auto & it : _map_block_material_props)
479  {
480  const std::set<std::string> & prop_names = it.second;
481  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
482  if (name_it != prop_names.end())
483  blocks.insert(it.first);
484  }
485 
486  return blocks;
487 }
488 
489 std::vector<SubdomainName>
490 SubProblem::getMaterialPropertyBlockNames(const std::string & prop_name)
491 {
492  std::set<SubdomainID> blocks = getMaterialPropertyBlocks(prop_name);
493  std::vector<SubdomainName> block_names;
494  block_names.reserve(blocks.size());
495  for (const auto & block_id : blocks)
496  {
497  SubdomainName name;
498  name = mesh().getMesh().subdomain_name(block_id);
499  if (name.empty())
500  {
501  std::ostringstream oss;
502  oss << block_id;
503  name = oss.str();
504  }
505  block_names.push_back(name);
506  }
507 
508  return block_names;
509 }
510 
511 bool
512 SubProblem::hasBlockMaterialProperty(SubdomainID bid, const std::string & prop_name)
513 {
514  auto it = _map_block_material_props.find(bid);
515  if (it == _map_block_material_props.end())
516  return false;
517 
518  if (it->second.count(prop_name) > 0)
519  return true;
520  else
521  return false;
522 }
523 
524 // TODO: remove code duplication by templating
525 std::set<BoundaryID>
526 SubProblem::getMaterialPropertyBoundaryIDs(const std::string & prop_name)
527 {
528  std::set<BoundaryID> boundaries;
529 
530  for (const auto & it : _map_boundary_material_props)
531  {
532  const std::set<std::string> & prop_names = it.second;
533  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
534  if (name_it != prop_names.end())
535  boundaries.insert(it.first);
536  }
537 
538  return boundaries;
539 }
540 
541 std::vector<BoundaryName>
542 SubProblem::getMaterialPropertyBoundaryNames(const std::string & prop_name)
543 {
544  std::set<BoundaryID> boundaries = getMaterialPropertyBoundaryIDs(prop_name);
545  std::vector<BoundaryName> boundary_names;
546  boundary_names.reserve(boundaries.size());
547  const BoundaryInfo & boundary_info = mesh().getMesh().get_boundary_info();
548 
549  for (const auto & bnd_id : boundaries)
550  {
551  BoundaryName name;
552  if (bnd_id == Moose::ANY_BOUNDARY_ID)
553  name = "ANY_BOUNDARY_ID";
554  else
555  {
556  name = boundary_info.get_sideset_name(bnd_id);
557  if (name.empty())
558  {
559  std::ostringstream oss;
560  oss << bnd_id;
561  name = oss.str();
562  }
563  }
564  boundary_names.push_back(name);
565  }
566 
567  return boundary_names;
568 }
569 
570 bool
571 SubProblem::hasBoundaryMaterialProperty(BoundaryID bid, const std::string & prop_name)
572 {
573  auto it = _map_boundary_material_props.find(bid);
574  if (it == _map_boundary_material_props.end())
575  return false;
576 
577  if (it->second.count(prop_name) > 0)
578  return true;
579  else
580  return false;
581 }
582 
583 void
584 SubProblem::storeSubdomainMatPropName(SubdomainID block_id, const std::string & name)
585 {
586  _map_block_material_props[block_id].insert(name);
587 }
588 
589 void
590 SubProblem::storeBoundaryMatPropName(BoundaryID boundary_id, const std::string & name)
591 {
592  _map_boundary_material_props[boundary_id].insert(name);
593 }
594 
595 void
596 SubProblem::storeSubdomainZeroMatProp(SubdomainID block_id, const MaterialPropertyName & name)
597 {
598  _zero_block_material_props[block_id].insert(name);
599 }
600 
601 void
602 SubProblem::storeBoundaryZeroMatProp(BoundaryID boundary_id, const MaterialPropertyName & name)
603 {
604  _zero_boundary_material_props[boundary_id].insert(name);
605 }
606 
607 void
608 SubProblem::storeSubdomainDelayedCheckMatProp(const std::string & requestor,
609  SubdomainID block_id,
610  const std::string & name)
611 {
612  _map_block_material_props_check[block_id].insert(std::make_pair(requestor, name));
613 }
614 
615 void
616 SubProblem::storeBoundaryDelayedCheckMatProp(const std::string & requestor,
617  BoundaryID boundary_id,
618  const std::string & name)
619 {
620  _map_boundary_material_props_check[boundary_id].insert(std::make_pair(requestor, name));
621 }
622 
623 void
625 {
626  // Variable for storing all available blocks/boundaries from the mesh
627  std::set<SubdomainID> all_ids(mesh().meshSubdomains());
628 
629  std::stringstream errors;
630 
631  // Loop through the properties to check
632  for (const auto & check_it : _map_block_material_props_check)
633  {
634  // The current id for the property being checked (BoundaryID || BlockID)
635  SubdomainID check_id = check_it.first;
636 
637  std::set<SubdomainID> check_ids = {check_id};
638 
639  // Loop through all the block/boundary ids
640  for (const auto & id : check_ids)
641  {
642  // Loop through all the stored properties
643  for (const auto & prop_it : check_it.second)
644  {
645  // Produce an error if the material property is not defined on the current block/boundary
646  // and any block/boundary
647  // and not is not a zero material property.
648  if (_map_block_material_props[id].count(prop_it.second) == 0 &&
649  _zero_block_material_props[id].count(prop_it.second) == 0)
650  {
651  std::string check_name = restrictionSubdomainCheckName(id);
652  if (check_name.empty())
653  check_name = std::to_string(id);
654  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
655  << "' is not defined on block " << check_name << "\n";
656  }
657  }
658  }
659  }
660 
661  if (!errors.str().empty())
662  mooseError(errors.str());
663 }
664 
665 void
667 {
668  // Variable for storing the value for ANY_BOUNDARY_ID
670 
671  // Variable for storing all available blocks/boundaries from the mesh
672  std::set<BoundaryID> all_ids(mesh().getBoundaryIDs());
673 
674  std::stringstream errors;
675 
676  // Loop through the properties to check
677  for (const auto & check_it : _map_boundary_material_props_check)
678  {
679  // The current id for the property being checked (BoundaryID || BlockID)
680  BoundaryID check_id = check_it.first;
681 
682  // In the case when the material being checked has an ID is set to ANY, then loop through all
683  // the possible ids and verify that the material property is defined.
684  std::set<BoundaryID> check_ids{check_id};
685  if (check_id == any_id)
686  check_ids = all_ids;
687 
688  // Loop through all the block/boundary ids
689  for (const auto & id : check_ids)
690  {
691  // Loop through all the stored properties
692  for (const auto & prop_it : check_it.second)
693  {
694  // Produce an error if the material property is not defined on the current block/boundary
695  // and any block/boundary
696  // and not is not a zero material property.
697  if (_map_boundary_material_props[id].count(prop_it.second) == 0 &&
698  _map_boundary_material_props[any_id].count(prop_it.second) == 0 &&
699  _zero_boundary_material_props[id].count(prop_it.second) == 0 &&
700  _zero_boundary_material_props[any_id].count(prop_it.second) == 0)
701  {
702  std::string check_name = restrictionBoundaryCheckName(id);
703  if (check_name.empty())
704  check_name = std::to_string(id);
705  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
706  << "' is not defined on boundary " << check_name << "\n";
707  }
708  }
709  }
710  }
711 
712  if (!errors.str().empty())
713  mooseError(errors.str());
714 }
715 
716 bool
717 SubProblem::nlConverged(const unsigned int nl_sys_num)
718 {
719  mooseAssert(nl_sys_num < numNonlinearSystems(),
720  "The nonlinear system number is higher than the number of systems we have!");
721  return solverSystemConverged(nl_sys_num);
722 }
723 
724 void
725 SubProblem::markMatPropRequested(const std::string & prop_name)
726 {
727  _material_property_requested.insert(prop_name);
728 }
729 
730 bool
731 SubProblem::isMatPropRequested(const std::string & prop_name) const
732 {
733  return _material_property_requested.find(prop_name) != _material_property_requested.end();
734 }
735 
736 void
737 SubProblem::addConsumedPropertyName(const MooseObjectName & obj_name, const std::string & prop_name)
738 {
739  _consumed_material_properties[obj_name].insert(prop_name);
740 }
741 
742 const std::map<MooseObjectName, std::set<std::string>> &
744 {
746 }
747 
750 {
751  return _dirac_kernel_info;
752 }
753 
754 Real
756 {
757  return 0;
758 }
759 
760 unsigned int
762 {
763  return 0;
764 }
765 
766 unsigned int
767 SubProblem::nLinearIterations(unsigned int) const
768 {
769  return 0;
770 }
771 
772 std::string
774 {
775  // TODO: Put a better a interface in MOOSE
776  std::map<subdomain_id_type, std::string> & name_map = mesh().getMesh().set_subdomain_name_map();
777  std::map<subdomain_id_type, std::string>::const_iterator pos = name_map.find(check_id);
778  if (pos != name_map.end())
779  return pos->second;
780  return "";
781 }
782 
783 std::string
785 {
786  return mesh().getMesh().get_boundary_info().sideset_name(check_id);
787 }
788 
789 void
791 {
792  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
793  assembly(tid, nl_sys_num).setCurrentBoundaryID(bid);
794 }
795 
796 unsigned int
798 {
799  return mesh().getAxisymmetricRadialCoord();
800 }
801 
802 bool
803 SubProblem::hasLinearVariable(const std::string & var_name) const
804 {
805  for (const auto i : make_range(numLinearSystems()))
806  if (systemBaseLinear(i).hasVariable(var_name))
807  return true;
808  return false;
809 }
810 
811 bool
812 SubProblem::hasAuxiliaryVariable(const std::string & var_name) const
813 {
814  return systemBaseAuxiliary().hasVariable(var_name);
815 }
816 
817 template <typename T>
820  const std::string & var_name,
821  Moose::VarKindType expected_var_type,
822  Moose::VarFieldType expected_var_field_type,
823  const std::vector<T> & systems,
824  const SystemBase & aux) const
825 {
826  // Eventual return value
827  MooseVariableFEBase * var = nullptr;
828 
829  const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
830 
831  // First check that the variable is found on the expected system.
832  if (expected_var_type == Moose::VarKindType::VAR_ANY)
833  {
834  if (var_in_sys)
835  var = &(systems[sys_num]->getVariable(tid, var_name));
836  else if (aux.hasVariable(var_name))
837  var = &(aux.getVariable(tid, var_name));
838  else
839  mooseError("Unknown variable " + var_name);
840  }
841  else if (expected_var_type == Moose::VarKindType::VAR_SOLVER && var_in_sys &&
842  systems[sys_num]->hasVariable(var_name))
843  var = &(systems[sys_num]->getVariable(tid, var_name));
844  else if (expected_var_type == Moose::VarKindType::VAR_AUXILIARY && aux.hasVariable(var_name))
845  var = &(aux.getVariable(tid, var_name));
846  else
847  {
848  std::string expected_var_type_string =
849  (expected_var_type == Moose::VarKindType::VAR_SOLVER ? "nonlinear" : "auxiliary");
850  mooseError("No ",
851  expected_var_type_string,
852  " variable named ",
853  var_name,
854  " found. "
855  "Did you specify an auxiliary variable when you meant to specify a nonlinear "
856  "variable (or vice-versa)?");
857  }
858 
859  // Now make sure the var found has the expected field type.
860  if ((expected_var_field_type == Moose::VarFieldType::VAR_FIELD_ANY) ||
861  (expected_var_field_type == var->fieldType()))
862  return *var;
863  else
864  {
865  std::string expected_var_field_type_string =
866  MooseUtils::toLower(Moose::stringify(expected_var_field_type));
867  std::string var_field_type_string = MooseUtils::toLower(Moose::stringify(var->fieldType()));
868 
869  mooseError("No ",
870  expected_var_field_type_string,
871  " variable named ",
872  var_name,
873  " found. "
874  "Did you specify a ",
875  var_field_type_string,
876  " variable when you meant to specify a ",
877  expected_var_field_type_string,
878  " variable?");
879  }
880 }
881 
882 void
884  unsigned int side,
885  Real tolerance,
886  const std::vector<Point> * const pts,
887  const std::vector<Real> * const weights,
888  const THREAD_ID tid)
889 {
890  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
891  {
892  // - Set our _current_elem for proper dof index getting in the moose variables
893  // - Reinitialize all of our FE objects so we have current phi, dphi, etc. data
894  // Note that our number of shape functions will reflect the number of shapes associated with the
895  // interior element while the number of quadrature points will be determined by the passed pts
896  // parameter (which presumably will have a number of pts reflective of a facial quadrature rule)
897  assembly(tid, nl_sys_num).reinitElemFaceRef(elem, side, tolerance, pts, weights);
898 
899  auto & nl = systemBaseNonlinear(nl_sys_num);
900 
901  // Actually get the dof indices in the moose variables
902  nl.prepare(tid);
903 
904  // Let's finally compute our variable values!
905  nl.reinitElemFace(elem, side, tid);
906  }
907 
908  // do same for aux as for nl
910  systemBaseAuxiliary().reinitElemFace(elem, side, tid);
911 
912  // With the dof indices set in the moose variables, now let's properly size
913  // our local residuals/Jacobians
914  auto & current_assembly = assembly(tid, currentNlSysNum());
916  current_assembly.prepareJacobianBlock();
918  current_assembly.prepareResidual();
919 }
920 
921 void
923  unsigned int neighbor_side,
924  Real tolerance,
925  const std::vector<Point> * const pts,
926  const std::vector<Real> * const weights,
927  const THREAD_ID tid)
928 {
929  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
930  {
931  // - Set our _current_neighbor_elem for proper dof index getting in the moose variables
932  // - Reinitialize all of our FE objects so we have current phi, dphi, etc. data
933  // Note that our number of shape functions will reflect the number of shapes associated with the
934  // interior element while the number of quadrature points will be determined by the passed pts
935  // parameter (which presumably will have a number of pts reflective of a facial quadrature rule)
936  assembly(tid, nl_sys_num)
937  .reinitNeighborFaceRef(neighbor_elem, neighbor_side, tolerance, pts, weights);
938 
939  auto & nl = systemBaseNonlinear(nl_sys_num);
940 
941  // Actually get the dof indices in the moose variables
942  nl.prepareNeighbor(tid);
943 
944  // Let's finally compute our variable values!
945  nl.reinitNeighborFace(neighbor_elem, neighbor_side, tid);
946  }
947 
948  // do same for aux as for nl
950  systemBaseAuxiliary().reinitNeighborFace(neighbor_elem, neighbor_side, tid);
951 
952  // With the dof indices set in the moose variables, now let's properly size
953  // our local residuals/Jacobians
955 }
956 
957 void
959  const THREAD_ID tid,
960  const std::vector<Point> * const pts,
961  const std::vector<Real> * const weights)
962 {
963  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
964  {
965  // - Set our _current_lower_d_elem for proper dof index getting in the moose variables
966  // - Reinitialize all of our lower-d FE objects so we have current phi, dphi, etc. data
967  assembly(tid, nl_sys_num).reinitLowerDElem(elem, pts, weights);
968 
969  auto & nl = systemBaseNonlinear(nl_sys_num);
970 
971  // Actually get the dof indices in the moose variables
972  nl.prepareLowerD(tid);
973 
974  // With the dof indices set in the moose variables, now let's properly size
975  // our local residuals/Jacobians
976  assembly(tid, nl_sys_num).prepareLowerD();
977 
978  // Let's finally compute our variable values!
979  nl.reinitLowerD(tid);
980  }
981 
982  // do same for aux as for nl
985 }
986 
987 void
989 {
990  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
991  assembly(tid, nl_sys_num).reinitNeighborLowerDElem(elem);
992 }
993 
994 void
996 {
997  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
998  assembly(tid, nl_sys_num).reinitMortarElem(elem);
999 }
1000 
1001 void
1003 {
1004  EquationSystems & eq = es();
1005  const auto n_sys = eq.n_systems();
1006 
1007  auto pr = _root_alg_gf_to_sys_clones.emplace(
1008  &algebraic_gf, std::vector<std::shared_ptr<GhostingFunctor>>(n_sys - 1));
1009  mooseAssert(pr.second, "We are adding a duplicate algebraic ghosting functor");
1010  auto & clones_vec = pr.first->second;
1011 
1012  for (MooseIndex(n_sys) i = 1; i < n_sys; ++i)
1013  {
1014  DofMap & dof_map = eq.get_system(i).get_dof_map();
1015  std::shared_ptr<GhostingFunctor> clone_alg_gf = algebraic_gf.clone();
1017  ->init(mesh(), *algebraic_gf.get_mesh(), &dof_map);
1018  dof_map.add_algebraic_ghosting_functor(clone_alg_gf, to_mesh);
1019  clones_vec[i - 1] = clone_alg_gf;
1020  }
1021 }
1022 
1023 void
1025 {
1026  EquationSystems & eq = es();
1027  const auto n_sys = eq.n_systems();
1028  if (!n_sys)
1029  return;
1030 
1031  eq.get_system(0).get_dof_map().add_algebraic_ghosting_functor(algebraic_gf, to_mesh);
1032  cloneAlgebraicGhostingFunctor(algebraic_gf, to_mesh);
1033 }
1034 
1035 void
1037 {
1038  const std::size_t num_nl_sys = numNonlinearSystems();
1039 
1040  auto pr = _root_coupling_gf_to_sys_clones.emplace(
1041  &coupling_gf, std::vector<std::shared_ptr<GhostingFunctor>>(num_nl_sys - 1));
1042  mooseAssert(pr.second, "We are adding a duplicate coupling functor");
1043  auto & clones_vec = pr.first->second;
1044 
1045  for (const auto i : make_range(std::size_t(1), num_nl_sys))
1046  {
1047  DofMap & dof_map = systemBaseNonlinear(i).system().get_dof_map();
1048  std::shared_ptr<GhostingFunctor> clone_coupling_gf = coupling_gf.clone();
1050  ->init(mesh(), *coupling_gf.get_mesh(), &dof_map);
1051  dof_map.add_coupling_functor(clone_coupling_gf, to_mesh);
1052  clones_vec[i - 1] = clone_coupling_gf;
1053  }
1054 }
1055 
1056 void
1058 {
1059  const auto num_nl_sys = numNonlinearSystems();
1060  if (!num_nl_sys)
1061  return;
1062 
1063  systemBaseNonlinear(0).system().get_dof_map().add_coupling_functor(coupling_gf, to_mesh);
1064  cloneCouplingGhostingFunctor(coupling_gf, to_mesh);
1065 }
1066 
1067 void
1069 {
1070  EquationSystems & eq = es();
1071  const auto n_sys = eq.n_systems();
1072  DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1073 
1074  const bool found_in_root_sys =
1076  nl_dof_map.algebraic_ghosting_functors_end(),
1077  &algebraic_gf) != nl_dof_map.algebraic_ghosting_functors_end();
1078 
1079 #ifndef NDEBUG
1080  const bool found_in_our_map =
1081  _root_alg_gf_to_sys_clones.find(&algebraic_gf) != _root_alg_gf_to_sys_clones.end();
1082  mooseAssert(found_in_root_sys == found_in_our_map,
1083  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1084  "it in our gf to clones map");
1085 #endif
1086 
1087  if (found_in_root_sys) // libMesh yells if we try to remove
1088  // something that's not there
1089  nl_dof_map.remove_algebraic_ghosting_functor(algebraic_gf);
1090 
1091  auto it = _root_alg_gf_to_sys_clones.find(&algebraic_gf);
1092  if (it == _root_alg_gf_to_sys_clones.end())
1093  return;
1094 
1095  auto & clones_vec = it->second;
1096  mooseAssert((n_sys - 1) == clones_vec.size(),
1097  "The size of the gf clones vector doesn't match the number of systems minus one");
1098  if (clones_vec.empty())
1099  {
1100  mooseAssert(n_sys == 1, "The clones vector should only be empty if there is only one system");
1101  return;
1102  }
1103 
1104  for (const auto i : make_range(n_sys))
1105  eq.get_system(i + 1).get_dof_map().remove_algebraic_ghosting_functor(*clones_vec[i]);
1106 
1107  _root_alg_gf_to_sys_clones.erase(it->first);
1108 }
1109 
1110 void
1112 {
1113  EquationSystems & eq = es();
1114  const auto num_nl_sys = numNonlinearSystems();
1115  if (!num_nl_sys)
1116  return;
1117 
1118  DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1119  const bool found_in_root_sys = std::find(nl_dof_map.coupling_functors_begin(),
1120  nl_dof_map.coupling_functors_end(),
1121  &coupling_gf) != nl_dof_map.coupling_functors_end();
1122 
1123 #ifndef NDEBUG
1124  const bool found_in_our_map =
1126  mooseAssert(found_in_root_sys == found_in_our_map,
1127  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1128  "it in our gf to clones map");
1129 #endif
1130 
1131  if (found_in_root_sys) // libMesh yells if we try to remove
1132  // something that's not there
1133  nl_dof_map.remove_coupling_functor(coupling_gf);
1134 
1135  auto it = _root_coupling_gf_to_sys_clones.find(&coupling_gf);
1136  if (it == _root_coupling_gf_to_sys_clones.end())
1137  return;
1138 
1139  auto & clones_vec = it->second;
1140  mooseAssert((num_nl_sys - 1) == clones_vec.size(),
1141  "The size of the gf clones vector doesn't match the number of systems minus one");
1142  if (clones_vec.empty())
1143  {
1144  mooseAssert(num_nl_sys == 1,
1145  "The clones vector should only be empty if there is only one nonlinear system");
1146  return;
1147  }
1148 
1149  for (const auto i : make_range(num_nl_sys))
1150  eq.get_system(i + 1).get_dof_map().remove_coupling_functor(*clones_vec[i]);
1151 
1152  _root_coupling_gf_to_sys_clones.erase(it->first);
1153 }
1154 
1155 void
1156 SubProblem::automaticScaling(bool automatic_scaling)
1157 {
1158  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1159  systemBaseNonlinear(nl_sys_num).automaticScaling(automatic_scaling);
1160 }
1161 
1162 bool
1164 {
1165  // Currently going to assume that we are applying or not applying automatic scaling consistently
1166  // across nonlinear systems
1168 }
1169 
1170 void
1171 SubProblem::hasScalingVector(const unsigned int nl_sys_num)
1172 {
1173  for (const THREAD_ID tid : make_range(libMesh::n_threads()))
1174  assembly(tid, nl_sys_num).hasScalingVector();
1175 }
1176 
1177 void
1179 {
1180  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1183 }
1184 
1185 void
1187 {
1188  for (auto & map : _pbblf_functors)
1189  for (auto & pr : map)
1190  pr.second->timestepSetup();
1193 }
1194 
1195 void
1197 {
1198  for (auto & map : _pbblf_functors)
1199  for (auto & pr : map)
1200  pr.second->customSetup(exec_type);
1201 }
1202 
1203 void
1205 {
1206  for (auto & map : _pbblf_functors)
1207  for (auto & pr : map)
1208  pr.second->residualSetup();
1209 }
1210 
1211 void
1213 {
1214  for (auto & map : _pbblf_functors)
1215  for (auto & pr : map)
1216  pr.second->jacobianSetup();
1217 }
1218 
1219 void
1221 {
1222  if (_show_functors)
1223  {
1224  showFunctors();
1226  }
1229 
1230  for (const auto & functors : _functors)
1231  for (const auto & [functor_wrapper_name, functor_wrapper] : functors)
1232  {
1233  const auto & [true_functor_type, non_ad_functor, ad_functor] = functor_wrapper;
1234  mooseAssert(non_ad_functor->wrapsNull() == ad_functor->wrapsNull(), "These must agree");
1235  const auto functor_name = removeSubstring(functor_wrapper_name, "wraps_");
1236  if (non_ad_functor->wrapsNull())
1237  mooseError(
1238  "No functor ever provided with name '",
1239  functor_name,
1240  "', which was requested by '",
1241  MooseUtils::join(libmesh_map_find(_functor_to_requestors, functor_wrapper_name), ","),
1242  "'.");
1243  if (true_functor_type == TrueFunctorIs::NONAD ? non_ad_functor->ownsWrappedFunctor()
1244  : ad_functor->ownsWrappedFunctor())
1245  mooseError("Functor envelopes should not own the functors they wrap, but '",
1246  functor_name,
1247  "' is owned by the wrapper. Please open a MOOSE issue for help resolving this.");
1248  }
1249 }
1250 
1251 void
1253 {
1254  _console << "[DBG] Wrapped functors found in Subproblem" << std::endl;
1255  std::string functor_names = "[DBG] ";
1256  for (const auto & functor_pair : _functors[0])
1257  functor_names += std::regex_replace(functor_pair.first, std::regex("wraps_"), "") + " ";
1258  if (functor_names.size())
1259  functor_names.pop_back();
1260  _console << functor_names << std::endl;
1261 }
1262 
1263 void
1265 {
1266  for (const auto & [functor, requestors] : _functor_to_requestors)
1267  {
1268  _console << "[DBG] Requestors for wrapped functor "
1269  << std::regex_replace(functor, std::regex("wraps_"), "") << std::endl;
1270  _console << "[DBG] " << MooseUtils::join(requestors, " ") << std::endl;
1271  }
1272 }
1273 
1274 bool
1275 SubProblem::hasFunctor(const std::string & name, const THREAD_ID tid) const
1276 {
1277  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1278  auto & functors = _functors[tid];
1279  return (functors.find("wraps_" + name) != functors.end());
1280 }
1281 
1284 {
1285  return mesh().getCoordSystem(sid);
1286 }
1287 
1288 void
1290 {
1291  for (const auto nl : make_range(numNonlinearSystems()))
1292  assembly(tid, nl).reinitFVFace(fi);
1293 }
1294 
1295 void
1297 {
1298  assembly(tid, currentNlSysNum())
1300 }
1301 
1302 void
1304 {
1305  assembly(tid, currentNlSysNum())
1307 }
1308 
1309 void
1311 {
1312  assembly(tid, currentNlSysNum())
1314 }
1315 
1316 void
1318 {
1320  if (hasNonlocalCoupling())
1322 }
1323 
1324 void
1326 {
1328 }
1329 
1330 void
1332 {
1334 }
1335 
1336 void
1338 {
1339  std::unordered_set<FEFamily> disable_families;
1340  for (const auto & [family, flag] : _family_for_p_refinement)
1341  if (flag)
1342  disable_families.insert(family);
1343 
1344  for (const auto tid : make_range(libMesh::n_threads()))
1345  for (const auto s : make_range(numNonlinearSystems()))
1346  assembly(tid, s).havePRefinement(disable_families);
1347 
1348  auto & eq = es();
1349  for (const auto family : disable_families)
1350  for (const auto i : make_range(eq.n_systems()))
1351  {
1352  auto & system = eq.get_system(i);
1353  auto & dof_map = system.get_dof_map();
1354  for (const auto vg : make_range(system.n_variable_groups()))
1355  {
1356  const auto & var_group = system.variable_group(vg);
1357  if (var_group.type().family == family)
1358  dof_map.should_p_refine(vg, false);
1359  }
1360  }
1361 
1362  _have_p_refinement = true;
1363 }
1364 
1365 bool
1367 {
1368  return mesh().doingPRefinement();
1369 }
1370 
1371 void
1373 {
1374  auto family = Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"));
1375  bool flag = _default_families_without_p_refinement.count(family);
1376  if (params.isParamValid("disable_p_refinement"))
1377  flag = params.get<bool>("disable_p_refinement");
1378 
1379  auto [it, inserted] = _family_for_p_refinement.emplace(family, flag);
1380  if (!inserted && flag != it->second)
1381  mooseError("'disable_p_refinement' not set consistently for variables in ", family);
1382 }
1383 
1384 void
1385 SubProblem::setCurrentLowerDElem(const Elem * const lower_d_elem, const THREAD_ID tid)
1386 {
1387  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1388  assembly(tid, nl_sys_num).setCurrentLowerDElem(lower_d_elem);
1389 }
1390 
1391 template MooseVariableFEBase &
1393  const std::string & var_name,
1394  Moose::VarKindType expected_var_type,
1395  Moose::VarFieldType expected_var_field_type,
1396  const std::vector<std::shared_ptr<SolverSystem>> & nls,
1397  const SystemBase & aux) const;
1398 template MooseVariableFEBase &
1400  const std::string & var_name,
1401  Moose::VarKindType expected_var_type,
1402  Moose::VarFieldType expected_var_field_type,
1403  const std::vector<std::unique_ptr<DisplacedSystem>> & nls,
1404  const SystemBase & aux) const;
virtual MooseMesh & mesh()=0
virtual void init()=0
virtual void addCachedResidual(const THREAD_ID tid)
Definition: SubProblem.C:1310
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:1036
VarFieldType
Definition: MooseTypes.h:722
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: SubProblem.C:797
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:204
void reinitNeighborLowerDElem(const Elem *elem, const THREAD_ID tid=0)
reinitialize a neighboring lower dimensional element
Definition: SubProblem.C:988
void cacheResidualNeighbor(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Rn of all field variables and appends them to the cached ...
Definition: Assembly.C:3455
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1043
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:385
unsigned int TagTypeID
Definition: MooseTypes.h:211
virtual unsigned int nNonlinearIterations(const unsigned int nl_sys_num) const
Definition: SubProblem.C:761
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:379
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
Definition: MooseUtils.h:144
virtual bool hasBoundaryMaterialProperty(BoundaryID boundary_id, const std::string &prop_name)
Check if a material property is defined on a block.
Definition: SubProblem.C:571
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:30
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:403
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:1073
The DiracKernelInfo object is a place where all the Dirac points added by different DiracKernels are ...
const std::set< TagID > & getActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid) const
Definition: SubProblem.C:438
void removeCouplingGhostingFunctor(libMesh::GhostingFunctor &coupling_gf)
Remove a coupling ghosting functor from this problem&#39;s DofMaps.
Definition: SubProblem.C:1111
unsigned int n_systems() const
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:526
unsigned int n_threads()
void setCurrentBoundaryID(BoundaryID i)
set the current boundary ID
Definition: Assembly.h:434
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:958
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:924
void addAlgebraicGhostingFunctor(libMesh::GhostingFunctor &algebraic_gf, bool to_mesh=true)
Add an algebraic ghosting functor to this problem&#39;s DofMaps.
Definition: SubProblem.C:1024
unsigned int TagID
Definition: MooseTypes.h:210
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:596
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:512
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:391
std::string restrictionBoundaryCheckName(BoundaryID check_id)
Definition: SubProblem.C:784
void reinitNeighborLowerDElem(const Elem *elem)
reinitialize a neighboring lower dimensional element
Definition: Assembly.C:2381
char ** blocks
void setCurrentLowerDElem(const Elem *const lower_d_elem)
Set the current lower dimensional element.
Definition: Assembly.h:3226
static InputParameters validParams()
Definition: Problem.C:15
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:1002
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.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const std::set< TagID > & getActiveFEVariableCoupleableVectorTags(const THREAD_ID tid) const
Definition: SubProblem.C:397
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:1119
virtual unsigned int currentNlSysNum() const =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:737
const MeshBase * get_mesh() const
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:1159
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:444
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid)
sets the current boundary ID in assembly
Definition: SubProblem.C:790
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:608
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid)
Set the current lower dimensional element.
Definition: SubProblem.C:1385
virtual void reinitLowerD(THREAD_ID tid)
Compute the values of the variables on the lower dimensional element.
Definition: SystemBase.C:390
virtual ~SubProblem()
Definition: SubProblem.C:90
GhostingFunctorIterator algebraic_ghosting_functors_begin() const
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:93
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:455
virtual void addCachedJacobian(const THREAD_ID tid)
Definition: SubProblem.C:1331
virtual void residualSetup()
Definition: SubProblem.C:1204
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:602
Class that hold the whole problem being solved.
Definition: Problem.h:19
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
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:156
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:1204
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:616
void prepareNeighbor()
Definition: Assembly.C:2799
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:360
void reinitFVFace(const THREAD_ID tid, const FaceInfo &fi)
reinitialize the finite volume assembly data for the provided face and thread
Definition: SubProblem.C:1289
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
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:290
This class provides an interface for common operations on field variables of both FE and FV types wit...
GhostingFunctorIterator algebraic_ghosting_functors_end() const
virtual void jacobianSetup()
Definition: SubProblem.C:1212
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
void setActiveVariableCoupleableVectorTags(const std::set< TagID > &vtags, THREAD_ID tid)
Set the active vector tags for the variables.
Definition: SystemBase.C:1620
void showFunctors() const
Lists all functors in the problem.
Definition: SubProblem.C:1252
Base class for a system (of equations)
Definition: SystemBase.h:84
const BoundaryInfo & get_boundary_info() const
const bool & currentlyComputingResidualAndJacobian() const
Returns true if the problem is in the process of computing the residual and the Jacobian.
Definition: SubProblem.h:1492
const T_sys & get_system(std::string_view name) const
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1172
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid)
Clear the active elemental MooseVariableFieldBase.
Definition: SubProblem.C:467
void add_coupling_functor(GhostingFunctor &coupling_functor, bool to_mesh=true)
virtual void markMatPropRequested(const std::string &)
Helper method for adding a material property name to the _material_property_requested set...
Definition: SubProblem.C:725
void clearAllDofIndices()
Clear dof indices from variables in nl and aux systems.
Definition: SubProblem.C:1178
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
Definition: SubProblem.h:1089
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:1061
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:922
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4060
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:242
void addCachedResiduals(GlobalDataKey, const std::vector< VectorTag > &tags)
Pushes all cached residuals to the global residual vectors associated with each tag.
Definition: Assembly.C:3485
void preparePRefinement()
Prepare DofMap and Assembly classes with our p-refinement information.
Definition: SubProblem.C:1337
const std::set< TagID > & getActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:432
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1057
std::string toUpper(std::string name)
Convert supplied string to upper case.
virtual Real finalNonlinearResidual(const unsigned int nl_sys_num) const
Definition: SubProblem.C:755
void setActiveScalarVariableCoupleableVectorTags(const std::set< TagID > &vtags, THREAD_ID tid)
Set the active vector tags for the scalar variables.
Definition: SystemBase.C:1626
virtual void customSetup(const ExecFlagType &exec_type)
Definition: SubProblem.C:1196
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
Definition: SubProblem.C:666
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:410
void prepareLowerD()
Prepare the Jacobians and residuals for a lower dimensional element.
Definition: Assembly.C:2838
bool automaticScaling() const
Automatic scaling getter.
Definition: SubProblem.C:1163
void reinitLowerDElem(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
Reinitialize FE data for a lower dimenesional element with a given set of reference points...
Definition: Assembly.C:2288
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
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::unordered_map< FEFamily, bool > _family_for_p_refinement
Indicate whether a family is disabled for p-refinement.
Definition: SubProblem.h:1210
virtual bool isMatPropRequested(const std::string &prop_name) const
Find out if a material property has been requested by any object.
Definition: SubProblem.C:731
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1190
bool automaticScaling() const
Getter for whether we are performing automatic scaling.
Definition: SystemBase.h:122
static const std::unordered_set< FEFamily > _default_families_without_p_refinement
The set of variable families by default disable p-refinement.
Definition: SubProblem.h:1212
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3469
void removeAlgebraicGhostingFunctor(libMesh::GhostingFunctor &algebraic_gf)
Remove an algebraic ghosting functor from this problem&#39;s DofMaps.
Definition: SubProblem.C:1068
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1046
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:749
virtual void setActiveFEVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:370
virtual TagID getMatrixTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:343
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:420
void cacheJacobianNeighbor(GlobalDataKey)
Takes the values that are currently in the neighbor Dense Matrices and appends them to the cached val...
Definition: Assembly.C:4112
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: MooseMesh.C:4315
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:1163
boundary_id_type BoundaryID
virtual unsigned int nLinearIterations(const unsigned int nl_sys_num) const
Definition: SubProblem.C:767
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:1171
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:715
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:590
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:1197
virtual void prepareNeighbor(THREAD_ID tid)
Prepare the system for use.
Definition: SystemBase.C:324
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
Definition: SubProblem.C:312
std::string restrictionSubdomainCheckName(SubdomainID check_id)
Helper functions for checking MaterialProperties.
Definition: SubProblem.C:773
virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const
Definition: SubProblem.C:232
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:883
void cacheResidual(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Re of all field variables and appends them to the cached ...
Definition: Assembly.C:3404
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:1372
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
virtual void checkBlockMatProps()
Checks block material properties integrity.
Definition: SubProblem.C:624
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
bool _show_functors
Whether to output a list of the functors used and requested (currently only at initialSetup) ...
Definition: SubProblem.h:1166
virtual void reinitNeighborFace(const Elem *elem, unsigned int side, THREAD_ID tid)
Compute the values of the variables at all the current points.
Definition: SystemBase.C:374
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:173
std::string outputChainControlMap() const
Output the chain control map to a string.
std::vector< BoundaryID > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown, const std::set< BoundaryID > &mesh_boundary_ids)
Gets the boundary IDs with their names.
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:490
std::string & subdomain_name(subdomain_id_type id)
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
std::string toLower(std::string name)
Convert supplied string to lower case.
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Get the coordinate system type, e.g.
Definition: MooseMesh.C:4196
virtual bool hasVariable(const std::string &var_name) const =0
Whether or not this problem has the variable.
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:426
void showFunctorRequestors() const
Lists all functors and all the objects that requested them.
Definition: SubProblem.C:1264
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:851
bool doingPRefinement() const
Definition: SubProblem.C:1366
void reinitMortarElem(const Elem *elem)
reinitialize a mortar segment mesh element in order to get a proper JxW
Definition: Assembly.C:2402
std::string & sideset_name(boundary_id_type id)
VectorTagType
Definition: MooseTypes.h:979
virtual void cacheJacobianNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1325
std::vector< std::map< std::string, std::unique_ptr< Moose::FunctorAbstract > > > _pbblf_functors
Container to hold PiecewiseByBlockLambdaFunctors.
Definition: SubProblem.h:1149
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
Definition: SubProblem.h:1085
GhostingFunctorIterator coupling_functors_end() const
void reinitFVFace(const FaceInfo &fi)
Definition: Assembly.C:1855
virtual void cacheResidual(const THREAD_ID tid)
Definition: SubProblem.C:1296
virtual void timestepSetup()
Definition: SubProblem.C:1186
RATIONAL_BERNSTEIN
void removeSubstring(std::string &main, const std::string &sub)
find, erase, length algorithm for removing a substring from a string
Definition: MooseUtils.C:1201
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:1077
virtual bool nlConverged(const unsigned int nl_sys_num)
Definition: SubProblem.C:717
void havePRefinement(const std::unordered_set< FEFamily > &disable_p_refinement_for_families)
Indicate that we have p-refinement.
Definition: Assembly.C:4859
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:474
void addCouplingGhostingFunctor(libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
Add a coupling functor to this problem&#39;s DofMaps.
Definition: SubProblem.C:1057
bool _show_chain_control_data
Whether to output a list of all the chain control data.
Definition: SubProblem.h:1169
virtual void initialSetup()
Definition: SubProblem.C:1220
void remove_coupling_functor(GhostingFunctor &coupling_functor)
bool _have_p_refinement
Whether p-refinement has been requested at any point during the simulation.
Definition: SubProblem.h:1207
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
void hasScalingVector()
signals this object that a vector containing variable scaling factors should be used when doing resid...
Definition: Assembly.C:4574
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1060
CoordinateSystemType
Definition: MooseTypes.h:810
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:542
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)
Reinitialize FE data for the given neighbor_element on the given side with a given set of reference p...
Definition: Assembly.C:2192
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1182
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:1081
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:1179
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.
const std::string & get_sideset_name(boundary_id_type id) const
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:301
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const =0
void cacheJacobianNonlocal(GlobalDataKey)
Takes the values that are currently in _sub_Keg and appends them to the cached values.
Definition: Assembly.C:4090
IntRange< T > make_range(T beg, T end)
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
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:1064
virtual Moose::VarFieldType fieldType() const =0
Field type of this variable.
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:196
virtual void prepare(THREAD_ID tid)
Prepare the system for use.
Definition: SystemBase.C:256
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:364
ChainControlDataSystem & getChainControlDataSystem()
Gets the system that manages the ChainControls.
Definition: MooseApp.h:845
virtual std::unique_ptr< GhostingFunctor > clone() const
void reinitElemFaceRef(const Elem *elem, unsigned int elem_side, Real tolerance, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
Reinitialize FE data for the given element on the given side, optionally with a given set of referenc...
Definition: Assembly.C:2017
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters 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:1146
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1283
virtual void cacheResidualNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1303
virtual bool hasLinearVariable(const std::string &var_name) const
Whether or not this problem has this linear variable.
Definition: SubProblem.C:803
virtual void reinitElemFace(const Elem *elem, unsigned int side, THREAD_ID tid)
Reinit assembly info for a side of an element.
Definition: SystemBase.C:366
virtual TagName vectorTagName(const TagID tag) const
Retrieve the name associated with a TagID.
Definition: SubProblem.C:222
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual bool hasActiveElementalMooseVariables(const THREAD_ID tid) const
Whether or not a list of active elemental moose variables has been set.
Definition: SubProblem.C:461
virtual void prepareLowerD(THREAD_ID tid)
Prepare the system for use for lower dimensional elements.
Definition: SystemBase.C:332
static InputParameters validParams()
Definition: SubProblem.C:36
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:1072
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:90
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing is p-refinement.
Definition: MooseMesh.h:1365
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:684
virtual std::size_t numNonlinearSystems() const =0
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:1275
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)
const std::map< MooseObjectName, std::set< std::string > > & getConsumedPropertyMap() const
Return the map that tracks the object with consumed material properties.
Definition: SubProblem.C:743
Storage for all of the information pretaining to a vector tag.
Definition: VectorTag.h:17
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1051
virtual bool solverSystemConverged(const unsigned int sys_num)
Definition: SubProblem.h:100
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1054
void add_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor, bool to_mesh=true)
A class for storing the names of MooseObject by tag and object name.
const DofMap &dof_map LIBMESH_COMMA unsigned int std::string & set_subdomain_name_map()
void addCachedJacobian(GlobalDataKey)
Adds the values that have been cached by calling cacheJacobian() and or cacheJacobianNeighbor() to th...
Definition: Assembly.C:3815
const DofMap & get_dof_map() const
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:1083
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:162
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
Definition: SubProblem.h:1087
void clearAllDofIndices()
Clear all dof indices from moose variables.
Definition: SystemBase.C:1613
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:584
virtual void cacheJacobian(const THREAD_ID tid)
Definition: SubProblem.C:1317
void reinitMortarElem(const Elem *elem, const THREAD_ID tid=0)
Reinit a mortar element to obtain a valid JxW.
Definition: SubProblem.C:995
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:812
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:329
virtual TagName matrixTagName(TagID tag)
Retrieve the name associated with a TagID.
Definition: SubProblem.C:358
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:150
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:21
unsigned int THREAD_ID
Definition: MooseTypes.h:209
GhostingFunctorIterator coupling_functors_begin() const
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844