#include <MeshInit.h>
Public Types | |
| typedef StandardAVI::BCFunc | BCFunc |
| typedef StandardAVI::BCImposedType | BCImposedType |
Public Member Functions | |
| MeshInit (double simEndTime, bool wave) | |
| virtual | ~MeshInit () |
| void | initializeMesh (const std::string &fileName, int ndiv) |
| main function to call after creating an instance. | |
| virtual size_t | getSpatialDim () const =0 |
| virtual size_t | getNodesPerElem () const =0 |
| bool | isWave () const |
| double | getSimEndTime () const |
| int | getNumElements () const |
| Number of elements in the mesh. | |
| int | getNumNodes () const |
| number of nodes (vertices) in the mesh | |
| unsigned int | getTotalNumDof () const |
| number of nodes times the dimensionality | |
| const std::vector< AVI * > & | getAVIVec () const |
| const LocalToGlobalMap & | getLocalToGlobalMap () const |
| mapping function from local per element vectors (for target functions) to global vectors this tells what indices in the global vector each element contributes to | |
| void | setupDisplacements (VecDouble &disp) const |
| setup initial conditions to be called before starting the simulation loop | |
| void | setupVelocities (VecDouble &vel) const |
| setup initial conditions to be called before starting the simulation loop | |
| void | writeSync (const AVI &avi, const VecDouble &Qval, const VecDouble &Vbval, const VecDouble &Tval) |
| Write the values in global vectors corresponding to this avi element to a file at regular intervals. | |
| bool | cmpState (const MeshInit &that) const |
| Compare state of avi vector against other object Use for verification between different versions. | |
| void | printDiff (const MeshInit &that) const |
| Compare state of avi vector against other object Use for verification between different versions and also print out the differences. | |
Protected Member Functions | |
| virtual BCFunc | getBCFunc (const double *coord) const =0 |
| functions to compute boundary condtions | |
| virtual CoordConn * | makeCoordConn () const =0 |
| returns the correct derived type of CoordConn | |
| virtual const double * | getParam () const =0 |
| parametric node numbering of an element (triangle or tetrahedron) | |
| virtual double | initDisp (const double *coord, int f) const =0 |
| internal function used by | |
| virtual double | initVel (const double *coord, int f) const =0 |
| internal function used by | |
| virtual size_t | numFields () const =0 |
| number of fields often the same as dimensionality | |
Private Member Functions | |
| void | stretchInternal (VecDouble &dispOrVel, bool isVel) const |
| void | getBCs (const Element &e, std::vector< std::vector< BCImposedType > > &itypeMat, std::vector< BCFunc > &bcfuncVec) const |
| void | destroy () |
Static Private Member Functions | |
| static bool | computeDiffAVI (std::vector< AVI * > listA, std::vector< AVI * > listB, bool printDiff) |
| template<typename T > | |
| static void | destroyVecOfPtr (std::vector< T * > &vec) |
Private Attributes | |
| double | simEndTime |
| bool | wave |
| LocalToGlobalMap * | l2gMap |
| to be freed | |
| CoordConn * | cc |
| SimpleMaterial * | ile |
| std::vector< ElementGeometry * > | geomVec |
| vectors to keep track of all the memory | |
| std::vector< Element * > | elemVec |
| std::vector< Residue * > | massResidueVec |
| std::vector< DResidue * > | operationsVec |
| std::vector< AVI * > | aviVec |
| std::vector< size_t > | fieldsUsed |
| double | writeInc |
| int | writeInterval |
| std::vector< size_t > | aviWriteInterval |
| FILE * | syncFileWriter |
Static Private Attributes | |
| static const double | RHO = 1.0 |
| static const double | MU = 0.5 |
| static const double | LAMBDA = 0.0 |
| static const int | PID = 0 |
| static const double | DELTA = 0.1 |
| static const double | T_INIT = 0.0 |
| static const size_t | MAX_FNAME = 1024 |
| typedef StandardAVI::BCFunc MeshInit::BCFunc |
| MeshInit::MeshInit | ( | double | simEndTime, | |
| bool | wave | |||
| ) | [inline] |
| simEndTime | ||
| wave |
| virtual MeshInit::~MeshInit | ( | ) | [inline, virtual] |
| bool MeshInit::cmpState | ( | const MeshInit & | that | ) | const [inline] |
Compare state of avi vector against other object Use for verification between different versions.
| that |
| bool MeshInit::computeDiffAVI | ( | std::vector< AVI * > | listA, | |
| std::vector< AVI * > | listB, | |||
| bool | printDiff | |||
| ) | [static, private] |
| void MeshInit::destroy | ( | ) | [inline, private] |
| static void MeshInit::destroyVecOfPtr | ( | std::vector< T * > & | vec | ) | [inline, static, private] |
| const std::vector<AVI*>& MeshInit::getAVIVec | ( | ) | const [inline] |
| virtual BCFunc MeshInit::getBCFunc | ( | const double * | coord | ) | const [protected, pure virtual] |
functions to compute boundary condtions
| coord |
Implemented in TriMeshInit, and TetMeshInit.
| void MeshInit::getBCs | ( | const Element & | e, | |
| std::vector< std::vector< BCImposedType > > & | itypeMat, | |||
| std::vector< BCFunc > & | bcfuncVec | |||
| ) | const [private] |
| const LocalToGlobalMap& MeshInit::getLocalToGlobalMap | ( | ) | const [inline] |
mapping function from local per element vectors (for target functions) to global vectors this tells what indices in the global vector each element contributes to
| virtual size_t MeshInit::getNodesPerElem | ( | ) | const [pure virtual] |
Implemented in TriMeshInit, and TetMeshInit.
| int MeshInit::getNumElements | ( | ) | const [inline] |
Number of elements in the mesh.
| int MeshInit::getNumNodes | ( | ) | const [inline] |
number of nodes (vertices) in the mesh
| virtual const double* MeshInit::getParam | ( | ) | const [protected, pure virtual] |
parametric node numbering of an element (triangle or tetrahedron)
Implemented in TriMeshInit, and TetMeshInit.
| double MeshInit::getSimEndTime | ( | ) | const [inline] |
| virtual size_t MeshInit::getSpatialDim | ( | ) | const [pure virtual] |
Implemented in TriMeshInit, and TetMeshInit.
| unsigned int MeshInit::getTotalNumDof | ( | ) | const [inline] |
number of nodes times the dimensionality
| virtual double MeshInit::initDisp | ( | const double * | coord, | |
| int | f | |||
| ) | const [protected, pure virtual] |
internal function used by
| coord | ||
| f |
Implemented in TriMeshInit, and TetMeshInit.
| void MeshInit::initializeMesh | ( | const std::string & | fileName, | |
| int | ndiv | |||
| ) |
main function to call after creating an instance.
This initializes all the data structures by reading this file
| fileName | ||
| ndiv,: | number of times the mesh (read in from the file) should be subdivided | |
| fileName | ||
| ndiv | number of times to subdivide the initial mesh |
| virtual double MeshInit::initVel | ( | const double * | coord, | |
| int | f | |||
| ) | const [protected, pure virtual] |
internal function used by
| coord | ||
| f |
Implemented in TriMeshInit, and TetMeshInit.
| bool MeshInit::isWave | ( | ) | const [inline] |
| virtual CoordConn* MeshInit::makeCoordConn | ( | ) | const [protected, pure virtual] |
returns the correct derived type of CoordConn
Implemented in TriMeshInit, and TetMeshInit.
| virtual size_t MeshInit::numFields | ( | ) | const [protected, pure virtual] |
number of fields often the same as dimensionality
Implemented in TriMeshInit, and TetMeshInit.
| void MeshInit::printDiff | ( | const MeshInit & | that | ) | const [inline] |
Compare state of avi vector against other object Use for verification between different versions and also print out the differences.
| that |
| void MeshInit::setupDisplacements | ( | VecDouble & | disp | ) | const [inline] |
setup initial conditions to be called before starting the simulation loop
| disp,: | global dispalcements vector |
| void MeshInit::setupVelocities | ( | VecDouble & | vel | ) | const [inline] |
setup initial conditions to be called before starting the simulation loop
| vel,: | global velocities vector |
| void MeshInit::stretchInternal | ( | VecDouble & | dispOrVel, | |
| bool | isVel | |||
| ) | const [private] |
| void MeshInit::writeSync | ( | const AVI & | avi, | |
| const VecDouble & | Qval, | |||
| const VecDouble & | Vbval, | |||
| const VecDouble & | Tval | |||
| ) |
Write the values in global vectors corresponding to this avi element to a file at regular intervals.
| avi | ||
| Qval | ||
| Vbval | ||
| Tval | ||
| avi | ||
| Qval | displacement | |
| Vbval | velocity | |
| Tval | time |
std::vector<AVI*> MeshInit::aviVec [private] |
std::vector<size_t> MeshInit::aviWriteInterval [private] |
CoordConn* MeshInit::cc [private] |
const double MeshInit::DELTA = 0.1 [static, private] |
std::vector<Element*> MeshInit::elemVec [private] |
std::vector<size_t> MeshInit::fieldsUsed [private] |
std::vector<ElementGeometry*> MeshInit::geomVec [private] |
vectors to keep track of all the memory
SimpleMaterial* MeshInit::ile [private] |
LocalToGlobalMap* MeshInit::l2gMap [private] |
to be freed
const double MeshInit::LAMBDA = 0.0 [static, private] |
std::vector<Residue*> MeshInit::massResidueVec [private] |
const size_t MeshInit::MAX_FNAME = 1024 [static, private] |
const double MeshInit::MU = 0.5 [static, private] |
std::vector<DResidue*> MeshInit::operationsVec [private] |
const int MeshInit::PID = 0 [static, private] |
const double MeshInit::RHO = 1.0 [static, private] |
double MeshInit::simEndTime [private] |
FILE* MeshInit::syncFileWriter [private] |
const double MeshInit::T_INIT = 0.0 [static, private] |
bool MeshInit::wave [private] |
double MeshInit::writeInc [private] |
int MeshInit::writeInterval [private] |
1.6.3