https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BlockRestrictionDebugOutput.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// MOOSE includes
12#include "FEProblem.h"
13#include "Material.h"
14#include "ConsoleUtils.h"
15#include "MooseMesh.h"
16#include "MooseObjectName.h"
17#include "NonlinearSystemBase.h"
18#include "MooseVariableBase.h"
19#include "BlockRestrictable.h"
21#include "KernelBase.h"
22#include "AuxiliarySystem.h"
23#include "AuxKernel.h"
24#include "UserObject.h"
25#include "MooseObject.h"
28#include "Constraint.h"
29
30#include "libmesh/transient_system.h"
31
32#include <functional>
33#include <map>
34
36
37namespace
38{
39template <typename ID>
40using RestrictionGroups = std::map<std::set<ID>, std::set<std::string>>;
41
42template <typename ID>
43std::string
44formatRestrictionIDs(const std::set<ID> & ids,
45 const std::set<ID> & all_ids,
46 const std::string & all_text,
47 const std::function<std::string(ID)> & id_to_string)
48{
49 if (ids.empty())
50 return "(none)";
51
52 if (ids == all_ids)
53 return all_text;
54
55 std::stringstream out;
56 unsigned int i = 0;
57 for (const auto id : ids)
58 out << id_to_string(id) << (++i < ids.size() ? ", " : "");
59
60 return out.str();
61}
62
63void
64printGroupNames(std::stringstream & out, const std::set<std::string> & names)
65{
66 std::streampos begin_string_pos = out.tellp();
67 std::streampos curr_string_pos = begin_string_pos;
68 unsigned int i = 0;
69 for (const auto & name : names)
70 {
71 out << Moose::stringify(name) << (++i < names.size() ? ", " : "");
72 curr_string_pos = out.tellp();
73 ConsoleUtils::insertNewline(out, begin_string_pos, curr_string_pos);
74 }
75 out << '\n';
76}
77
78std::string
79objectRestrictionName(const MooseObject & object)
80{
81 return object.type() + "/" + object.name();
82}
83
84void
85addBlockRestrictionObject(RestrictionGroups<SubdomainID> & groups, const MooseObject & object)
86{
87 if (!object.enabled())
88 return;
89
90 const auto * const block_restrictable = dynamic_cast<const BlockRestrictable *>(&object);
91 if (block_restrictable)
92 groups[block_restrictable->blockIDs()].insert(objectRestrictionName(object));
93}
94
95void
96addBoundaryRestrictionObject(RestrictionGroups<BoundaryID> & groups,
97 const MooseObject & object,
98 const bool include_unrestricted)
99{
100 if (!object.enabled())
101 return;
102
103 const auto * const boundary_restrictable = dynamic_cast<const BoundaryRestrictable *>(&object);
104 if (!boundary_restrictable)
105 return;
106
107 if (!include_unrestricted && !boundary_restrictable->boundaryRestricted())
108 return;
109
110 const auto & ids = boundary_restrictable->boundaryRestricted()
111 ? boundary_restrictable->boundaryIDs()
112 : boundary_restrictable->meshBoundaryIDs();
113 groups[ids].insert(objectRestrictionName(object));
114}
115
116template <typename T>
117void
118addWarehouseBlockRestrictionObjects(RestrictionGroups<SubdomainID> & groups,
119 const MooseObjectWarehouseBase<T> & warehouse)
120{
121 for (const auto & object : warehouse.getObjects(/*tid = */ 0))
122 addBlockRestrictionObject(groups, *object);
123}
124
125template <typename T>
126void
127addWarehouseBoundaryRestrictionObjects(RestrictionGroups<BoundaryID> & groups,
128 const MooseObjectWarehouseBase<T> & warehouse,
129 const bool include_unrestricted)
130{
131 for (const auto & object : warehouse.getObjects(/*tid = */ 0))
132 addBoundaryRestrictionObject(groups, *object, include_unrestricted);
133}
134}
135
138{
140
141 params.addParam<MultiMooseEnum>("scope",
142 getScopes("all"),
143 "The types of object to output block coverage for, if nothing is "
144 "provided everything will be output.");
145
146 params.addParam<NonlinearSystemName>(
147 "nl_sys", "nl0", "The nonlinear system that we should output information for.");
148 params.addParam<bool>(
149 "show_block_restriction_map",
150 true,
151 "Print active objects for each block. This is the default block-restriction debug output.");
152 params.addParam<bool>("show_block_restriction_groups",
153 false,
154 "Print groups of objects with identical block restrictions.");
155 params.addParam<bool>("show_boundary_restriction_groups",
156 false,
157 "Print groups of objects with identical boundary restrictions.");
158
159 params.addClassDescription(
160 "Debug output object for displaying information regarding block and boundary restrictions of "
161 "objects.");
162 params.set<ExecFlagEnum>("execute_on") = EXEC_INITIAL;
163 return params;
164}
165
167BlockRestrictionDebugOutput::getScopes(std::string default_scopes)
168{
169 return MultiMooseEnum("none all variables kernels auxvariables auxkernels materials userobjects",
170 default_scopes);
171}
172
174 : Output(parameters),
175 _scope(getParam<MultiMooseEnum>("scope")),
176 _nl(_problem_ptr->getNonlinearSystemBase(
177 _problem_ptr->nlSysNum(getParam<NonlinearSystemName>("nl_sys")))),
178 _sys(_nl.system()),
179 _show_block_restriction_map(getParam<bool>("show_block_restriction_map")),
180 _show_block_restriction_groups(getParam<bool>("show_block_restriction_groups")),
181 _show_boundary_restriction_groups(getParam<bool>("show_boundary_restriction_groups"))
182{
183}
184
185void
197
198void
200{
201 // is there anything to do?
202 if (_scope.isValid() && _scope.contains("none"))
203 return;
204
205 // Build output stream
206 std::stringstream out;
207
208 auto printCategoryAndNames = [&out](std::string category, std::set<std::string> & names)
209 {
210 const auto n = names.size();
211 if (n > 0)
212 {
213 // print the category and number of items
214 out << " " << category << " (" << n << " " << ((n == 1) ? "item" : "items") << "): ";
215
216 // If we would just use Moose::stringify(names), the indention is not right.
217 // So we are printing the names one by one and using ConsoleUtils::insertNewline.
218 std::streampos begin_string_pos = out.tellp();
219 std::streampos curr_string_pos = begin_string_pos;
220 unsigned int i = 0;
221 for (const auto & name : names)
222 {
223 out << Moose::stringify(name) << ((i++ < (n - 1)) ? ", " : "");
224 curr_string_pos = out.tellp();
225 ConsoleUtils::insertNewline(out, begin_string_pos, curr_string_pos);
226 }
227 out << '\n';
228 return true;
229 }
230 else
231 {
232 return false;
233 }
234 };
235
236 // Reference to mesh for getting block names
238
239 // set of all subdomains in the mesh
240 const std::set<SubdomainID> & mesh_subdomains = mesh.meshSubdomains();
241
242 // get kernels via reference to the Kernel warehouse
243 const auto & kernel_warehouse = _nl.getKernelWarehouse();
244 const auto & kernels = kernel_warehouse.getObjects(/*tid = */ 0);
245
246 // AuxSystem
247 const auto & auxSystem = _problem_ptr->getAuxiliarySystem();
248
249 // Reference to the Material warehouse
250 const auto & material_warehouse = _problem_ptr->getMaterialWarehouse();
251
252 // get all user objects
253 std::vector<UserObject *> userObjects;
255 .query()
256 .condition<AttribSystem>("UserObject")
257 .condition<AttribThread>(0)
258 .queryIntoUnsorted(userObjects);
259
260 // do we have to check all object types?
261 const bool include_all = !_scope.isValid() || _scope.contains("all");
262
263 // iterate all subdomains
264 for (const auto & subdomain_id : mesh_subdomains)
265 {
266 // get the corresponding subdomain name
267 const auto & subdomain_name = mesh.getSubdomainName(subdomain_id);
268
269 out << "\n";
270 out << " Subdomain '" << subdomain_name << "' (id " << subdomain_id << "):\n";
271
272 bool objectsFound = false;
273
274 // Variables
275 if (include_all || _scope.contains("variables"))
276 {
277 std::set<std::string> names;
278 for (unsigned int var_num = 0; var_num < _sys.n_vars(); var_num++)
279 {
280 const auto & var_name = _sys.variable_name(var_num);
281 if (_problem_ptr->hasVariable(var_name))
282 {
283 const MooseVariableBase & var =
284 _problem_ptr->getVariable(/*tid = */ 0,
285 var_name,
288 if (var.hasBlocks(subdomain_id))
289 names.insert(var_name);
290 }
291 }
292 objectsFound = printCategoryAndNames("Variables", names) || objectsFound;
293 }
294
295 // Kernels
296 if (include_all || _scope.contains("kernels"))
297 {
298 std::set<std::string> names;
299 for (const auto & kernel : kernels)
300 {
301 if (kernel->hasBlocks(subdomain_id))
302 names.insert(kernel->name());
303 }
304 objectsFound = printCategoryAndNames("Kernels", names) || objectsFound;
305 }
306
307 // AuxVariables
308 if (include_all || _scope.contains("auxvariables"))
309 {
310 std::set<std::string> names;
311 const auto & sys = auxSystem.system();
312 for (unsigned int vg = 0; vg < sys.n_variable_groups(); vg++)
313 {
314 const libMesh::VariableGroup & vg_description(sys.variable_group(vg));
315 for (unsigned int vn = 0; vn < vg_description.n_variables(); vn++)
316 {
317 if (vg_description.active_on_subdomain(subdomain_id))
318 names.insert(vg_description.name(vn));
319 }
320 }
321 objectsFound = printCategoryAndNames("AuxVariables", names) || objectsFound;
322 }
323
324 // AuxKernels
325 if (include_all || _scope.contains("auxkernels"))
326 {
327
328 {
329 const auto & wh = auxSystem.nodalAuxWarehouse();
330 std::set<std::string> names;
331 if (wh.hasActiveBlockObjects(subdomain_id))
332 {
333 const auto & auxkernels = wh.getActiveBlockObjects(subdomain_id);
334 for (auto & auxkernel : auxkernels)
335 names.insert(auxkernel->name());
336 }
337 objectsFound = printCategoryAndNames("AuxKernels[nodal]", names) || objectsFound;
338 }
339
340 {
341 const auto & wh = auxSystem.nodalVectorAuxWarehouse();
342 std::set<std::string> names;
343 if (wh.hasActiveBlockObjects(subdomain_id))
344 {
345 const auto & auxkernels = wh.getActiveBlockObjects(subdomain_id);
346 for (auto & auxkernel : auxkernels)
347 names.insert(auxkernel->name());
348 }
349 objectsFound = printCategoryAndNames("AuxKernels[nodalVector]", names) || objectsFound;
350 }
351
352 {
353 const auto & wh = auxSystem.nodalArrayAuxWarehouse();
354 std::set<std::string> names;
355 if (wh.hasActiveBlockObjects(subdomain_id))
356 {
357 const auto & auxkernels = wh.getActiveBlockObjects(subdomain_id);
358 for (auto & auxkernel : auxkernels)
359 names.insert(auxkernel->name());
360 }
361 objectsFound = printCategoryAndNames("AuxKernels[nodalArray]", names) || objectsFound;
362 }
363
364 {
365 const auto & wh = auxSystem.elemAuxWarehouse();
366 std::set<std::string> names;
367 if (wh.hasActiveBlockObjects(subdomain_id))
368 {
369 const auto & auxkernels = wh.getActiveBlockObjects(subdomain_id);
370 for (auto & auxkernel : auxkernels)
371 names.insert(auxkernel->name());
372 }
373 objectsFound = printCategoryAndNames("AuxKernels[elemAux]", names) || objectsFound;
374 }
375
376 {
377 const auto & wh = auxSystem.elemVectorAuxWarehouse();
378 std::set<std::string> names;
379 if (wh.hasActiveBlockObjects(subdomain_id))
380 {
381 const auto & auxkernels = wh.getActiveBlockObjects(subdomain_id);
382 for (auto & auxkernel : auxkernels)
383 names.insert(auxkernel->name());
384 }
385 objectsFound = printCategoryAndNames("AuxKernels[elemVector]", names) || objectsFound;
386 }
387
388 {
389 const auto & wh = auxSystem.elemArrayAuxWarehouse();
390 std::set<std::string> names;
391 if (wh.hasActiveBlockObjects(subdomain_id))
392 {
393 const auto & auxkernels = wh.getActiveBlockObjects(subdomain_id);
394 for (auto & auxkernel : auxkernels)
395 names.insert(auxkernel->name());
396 }
397 objectsFound = printCategoryAndNames("AuxKernels[elemArray]", names) || objectsFound;
398 }
399 }
400
401 // Materials
402 if (include_all || _scope.contains("materials"))
403 {
404 std::set<std::string> names;
405 if (material_warehouse.hasActiveBlockObjects(subdomain_id))
406 {
407 auto const objs = material_warehouse.getBlockObjects(subdomain_id);
408 for (const auto & mat : objs)
409 names.insert(mat->name());
410 }
411 objectsFound = printCategoryAndNames("Materials", names) || objectsFound;
412 }
413
414 // UserObjects
415 if (include_all || _scope.contains("userobjects"))
416 {
417 std::set<std::string> names;
418 for (const auto & obj : userObjects)
419 if (BlockRestrictable * blockrestrictable_obj = dynamic_cast<BlockRestrictable *>(obj))
420 if (blockrestrictable_obj->hasBlocks(subdomain_id))
421 names.insert(obj->name());
422 objectsFound = printCategoryAndNames("UserObjects", names) || objectsFound;
423 }
424
425 if (!objectsFound)
426 out << " (no objects found)\n";
427 }
428
429 out << std::flush;
430
431 // Write the stored string to the ConsoleUtils output objects
432 _console << "\n[DBG] Block-Restrictions (" << mesh_subdomains.size()
433 << " subdomains): showing active objects\n";
434 _console << std::setw(ConsoleUtils::console_field_width) << out.str() << std::endl;
435}
436
437void
439{
441 const auto & mesh_subdomains = mesh.meshSubdomains();
442
443 RestrictionGroups<SubdomainID> groups;
444 std::vector<MooseObject *> objects;
446 .query()
448 .condition<AttribThread>(0)
449 .queryIntoUnsorted(objects);
450
451 for (const auto object : objects)
452 if (object->enabled())
453 {
454 const auto * const block_restrictable = dynamic_cast<const BlockRestrictable *>(object);
455 mooseAssert(block_restrictable, "Query returned an object without BlockRestrictable");
456 groups[block_restrictable->blockIDs()].insert(objectRestrictionName(*object));
457 }
458
459 // Variables and aux variables are stored in libMesh systems / VariableWarehouse, not in
460 // theWarehouse(), so add their block restrictions explicitly.
461 for (const auto var_num : make_range(_sys.n_vars()))
462 {
463 const auto & var_name = _sys.variable_name(var_num);
464 if (_problem_ptr->hasVariable(var_name))
465 {
466 const auto & var = _problem_ptr->getVariable(
468 groups[var.blockIDs()].insert("Variable/" + var_name);
469 }
470 }
471
472 const auto & aux_system = _problem_ptr->getAuxiliarySystem().system();
473 for (const auto vg : make_range(aux_system.n_variable_groups()))
474 {
475 const libMesh::VariableGroup & vg_description(aux_system.variable_group(vg));
476 std::set<SubdomainID> blocks;
477 for (const auto subdomain_id : mesh_subdomains)
478 if (vg_description.active_on_subdomain(subdomain_id))
479 blocks.insert(subdomain_id);
480
481 for (const auto vn : make_range(vg_description.n_variables()))
482 groups[blocks].insert("AuxVariable/" + vg_description.name(vn));
483 }
484
485 // Custom warehouses below are not covered by theWarehouse() queries.
486 const auto & aux_system_base = _problem_ptr->getAuxiliarySystem();
487 addWarehouseBlockRestrictionObjects(groups, aux_system_base.nodalAuxWarehouse());
488 addWarehouseBlockRestrictionObjects(groups, aux_system_base.mortarNodalAuxWarehouse());
489 addWarehouseBlockRestrictionObjects(groups, aux_system_base.nodalVectorAuxWarehouse());
490 addWarehouseBlockRestrictionObjects(groups, aux_system_base.nodalArrayAuxWarehouse());
491 addWarehouseBlockRestrictionObjects(groups, aux_system_base.elemAuxWarehouse());
492 addWarehouseBlockRestrictionObjects(groups, aux_system_base.elemVectorAuxWarehouse());
493 addWarehouseBlockRestrictionObjects(groups, aux_system_base.elemArrayAuxWarehouse());
494#ifdef MOOSE_KOKKOS_ENABLED
495 addWarehouseBlockRestrictionObjects(groups, aux_system_base.kokkosNodalAuxWarehouse());
496 addWarehouseBlockRestrictionObjects(groups, aux_system_base.kokkosElemAuxWarehouse());
497#endif
498
499 addWarehouseBlockRestrictionObjects(groups, _problem_ptr->getInitialConditionWarehouse());
500 addWarehouseBlockRestrictionObjects(groups, _problem_ptr->getFVInitialConditionWarehouse());
501 addWarehouseBlockRestrictionObjects(groups, _nl.getConstraintWarehouse());
502
503 // Materials use MaterialWarehouse, which also owns automatically-created face and neighbor
504 // materials; report the primary material objects from the aggregate material warehouse.
505 addWarehouseBlockRestrictionObjects(groups, _problem_ptr->getMaterialWarehouse());
506
507 std::stringstream out;
508 for (const auto & group : groups)
509 {
510 out << "\n";
511 out << " Blocks "
512 << formatRestrictionIDs<SubdomainID>(group.first,
513 mesh_subdomains,
514 "all blocks",
515 [&mesh](const SubdomainID id)
516 {
517 const auto & name = mesh.getSubdomainName(id);
518 return name.empty() ? std::to_string(id)
519 : "'" + name + "' (id " +
520 std::to_string(id) + ")";
521 })
522 << " (" << group.second.size() << " " << (group.second.size() == 1 ? "item" : "items")
523 << "): ";
524 printGroupNames(out, group.second);
525 }
526
527 if (groups.empty())
528 out << "\n (no objects found)\n";
529
530 out << std::flush;
531
532 _console << "\n[DBG] Block-Restriction Groups (" << groups.size()
533 << " groups): showing objects with matching block restrictions\n";
534 _console << std::setw(ConsoleUtils::console_field_width) << out.str() << std::endl;
535}
536
537void
539{
541 const auto & mesh_boundaries = mesh.getBoundaryIDs();
542
543 RestrictionGroups<BoundaryID> groups;
544 std::vector<MooseObject *> objects;
546 .query()
548 .condition<AttribThread>(0)
549 .queryIntoUnsorted(objects);
550
551 for (const auto object : objects)
552 if (object->enabled())
553 {
554 const auto * const boundary_restrictable = dynamic_cast<const BoundaryRestrictable *>(object);
555 mooseAssert(boundary_restrictable, "Query returned an object without BoundaryRestrictable");
556 const auto & ids = boundary_restrictable->boundaryRestricted()
557 ? boundary_restrictable->boundaryIDs()
558 : boundary_restrictable->meshBoundaryIDs();
559 groups[ids].insert(objectRestrictionName(*object));
560 }
561
562 // Custom warehouses below are not covered by theWarehouse() queries. For these explicit passes,
563 // only boundary-restricted objects belong in boundary-restriction groups; block-only objects are
564 // already represented in the block groups.
565 const auto & aux_system = _problem_ptr->getAuxiliarySystem();
566 addWarehouseBoundaryRestrictionObjects(groups, aux_system.nodalAuxWarehouse(), false);
567 addWarehouseBoundaryRestrictionObjects(groups, aux_system.mortarNodalAuxWarehouse(), false);
568 addWarehouseBoundaryRestrictionObjects(groups, aux_system.nodalVectorAuxWarehouse(), false);
569 addWarehouseBoundaryRestrictionObjects(groups, aux_system.nodalArrayAuxWarehouse(), false);
570 addWarehouseBoundaryRestrictionObjects(groups, aux_system.elemAuxWarehouse(), false);
571 addWarehouseBoundaryRestrictionObjects(groups, aux_system.elemVectorAuxWarehouse(), false);
572 addWarehouseBoundaryRestrictionObjects(groups, aux_system.elemArrayAuxWarehouse(), false);
573#ifdef MOOSE_KOKKOS_ENABLED
574 addWarehouseBoundaryRestrictionObjects(groups, aux_system.kokkosNodalAuxWarehouse(), false);
575 addWarehouseBoundaryRestrictionObjects(groups, aux_system.kokkosElemAuxWarehouse(), false);
576#endif
577
578 addWarehouseBoundaryRestrictionObjects(
580 addWarehouseBoundaryRestrictionObjects(groups, _nl.getConstraintWarehouse(), false);
581 addWarehouseBoundaryRestrictionObjects(groups, _problem_ptr->getMaterialWarehouse(), false);
582
583 std::stringstream out;
584 for (const auto & group : groups)
585 {
586 out << "\n";
587 out << " Boundaries "
588 << formatRestrictionIDs<BoundaryID>(group.first,
589 mesh_boundaries,
590 "all boundaries",
591 [&mesh](const BoundaryID id)
592 {
593 const auto name = mesh.getBoundaryString(id);
594 return "'" + name + "' (id " + std::to_string(id) +
595 ")";
596 })
597 << " (" << group.second.size() << " " << (group.second.size() == 1 ? "item" : "items")
598 << "): ";
599 printGroupNames(out, group.second);
600 }
601
602 if (groups.empty())
603 out << "\n (no objects found)\n";
604
605 out << std::flush;
606
607 _console << "\n[DBG] Boundary-Restriction Groups (" << groups.size()
608 << " groups): showing objects with matching boundary restrictions\n";
609 _console << std::setw(ConsoleUtils::console_field_width) << out.str() << std::endl;
610}
@ BoundaryRestrictable
boundary_id_type BoundaryID
subdomain_id_type SubdomainID
registerMooseObject("MooseApp", BlockRestrictionDebugOutput)
const ExecFlagType EXEC_INITIAL
Definition Moose.C:31
char ** blocks
virtual libMesh::System & system() override
Get the reference to the libMesh system.
An interface that restricts an object to subdomains via the 'blocks' input parameter.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.
A class for producing various debug related outputs.
const NonlinearSystemBase & _nl
Reference to MOOSE's nonlinear system.
const bool & _show_block_restriction_groups
Whether to print object groups by identical block restriction.
void printBoundaryRestrictionGroups() const
Prints object groups with identical boundary restrictions.
const bool & _show_boundary_restriction_groups
Whether to print object groups by identical boundary restriction.
virtual void output() override
Perform the debugging output.
void printBlockRestrictionGroups() const
Prints object groups with identical block restrictions.
const MultiMooseEnum & _scope
multi-enum of object types to show the block-restriction for
const libMesh::System & _sys
Reference to libMesh system.
BlockRestrictionDebugOutput(const InputParameters &parameters)
const bool & _show_block_restriction_map
Whether to print the existing per-block restriction map.
static MultiMooseEnum getScopes(std::string default_scopes="")
Get the supported scopes of output (e.g., variables, etc.)
void printBlockRestrictionMap() const
Prints block-restriction information.
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
virtual bool boundaryRestricted() const
Returns true if this object has been restricted to a boundary.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
A MultiMooseEnum object to hold "execute_on" flags.
AuxiliarySystem & getAuxiliarySystem()
const InitialConditionWarehouse & getInitialConditionWarehouse() const
Return InitialCondition storage.
const MaterialWarehouse & getMaterialWarehouse() const
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
virtual MooseMesh & mesh() override
TheWarehouse & theWarehouse() const
const FVInitialConditionWarehouse & getFVInitialConditionWarehouse() const
Return FVInitialCondition storage.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
A base storage container for MooseObjects.
const std::vector< std::shared_ptr< T > > & getObjects(THREAD_ID tid=0) const
Retrieve complete vector to the all/block/boundary restricted objects for a given thread.
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
virtual bool enabled() const
Return the enabled status of the object.
Definition MooseObject.h:49
Base variable class.
virtual void insert(libMesh::NumericVector< libMesh::Number > &vector)=0
Insert the currently cached degree of freedom values into the provided vector.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
bool contains(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
virtual bool isValid() const override
IsValid.
const ConstraintWarehouse & getConstraintWarehouse() const
MooseObjectTagWarehouse< KernelBase > & getKernelWarehouse()
Access functions to Warehouses from outside NonlinearSystemBase.
Based class for output objects.
Definition Output.h:52
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
Definition Output.h:185
static InputParameters validParams()
Definition Output.C:32
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse.
std::streampos tellp()
const std::string & variable_name(const unsigned int i) const
unsigned int n_vars() const
unsigned int n_variables() const
const std::string & name(unsigned int v) const
bool active_on_subdomain(subdomain_id_type sid) const
MeshBase & mesh
static const unsigned int console_field_width
Width used for printing simulation information.
void insertNewline(std::stringstream &oss, std::streampos &begin, std::streampos &curr)
Helper function function for stringstream formatting.
@ VAR_FIELD_ANY
Definition MooseTypes.h:781
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:64
@ VAR_ANY
Definition MooseTypes.h:772
OStreamProxy out(std::cout)