www.mooseframework.org
DOFMapOutput.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #pragma once
11 
12 // MOOSE includes
13 #include "FileOutput.h"
14 
15 // Forward declarations
16 class DOFMapOutput;
17 class MooseMesh;
18 
19 template <>
21 
25 class DOFMapOutput : public FileOutput
26 {
27 public:
29 
31 
37  virtual std::string filename() override;
38 
42  void output(const ExecFlagType & type) override;
43 
44 protected:
51  template <typename T>
52  std::string join(const T & begin, const T & end, const char * const delim);
53 
62  void writeStreamToFile(bool append = true);
63 
67  std::string demangle(const std::string & name);
68 
71 
74 
76  std::stringstream _file_output_stream;
77 
79  std::string _system_name;
80 
83 };
84 
FileOutput
An outputter with filename support.
Definition: FileOutput.h:26
DOFMapOutput::_write_screen
bool _write_screen
Flag for controlling outputting console information to screen.
Definition: DOFMapOutput.h:73
DOFMapOutput::_system_name
std::string _system_name
The name of the system to extract DOF information.
Definition: DOFMapOutput.h:79
FileOutput.h
DOFMapOutput::validParams
static InputParameters validParams()
Definition: DOFMapOutput.C:31
MooseObject::type
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:63
DOFMapOutput::_mesh
MooseMesh & _mesh
Reference to the mesh object.
Definition: DOFMapOutput.h:82
MooseObject::parameters
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:76
DOFMapOutput::filename
virtual std::string filename() override
Creates the output file name Appends the user-supplied 'file_base' input parameter with a '....
Definition: DOFMapOutput.C:58
DOFMapOutput::_file_output_stream
std::stringstream _file_output_stream
Stream for storing information to be written to a file.
Definition: DOFMapOutput.h:76
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
DOFMapOutput::_write_file
bool _write_file
Flag for controlling outputting console information to a file.
Definition: DOFMapOutput.h:70
DOFMapOutput
An output object for writing the DOF map of the system in a machine parsable format.
Definition: DOFMapOutput.h:25
DOFMapOutput::writeStreamToFile
void writeStreamToFile(bool append=true)
Write the file stream to the file.
Definition: DOFMapOutput.C:82
DOFMapOutput::demangle
std::string demangle(const std::string &name)
Try to demangle type name.
Definition: DOFMapOutput.C:67
DOFMapOutput::output
void output(const ExecFlagType &type) override
Write the DOF mapt.
Definition: DOFMapOutput.C:111
MooseEnumItem
Class for containing MooseEnum item information.
Definition: MooseEnumItem.h:21
DOFMapOutput::join
std::string join(const T &begin, const T &end, const char *const delim)
A helper method for joining items with a delimeter.
Definition: DOFMapOutput.C:102
validParams< DOFMapOutput >
InputParameters validParams< DOFMapOutput >()
MooseMesh
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
MooseObject::name
virtual const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:70
DOFMapOutput::DOFMapOutput
DOFMapOutput(const InputParameters &parameters)
Definition: DOFMapOutput.C:48