19 #include "libmesh/transient_system.h" 27 params.
addClassDescription(
"Debug output object for displaying material property information.");
42 std::stringstream consumed;
45 consumed <<
" Object: " << pair.first <<
"\n";
46 consumed <<
" Properties: " <<
MooseUtils::join(pair.second,
", ") <<
"\n\n";
49 _console <<
"\n\nConsumed Material Properties:\n";
57 std::stringstream active_block, active_face, active_neighbor, active_boundary;
68 for (
const auto & it : objects)
70 active_block <<
" Subdomain: " <<
mesh.getSubdomainName(it.first) <<
" (" << it.first
79 for (
const auto & it : objects)
81 active_face <<
" Subdomain: " <<
mesh.getSubdomainName(it.first) <<
" (" << it.first
90 for (
const auto & it : objects)
92 active_neighbor <<
" Subdomain: " <<
mesh.getSubdomainName(it.first) <<
" (" << it.first
101 for (
const auto & it : objects)
103 active_boundary <<
" Boundary: " <<
mesh.getBoundaryName(it.first) <<
" (" << it.first
110 _console <<
"\n\nActive Materials:\n";
125 std::stringstream & output,
const std::vector<std::shared_ptr<MaterialBase>> & materials)
const 128 for (
const auto & mat : materials)
131 const std::set<std::string> & props = mat->getSuppliedItems();
135 <<
" Material Name: " << mat->name() <<
'\n';
139 std::streampos begin_string_pos =
output.tellp();
140 std::streampos curr_string_pos = begin_string_pos;
142 for (
const auto & prop : props)
144 output <<
"\"" << prop <<
"\" ";
145 curr_string_pos =
output.tellp();
A MultiMooseEnum object to hold "execute_on" flags.
void printMaterialProperties(std::stringstream &output, const std::vector< std::shared_ptr< MaterialBase >> &materials) const
Builds a output streams for the properties in each material object.
MaterialBase objects are special in that they have additional objects created automatically (see FEPr...
const MaterialWarehouse & getMaterialWarehouse() const
static const unsigned int console_field_width
Width used for printing simulation information.
Based class for output objects.
MaterialPropertyDebugOutput(const InputParameters ¶meters)
void insertNewline(std::stringstream &oss, std::streampos &begin, std::streampos &curr)
Helper function function for stringstream formatting.
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getBlockObjects(THREAD_ID tid=0) const
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getBoundaryObjects(THREAD_ID tid=0) const
static InputParameters validParams()
void printMaterialMap() const
Prints material property information in a format similar to Moose system information.
virtual MooseMesh & mesh() override
registerMooseObject("MooseApp", MaterialPropertyDebugOutput)
A class for producing various debug related outputs.
virtual void output() override
Perform the debugging output.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
const std::map< MooseObjectName, std::set< std::string > > & getConsumedPropertyMap() const
Return the map that tracks the object with consumed material properties.
static InputParameters validParams()
std::string join(const T &strings, const std::string &delimiter)
Python like join function for strings.
const ExecFlagType EXEC_INITIAL