swSim  Version 1.0
All Classes Namespaces Files Functions Variables Typedefs Macros
Classes | Public Member Functions | Public Attributes | List of all members
swSim::Model Class Reference

Defines data structures for Model in swSim. More...

#include "include/Model.hpp"

Inheritance diagram for swSim::Model:
swSim::ParsableObject

Classes

struct  model_s
 

Public Member Functions

 Model ()
 Create the Model. More...
 
 ~Model ()
 Destroy the Model. More...
 
void Init (uint32_t TimeSteps, double dt, uint8_t numMat, uint8_t numExc)
 Initilize data values. More...
 
void Init (uint32_t TimeSteps, double dt, uint8_t numMat, uint8_t numExc, const char *inFname, const char *inPname)
 Initilize data values and file names. More...
 
void Copy (Model *other)
 Copy values of one model to another. More...
 
MPI_Datatype MPICreate ()
 Create the MPI datatype for the model. More...
 
void ParseSwitch (xmlDocPtr doc, xmlNodePtr cur, int caseNumber) override
 Provide parsing instructions for reading inputs associated with the model. More...
 
void Input (char *inputFileName, MPI_Comm m_mpi_comm)
 Takes input from a file and disperse it across all process. More...
 
void Print (int rank)
 Prints all the elements of the Model. More...
 
int readInput (char *inputFileName)
 Read the Input from the file. More...
 
void sendInput (MPI_Comm l_mpi_comm)
 Send the Input to other processes. More...
 
void recieveInput (MPI_Comm l_mpi_comm)
 Recieve the Input from another processes. More...
 
std::string parsePath (char *inputFileName)
 Return the path only. More...
 
std::string parseFile (char *inputFileName)
 Return the filename only. More...
 
- Public Member Functions inherited from swSim::ParsableObject
void Parse (xmlDocPtr doc, xmlNodePtr cur)
 Parse the specific object. More...
 
xmlNodePtr ParseSearch (xmlDocPtr doc, xmlNodePtr cur, const char *value)
 Search to the xml element corespondng to each parsable variable. More...
 
void Do_parse (xmlDocPtr doc, xmlNodePtr cur, double *value)
 Parse a double object. More...
 
void Do_parse (xmlDocPtr doc, xmlNodePtr cur, float *value)
 Parse a float object. More...
 
void Do_parse (xmlDocPtr doc, xmlNodePtr cur, uint8_t *value)
 Parse a uint_8 object. More...
 
void Do_parse (xmlDocPtr doc, xmlNodePtr cur, uint32_t *value)
 Parse a uint_32 object. More...
 
void Do_parse (xmlDocPtr doc, xmlNodePtr cur, uint64_t *value)
 Parse a uint_64 object. More...
 
void Do_parse (xmlDocPtr doc, xmlNodePtr cur, bool *value)
 Parse a boolean object. More...
 
void Do_parse (xmlDocPtr doc, xmlNodePtr cur, char *value)
 Parse a char array object. More...
 

Public Attributes

model_s modS
 The Model struct for MPI passing. More...
 
Geometry modGeometry
 The geometry associated with the model. More...
 
std::vector< MaterialmodMaterialsList
 Vector of materials. More...
 
std::vector< ExcitationmodExcitationsList
 Vector of Excitations. More...
 
MPI_Datatype mpi_model
 MPI data type for passing the Model struct. More...
 
- Public Attributes inherited from swSim::ParsableObject
std::vector< std::string > parseNames
 Vector of parse names to look for when reading inputs. More...
 

Detailed Description

Defines data structures for Model in swSim.

Constructor & Destructor Documentation

◆ Model()

swSim::Model::Model ( )

Create the Model.

◆ ~Model()

swSim::Model::~Model ( )

Destroy the Model.

Member Function Documentation

◆ Init() [1/2]

void swSim::Model::Init ( uint32_t  TimeSteps,
double  dt,
uint8_t  numMat,
uint8_t  numExc 
)

Initilize data values.

◆ Init() [2/2]

void swSim::Model::Init ( uint32_t  TimeSteps,
double  dt,
uint8_t  numMat,
uint8_t  numExc,
const char *  inFname,
const char *  inPname 
)

Initilize data values and file names.

◆ Copy()

void swSim::Model::Copy ( Model other)

Copy values of one model to another.

◆ MPICreate()

MPI_Datatype swSim::Model::MPICreate ( )

Create the MPI datatype for the model.

◆ ParseSwitch()

void swSim::Model::ParseSwitch ( xmlDocPtr  doc,
xmlNodePtr  cur,
int  caseNumber 
)
overridevirtual

Provide parsing instructions for reading inputs associated with the model.

Reimplemented from swSim::ParsableObject.

◆ Input()

void swSim::Model::Input ( char *  inputFileName,
MPI_Comm  m_mpi_comm 
)

Takes input from a file and disperse it across all process.

◆ Print()

void swSim::Model::Print ( int  rank)

Prints all the elements of the Model.

◆ readInput()

int swSim::Model::readInput ( char *  inputFileName)

Read the Input from the file.

◆ sendInput()

void swSim::Model::sendInput ( MPI_Comm  l_mpi_comm)

Send the Input to other processes.

◆ recieveInput()

void swSim::Model::recieveInput ( MPI_Comm  l_mpi_comm)

Recieve the Input from another processes.

◆ parsePath()

std::string swSim::Model::parsePath ( char *  inputFileName)

Return the path only.

◆ parseFile()

std::string swSim::Model::parseFile ( char *  inputFileName)

Return the filename only.

Member Data Documentation

◆ modS

model_s swSim::Model::modS

The Model struct for MPI passing.

◆ modGeometry

Geometry swSim::Model::modGeometry

The geometry associated with the model.

◆ modMaterialsList

std::vector<Material> swSim::Model::modMaterialsList

Vector of materials.

◆ modExcitationsList

std::vector<Excitation> swSim::Model::modExcitationsList

Vector of Excitations.

◆ mpi_model

MPI_Datatype swSim::Model::mpi_model

MPI data type for passing the Model struct.


The documentation for this class was generated from the following files: