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