https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ConsoleUtils.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
11#include "ConsoleUtils.h"
12
13#include "AuxiliarySystem.h"
14#include "Conversion.h"
15#include "Executioner.h"
16#include "MoosePreconditioner.h"
17#include "FEProblem.h"
18#include "MooseApp.h"
19#include "MooseMesh.h"
20#include "MooseObject.h"
21#include "NonlinearSystem.h"
22#include "OutputWarehouse.h"
23#include "SystemInfo.h"
24#include "Checkpoint.h"
26#include "Registry.h"
27#include "CommandLine.h"
28#include "Split.h"
29
30#include <filesystem>
31
32#include "libmesh/string_to_enum.h"
33#include "libmesh/simple_range.h"
34
35namespace ConsoleUtils
36{
37
38std::string
39indent(unsigned int spaces)
40{
41 return std::string(spaces, ' ');
42}
43
44std::string
46{
47 std::stringstream oss;
48 oss << std::left;
49
50 oss << app.getSystemInfo().getInfo();
51
52 oss << "Input File(s):\n";
53 for (const auto & entry : app.getInputFileNames())
54 oss << " " << std::filesystem::absolute(entry).c_str() << "\n";
55 oss << "\n";
56
57 const auto & cl = std::as_const(*app.commandLine());
58 // We skip the 0th argument of the main app, i.e., the name used to invoke the program
59 const auto cl_range =
60 as_range(std::next(cl.getEntries().begin(), app.multiAppLevel() == 0), cl.getEntries().end());
61
62 std::stringstream args_oss;
63 for (const auto & entry : cl_range)
64 if (!entry.hit_param && !entry.subapp_name && entry.name != "-i")
65 args_oss << " " << cl.formatEntry(entry) << "\n";
66 if (args_oss.str().size())
67 oss << "Command Line Argument(s):\n" << args_oss.str() << "\n";
68
69 std::stringstream input_args_oss;
70 for (const auto & entry : cl_range)
71 if (entry.hit_param && !entry.subapp_name)
72 input_args_oss << " " << cl.formatEntry(entry) << "\n";
73 if (input_args_oss.str().size())
74 oss << "Command Line Input Argument(s):\n" << input_args_oss.str() << "\n";
75
76 const auto checkpoints = app.getOutputWarehouse().getOutputs<Checkpoint>();
77 if (checkpoints.size())
78 {
79 oss << std::left << "Checkpoint:\n";
80 oss << checkpoints[0]->checkpointInfo().str();
81 oss << std::endl;
82 }
83
84 oss << std::left << "Parallelism:\n"
85 << std::setw(console_field_width)
86 << " Num Processors: " << static_cast<std::size_t>(app.n_processors()) << '\n'
87 << std::setw(console_field_width)
88 << " Num Threads: " << static_cast<std::size_t>(libMesh::n_threads()) << std::endl;
89
90 return oss.str();
91}
92
93std::string
94outputMeshInformation(FEProblemBase & problem, bool verbose)
95{
96 std::stringstream oss;
97 oss << std::left;
98
99 const MooseMesh & mesh = problem.mesh();
100
101 const auto fe_backend = problem.feBackend();
102
103 if (verbose)
104 {
105 oss << "\nMesh: " << '\n' << std::setw(console_field_width);
106
107 oss << " Parallel Type: " << (mesh.isDistributedMesh() ? "distributed" : "replicated");
108 if (fe_backend == Moose::FEBackend::LibMesh)
109 {
110 bool forced = mesh.isParallelTypeForced();
111 bool pre_split = mesh.isSplit();
112 oss << (forced || pre_split ? " (" : "") << (forced ? "forced" : "")
113 << (forced && pre_split ? ", " : "") << (pre_split ? "pre-split" : "")
114 << (forced || pre_split ? ")" : "");
115 }
116 oss << '\n';
117 oss << std::setw(console_field_width) << " Mesh Dimension: " << mesh.dimension() << '\n'
118 << std::setw(console_field_width) << " Spatial Dimension: " << mesh.spatialDimension()
119 << '\n';
120 }
121
122 // Nodes, only associated with the mesh in libMesh
123 if (fe_backend == Moose::FEBackend::LibMesh)
124 {
125 if (mesh.n_processors() > 1)
126 {
127 dof_id_type nnodes = mesh.nNodes();
128 dof_id_type nnodes_local = mesh.nLocalNodes();
129 oss << std::setw(console_field_width) << " Nodes:" << '\n'
130 << std::setw(console_field_width) << " Total:" << nnodes << '\n';
131 oss << std::setw(console_field_width) << " Local:" << nnodes_local << '\n';
132 dof_id_type min_nnodes = nnodes_local, max_nnodes = nnodes_local;
133 mesh.comm().min(min_nnodes);
134 mesh.comm().max(max_nnodes);
135 if (mesh.processor_id() == 0)
136 oss << std::setw(console_field_width) << " Min/Max/Avg:" << min_nnodes << '/'
137 << max_nnodes << '/' << nnodes / mesh.n_processors() << '\n';
138 }
139 else
140 oss << std::setw(console_field_width) << " Nodes:" << mesh.nNodes() << '\n';
141 }
142
143 // Elements
144 if (mesh.n_processors() > 1)
145 {
146 dof_id_type nelems = mesh.nActiveElem();
147 dof_id_type nelems_local = mesh.nActiveLocalElem();
148 oss << std::setw(console_field_width) << " Elems:" << '\n'
149 << std::setw(console_field_width) << " Total:" << nelems << '\n';
150 oss << std::setw(console_field_width) << " Local:" << nelems_local << '\n';
151 dof_id_type min_nelems = nelems_local, max_nelems = nelems_local;
152 mesh.comm().min(min_nelems);
153 mesh.comm().max(max_nelems);
154 if (mesh.processor_id() == 0)
155 oss << std::setw(console_field_width) << " Min/Max/Avg:" << min_nelems << '/' << max_nelems
156 << '/' << nelems / mesh.n_processors() << '\n';
157 }
158 else
159 oss << std::setw(console_field_width) << " Elems:" << mesh.nActiveElem() << '\n';
160
161 // P-refinement
162 if (fe_backend == Moose::FEBackend::LibMesh)
163 {
164 if (mesh.maxPLevel() > 0)
165 oss << std::setw(console_field_width)
166 << " Max p-Refinement Level: " << static_cast<std::size_t>(mesh.maxPLevel()) << '\n';
167 if (mesh.maxHLevel() > 0)
168 oss << std::setw(console_field_width)
169 << " Max h-Refinement Level: " << static_cast<std::size_t>(mesh.maxHLevel()) << '\n';
170 }
171
172 if (verbose)
173 {
174 oss << std::setw(console_field_width)
175 << " Num Subdomains: " << static_cast<std::size_t>(mesh.nSubdomains()) << '\n';
176 if (mesh.n_processors() > 1 && fe_backend == Moose::FEBackend::LibMesh)
177 {
178 oss << std::setw(console_field_width)
179 << " Num Partitions: " << static_cast<std::size_t>(mesh.nPartitions()) << '\n'
180 << std::setw(console_field_width) << " Partitioner: " << mesh.partitionerName()
181 << (mesh.isPartitionerForced() ? " (forced) " : "") << '\n';
182 if (mesh.skipPartitioning())
183 oss << std::setw(console_field_width) << " Skipping all partitioning!" << '\n';
184 else if (mesh.skipNoncriticalPartitioning())
185 oss << std::setw(console_field_width) << " Skipping noncritical partitioning!" << '\n';
186 }
187 }
188
189 oss << std::endl;
190
191 return oss.str();
192}
193
194std::string
199
200std::string
201outputSystemInformationHelper(std::stringstream & oss, System & system)
202{
203 oss << std::left;
204
205 if (system.n_dofs())
206 {
207 oss << std::setw(console_field_width) << " Num DOFs: " << system.n_dofs() << '\n'
208 << std::setw(console_field_width) << " Num Local DOFs: " << system.n_local_dofs() << '\n';
209
210 if (system.n_constrained_dofs())
211 {
212 oss << std::setw(console_field_width)
213 << " Num Constrained DOFs: " << system.n_constrained_dofs() << '\n'
214 << std::setw(console_field_width)
215 << " Local Constrained DOFs: " << system.n_local_constrained_dofs() << '\n';
216 }
217
218 std::streampos begin_string_pos = oss.tellp();
219 std::streampos curr_string_pos = begin_string_pos;
220 oss << std::setw(console_field_width) << " Variables: ";
221 for (unsigned int vg = 0; vg < system.n_variable_groups(); vg++)
222 {
223 const libMesh::VariableGroup & vg_description(system.variable_group(vg));
224
225 if (vg_description.n_variables() > 1)
226 oss << "{ ";
227 if (vg_description.n_variables() > 10)
228 {
229 // when the number of variables in this group is larger than 10, we only output the first
230 // and the last 5 variable names
231 for (unsigned int vn = 0; vn < 5; vn++)
232 {
233 oss << "\"" << vg_description.name(vn) << "\" ";
234 curr_string_pos = oss.tellp();
235 insertNewline(oss, begin_string_pos, curr_string_pos);
236 }
237 oss << "... ";
238 curr_string_pos = oss.tellp();
239 insertNewline(oss, begin_string_pos, curr_string_pos);
240 for (unsigned int vn = vg_description.n_variables() - 5; vn < vg_description.n_variables();
241 vn++)
242 {
243 oss << "\"" << vg_description.name(vn) << "\" ";
244 curr_string_pos = oss.tellp();
245 insertNewline(oss, begin_string_pos, curr_string_pos);
246 }
247 }
248 else
249 for (unsigned int vn = 0; vn < vg_description.n_variables(); vn++)
250 {
251 oss << "\"" << vg_description.name(vn) << "\" ";
252 curr_string_pos = oss.tellp();
253 insertNewline(oss, begin_string_pos, curr_string_pos);
254 }
255
256 if (vg_description.n_variables() > 1)
257 oss << "} ";
258 }
259 oss << '\n';
260
261 begin_string_pos = oss.tellp();
262 curr_string_pos = begin_string_pos;
263 oss << std::setw(console_field_width) << " Finite Element Types: ";
264#ifndef LIBMESH_ENABLE_INFINITE_ELEMENTS
265 for (unsigned int vg = 0; vg < system.n_variable_groups(); vg++)
266 {
267 oss << "\""
268 << libMesh::Utility::enum_to_string<FEFamily>(
269 system.get_dof_map().variable_group(vg).type().family)
270 << "\" ";
271 curr_string_pos = oss.tellp();
272 insertNewline(oss, begin_string_pos, curr_string_pos);
273 }
274 oss << '\n';
275#else
276 for (unsigned int vg = 0; vg < system.n_variable_groups(); vg++)
277 {
278 oss << "\""
279 << libMesh::Utility::enum_to_string<FEFamily>(
280 system.get_dof_map().variable_group(vg).type().family)
281 << "\", \""
282 << libMesh::Utility::enum_to_string<FEFamily>(
283 system.get_dof_map().variable_group(vg).type().radial_family)
284 << "\" ";
285 curr_string_pos = oss.tellp();
286 insertNewline(oss, begin_string_pos, curr_string_pos);
287 }
288 oss << '\n';
289
290 begin_string_pos = oss.tellp();
291 curr_string_pos = begin_string_pos;
292 oss << std::setw(console_field_width) << " Infinite Element Mapping: ";
293 for (unsigned int vg = 0; vg < system.n_variable_groups(); vg++)
294 {
295 oss << "\""
296 << libMesh::Utility::enum_to_string<InfMapType>(
297 system.get_dof_map().variable_group(vg).type().inf_map)
298 << "\" ";
299 curr_string_pos = oss.tellp();
300 insertNewline(oss, begin_string_pos, curr_string_pos);
301 }
302 oss << '\n';
303#endif
304
305 begin_string_pos = oss.tellp();
306 curr_string_pos = begin_string_pos;
307 oss << std::setw(console_field_width) << " Approximation Orders: ";
308 for (unsigned int vg = 0; vg < system.n_variable_groups(); vg++)
309 {
310#ifndef LIBMESH_ENABLE_INFINITE_ELEMENTS
311 oss << "\""
312 << Utility::enum_to_string<Order>(system.get_dof_map().variable_group(vg).type().order)
313 << "\" ";
314#else
315 oss << "\""
316 << Utility::enum_to_string<Order>(system.get_dof_map().variable_group(vg).type().order)
317 << "\", \""
318 << Utility::enum_to_string<Order>(
319 system.get_dof_map().variable_group(vg).type().radial_order)
320 << "\" ";
321#endif
322 curr_string_pos = oss.tellp();
323 insertNewline(oss, begin_string_pos, curr_string_pos);
324 }
325 oss << "\n" << std::endl;
326 }
327
328 return oss.str();
329}
330
331std::string
332outputSolverSystemInformation(FEProblemBase & problem, const unsigned int sys_num)
333{
334 std::stringstream oss;
335 oss << std::left;
336
337 return outputSystemInformationHelper(oss, problem.getSolverSystem(sys_num).system());
338}
339
340std::string
342{
343 std::stringstream oss;
344
345 return outputSystemInformationHelper(oss, system);
346}
347
348std::string
350{
351 std::stringstream oss;
352 oss << std::left;
353
354 auto info_strings = app.getRelationshipManagerInfo();
355 if (info_strings.size())
356 {
357 for (const auto & info_pair : info_strings)
358 oss << std::setw(console_field_width)
359 << " " + MooseUtils::underscoreToCamelCase(MooseUtils::toLower(info_pair.first), true) +
360 ":"
361 << info_pair.second << '\n';
362 oss << std::endl;
363 }
364
365 return oss.str();
366}
367
368std::string
370{
371
372 std::stringstream oss;
373 oss << std::left;
374
375 Executioner * exec = app.getExecutioner();
376
377 oss << "Execution Information:\n"
378 << std::setw(console_field_width) << " Executioner: " << exec->type() << '\n';
379
380 std::string time_stepper = exec->getTimeStepperName();
381 if (time_stepper != "")
382 oss << std::setw(console_field_width) << " TimeStepper: " << time_stepper << '\n';
383 const auto time_integrator_names = exec->getTimeIntegratorNames();
384 if (!time_integrator_names.empty())
385 oss << std::setw(console_field_width)
386 << " TimeIntegrator(s): " << MooseUtils::join(time_integrator_names, " ") << '\n';
387
388 oss << std::setw(console_field_width)
389 << std::string(" Solver") +
390 (problem.feBackend() == Moose::FEBackend::LibMesh ? " Mode" : "") + ": ";
391 for (const std::size_t i : make_range(problem.numSolverSystems()))
392 oss << (problem.numSolverSystems() > 1 ? "[" + problem.getSolverSystemNames()[i] + "]: " : "")
393 << problem.solverTypeString(i) << " ";
394 oss << '\n';
395
396 // Check for a selection of common PETSc pc options on the command line for
397 // all solver systems and all field splits within each nonlinear system
398 std::string pc_desc;
399 for (const std::size_t i : make_range(problem.numSolverSystems()))
400 {
401 std::vector<std::string> splits = {""};
402 if (problem.isSolverSystemNonlinear(i))
403 for (const auto & split : problem.getNonlinearSystemBase(i).getSplits().getObjects())
404 splits.push_back("fieldsplit_" + split->name() + "_");
405
406 for (const std::string & split : splits)
407 {
408 std::string pc_desc_split;
409 const std::string prefix = problem.solverParams(i)._prefix + split;
410 for (const auto & entry : std::as_const(*app.commandLine()).getEntries())
411 if (entry.name == prefix + "pc_type" || entry.name == prefix + "sub_pc_type" ||
412 entry.name == prefix + "pc_hypre_type" || entry.name == prefix + "pc_fieldsplit_type")
413 pc_desc_split += entry.value ? *entry.value + " " : "unspecified ";
414
415 if (!pc_desc_split.empty() && prefix.size() > 1)
416 pc_desc += "[" + prefix.substr(1, prefix.size() - 2) + "]: ";
417 pc_desc += pc_desc_split;
418 }
419 }
420
421 // Alert the user any unoverridden options will still be picked up from the input file
422 if (!pc_desc.empty())
423 pc_desc += "(see input file for unoverridden options)";
424
425 // If there are no PETSc pc options on the command line, print the input file options
426 if (pc_desc.empty())
427 pc_desc = problem.getPetscOptions().pc_description;
428
429 if (!pc_desc.empty())
430 oss << std::setw(console_field_width) << " PETSc Preconditioner: " << pc_desc << '\n';
431
432 std::string mpc_desc;
433 for (const std::size_t i : make_range(problem.numNonlinearSystems()))
434 {
436 if (mpc)
437 {
438 if (problem.numNonlinearSystems() > 1)
439 mpc_desc += "[" + problem.getNonlinearSystemNames()[i] + "]: ";
440 mpc_desc += mpc->type() + " ";
441 if (mpc->name().find("_moose_auto") != std::string::npos)
442 mpc_desc += "(auto) ";
443 }
444 }
445
446 if (!mpc_desc.empty())
447 oss << std::setw(console_field_width) << " MOOSE Preconditioner: " << mpc_desc << '\n';
448
449 oss << "\n";
450
451 return oss.str();
452}
453
454std::string
456{
457 std::stringstream oss;
458 oss << std::left;
459
460 const std::vector<Output *> outputs = app.getOutputWarehouse().getOutputs<Output>();
461 oss << "Outputs:\n";
462 for (const auto & out : outputs)
463 {
464 // Display the "execute_on" settings
465 const MultiMooseEnum & execute_on = out->executeOn();
466 oss << " " << std::setw(console_field_width - 2) << out->name() << "\"" << execute_on
467 << "\"\n";
468
469 // Display the advanced "execute_on" settings, only if they are different from "execute_on"
470 if (out->isAdvanced())
471 {
472 const OutputOnWarehouse & adv_on = out->advancedExecuteOn();
473 for (const auto & adv_it : adv_on)
474 if (execute_on != adv_it.second)
475 oss << " " << std::setw(console_field_width - 4) << adv_it.first + ":" << "\""
476 << adv_it.second << "\"" << std::endl;
477 }
478 }
479
480 return oss.str();
481}
482
483std::string
485{
486 std::stringstream oss;
487 oss << std::left;
488
489 oss << COLOR_BLUE;
490 oss << "Executioner/use_pre_smo_residual is set to true. The pre-SMO residual will be evaluated "
491 "at the beginning of each time step before executing objects that could modify the "
492 "solution, such as preset BCs, predictors, correctors, constraints, and certain user "
493 "objects. The pre-SMO residuals will be prefixed with * and will be used in the relative "
494 "convergence check.\n";
495 oss << COLOR_DEFAULT;
496
497 return oss.str();
498}
499
500std::string
502{
503 std::stringstream oss;
504 oss << std::left;
505
506 if (app.parameters().get<bool>("use_legacy_material_output"))
507 {
508 oss << COLOR_RED << "LEGACY MODES ENABLED:" << COLOR_DEFAULT << '\n';
509 oss << " This application uses the legacy material output option: material properties are "
510 "output only on TIMESTEP_END, not INITIAL. To remove this message, set "
511 "'use_legacy_material_output' to false in this application. If there are gold output "
512 "files that contain material property output for which output occurs on INITIAL, then "
513 "these will generate diffs due to zero values being stored, and these tests should be "
514 "re-golded.\n"
515 << COLOR_DEFAULT << std::endl;
516 }
517
518 if (app.parameters().get<bool>("use_legacy_initial_residual_evaluation_behavior"))
519 {
520 oss << COLOR_RED << "LEGACY MODES ENABLED:" << COLOR_DEFAULT << '\n';
521 oss << " This application uses the legacy initial residual evaluation behavior. The legacy "
522 "behavior performs an often times redundant residual evaluation before the solution "
523 "modifying objects are executed prior to the initial (0th nonlinear iteration) residual "
524 "evaluation. The new behavior skips that redundant residual evaluation unless the "
525 "parameter Executioner/use_pre_smo_residual is set to true. To remove this message and "
526 "enable the new behavior, set the parameter "
527 "'use_legacy_initial_residual_evaluation_behavior' to false in *App.C. Some tests that "
528 "rely on the side effects of the legacy behavior may fail/diff and should be "
529 "re-golded.\n"
530 << COLOR_DEFAULT << std::endl;
531 }
532
533 return oss.str();
534}
535
536std::string
538{
539 std::stringstream oss;
540 oss << "Data File Paths:\n";
541 for (const auto & [name, path] : Registry::getDataFilePaths())
542 oss << " " << name << ": " << path << "\n";
543 return oss.str() + "\n";
544}
545
546std::string
548{
549 std::map<std::string, std::string> values; // for A-Z sort
550 for (const auto & object_name_params_pair : app.getInputParameterWarehouse().getInputParameters())
551 {
552 const auto & params = object_name_params_pair.second;
553 for (const auto & name_value_pair : *params)
554 {
555 const auto & name = name_value_pair.first;
556 if (const auto path = params->queryDataFileNamePath(name))
557 if (params->getHitNode(name))
558 values.emplace(params->paramFullpath(name), path->path);
559 }
560 }
561
562 std::stringstream oss;
563 oss << "Data File Parameters:\n";
564 for (const auto & [param, value] : values)
565 oss << " " << param << " = " << value << "\n";
566 return oss.str() + '\n';
567}
568
569void
570insertNewline(std::stringstream & oss, std::streampos & begin, std::streampos & curr)
571{
572 if (curr - begin > console_line_length)
573 {
574 oss << "\n";
575 begin = oss.tellp();
576 oss << std::setw(console_field_width + 2) << ""; // "{ "
577 }
578}
579
580std::string
581formatString(std::string message, const std::string & prefix)
582{
583 MooseUtils::indentMessage(prefix, message, COLOR_DEFAULT, true, " ");
584 std::stringstream stream;
585 std::streampos start = stream.tellp();
586 stream << message;
587 std::streampos end = stream.tellp();
588 insertNewline(stream, start, end);
589 auto formatted_string = stream.str();
590 // no need to end with a line break
591 if (formatted_string.back() == '\n')
592 formatted_string.pop_back();
593 return formatted_string;
594}
595
596std::string
597mooseObjectVectorToString(const std::vector<MooseObject *> & objs, const std::string & sep /*=""*/)
598{
599 std::string object_names = "";
600 if (objs.size())
601 {
602 // Gather all the object names
603 std::vector<std::string> names;
604 names.reserve(objs.size());
605 for (const auto & obj : objs)
606 {
607 mooseAssert(obj, "Trying to print a null object");
608 names.push_back(obj->name());
609 }
610
611 object_names = MooseUtils::join(names, sep);
612 }
613 return object_names;
614}
615
616} // ConsoleUtils namespace
std::array< Real, 2 > values
Definition MortarUtils.C:52
virtual libMesh::System & system() override
Get the reference to the libMesh system.
Writes out three things:
Definition Checkpoint.h:49
std::stringstream checkpointInfo() const
Gathers and records information used later for console output.
Definition Checkpoint.C:236
Executioners are objects that do the actual work of solving your problem.
Definition Executioner.h:37
virtual std::string getTimeStepperName() const
The name of the TimeStepper This is an empty string for non-Transient executioners.
virtual std::vector< std::string > getTimeIntegratorNames() const
The name of the TimeIntegrator This is an empty string for non-Transient executioners.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
AuxiliarySystem & getAuxiliarySystem()
virtual std::size_t numSolverSystems() const override
virtual std::size_t numNonlinearSystems() const override
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
SolverParams & solverParams(unsigned int solver_sys_num=0)
Get the solver parameters.
virtual MooseMesh & mesh() override
const std::vector< NonlinearSystemName > & getNonlinearSystemNames() const
SolverSystem & getSolverSystem(unsigned int sys_num)
Get non-constant reference to a solver system.
const std::vector< SolverSystemName > & getSolverSystemNames() const
virtual std::string solverTypeString(unsigned int solver_sys_num=0)
Return solver type as a human readable string.
Moose::PetscSupport::PetscOptions & getPetscOptions()
Retrieve a writable reference the PETSc options (used by PetscSupport)
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
virtual Moose::FEBackend feBackend() const
const std::multimap< MooseObjectName, std::shared_ptr< InputParameters > > & getInputParameters(THREAD_ID tid=0) const
Return const reference to the map containing the InputParameter objects.
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.
Base class for MOOSE-based applications.
Definition MooseApp.h:110
const std::vector< std::string > & getInputFileNames() const
Definition MooseApp.C:1523
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition MooseApp.C:2414
unsigned int multiAppLevel() const
The MultiApp Level.
Definition MooseApp.h:855
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition MooseApp.C:2020
std::vector< std::pair< std::string, std::string > > getRelationshipManagerInfo() const
Returns the Relationship managers info suitable for printing.
Definition MooseApp.C:3324
const SystemInfo & getSystemInfo() const
Get SystemInfo object.
Definition MooseApp.h:567
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
Definition MooseApp.h:424
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition MooseApp.C:2872
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & type() const
Get the type of this class.
Definition MooseBase.h:93
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
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.
Base class for MOOSE preconditioners.
std::string pc_description
Preconditioner description.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
MoosePreconditioner const * getPreconditioner() const
MooseObjectWarehouseBase< Split > & getSplits()
Retrieves all splits.
A helper warehouse class for storing the "execute_on" settings for the various output types.
std::vector< T * > getOutputs(const std::vector< OutputName > &names)
Return a vector of objects by names.
Based class for output objects.
Definition Output.h:52
static const std::map< std::string, std::string > & getDataFilePaths()
Returns a map of all registered data file paths (name -> path)
Definition Registry.h:271
std::string _prefix
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
std::string getInfo() const
Definition SystemInfo.C:29
processor_id_type n_processors() const
unsigned int n_variables() const
const std::string & name(unsigned int v) const
MeshBase & mesh
std::string outputOutputInformation(MooseApp &app)
Output the output information.
std::string outputPreSMOResidualInformation()
Output the information about pre-SMO residual evaluation.
std::string outputLegacyInformation(MooseApp &app)
Output the legacy flag information.
std::string outputMeshInformation(FEProblemBase &problem, bool verbose=true)
Output the mesh information.
std::string formatString(std::string message, const std::string &prefix)
Add new lines and prefixes to a string for pretty display in output NOTE: This makes a copy of the st...
static const unsigned int console_line_length
Line length for printing simulation information.
std::string mooseObjectVectorToString(const std::vector< MooseObject * > &objs, const std::string &sep=" ")
Routine to output the name of MooseObjects in a string.
std::string outputSolverSystemInformation(FEProblemBase &problem, const unsigned int solver_sys_num)
Output a solver system information.
std::string outputAuxiliarySystemInformation(FEProblemBase &problem)
Output the Auxiliary system information.
std::string outputDataFilePaths()
Output the registered data paths for searching.
std::string outputExecutionInformation(const MooseApp &app, FEProblemBase &problem)
Output execution information.
static const unsigned int console_field_width
Width used for printing simulation information.
std::string outputDataFileParams(MooseApp &app)
Output the (param path = value) pairs for each DataFileName parameter.
std::string outputRelationshipManagerInformation(const MooseApp &app)
Output action RelationshipManager information.
std::string outputSystemInformationHelper(libMesh::System &system)
Output system information.
std::string outputFrameworkInformation(const MooseApp &app)
Outputs framework information.
void insertNewline(std::stringstream &oss, std::streampos &begin, std::streampos &curr)
Helper function function for stringstream formatting.
std::string indent(unsigned int spaces)
Create empty string for indenting.
void indentMessage(const std::string &prefix, std::string &message, const char *color, bool indent_first_line, const std::string &post_prefix)
Definition MooseUtils.C:749
std::string toLower(std::string name)
Convert supplied string to lower case.
std::string underscoreToCamelCase(const std::string &underscore_name, bool leading_upper_case)
Definition MooseUtils.C:591
unsigned int n_threads()