PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
inp::OutputDeck Struct Reference

Structure to read input data for performing simulation output. More...

#include <outputDeck.h>

Collaboration diagram for inp::OutputDeck:

Public Member Functions

 OutputDeck ()
 Constructor.
 
std::string printStr (int nt=0, int lvl=0) const
 Returns the string containing printable information about the object.
 
void print (int nt=0, int lvl=0) const
 Prints the information about the object.
 
bool isTagInOutput (const std::string &tag)
 Searches list of tags and returns true if the asked tag is in the list.
 

Data Fields

std::string d_outFormat
 Output format: currently supports vtu, msh, legacy_vtk output.
 
std::string d_path
 Output Path where the files will be written.
 
std::vector< std::string > d_outTags
 List of tags of data to be dumped.
 
size_t d_dtOut
 Size of time steps (or frequency) for output operation.
 
size_t d_dtOutOld
 Size of time steps (or frequency) for output operation.
 
size_t d_debug
 Flag specifying debug level TODO verify below value-description text value = 0: code is almost completely silent value = 1: some information are printed and logged value = 2: more verbosity value = 3: highest verbosity.
 
bool d_performFEOut
 Flag specifying if element-node connectivity should not be dumped.
 
std::string d_compressType
 Compressor type for .vtu files.
 
std::string d_outCriteria
 Specify output criteria to change output frequency.
 
size_t d_dtOutCriteria
 Specify output frequency if output criteria is met.
 
std::vector< double > d_outCriteriaParams
 List of parameters required in checking output criteria.
 
bool d_performOut
 Perform vtu output.
 
size_t d_dtTestOut
 Size of time steps (or frequency) for output operation.
 
std::string d_tagPPFile
 Tag for postprocessing file.
 

Detailed Description

Structure to read input data for performing simulation output.

Definition at line 26 of file outputDeck.h.

Constructor & Destructor Documentation

◆ OutputDeck()

inp::OutputDeck::OutputDeck ( )
inline

Constructor.

Definition at line 103 of file outputDeck.h.

104 : d_outFormat("vtu"), d_path("./"), d_dtOut(0), d_dtOutOld(0), d_debug(0),
106 d_dtTestOut(0), d_tagPPFile("") {};
size_t d_dtTestOut
Size of time steps (or frequency) for output operation.
Definition outputDeck.h:95
size_t d_dtOutCriteria
Specify output frequency if output criteria is met.
Definition outputDeck.h:86
size_t d_dtOut
Size of time steps (or frequency) for output operation.
Definition outputDeck.h:44
bool d_performFEOut
Flag specifying if element-node connectivity should not be dumped.
Definition outputDeck.h:65
std::string d_outFormat
Output format: currently supports vtu, msh, legacy_vtk output.
Definition outputDeck.h:32
std::string d_path
Output Path where the files will be written.
Definition outputDeck.h:38
std::string d_tagPPFile
Tag for postprocessing file.
Definition outputDeck.h:98
size_t d_debug
Flag specifying debug level TODO verify below value-description text value = 0: code is almost comple...
Definition outputDeck.h:57
bool d_performOut
Perform vtu output.
Definition outputDeck.h:92
size_t d_dtOutOld
Size of time steps (or frequency) for output operation.
Definition outputDeck.h:47

Member Function Documentation

◆ isTagInOutput()

bool inp::OutputDeck::isTagInOutput ( const std::string &  tag)
inline

Searches list of tags and returns true if the asked tag is in the list.

Parameters
tagTag to search
Returns
bool True/false If tag is find return true or else false

Definition at line 154 of file outputDeck.h.

154 {
155
156 // search for tag in output tag list
157 for (const auto &type : d_outTags)
158 if (tag == type)
159 return true;
160
161 return false;
162 };
std::vector< std::string > d_outTags
List of tags of data to be dumped.
Definition outputDeck.h:41

References d_outTags.

◆ print()

void inp::OutputDeck::print ( int  nt = 0,
int  lvl = 0 
) const
inline

Prints the information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)

Definition at line 146 of file outputDeck.h.

146{ std::cout << printStr(nt, lvl); }
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition outputDeck.h:115

References printStr().

Here is the call graph for this function:

◆ printStr()

std::string inp::OutputDeck::printStr ( int  nt = 0,
int  lvl = 0 
) const
inline

Returns the string containing printable information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)
Returns
string String containing printable information about the object

Definition at line 115 of file outputDeck.h.

