https://mooseframework.inl.gov
DOFMapOutput.h
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 #pragma once
11 
12 // MOOSE includes
13 #include "FileOutput.h"
14 
15 class MooseMesh;
16 
20 class DOFMapOutput : public FileOutput
21 {
22 public:
24 
26 
32  virtual std::string filename() override;
33 
37  void output() override;
38 
39 protected:
46  template <typename T>
47  std::string join(const T & begin, const T & end, const char * const delim);
48 
57  void writeStreamToFile(bool append = true);
58 
62  std::string demangle(const std::string & name);
63 
66 
69 
71  std::stringstream _file_output_stream;
72 
74  std::string _system_name;
75 
78 
80  const unsigned int _nl_sys_num;
81 };
static InputParameters validParams()
Definition: DOFMapOutput.C:31
std::stringstream _file_output_stream
Stream for storing information to be written to a file.
Definition: DOFMapOutput.h:71
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const unsigned int _nl_sys_num
The nonlinear system number we should output degree of freedom information for.
Definition: DOFMapOutput.h:80
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseMesh & _mesh
Reference to the mesh object.
Definition: DOFMapOutput.h:77
bool _write_screen
Flag for controlling outputting console information to screen.
Definition: DOFMapOutput.h:68
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
void output() override
Write the DOF mapt.
Definition: DOFMapOutput.C:114
An output object for writing the DOF map of the system in a machine parsable format.
Definition: DOFMapOutput.h:20
virtual std::string filename() override
Creates the output file name Appends the user-supplied &#39;file_base&#39; input parameter with a &#39;...
Definition: DOFMapOutput.C:61
DOFMapOutput(const InputParameters &parameters)
Definition: DOFMapOutput.C:50
const InputParameters & parameters() const
Get the parameters of the object.
std::string _system_name
The name of the system to extract DOF information.
Definition: DOFMapOutput.h:74
void writeStreamToFile(bool append=true)
Write the file stream to the file.
Definition: DOFMapOutput.C:85
An outputter with filename support.
Definition: FileOutput.h:20
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:105
std::string demangle(const std::string &name)
Try to demangle type name.
Definition: DOFMapOutput.C:70
bool _write_file
Flag for controlling outputting console information to a file.
Definition: DOFMapOutput.h:65