Implementation of the basic parts of the serial program example. More...
#include <DriverProgram.H>
Public Member Functions | |
SerialProgram () | |
Default constructor. More... | |
SerialProgram (int nargs, char **args) | |
Constructor designed to take the commandline args. More... | |
virtual int | Initialize () |
Initializes native data structures from commandline args. More... | |
int | VerbLevel () const |
Returns verbosity level. More... | |
virtual | ~SerialProgram () |
Destructor. More... | |
virtual int | Run () |
This function implements the main function executed by the program. More... | |
virtual int | ReadPatranInput () |
This function parses a Patran format input file. More... | |
virtual int | ReadStanfordInput () |
This function parses a Stanford format input file. More... | |
virtual int | HigherOrderTets (SolverUtils::Mesh::Connectivity elemEdgeToElems, SolverUtils::Mesh::Connectivity nodesToDomains) |
This function creates higher order tets from linear tets. More... | |
virtual int | ConnectivityMaps (SolverUtils::Mesh::Connectivity nodesToElems) |
This function creates a few different connectivity maps that are needed. More... | |
virtual int | WriteOutput () |
This function writes the output grid file. More... | |
Protected Attributes | |
std::string | output_name |
Name of file for output. More... | |
std::string | input_name |
Name of input file. More... | |
std::string | bc_input_name |
Name of bc input file. More... | |
int | verblevel |
Verbosity level. More... | |
std::ofstream | Ouf |
Outfile stream for output. More... | |
std::ifstream | Inf |
Infile stream for input. More... | |
bool | quadratic |
boolean for changing the elements to higher order More... | |
int | numNodes |
number of nodes in mesh More... | |
std::vector< double > | nodes |
vector for holding nodal coordinates read from input More... | |
std::vector< std::vector< int > > | nodeBCs |
std::vector< std::vector < std::vector< double > > > | nodeBCValues |
vector to hold list of node bc values (these are different for each bc type - see the Rocfrac documentation for more clarification) More... | |
SolverUtils::Mesh::Connectivity | nodesToDomains |
int | numElemEdges |
number of element edges in mesh More... | |
std::vector< unsigned int > | elemEdges |
vector for holding element edges More... | |
int | numNodesPerElemEdge |
number of nodes per element edge More... | |
std::vector< unsigned int > | elemToElemEdges |
map of elements to element edges More... | |
int | numEdgesPerElem |
int | numElems |
number of elements in mesh More... | |
std::vector< std::vector < unsigned int > > | nodeToNode |
vector for holding node to node map More... | |
std::vector< unsigned int > | elems |
vector for holding element connectivies read from input More... | |
std::vector< std::vector< int > > | elemBCs |
vector to hold list of element bc values More... | |
std::vector< std::vector < std::vector< double > > > | elemBCValues |
vector to hold list of element bc values (these are different for each bc type - see the Rocfrac documentation for more clarification) More... | |
int | numNodesPerElem |
number of nodes per element More... | |
std::vector< std::vector< int > > | elemsToDomains |
vector to hold the domains for each element More... | |
int | elemShape |
integer to denote the shape of elements used in the mesh More... | |
std::vector< std::string > | shapes |
vector to hold the element shapes (only used for Patran input format) More... | |
int | numDomains |
number of domains in mesh More... | |
std::vector< std::vector < unsigned int > > | domains |
vector of vectors to hold the domains More... | |
std::vector< std::vector< int > > | domainBCs |
vector to hold list of domain bc flags More... | |
std::vector< std::vector < std::vector< double > > > | domainBCValues |
vector to hold list of domain bc values (these are different for each bc type - see the Rocfrac documentation for more clarification) More... | |
std::vector< std::vector< int > > | edges |
vector of vectors to hold the edges More... | |
std::vector< std::vector< int > > | edgeBCs |
vector to hold list of edge bc flags More... | |
std::vector< std::vector < std::vector< double > > > | edgeBCValues |
vector to hold list of edge bc values (these are different for each bc type - see the Rocfrac documentation for more clarification) More... | |
Implementation of the basic parts of the serial program example.
This object encapsulates the example serial program. It inherits from the IRAD::Global::Program type.
The program itself just copies a specified input file to the specified output file (or stdout if no file is given). The command line usage goes:
sep Usage: sep [-h] [-v [arg] -o <filename> ] <input> -h,--help Prints this long version of help. -v,--verbosity [arg] -o,--output <filename> Specifies the name of the output file. <input> Mode-dependent input: input <filename> for serial example program, or <number of divisions> for parallel example.
Definition at line 178 of file DriverProgram.H.
|
inline |
Default constructor.
Definition at line 255 of file DriverProgram.H.
|
inline |
Constructor designed to take the commandline args.
Definition at line 261 of file DriverProgram.H.
|
inlinevirtual |
Destructor.
Definition at line 348 of file DriverProgram.H.
References SerialProgram::Ouf.
|
virtual |
This function creates a few different connectivity maps that are needed.
Definition at line 6 of file ConnectivityMaps.C.
References SerialProgram::elemEdges, SerialProgram::elems, SerialProgram::elemToElemEdges, i, j, k, SerialProgram::nodeToNode, SerialProgram::numEdgesPerElem, SerialProgram::numElemEdges, SerialProgram::numElems, SerialProgram::numNodes, SerialProgram::numNodesPerElem, SerialProgram::numNodesPerElemEdge, and SerialProgram::verblevel.
Referenced by SerialProgram::Run().
|
virtual |
This function creates higher order tets from linear tets.
(For now it only takes 4 node tets and creates only 10 node tets.
Definition at line 6 of file HigherOrder.C.
References SerialProgram::domains, SerialProgram::elemEdges, SerialProgram::elems, SerialProgram::elemToElemEdges, i, j, k, SerialProgram::nodes, SerialProgram::numEdgesPerElem, SerialProgram::numElemEdges, SerialProgram::numElems, SerialProgram::numNodes, SerialProgram::numNodesPerElem, SerialProgram::numNodesPerElemEdge, SerialProgram::verblevel, x, y, and z.
Referenced by SerialProgram::Run().
|
inlinevirtual |
Initializes native data structures from commandline args.
Definition at line 267 of file DriverProgram.H.
References SerialProgram::bc_input_name, SerialProgram::elemShape, SerialProgram::input_name, SerialProgram::numDomains, SerialProgram::numElems, SerialProgram::numNodes, SerialProgram::numNodesPerElem, SerialProgram::output_name, SerialProgram::quadratic, SerialProgram::shapes, and SerialProgram::verblevel.
Referenced by GridConversion::ExampleProgram::Driver(), and GridConversion::DriverProgram::Driver().
|
virtual |
This function parses a Patran format input file.
Definition at line 5 of file ReadPatranInput.C.
References SerialProgram::bc_input_name, SerialProgram::domainBCs, SerialProgram::domainBCValues, SerialProgram::domains, SerialProgram::edgeBCs, SerialProgram::edgeBCValues, SerialProgram::edges, SerialProgram::elems, SerialProgram::elemShape, i, SerialProgram::Inf, SerialProgram::input_name, j, lines(), SerialProgram::nodes, SerialProgram::numElems, SerialProgram::numNodes, SerialProgram::numNodesPerElem, SerialProgram::shapes, and SerialProgram::verblevel.
|
virtual |
This function parses a Stanford format input file.
Definition at line 5 of file ReadStanfordInput.C.
References SerialProgram::bc_input_name, SerialProgram::domainBCs, SerialProgram::domainBCValues, SerialProgram::domains, SerialProgram::edgeBCs, SerialProgram::edgeBCValues, SerialProgram::edges, SerialProgram::elems, SerialProgram::elemShape, i, SerialProgram::Inf, SerialProgram::input_name, j, k, lines(), SerialProgram::nodes, SerialProgram::numDomains, SerialProgram::numElems, SerialProgram::numNodes, SerialProgram::numNodesPerElem, and SerialProgram::verblevel.
Referenced by SerialProgram::Run().
|
virtual |
This function implements the main function executed by the program.
Definition at line 16 of file DriverProgram.C.
References SerialProgram::ConnectivityMaps(), SerialProgram::domainBCs, SerialProgram::domainBCValues, SerialProgram::domains, SerialProgram::edgeBCs, SerialProgram::edgeBCValues, SerialProgram::edges, SerialProgram::elemBCs, SerialProgram::elemBCValues, SerialProgram::elems, SerialProgram::elemsToDomains, SerialProgram::elemToElemEdges, SerialProgram::HigherOrderTets(), i, j, k, SerialProgram::nodeBCs, SerialProgram::nodeBCValues, SerialProgram::nodes, SerialProgram::nodesToDomains, SerialProgram::numEdgesPerElem, SerialProgram::numElemEdges, SerialProgram::numElems, SerialProgram::numNodes, SerialProgram::numNodesPerElem, SerialProgram::quadratic, SerialProgram::ReadStanfordInput(), SerialProgram::verblevel, and SerialProgram::WriteOutput().
Referenced by GridConversion::ExampleProgram::Driver(), and GridConversion::DriverProgram::Driver().
|
inline |
Returns verbosity level.
Definition at line 344 of file DriverProgram.H.
References SerialProgram::verblevel.
Referenced by GridConversion::ExampleProgram::Driver(), and GridConversion::DriverProgram::Driver().
|
virtual |
This function writes the output grid file.
Definition at line 6 of file WriteOutput.C.
References SerialProgram::domainBCs, SerialProgram::domainBCValues, SerialProgram::elems, SerialProgram::elemShape, SerialProgram::elemsToDomains, i, j, k, SerialProgram::nodeBCs, SerialProgram::nodeBCValues, SerialProgram::nodes, SerialProgram::nodesToDomains, SerialProgram::numElems, SerialProgram::numNodes, SerialProgram::numNodesPerElem, SerialProgram::Ouf, and SerialProgram::output_name.
Referenced by SerialProgram::Run().
|
protected |
Name of bc input file.
Definition at line 186 of file DriverProgram.H.
Referenced by SerialProgram::Initialize(), SerialProgram::ReadPatranInput(), and SerialProgram::ReadStanfordInput().
|
protected |
vector to hold list of domain bc flags
Definition at line 240 of file DriverProgram.H.
Referenced by SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
vector to hold list of domain bc values (these are different for each bc type - see the Rocfrac documentation for more clarification)
Definition at line 243 of file DriverProgram.H.
Referenced by SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
vector of vectors to hold the domains
Definition at line 238 of file DriverProgram.H.
Referenced by SerialProgram::HigherOrderTets(), SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), and SerialProgram::Run().
|
protected |
vector to hold list of edge bc flags
Definition at line 247 of file DriverProgram.H.
Referenced by SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), and SerialProgram::Run().
|
protected |
vector to hold list of edge bc values (these are different for each bc type - see the Rocfrac documentation for more clarification)
Definition at line 250 of file DriverProgram.H.
Referenced by SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), and SerialProgram::Run().
|
protected |
vector of vectors to hold the edges
Definition at line 245 of file DriverProgram.H.
Referenced by SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), and SerialProgram::Run().
|
protected |
vector to hold list of element bc values
Definition at line 223 of file DriverProgram.H.
Referenced by SerialProgram::Run().
|
protected |
vector to hold list of element bc values (these are different for each bc type - see the Rocfrac documentation for more clarification)
Definition at line 226 of file DriverProgram.H.
Referenced by SerialProgram::Run().
|
protected |
vector for holding element edges
Definition at line 209 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), and SerialProgram::HigherOrderTets().
|
protected |
vector for holding element connectivies read from input
Definition at line 221 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), SerialProgram::HigherOrderTets(), SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
integer to denote the shape of elements used in the mesh
Definition at line 232 of file DriverProgram.H.
Referenced by SerialProgram::Initialize(), SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), and SerialProgram::WriteOutput().
|
protected |
vector to hold the domains for each element
Definition at line 230 of file DriverProgram.H.
Referenced by SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
map of elements to element edges
Definition at line 213 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), SerialProgram::HigherOrderTets(), and SerialProgram::Run().
|
protected |
Infile stream for input.
Definition at line 192 of file DriverProgram.H.
Referenced by SerialProgram::ReadPatranInput(), and SerialProgram::ReadStanfordInput().
|
protected |
Name of input file.
Definition at line 184 of file DriverProgram.H.
Referenced by SerialProgram::Initialize(), SerialProgram::ReadPatranInput(), and SerialProgram::ReadStanfordInput().
|
protected |
Definition at line 200 of file DriverProgram.H.
Referenced by SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
vector to hold list of node bc values (these are different for each bc type - see the Rocfrac documentation for more clarification)
Definition at line 203 of file DriverProgram.H.
Referenced by SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
vector for holding nodal coordinates read from input
Definition at line 198 of file DriverProgram.H.
Referenced by SerialProgram::HigherOrderTets(), SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
Definition at line 205 of file DriverProgram.H.
Referenced by SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
vector for holding node to node map
Definition at line 219 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps().
|
protected |
number of domains in mesh
Definition at line 236 of file DriverProgram.H.
Referenced by SerialProgram::Initialize(), and SerialProgram::ReadStanfordInput().
|
protected |
Definition at line 215 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), SerialProgram::HigherOrderTets(), and SerialProgram::Run().
|
protected |
number of element edges in mesh
Definition at line 207 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), SerialProgram::HigherOrderTets(), and SerialProgram::Run().
|
protected |
number of elements in mesh
Definition at line 217 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), SerialProgram::HigherOrderTets(), SerialProgram::Initialize(), SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
number of nodes in mesh
Definition at line 196 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), SerialProgram::HigherOrderTets(), SerialProgram::Initialize(), SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
number of nodes per element
Definition at line 228 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), SerialProgram::HigherOrderTets(), SerialProgram::Initialize(), SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), SerialProgram::Run(), and SerialProgram::WriteOutput().
|
protected |
number of nodes per element edge
Definition at line 211 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), and SerialProgram::HigherOrderTets().
|
protected |
Outfile stream for output.
Definition at line 190 of file DriverProgram.H.
Referenced by SerialProgram::WriteOutput(), and SerialProgram::~SerialProgram().
|
protected |
Name of file for output.
Definition at line 182 of file DriverProgram.H.
Referenced by SerialProgram::Initialize(), and SerialProgram::WriteOutput().
|
protected |
boolean for changing the elements to higher order
Definition at line 194 of file DriverProgram.H.
Referenced by SerialProgram::Initialize(), and SerialProgram::Run().
|
protected |
vector to hold the element shapes (only used for Patran input format)
Definition at line 234 of file DriverProgram.H.
Referenced by SerialProgram::Initialize(), and SerialProgram::ReadPatranInput().
|
protected |
Verbosity level.
Definition at line 188 of file DriverProgram.H.
Referenced by SerialProgram::ConnectivityMaps(), SerialProgram::HigherOrderTets(), SerialProgram::Initialize(), SerialProgram::ReadPatranInput(), SerialProgram::ReadStanfordInput(), SerialProgram::Run(), and SerialProgram::VerbLevel().