29 _xml_doc.append_child(
"VectorPostprocessors");
37 std::ostringstream file_name;
40 <<
"." << std::setw(digits) << std::setfill(
'0') <<
processor_id();
41 return file_name.str();
50 auto vpp_node =
_xml_doc.child(
"VectorPostprocessors");
51 auto vec_node = vpp_node.append_child(
"Vectors");
58 vec_node.append_attribute(
"linear_iteration") =
_linear_iter;
68 const std::string & vpp_name = r_name.getObjectName();
69 const std::string & vec_name = r_name.getValueName();
70 const bool vpp_out =
out.find(vpp_name) !=
out.end();
79 auto data_node = vec_node.append_child(
"Vector");
80 data_node.append_attribute(
"object") = vpp_name.c_str();
81 data_node.append_attribute(
"name") = vec_name.c_str();
82 data_node.append_attribute(
"distributed") = distributed;
85 data_node.append_attribute(
"processor_id") =
processor_id();
86 data_node.append_attribute(
"n_processors") =
n_processors();
92 std::ostringstream oss;
93 std::copy(vector.begin(), vector.end(), infix_ostream_iterator<Real>(oss,
" "));
94 data_node.text().set(oss.str().c_str());
virtual Real & time() const
pugi::xml_document _xml_doc
virtual void outputVectorPostprocessors() override
Performs output of VectorPostprocessors The child class must define this method to output the VectorP...
std::string _file_base
The base filename from the input paramaters.
virtual void output()
A single call to this function should output all the necessary data for a single timestep.
bool _on_nonlinear_residual
True if current output call is on the non-linear residual (used by time())
const std::set< std::string > & getVectorPostprocessorOutput()
The list of VectorPostprocessor names that are set for output.
static InputParameters validParams()
processor_id_type n_processors() const
PetscInt _linear_iter
Current linear iteration returned from PETSc.
virtual void output() override
A single call to this function should output all the necessary data for a single timestep.
const T & getReporterValue(const ReporterName &reporter_name, const MooseObject &consumer, const ReporterMode &mode, const std::size_t time_index=0) const
Method for returning read only references to Reporter values.
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
virtual std::string filename() override
The filename for the output file.
const VectorPostprocessor & getVectorPostprocessorObjectByName(const std::string &object_name, const THREAD_ID tid=0) const
Return the VPP object given the name.
bool isValueSet(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
static InputParameters enableOutputTypes(const std::string &names=std::string())
A method for enabling individual output type control.
const ExecFlagType EXEC_LINEAR
virtual int & timeStep() const
std::set< ReporterName > getReporterNames() const
Return a list of all reporter names.
const ExecFlagEnum & _execute_enum
Execute settings for this object.
registerMooseObject("MooseApp", XMLOutput)
const ReporterData & _reporter_data
Storage for Reporter values.
Based class for output objects.
const ExecFlagType EXEC_NONLINEAR
std::vector< Real > VectorPostprocessorValue
int numDigits(const T &num)
Return the number of digits for a number.
XMLOutput(const InputParameters ¶meters)
bool isDistributed() const
Return true if the VPP is operating in distributed mode.
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
static InputParameters validParams()
processor_id_type processor_id() const
Base class for Postprocessors that produce a vector of values.
PetscInt _nonlinear_iter
Current non-linear iteration returned from PETSc.