Go to the documentation of this file.
42 void addOutput(std::shared_ptr<Output> & output);
61 bool hasOutput(
const std::string & name)
const;
86 void setFileNumbers(std::map<std::string, unsigned int> input,
unsigned int offset = 0);
127 template <
typename T>
136 template <
typename T>
137 std::vector<T *>
getOutputs(
const std::vector<OutputName> & names);
144 template <
typename T>
152 template <
typename T>
213 template <
typename T>
283 const std::set<std::string> & variable_names);
367 template <
typename T>
373 mooseError(
"An output object with the name '",
name,
"' does not exist.");
380 mooseError(
"An output object with the name '",
name,
"' for the specified type does not exist");
386 template <
typename T>
391 std::vector<T *> outputs;
394 for (std::vector<OutputName>::const_iterator it = names.begin(); it != names.end(); ++it)
395 outputs.push_back(getOutput<T>(*it));
401 template <
typename T>
406 std::vector<T *> outputs;
409 for (std::map<OutputName, Output *>::const_iterator it =
_object_map.begin();
413 T *
output = dynamic_cast<T *>(it->second);
415 outputs.push_back(
output);
422 template <
typename T>
423 std::vector<OutputName>
427 std::vector<OutputName> names;
430 for (std::map<OutputName, Output *>::const_iterator it =
_object_map.begin();
434 T *
output = dynamic_cast<T *>(it->second);
436 names.push_back(it->first);
443 template <
typename T>
447 std::vector<T *> outputs = getOutputs<T>();
448 for (
typename std::vector<T *>::iterator it = outputs.begin(); it != outputs.end(); ++it)
449 (*it)->allowOutput(state);
void mooseConsole()
Send current output buffer to Console output objects.
std::set< AuxVariableName > _all_material_output_variables
List of all variable created by auto material output.
bool isReservedName(const std::string &name)
Test if the given name is reserved.
void addInterfaceHideVariables(const std::string &output_name, const std::set< std::string > &variable_names)
Insert variable names for hiding via the OutoutInterface.
void setFileNumbers(std::map< std::string, unsigned int > input, unsigned int offset=0)
Calls the setFileNumber method for every FileOutput output object.
void setCommonParameters(InputParameters *params_ptr)
Stores the common InputParameters object.
bool hasOutput(const std::string &name) const
Returns true if the output object exists.
void subdomainSetup()
Calls the subdomainSetup function for each of the output objects.
const std::set< OutputName > & getOutputNames()
Get a complete set of all output object names.
bool _buffer_action_console_outputs
True to buffer console outputs in actions.
std::set< OutputName > _object_names
A set of output names.
std::set< Real > & getSyncTimes()
Return the sync times for all objects.
bool _logging_requested
Indicates that performance logging has been requested by the console or some object (PerformanceData)
void flushConsoleBuffer()
If content exists in the buffer, write it.
bool _force_output
Flag indicating that next call to outputStep is forced.
std::ostringstream _console_buffer
The stream for holding messages passed to _console prior to Output object construction.
void addOutput(std::shared_ptr< Output > &output)
Adds an existing output object to the warehouse.
void addOutputFilename(const OutFileBase &filename)
Adds the file name to the list of filenames being output The main function of this object is to test ...
std::vector< std::shared_ptr< Output > > _all_ptrs
We are using std::shared_ptr to handle the cleanup of the pointers at the end of execution.
const std::set< std::string > & getReservedNames() const
Return a set of reserved output names.
void buildInterfaceHideVariables(const std::string &output_name, std::set< std::string > &hide)
Return the list of hidden variables for the given output name.
std::set< OutFileBase > _file_base_set
List of object names.
std::map< OutputName, std::set< AuxVariableName > > _material_output_map
Map of output name and AuxVariable names to be output (used by auto Material output)
std::map< OutputName, Output * > _object_map
A map of the output pointers.
void forceOutput()
Indicates that the next call to outputStep should be forced This is private, users should utilize FEP...
std::ostringstream & consoleBuffer()
The buffered messages stream for Console objects.
InputParameters * _common_params_ptr
Pointer to the common InputParameters (.
A class to provide an common interface to objects requiring "outputs" option.
std::map< std::string, std::set< std::string > > _interface_map
Storage for variables to hide as prescribed by the object via the OutputInterface.
OutputWarehouse(MooseApp &app)
Class constructor.
void outputStep(ExecFlagType type)
Calls the outputStep method for each output object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
ExecFlagType _output_exec_flag
The current output execution flag.
Class for storing and utilizing output objects.
void solveSetup()
Calls the timestepSetup function for each of the output objects.
virtual ~OutputWarehouse()
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
void initialSetup()
Calls the initialSetup function for each of the output objects.
Adds the ability to output on every nonlinear and/or linear residual.
std::vector< T * > getOutputs() const
Return a vector of objects of a given type.
Class for containing MooseEnum item information.
std::set< Real > _sync_times
Sync times for all objects.
void timestepSetup()
Calls the timestepSetup function for each of the output objects.
virtual void output(const ExecFlagType &type)=0
Overload this function with the desired output activities.
std::vector< Output * > _all_objects
All instances of objects (raw pointers)
void checkOutputs(const std::set< OutputName > &names)
Test that the output names exist.
void jacobianSetup()
Calls the jacobianSetup function for each of the output objects.
void meshChanged()
Calls the meshChanged method for every output object.
T * getOutput(const OutputName &name)
Return an Output object by name.
void bufferConsoleOutputsBeforeConstruction(bool buffer)
Set if the outputs to Console before its construction are to be buffered or to screen directly.
void setOutputExecutionType(ExecFlagType type)
Sets the execution flag type.
std::set< std::string > _reserved
List of reserved names.
Base class for MOOSE-based applications.
void reset()
Reset the output system.
bool getLoggingRequested() const
Returns a Boolean indicating whether performance logging is requested in this application.
void residualSetup()
Calls the residualSetup function for each of the output objects.
InputParameters * getCommonParameters()
Get a reference to the common output parameters.
bool _last_message_ended_in_newline
Whether or not the last thing output by mooseConsole had a newline as the last character.
std::string _input_file_name
Input file name for this output object.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Creates AuxVariables and AuxKernels for automatic output of material properties.
std::map< std::string, unsigned int > getFileNumbers()
Extracts the file numbers from the output objects.
virtual const std::string & name() const
Get the name of the object.
void setLoggingRequested()
Sets a Boolean indicating that at least one object is requesting performance logging in this applicat...