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  _output_functors(false),
72  _typed_vector_tags(2),
73  _have_p_refinement(false)
74 {
75  unsigned int n_threads = libMesh::n_threads();
78 
83 
84  _functors.resize(n_threads);
85  _pbblf_functors.resize(n_threads);
87 }
88 
90 
91 TagID
92 SubProblem::addVectorTag(const TagName & tag_name,
93  const Moose::VectorTagType type /* = Moose::VECTOR_TAG_RESIDUAL */)
94 {
96  mooseError("Vector tag type cannot be VECTOR_TAG_ANY");
97 
98  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
99 
100  // First, see if the tag exists already
101  for (const auto & vector_tag : _vector_tags)
102  {
103  mooseAssert(_vector_tags[vector_tag._id] == vector_tag, "Vector tags index mismatch");
104  if (vector_tag._name == tag_name_upper)
105  {
106  if (vector_tag._type != type)
107  mooseError("While attempting to add vector tag with name '",
108  tag_name_upper,
109  "' and type ",
110  type,
111  ",\na tag with the same name but type ",
112  vector_tag._type,
113  " was found.\n\nA tag can only exist with one type.");
114 
115  return vector_tag._id;
116  }
117  }
118 
119  // Doesn't exist - create it
120  const TagID new_tag_id = _vector_tags.size();
121  const TagTypeID new_tag_type_id = _typed_vector_tags[type].size();
122  // Primary storage for all tags where the index in the vector == the tag ID
123  _vector_tags.emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
124  // Secondary storage for each type so that we can have quick access to all tags of a type
125  _typed_vector_tags[type].emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
126  // Name map storage for quick name access
127  _vector_tags_name_map.emplace(tag_name_upper, new_tag_id);
128 
129  // Make sure that _vector_tags, _typed_vector_tags, and _vector_tags_name_map are sane
131 
132  return new_tag_id;
133 }
134 
135 bool
136 SubProblem::vectorTagExists(const TagName & tag_name) const
137 {
138  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
139 
140  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
141  for (const auto & vector_tag : _vector_tags)
142  if (vector_tag._name == tag_name_upper)
143  return true;
144 
145  return false;
146 }
147 
148 void
150 {
151  _not_zeroed_tagged_vectors.insert(tag);
152 }
153 
154 bool
156 {
157  return _not_zeroed_tagged_vectors.count(tag);
158 }
159 
160 const VectorTag &
161 SubProblem::getVectorTag(const TagID tag_id) const
162 {
163  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
164 
165  if (!vectorTagExists(tag_id))
166  mooseError("Vector tag with ID ", tag_id, " does not exist");
167 
168  return _vector_tags[tag_id];
169 }
170 
171 std::vector<VectorTag>
172 SubProblem::getVectorTags(const std::set<TagID> & tag_ids) const
173 {
174  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
175 
176  std::vector<VectorTag> tags;
177  tags.reserve(tag_ids.size());
178  for (const auto & tag_id : tag_ids)
179  tags.push_back(getVectorTag(tag_id));
180  return tags;
181 }
182 
183 const std::vector<VectorTag> &
184 SubProblem::getVectorTags(const Moose::VectorTagType type /* = Moose::VECTOR_TAG_ANY */) const
185 {
186  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
187 
189  return _vector_tags;
190  else
191  return _typed_vector_tags[type];
192 }
193 
194 unsigned int
195 SubProblem::numVectorTags(const Moose::VectorTagType type /* = Moose::VECTOR_TAG_ANY */) const
196 {
197  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
198 
199  return getVectorTags(type).size();
200 }
201 
202 TagID
203 SubProblem::getVectorTagID(const TagName & tag_name) const
204 {
205  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
206 
207  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
208  const auto search = _vector_tags_name_map.find(tag_name_upper);
209  if (search != _vector_tags_name_map.end())
210  return search->second;
211 
212  std::string message =
213  tag_name_upper == "TIME"
214  ? ".\n\nThis may occur if "
215  "you have a TimeKernel in your problem but did not specify a transient executioner."
216  : "";
217  mooseError("Vector tag '", tag_name_upper, "' does not exist", message);
218 }
219 
220 TagName
221 SubProblem::vectorTagName(const TagID tag_id) const
222 {
223  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
224  if (!vectorTagExists(tag_id))
225  mooseError("Vector tag with ID ", tag_id, " does not exist");
226 
227  return _vector_tags[tag_id]._name;
228 }
229 
231 SubProblem::vectorTagType(const TagID tag_id) const
232 {
233  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
234  if (!vectorTagExists(tag_id))
235  mooseError("Vector tag with ID ", tag_id, " does not exist");
236 
237  return _vector_tags[tag_id]._type;
238 }
239 
240 bool
242 {
243  for (TagID tag_id = 0; tag_id < _vector_tags.size(); ++tag_id)
244  {
245  const auto & vector_tag = _vector_tags[tag_id];
246 
247  if (vector_tag._id != tag_id)
248  mooseError("Vector tag ", vector_tag._id, " id mismatch in _vector_tags");
249  if (vector_tag._type == Moose::VECTOR_TAG_ANY)
250  mooseError("Vector tag '", vector_tag._name, "' has type VECTOR_TAG_ANY");
251 
252  const auto search = _vector_tags_name_map.find(vector_tag._name);
253  if (search == _vector_tags_name_map.end())
254  mooseError("Vector tag ", vector_tag._id, " is not in _vector_tags_name_map");
255  else if (search->second != tag_id)
256  mooseError("Vector tag ", vector_tag._id, " has incorrect id in _vector_tags_name_map");
257 
258  unsigned int found_in_type = 0;
259  for (TagTypeID tag_type_id = 0; tag_type_id < _typed_vector_tags[vector_tag._type].size();
260  ++tag_type_id)
261  {
262  const auto & vector_tag_type = _typed_vector_tags[vector_tag._type][tag_type_id];
263  if (vector_tag_type == vector_tag)
264  {
265  ++found_in_type;
266  if (vector_tag_type._type_id != tag_type_id)
267  mooseError("Type ID for Vector tag ", tag_id, " is incorrect");
268  }
269  }
270 
271  if (found_in_type == 0)
272  mooseError("Vector tag ", tag_id, " not found in _typed_vector_tags");
273  if (found_in_type > 1)
274  mooseError("Vector tag ", tag_id, " found multiple times in _typed_vector_tags");
275  }
276 
277  unsigned int num_typed_vector_tags = 0;
278  for (const auto & typed_vector_tags : _typed_vector_tags)
279  num_typed_vector_tags += typed_vector_tags.size();
280  if (num_typed_vector_tags != _vector_tags.size())
281  mooseError("Size mismatch between _vector_tags and _typed_vector_tags");
282  if (_vector_tags_name_map.size() != _vector_tags.size())
283  mooseError("Size mismatch between _vector_tags and _vector_tags_name_map");
284 
285  return true;
286 }
287 
288 void
290  const std::vector<VectorTag> & input_vector_tags,
291  std::set<TagID> & selected_tags)
292 {
293  selected_tags.clear();
294  for (const auto & vector_tag : input_vector_tags)
295  if (system.hasVector(vector_tag._id))
296  selected_tags.insert(vector_tag._id);
297 }
298 
299 void
301  const std::map<TagName, TagID> & input_matrix_tags,
302  std::set<TagID> & selected_tags)
303 {
304  selected_tags.clear();
305  for (const auto & matrix_tag_pair : input_matrix_tags)
306  if (system.hasMatrix(matrix_tag_pair.second))
307  selected_tags.insert(matrix_tag_pair.second);
308 }
309 
310 TagID
311 SubProblem::addMatrixTag(TagName tag_name)
312 {
313  auto tag_name_upper = MooseUtils::toUpper(tag_name);
314  auto existing_tag = _matrix_tag_name_to_tag_id.find(tag_name_upper);
315  if (existing_tag == _matrix_tag_name_to_tag_id.end())
316  {
317  auto tag_id = _matrix_tag_name_to_tag_id.size();
318 
319  _matrix_tag_name_to_tag_id[tag_name_upper] = tag_id;
320 
321  _matrix_tag_id_to_tag_name[tag_id] = tag_name_upper;
322  }
323 
324  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
325 }
326 
327 bool
328 SubProblem::matrixTagExists(const TagName & tag_name) const
329 {
330  auto tag_name_upper = MooseUtils::toUpper(tag_name);
331 
332  return _matrix_tag_name_to_tag_id.find(tag_name_upper) != _matrix_tag_name_to_tag_id.end();
333 }
334 
335 bool
337 {
338  return _matrix_tag_id_to_tag_name.find(tag_id) != _matrix_tag_id_to_tag_name.end();
339 }
340 
341 TagID
342 SubProblem::getMatrixTagID(const TagName & tag_name) const
343 {
344  auto tag_name_upper = MooseUtils::toUpper(tag_name);
345 
346  if (!matrixTagExists(tag_name))
347  mooseError("Matrix tag: ",
348  tag_name,
349  " does not exist. ",
350  "If this is a TimeKernel then this may have happened because you didn't "
351  "specify a Transient Executioner.");
352 
353  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
354 }
355 
356 TagName
358 {
359  return _matrix_tag_id_to_tag_name[tag];
360 }
361 
362 void
364 {
366 }
367 
368 void
370 {
372  for (const auto sys_num : make_range(numSolverSystems()))
375 }
376 
377 void
379 {
381 }
382 
383 void
385 {
387 }
388 
389 const std::set<TagID> &
391 {
393 }
394 
395 const std::set<TagID> &
397 {
399 }
400 
401 void
403  const THREAD_ID tid)
404 {
406 }
407 
408 void
410  const THREAD_ID tid)
411 {
413  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
416 }
417 
418 void
420 {
422 }
423 
424 void
426 {
428 }
429 
430 const std::set<TagID> &
432 {
434 }
435 
436 const std::set<TagID> &
438 {
440 }
441 
442 void
443 SubProblem::setActiveElementalMooseVariables(const std::set<MooseVariableFEBase *> & moose_vars,
444  const THREAD_ID tid)
445 {
446  if (!moose_vars.empty())
447  {
449  _active_elemental_moose_variables[tid] = moose_vars;
450  }
451 }
452 
453 const std::set<MooseVariableFEBase *> &
455 {
457 }
458 
459 bool
461 {
463 }
464 
465 void
467 {
470 }
471 
472 std::set<SubdomainID>
473 SubProblem::getMaterialPropertyBlocks(const std::string & prop_name)
474 {
475  std::set<SubdomainID> blocks;
476 
477  for (const auto & it : _map_block_material_props)
478  {
479  const std::set<std::string> & prop_names = it.second;
480  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
481  if (name_it != prop_names.end())
482  blocks.insert(it.first);
483  }
484 
485  return blocks;
486 }
487 
488 std::vector<SubdomainName>
489 SubProblem::getMaterialPropertyBlockNames(const std::string & prop_name)
490 {
491  std::set<SubdomainID> blocks = getMaterialPropertyBlocks(prop_name);
492  std::vector<SubdomainName> block_names;
493  block_names.reserve(blocks.size());
494  for (const auto & block_id : blocks)
495  {
496  SubdomainName name;
497  name = mesh().getMesh().subdomain_name(block_id);
498  if (name.empty())
499  {
500  std::ostringstream oss;
501  oss << block_id;
502  name = oss.str();
503  }
504  block_names.push_back(name);
505  }
506 
507  return block_names;
508 }
509 
510 bool
511 SubProblem::hasBlockMaterialProperty(SubdomainID bid, const std::string & prop_name)
512 {
513  auto it = _map_block_material_props.find(bid);
514  if (it == _map_block_material_props.end())
515  return false;
516 
517  if (it->second.count(prop_name) > 0)
518  return true;
519  else
520  return false;
521 }
522 
523 // TODO: remove code duplication by templating
524 std::set<BoundaryID>
525 SubProblem::getMaterialPropertyBoundaryIDs(const std::string & prop_name)
526 {
527  std::set<BoundaryID> boundaries;
528 
529  for (const auto & it : _map_boundary_material_props)
530  {
531  const std::set<std::string> & prop_names = it.second;
532  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
533  if (name_it != prop_names.end())
534  boundaries.insert(it.first);
535  }
536 
537  return boundaries;
538 }
539 
540 std::vector<BoundaryName>
541 SubProblem::getMaterialPropertyBoundaryNames(const std::string & prop_name)
542 {
543  std::set<BoundaryID> boundaries = getMaterialPropertyBoundaryIDs(prop_name);
544  std::vector<BoundaryName> boundary_names;
545  boundary_names.reserve(boundaries.size());
546  const BoundaryInfo & boundary_info = mesh().getMesh().get_boundary_info();
547 
548  for (const auto & bnd_id : boundaries)
549  {
550  BoundaryName name;
551  if (bnd_id == Moose::ANY_BOUNDARY_ID)
552  name = "ANY_BOUNDARY_ID";
553  else
554  {
555  name = boundary_info.get_sideset_name(bnd_id);
556  if (name.empty())
557  {
558  std::ostringstream oss;
559  oss << bnd_id;
560  name = oss.str();
561  }
562  }
563  boundary_names.push_back(name);
564  }
565 
566  return boundary_names;
567 }
568 
569 bool
570 SubProblem::hasBoundaryMaterialProperty(BoundaryID bid, const std::string & prop_name)
571 {
572  auto it = _map_boundary_material_props.find(bid);
573  if (it == _map_boundary_material_props.end())
574  return false;
575 
576  if (it->second.count(prop_name) > 0)
577  return true;
578  else
579  return false;
580 }
581 
582 void
583 SubProblem::storeSubdomainMatPropName(SubdomainID block_id, const std::string & name)
584 {
585  _map_block_material_props[block_id].insert(name);
586 }
587 
588 void
589 SubProblem::storeBoundaryMatPropName(BoundaryID boundary_id, const std::string & name)
590 {
591  _map_boundary_material_props[boundary_id].insert(name);
592 }
593 
594 void
595 SubProblem::storeSubdomainZeroMatProp(SubdomainID block_id, const MaterialPropertyName & name)
596 {
597  _zero_block_material_props[block_id].insert(name);
598 }
599 
600 void
601 SubProblem::storeBoundaryZeroMatProp(BoundaryID boundary_id, const MaterialPropertyName & name)
602 {
603  _zero_boundary_material_props[boundary_id].insert(name);
604 }
605 
606 void
607 SubProblem::storeSubdomainDelayedCheckMatProp(const std::string & requestor,
608  SubdomainID block_id,
609  const std::string & name)
610 {
611  _map_block_material_props_check[block_id].insert(std::make_pair(requestor, name));
612 }
613 
614 void
615 SubProblem::storeBoundaryDelayedCheckMatProp(const std::string & requestor,
616  BoundaryID boundary_id,
617  const std::string & name)
618 {
619  _map_boundary_material_props_check[boundary_id].insert(std::make_pair(requestor, name));
620 }
621 
622 void
624 {
625  // Variable for storing all available blocks/boundaries from the mesh
626  std::set<SubdomainID> all_ids(mesh().meshSubdomains());
627 
628  std::stringstream errors;
629 
630  // Loop through the properties to check
631  for (const auto & check_it : _map_block_material_props_check)
632  {
633  // The current id for the property being checked (BoundaryID || BlockID)
634  SubdomainID check_id = check_it.first;
635 
636  std::set<SubdomainID> check_ids = {check_id};
637 
638  // Loop through all the block/boundary ids
639  for (const auto & id : check_ids)
640  {
641  // Loop through all the stored properties
642  for (const auto & prop_it : check_it.second)
643  {
644  // Produce an error if the material property is not defined on the current block/boundary
645  // and any block/boundary
646  // and not is not a zero material property.
647  if (_map_block_material_props[id].count(prop_it.second) == 0 &&
648  _zero_block_material_props[id].count(prop_it.second) == 0)
649  {
650  std::string check_name = restrictionSubdomainCheckName(id);
651  if (check_name.empty())
652  check_name = std::to_string(id);
653  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
654  << "' is not defined on block " << check_name << "\n";
655  }
656  }
657  }
658  }
659 
660  if (!errors.str().empty())
661  mooseError(errors.str());
662 }
663 
664 void
666 {
667  // Variable for storing the value for ANY_BOUNDARY_ID
669 
670  // Variable for storing all available blocks/boundaries from the mesh
671  std::set<BoundaryID> all_ids(mesh().getBoundaryIDs());
672 
673  std::stringstream errors;
674 
675  // Loop through the properties to check
676  for (const auto & check_it : _map_boundary_material_props_check)
677  {
678  // The current id for the property being checked (BoundaryID || BlockID)
679  BoundaryID check_id = check_it.first;
680 
681  // In the case when the material being checked has an ID is set to ANY, then loop through all
682  // the possible ids and verify that the material property is defined.
683  std::set<BoundaryID> check_ids{check_id};
684  if (check_id == any_id)
685  check_ids = all_ids;
686 
687  // Loop through all the block/boundary ids
688  for (const auto & id : check_ids)
689  {
690  // Loop through all the stored properties
691  for (const auto & prop_it : check_it.second)
692  {
693  // Produce an error if the material property is not defined on the current block/boundary
694  // and any block/boundary
695  // and not is not a zero material property.
696  if (_map_boundary_material_props[id].count(prop_it.second) == 0 &&
697  _map_boundary_material_props[any_id].count(prop_it.second) == 0 &&
698  _zero_boundary_material_props[id].count(prop_it.second) == 0 &&
699  _zero_boundary_material_props[any_id].count(prop_it.second) == 0)
700  {
701  std::string check_name = restrictionBoundaryCheckName(id);
702  if (check_name.empty())
703  check_name = std::to_string(id);
704  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
705  << "' is not defined on boundary " << check_name << "\n";
706  }
707  }
708  }
709  }
710 
711  if (!errors.str().empty())
712  mooseError(errors.str());
713 }
714 
715 bool
716 SubProblem::nlConverged(const unsigned int nl_sys_num)
717 {
718  mooseAssert(nl_sys_num < numNonlinearSystems(),
719  "The nonlinear system number is higher than the number of systems we have!");
720  return solverSystemConverged(nl_sys_num);
721 }
722 
723 void
724 SubProblem::markMatPropRequested(const std::string & prop_name)
725 {
726  _material_property_requested.insert(prop_name);
727 }
728 
729 bool
730 SubProblem::isMatPropRequested(const std::string & prop_name) const
731 {
732  return _material_property_requested.find(prop_name) != _material_property_requested.end();
733 }
734 
735 void
736 SubProblem::addConsumedPropertyName(const MooseObjectName & obj_name, const std::string & prop_name)
737 {
738  _consumed_material_properties[obj_name].insert(prop_name);
739 }
740 
741 const std::map<MooseObjectName, std::set<std::string>> &
743 {
745 }
746 
749 {
750  return _dirac_kernel_info;
751 }
752 
753 Real
755 {
756  return 0;
757 }
758 
759 unsigned int
761 {
762  return 0;
763 }
764 
765 unsigned int
766 SubProblem::nLinearIterations(unsigned int) const
767 {
768  return 0;
769 }
770 
771 std::string
773 {
774  // TODO: Put a better a interface in MOOSE
775  std::map<subdomain_id_type, std::string> & name_map = mesh().getMesh().set_subdomain_name_map();
776  std::map<subdomain_id_type, std::string>::const_iterator pos = name_map.find(check_id);
777  if (pos != name_map.end())
778  return pos->second;
779  return "";
780 }
781 
782 std::string
784 {
785  return mesh().getMesh().get_boundary_info().sideset_name(check_id);
786 }
787 
788 void
790 {
791  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
792  assembly(tid, nl_sys_num).setCurrentBoundaryID(bid);
793 }
794 
795 unsigned int
797 {
798  return mesh().getAxisymmetricRadialCoord();
799 }
800 
801 bool
802 SubProblem::hasLinearVariable(const std::string & var_name) const
803 {
804  for (const auto i : make_range(numLinearSystems()))
805  if (systemBaseLinear(i).hasVariable(var_name))
806  return true;
807  return false;
808 }
809 
810 bool
811 SubProblem::hasAuxiliaryVariable(const std::string & var_name) const
812 {
813  return systemBaseAuxiliary().hasVariable(var_name);
814 }
815 
816 template <typename T>
819  const std::string & var_name,
820  Moose::VarKindType expected_var_type,
821  Moose::VarFieldType expected_var_field_type,
822  const std::vector<T> & systems,
823  const SystemBase & aux) const
824 {
825  // Eventual return value
826  MooseVariableFEBase * var = nullptr;
827 
828  const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
829 
830  // First check that the variable is found on the expected system.
831  if (expected_var_type == Moose::VarKindType::VAR_ANY)
832  {
833  if (var_in_sys)
834  var = &(systems[sys_num]->getVariable(tid, var_name));
835  else if (aux.hasVariable(var_name))
836  var = &(aux.getVariable(tid, var_name));
837  else
838  mooseError("Unknown variable " + var_name);
839  }
840  else if (expected_var_type == Moose::VarKindType::VAR_SOLVER && var_in_sys &&
841  systems[sys_num]->hasVariable(var_name))
842  var = &(systems[sys_num]->getVariable(tid, var_name));
843  else if (expected_var_type == Moose::VarKindType::VAR_AUXILIARY && aux.hasVariable(var_name))
844  var = &(aux.getVariable(tid, var_name));
845  else
846  {
847  std::string expected_var_type_string =
848  (expected_var_type == Moose::VarKindType::VAR_SOLVER ? "nonlinear" : "auxiliary");
849  mooseError("No ",
850  expected_var_type_string,
851  " variable named ",
852  var_name,
853  " found. "
854  "Did you specify an auxiliary variable when you meant to specify a nonlinear "
855  "variable (or vice-versa)?");
856  }
857 
858  // Now make sure the var found has the expected field type.
859  if ((expected_var_field_type == Moose::VarFieldType::VAR_FIELD_ANY) ||
860  (expected_var_field_type == var->fieldType()))
861  return *var;
862  else
863  {
864  std::string expected_var_field_type_string =
865  MooseUtils::toLower(Moose::stringify(expected_var_field_type));
866  std::string var_field_type_string = MooseUtils::toLower(Moose::stringify(var->fieldType()));
867 
868  mooseError("No ",
869  expected_var_field_type_string,
870  " variable named ",
871  var_name,
872  " found. "
873  "Did you specify a ",
874  var_field_type_string,
875  " variable when you meant to specify a ",
876  expected_var_field_type_string,
877  " variable?");
878  }
879 }
880 
881 void
883  unsigned int side,
884  Real tolerance,
885  const std::vector<Point> * const pts,
886  const std::vector<Real> * const weights,
887  const THREAD_ID tid)
888 {
889  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
890  {
891  // - Set our _current_elem for proper dof index getting in the moose variables
892  // - Reinitialize all of our FE objects so we have current phi, dphi, etc. data
893  // Note that our number of shape functions will reflect the number of shapes associated with the
894  // interior element while the number of quadrature points will be determined by the passed pts
895  // parameter (which presumably will have a number of pts reflective of a facial quadrature rule)
896  assembly(tid, nl_sys_num).reinitElemFaceRef(elem, side, tolerance, pts, weights);
897 
898  auto & nl = systemBaseNonlinear(nl_sys_num);
899 
900  // Actually get the dof indices in the moose variables
901  nl.prepare(tid);
902 
903  // Let's finally compute our variable values!
904  nl.reinitElemFace(elem, side, tid);
905  }
906 
907  // do same for aux as for nl
909  systemBaseAuxiliary().reinitElemFace(elem, side, tid);
910 
911  // With the dof indices set in the moose variables, now let's properly size
912  // our local residuals/Jacobians
913  auto & current_assembly = assembly(tid, currentNlSysNum());
915  current_assembly.prepareJacobianBlock();
917  current_assembly.prepareResidual();
918 }
919 
920 void
922  unsigned int neighbor_side,
923  Real tolerance,
924  const std::vector<Point> * const pts,
925  const std::vector<Real> * const weights,
926  const THREAD_ID tid)
927 {
928  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
929  {
930  // - Set our _current_neighbor_elem for proper dof index getting in the moose variables
931  // - Reinitialize all of our FE objects so we have current phi, dphi, etc. data
932  // Note that our number of shape functions will reflect the number of shapes associated with the
933  // interior element while the number of quadrature points will be determined by the passed pts
934  // parameter (which presumably will have a number of pts reflective of a facial quadrature rule)
935  assembly(tid, nl_sys_num)
936  .reinitNeighborFaceRef(neighbor_elem, neighbor_side, tolerance, pts, weights);
937 
938  auto & nl = systemBaseNonlinear(nl_sys_num);
939 
940  // Actually get the dof indices in the moose variables
941  nl.prepareNeighbor(tid);
942 
943  // Let's finally compute our variable values!
944  nl.reinitNeighborFace(neighbor_elem, neighbor_side, tid);
945  }
946 
947  // do same for aux as for nl
949  systemBaseAuxiliary().reinitNeighborFace(neighbor_elem, neighbor_side, tid);
950 
951  // With the dof indices set in the moose variables, now let's properly size
952  // our local residuals/Jacobians
954 }
955 
956 void
958  const THREAD_ID tid,
959  const std::vector<Point> * const pts,
960  const std::vector<Real> * const weights)
961 {
962  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
963  {
964  // - Set our _current_lower_d_elem for proper dof index getting in the moose variables
965  // - Reinitialize all of our lower-d FE objects so we have current phi, dphi, etc. data
966  assembly(tid, nl_sys_num).reinitLowerDElem(elem, pts, weights);
967 
968  auto & nl = systemBaseNonlinear(nl_sys_num);
969 
970  // Actually get the dof indices in the moose variables
971  nl.prepareLowerD(tid);
972 
973  // With the dof indices set in the moose variables, now let's properly size
974  // our local residuals/Jacobians
975  assembly(tid, nl_sys_num).prepareLowerD();
976 
977  // Let's finally compute our variable values!
978  nl.reinitLowerD(tid);
979  }
980 
981  // do same for aux as for nl
984 }
985 
986 void
988 {
989  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
990  assembly(tid, nl_sys_num).reinitNeighborLowerDElem(elem);
991 }
992 
993 void
995 {
996  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
997  assembly(tid, nl_sys_num).reinitMortarElem(elem);
998 }
999 
1000 void
1002 {
1003  EquationSystems & eq = es();
1004  const auto n_sys = eq.n_systems();
1005 
1006  auto pr = _root_alg_gf_to_sys_clones.emplace(
1007  &algebraic_gf, std::vector<std::shared_ptr<GhostingFunctor>>(n_sys - 1));
1008  mooseAssert(pr.second, "We are adding a duplicate algebraic ghosting functor");
1009  auto & clones_vec = pr.first->second;
1010 
1011  for (MooseIndex(n_sys) i = 1; i < n_sys; ++i)
1012  {
1013  DofMap & dof_map = eq.get_system(i).get_dof_map();
1014  std::shared_ptr<GhostingFunctor> clone_alg_gf = algebraic_gf.clone();
1016  ->init(mesh(), *algebraic_gf.get_mesh(), &dof_map);
1017  dof_map.add_algebraic_ghosting_functor(clone_alg_gf, to_mesh);
1018  clones_vec[i - 1] = clone_alg_gf;
1019  }
1020 }
1021 
1022 void
1024 {
1025  EquationSystems & eq = es();
1026  const auto n_sys = eq.n_systems();
1027  if (!n_sys)
1028  return;
1029 
1030  eq.get_system(0).get_dof_map().add_algebraic_ghosting_functor(algebraic_gf, to_mesh);
1031  cloneAlgebraicGhostingFunctor(algebraic_gf, to_mesh);
1032 }
1033 
1034 void
1036 {
1037  const std::size_t num_nl_sys = numNonlinearSystems();
1038 
1039  auto pr = _root_coupling_gf_to_sys_clones.emplace(
1040  &coupling_gf, std::vector<std::shared_ptr<GhostingFunctor>>(num_nl_sys - 1));
1041  mooseAssert(pr.second, "We are adding a duplicate coupling functor");
1042  auto & clones_vec = pr.first->second;
1043 
1044  for (const auto i : make_range(std::size_t(1), num_nl_sys))
1045  {
1046  DofMap & dof_map = systemBaseNonlinear(i).system().get_dof_map();
1047  std::shared_ptr<GhostingFunctor> clone_coupling_gf = coupling_gf.clone();
1049  ->init(mesh(), *coupling_gf.get_mesh(), &dof_map);
1050  dof_map.add_coupling_functor(clone_coupling_gf, to_mesh);
1051  clones_vec[i - 1] = clone_coupling_gf;
1052  }
1053 }
1054 
1055 void
1057 {
1058  const auto num_nl_sys = numNonlinearSystems();
1059  if (!num_nl_sys)
1060  return;
1061 
1062  systemBaseNonlinear(0).system().get_dof_map().add_coupling_functor(coupling_gf, to_mesh);
1063  cloneCouplingGhostingFunctor(coupling_gf, to_mesh);
1064 }
1065 
1066 void
1068 {
1069  EquationSystems & eq = es();
1070  const auto n_sys = eq.n_systems();
1071  DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1072 
1073  const bool found_in_root_sys =
1074  std::find(nl_dof_map.algebraic_ghosting_functors_begin(),
1075  nl_dof_map.algebraic_ghosting_functors_end(),
1076  &algebraic_gf) != nl_dof_map.algebraic_ghosting_functors_end();
1077 
1078 #ifndef NDEBUG
1079  const bool found_in_our_map =
1080  _root_alg_gf_to_sys_clones.find(&algebraic_gf) != _root_alg_gf_to_sys_clones.end();
1081  mooseAssert(found_in_root_sys == found_in_our_map,
1082  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1083  "it in our gf to clones map");
1084 #endif
1085 
1086  if (found_in_root_sys) // libMesh yells if we try to remove
1087  // something that's not there
1088  nl_dof_map.remove_algebraic_ghosting_functor(algebraic_gf);
1089 
1090  auto it = _root_alg_gf_to_sys_clones.find(&algebraic_gf);
1091  if (it == _root_alg_gf_to_sys_clones.end())
1092  return;
1093 
1094  auto & clones_vec = it->second;
1095  mooseAssert((n_sys - 1) == clones_vec.size(),
1096  "The size of the gf clones vector doesn't match the number of systems minus one");
1097  if (clones_vec.empty())
1098  {
1099  mooseAssert(n_sys == 1, "The clones vector should only be empty if there is only one system");
1100  return;
1101  }
1102 
1103  for (const auto i : make_range(n_sys))
1104  eq.get_system(i + 1).get_dof_map().remove_algebraic_ghosting_functor(*clones_vec[i]);
1105 
1106  _root_alg_gf_to_sys_clones.erase(it->first);
1107 }
1108 
1109 void
1111 {
1112  EquationSystems & eq = es();
1113  const auto num_nl_sys = numNonlinearSystems();
1114  if (!num_nl_sys)
1115  return;
1116 
1117  DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1118  const bool found_in_root_sys = std::find(nl_dof_map.coupling_functors_begin(),
1119  nl_dof_map.coupling_functors_end(),
1120  &coupling_gf) != nl_dof_map.coupling_functors_end();
1121 
1122 #ifndef NDEBUG
1123  const bool found_in_our_map =
1125  mooseAssert(found_in_root_sys == found_in_our_map,
1126  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1127  "it in our gf to clones map");
1128 #endif
1129 
1130  if (found_in_root_sys) // libMesh yells if we try to remove
1131  // something that's not there
1132  nl_dof_map.remove_coupling_functor(coupling_gf);
1133 
1134  auto it = _root_coupling_gf_to_sys_clones.find(&coupling_gf);
1135  if (it == _root_coupling_gf_to_sys_clones.end())
1136  return;
1137 
1138  auto & clones_vec = it->second;
1139  mooseAssert((num_nl_sys - 1) == clones_vec.size(),
1140  "The size of the gf clones vector doesn't match the number of systems minus one");
1141  if (clones_vec.empty())
1142  {
1143  mooseAssert(num_nl_sys == 1,
1144  "The clones vector should only be empty if there is only one nonlinear system");
1145  return;
1146  }
1147 
1148  for (const auto i : make_range(num_nl_sys))
1149  eq.get_system(i + 1).get_dof_map().remove_coupling_functor(*clones_vec[i]);
1150 
1151  _root_coupling_gf_to_sys_clones.erase(it->first);
1152 }
1153 
1154 void
1155 SubProblem::automaticScaling(bool automatic_scaling)
1156 {
1157  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1158  systemBaseNonlinear(nl_sys_num).automaticScaling(automatic_scaling);
1159 }
1160 
1161 bool
1163 {
1164  // Currently going to assume that we are applying or not applying automatic scaling consistently
1165  // across nonlinear systems
1167 }
1168 
1169 void
1170 SubProblem::hasScalingVector(const unsigned int nl_sys_num)
1171 {
1172  for (const THREAD_ID tid : make_range(libMesh::n_threads()))
1173  assembly(tid, nl_sys_num).hasScalingVector();
1174 }
1175 
1176 void
1178 {
1179  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1182 }
1183 
1184 void
1186 {
1187  for (auto & map : _pbblf_functors)
1188  for (auto & pr : map)
1189  pr.second->timestepSetup();
1190 }
1191 
1192 void
1194 {
1195  for (auto & map : _pbblf_functors)
1196  for (auto & pr : map)
1197  pr.second->customSetup(exec_type);
1198 }
1199 
1200 void
1202 {
1203  for (auto & map : _pbblf_functors)
1204  for (auto & pr : map)
1205  pr.second->residualSetup();
1206 }
1207 
1208 void
1210 {
1211  for (auto & map : _pbblf_functors)
1212  for (auto & pr : map)
1213  pr.second->jacobianSetup();
1214 }
1215 
1216 void
1218 {
1219  if (_output_functors)
1220  {
1221  showFunctors();
1223  }
1224 
1225  for (const auto & functors : _functors)
1226  for (const auto & [functor_wrapper_name, functor_wrapper] : functors)
1227  {
1228  const auto & [true_functor_type, non_ad_functor, ad_functor] = functor_wrapper;
1229  mooseAssert(non_ad_functor->wrapsNull() == ad_functor->wrapsNull(), "These must agree");
1230  const auto functor_name = removeSubstring(functor_wrapper_name, "wraps_");
1231  if (non_ad_functor->wrapsNull())
1232  mooseError(
1233  "No functor ever provided with name '",
1234  functor_name,
1235  "', which was requested by '",
1236  MooseUtils::join(libmesh_map_find(_functor_to_requestors, functor_wrapper_name), ","),
1237  "'.");
1238  if (true_functor_type == TrueFunctorIs::NONAD ? non_ad_functor->ownsWrappedFunctor()
1239  : ad_functor->ownsWrappedFunctor())
1240  mooseError("Functor envelopes should not own the functors they wrap, but '",
1241  functor_name,
1242  "' is owned by the wrapper. Please open a MOOSE issue for help resolving this.");
1243  }
1244 }
1245 
1246 void
1248 {
1249  _console << "[DBG] Wrapped functors found in Subproblem" << std::endl;
1250  std::string functor_names = "[DBG] ";
1251  for (const auto & functor_pair : _functors[0])
1252  functor_names += std::regex_replace(functor_pair.first, std::regex("wraps_"), "") + " ";
1253  if (functor_names.size())
1254  functor_names.pop_back();
1255  _console << functor_names << std::endl;
1256 }
1257 
1258 void
1260 {
1261  for (const auto & [functor, requestors] : _functor_to_requestors)
1262  {
1263  _console << "[DBG] Requestors for wrapped functor "
1264  << std::regex_replace(functor, std::regex("wraps_"), "") << std::endl;
1265  _console << "[DBG] " << MooseUtils::join(requestors, " ") << std::endl;
1266  }
1267 }
1268 
1269 bool
1270 SubProblem::hasFunctor(const std::string & name, const THREAD_ID tid) const
1271 {
1272  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1273  auto & functors = _functors[tid];
1274  return (functors.find("wraps_" + name) != functors.end());
1275 }
1276 
1279 {
1280  return mesh().getCoordSystem(sid);
1281 }
1282 
1283 void
1285 {
1286  for (const auto nl : make_range(numNonlinearSystems()))
1287  assembly(tid, nl).reinitFVFace(fi);
1288 }
1289 
1290 void
1292 {
1293  assembly(tid, currentNlSysNum())
1295 }
1296 
1297 void
1299 {
1300  assembly(tid, currentNlSysNum())
1302 }
1303 
1304 void
1306 {
1307  assembly(tid, currentNlSysNum())
1309 }
1310 
1311 void
1313 {
1315  if (hasNonlocalCoupling())
1317 }
1318 
1319 void
1321 {
1323 }
1324 
1325 void
1327 {
1329 }
1330 
1331 void
1333 {
1334  std::unordered_set<FEFamily> disable_families;
1335  for (const auto & [family, flag] : _family_for_p_refinement)
1336  if (flag)
1337  disable_families.insert(family);
1338 
1339  for (const auto tid : make_range(libMesh::n_threads()))
1340  for (const auto s : make_range(numNonlinearSystems()))
1341  assembly(tid, s).havePRefinement(disable_families);
1342 
1343  auto & eq = es();
1344  for (const auto family : disable_families)
1345  for (const auto i : make_range(eq.n_systems()))
1346  {
1347  auto & system = eq.get_system(i);
1348  auto & dof_map = system.get_dof_map();
1349  for (const auto vg : make_range(system.n_variable_groups()))
1350  {
1351  const auto & var_group = system.variable_group(vg);
1352  if (var_group.type().family == family)
1353  dof_map.should_p_refine(vg, false);
1354  }
1355  }
1356 
1357  _have_p_refinement = true;
1358 }
1359 
1360 bool
1362 {
1363  return mesh().doingPRefinement();
1364 }
1365 
1366 void
1368 {
1369  auto family = Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"));
1370  bool flag = _default_families_without_p_refinement.count(family);
1371  if (params.isParamValid("disable_p_refinement"))
1372  flag = params.get<bool>("disable_p_refinement");
1373 
1374  auto [it, inserted] = _family_for_p_refinement.emplace(family, flag);
1375  if (!inserted && flag != it->second)
1376  mooseError("'disable_p_refinement' not set consistently for variables in ", family);
1377 }
1378 
1379 void
1380 SubProblem::setCurrentLowerDElem(const Elem * const lower_d_elem, const THREAD_ID tid)
1381 {
1382  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1383  assembly(tid, nl_sys_num).setCurrentLowerDElem(lower_d_elem);
1384 }
1385 
1386 template MooseVariableFEBase &
1388  const std::string & var_name,
1389  Moose::VarKindType expected_var_type,
1390  Moose::VarFieldType expected_var_field_type,
1391  const std::vector<std::shared_ptr<SolverSystem>> & nls,
1392  const SystemBase & aux) const;
1393 template MooseVariableFEBase &
1395  const std::string & var_name,
1396  Moose::VarKindType expected_var_type,
1397  Moose::VarFieldType expected_var_field_type,
1398  const std::vector<std::unique_ptr<DisplacedSystem>> & nls,
1399  const SystemBase & aux) const;
virtual MooseMesh & mesh()=0
virtual void init()=0
virtual void addCachedResidual(const THREAD_ID tid)
Definition: SubProblem.C:1305
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
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:3460
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1041
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:384
unsigned int TagTypeID
Definition: MooseTypes.h:211
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
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
Definition: MooseUtils.h:142
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
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:402
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
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:437
void removeCouplingGhostingFunctor(libMesh::GhostingFunctor &coupling_gf)
Remove a coupling ghosting functor from this problem&#39;s DofMaps.
Definition: SubProblem.C:1110
unsigned int n_systems() const
std::string toLower(const std::string &name)
Convert supplied string to lower case.
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
std::set< GhostingFunctor *>::const_iterator coupling_functors_begin() const
unsigned int n_threads()
void setCurrentBoundaryID(BoundaryID i)
set the current boundary ID
Definition: Assembly.h:395
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
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
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
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
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:595
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
void reinitNeighborLowerDElem(const Elem *elem)
reinitialize a neighboring lower dimensional element
Definition: Assembly.C:2386
char ** blocks
void setCurrentLowerDElem(const Elem *const lower_d_elem)
Set the current lower dimensional element.
Definition: Assembly.h:3200
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:1001
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: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
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
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: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 void reinitLowerD(THREAD_ID tid)
Compute the values of the variables on the lower dimensional element.
Definition: SystemBase.C:382
virtual ~SubProblem()
Definition: SubProblem.C:89
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
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
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:155
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
void prepareNeighbor()
Definition: Assembly.C:2804
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
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
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: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 setActiveVariableCoupleableVectorTags(const std::set< TagID > &vtags, THREAD_ID tid)
Set the active vector tags for the variables.
Definition: SystemBase.C:1587
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 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:1487
const T_sys & get_system(std::string_view name) const
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
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
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:724
void clearAllDofIndices()
Clear dof indices from variables in nl and aux systems.
Definition: SubProblem.C:1177
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
Definition: SubProblem.h:1087
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
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4065
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
void addCachedResiduals(GlobalDataKey, const std::vector< VectorTag > &tags)
Pushes all cached residuals to the global residual vectors associated with each tag.
Definition: Assembly.C:3490
void preparePRefinement()
Prepare DofMap and Assembly classes with our p-refinement information.
Definition: SubProblem.C:1332
const std::set< TagID > & getActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) const
Definition: SubProblem.C:431
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
void setActiveScalarVariableCoupleableVectorTags(const std::set< TagID > &vtags, THREAD_ID tid)
Set the active vector tags for the scalar variables.
Definition: SystemBase.C:1593
virtual void customSetup(const ExecFlagType &exec_type)
Definition: SubProblem.C:1193
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
Definition: SubProblem.C:665
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:409
void prepareLowerD()
Prepare the Jacobians and residuals for a lower dimensional element.
Definition: Assembly.C:2843
bool automaticScaling() const
Automatic scaling getter.
Definition: SubProblem.C:1162
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:2293
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 bool isMatPropRequested(const std::string &prop_name) const
Find out if a material property has been requested by any object.
Definition: SubProblem.C:730
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1185
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:1207
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
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
void cacheJacobianNeighbor(GlobalDataKey)
Takes the values that are currently in the neighbor Dense Matrices and appends them to the cached val...
Definition: Assembly.C:4117
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: MooseMesh.C:4263
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 void prepareNeighbor(THREAD_ID tid)
Prepare the system for use.
Definition: SystemBase.C:323
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
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:3409
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
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
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
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:366
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:172
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:489
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
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:4144
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:425
void showFunctorRequestors() const
Lists all functors and all the objects that requested them.
Definition: SubProblem.C:1259
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:834
bool doingPRefinement() const
Definition: SubProblem.C:1361
void reinitMortarElem(const Elem *elem)
reinitialize a mortar segment mesh element in order to get a proper JxW
Definition: Assembly.C:2407
std::string & sideset_name(boundary_id_type id)
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
void reinitFVFace(const FaceInfo &fi)
Definition: Assembly.C:1860
std::set< GhostingFunctor *>::const_iterator algebraic_ghosting_functors_end() const
virtual void cacheResidual(const THREAD_ID tid)
Definition: SubProblem.C:1291
virtual void timestepSetup()
Definition: SubProblem.C:1185
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:1296
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
void havePRefinement(const std::unordered_set< FEFamily > &disable_p_refinement_for_families)
Indicate that we have p-refinement.
Definition: Assembly.C:4864
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 initialSetup()
Definition: SubProblem.C:1217
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:1202
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:4579
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
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:2197
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1177
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
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 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:300
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:4095
IntRange< T > make_range(T beg, T end)
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:1062
virtual Moose::VarFieldType fieldType() const =0
Field type of this variable.
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 prepare(THREAD_ID tid)
Prepare the system for use.
Definition: SystemBase.C:255
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:363
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:2022
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: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
std::set< GhostingFunctor *>::const_iterator coupling_functors_end() const
virtual void reinitElemFace(const Elem *elem, unsigned int side, THREAD_ID tid)
Reinit assembly info for a side of an element.
Definition: SystemBase.C:358
virtual TagName vectorTagName(const TagID tag) const
Retrieve the name associated with a TagID.
Definition: SubProblem.C:221
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:460
virtual void prepareLowerD(THREAD_ID tid)
Prepare the system for use for lower dimensional elements.
Definition: SystemBase.C:331
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:1070
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing is p-refinement.
Definition: MooseMesh.h:1347
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:1270
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)
std::set< GhostingFunctor *>::const_iterator algebraic_ghosting_functors_begin() const
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
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1049
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:1052
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:3820
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: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
void clearAllDofIndices()
Clear all dof indices from moose variables.
Definition: SystemBase.C:1580
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
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 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
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:21
unsigned int THREAD_ID
Definition: MooseTypes.h:209
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:815