115 {
116
117 auto tabS = util::io::getTabS(nt);
118 std::ostringstream oss;
119 oss << tabS << "------- OutputDeck --------" << std::endl << std::endl;
120 oss << tabS << "Output format = " << d_outFormat << std::endl;
121 oss << tabS << "Output path = " << d_path
122 << std::endl;
123 oss << tabS << "Output tags = " << util::io::printStr<std::string>(d_outTags, 0) << std::endl;
124 oss << tabS << "Output time step = " << d_dtOut << std::endl;
125 oss << tabS << "Output time step old = " << d_dtOutOld << std::endl;
126 oss << tabS << "Debug level = " << d_debug << std::endl;
127 oss << tabS << "Perform FE output = " << d_performFEOut << std::endl;
128 oss << tabS << "Output file compression type = " << d_compressType << std::endl;
129 oss << tabS << "Output criteria = " << d_outCriteria << std::endl;
130 oss << tabS << "Output dt criteria = " << d_dtOutCriteria << std::endl;
131 oss << tabS << "Output criteria parameters = " << util::io::printStr<double>(d_outCriteriaParams, 0) << std::endl;
132 oss << tabS << "Perform output = " << d_performOut << std::endl;
133 oss << tabS << "Output time step when test = " << d_dtTestOut << std::endl;
134 oss << tabS << "Tag for postprocessing file = " << d_tagPPFile << std::endl;
135 oss << tabS << std::endl;
136
137 return oss.str();
138 }
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40
std::string d_compressType
Compressor type for .vtu files.
Definition outputDeck.h:68
std::string d_outCriteria
Specify output criteria to change output frequency.
Definition outputDeck.h:80
std::vector< double > d_outCriteriaParams
List of parameters required in checking output criteria.
Definition outputDeck.h:89

References d_compressType, d_debug, d_dtOut, d_dtOutCriteria, d_dtOutOld, d_dtTestOut, d_outCriteria, d_outCriteriaParams, d_outFormat, d_outTags, d_path, d_performFEOut, d_performOut, d_tagPPFile, and util::io::getTabS().

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ d_compressType

std::string inp::OutputDeck::d_compressType

Compressor type for .vtu files.

Definition at line 68 of file outputDeck.h.

Referenced by printStr().

◆ d_debug

size_t inp::OutputDeck::d_debug

Flag specifying debug level TODO verify below value-description text value = 0: code is almost completely silent value = 1: some information are printed and logged value = 2: more verbosity value = 3: highest verbosity.

Definition at line 57 of file outputDeck.h.

Referenced by printStr().

◆ d_dtOut

size_t inp::OutputDeck::d_dtOut

Size of time steps (or frequency) for output operation.

Definition at line 44 of file outputDeck.h.

Referenced by printStr().

◆ d_dtOutCriteria

size_t inp::OutputDeck::d_dtOutCriteria

Specify output frequency if output criteria is met.

If criteria is met, then this number if used as output frequency.

Definition at line 86 of file outputDeck.h.

Referenced by printStr().

◆ d_dtOutOld

size_t inp::OutputDeck::d_dtOutOld

Size of time steps (or frequency) for output operation.

Definition at line 47 of file outputDeck.h.

Referenced by printStr().

◆ d_dtTestOut

size_t inp::OutputDeck::d_dtTestOut

Size of time steps (or frequency) for output operation.

Definition at line 95 of file outputDeck.h.

Referenced by printStr().

◆ d_outCriteria

std::string inp::OutputDeck::d_outCriteria

Specify output criteria to change output frequency.

Choices are:

  • '' (none/null)
  • max_Z
  • max_Z_stop

Specify the method used in changing the output frequency. If not specified then we do not change the output frequency from d_dtOut.

Definition at line 80 of file outputDeck.h.

Referenced by printStr().

◆ d_outCriteriaParams

std::vector<double> inp::OutputDeck::d_outCriteriaParams

List of parameters required in checking output criteria.

Definition at line 89 of file outputDeck.h.

Referenced by printStr().

◆ d_outFormat

std::string inp::OutputDeck::d_outFormat

Output format: currently supports vtu, msh, legacy_vtk output.

Default is vtu format.

Definition at line 32 of file outputDeck.h.

Referenced by printStr().

◆ d_outTags

std::vector<std::string> inp::OutputDeck::d_outTags

List of tags of data to be dumped.

Definition at line 41 of file outputDeck.h.

Referenced by isTagInOutput(), and printStr().

◆ d_path

std::string inp::OutputDeck::d_path

Output Path where the files will be written.

Default is current working directory

Definition at line 38 of file outputDeck.h.

Referenced by printStr().

◆ d_performFEOut

bool inp::OutputDeck::d_performFEOut

Flag specifying if element-node connectivity should not be dumped.

For large mesh, vtk writer crashes when writing element-node connectivity.

Definition at line 65 of file outputDeck.h.

Referenced by printStr().

◆ d_performOut

bool inp::OutputDeck::d_performOut

Perform vtu output.

Definition at line 92 of file outputDeck.h.

Referenced by printStr().

◆ d_tagPPFile

std::string inp::OutputDeck::d_tagPPFile

Tag for postprocessing file.

Definition at line 98 of file outputDeck.h.

Referenced by printStr().


The documentation for this struct was generated from the following file: