MEDMEM::MED Class Reference
List of all members.
Public Member Functions |
| | MED () |
| | MED (driverTypes driverType, const string &fileName) |
| | ~MED () |
| void | addField (FIELD_ *const ptrField) throw (MED_EXCEPTION) |
| void | addMesh (MESH *const ptrMesh) throw (MED_EXCEPTION) |
| void | updateNamesInMaps () |
| int | addDriver (driverTypes driverType, const string &fileName, MED_EN::med_mode_acces access=MED_EN::RDWR) |
| int | addDriver (GENDRIVER &driver) |
| void | rmDriver (int index=0) throw (MEDEXCEPTION) |
| void | readFileStruct (int index=0) throw (MEDEXCEPTION) |
| void | read (int index=0) throw (MEDEXCEPTION) |
| void | writeFrom (int index=0) throw (MEDEXCEPTION) |
| void | write (int index=0) throw (MEDEXCEPTION) |
| int | getNumberOfMeshes (void) const |
| int | getNumberOfFields (void) const |
| void | getMeshNames (string *meshNames) const throw (MEDEXCEPTION) |
| deque< string > | getMeshNames () const |
| MESH * | getMesh (const string &meshName) const throw (MEDEXCEPTION) |
| MESH * | getMesh (const FIELD_ *const field) const throw (MEDEXCEPTION) |
| void | getFieldNames (string *fieldNames) const throw (MEDEXCEPTION) |
| deque< string > | getFieldNames () const |
| deque< DT_IT_ > | getFieldIteration (const string &fieldName) const throw (MEDEXCEPTION) |
| FIELD_ * | getField (const string &fieldName, const int dt, const int it) const throw (MEDEXCEPTION) |
| template<class T > |
| FIELD< T > * | getFieldT (const string &fieldName, const int dt, const int it) const throw (MEDEXCEPTION) |
| FIELD_ * | getField2 (const string &fieldName, double time, int it=0) const throw (MEDEXCEPTION) |
const map
< MED_EN::medEntityMesh,
SUPPORT * > & | getSupports (const string &meshName) const throw (MEDEXCEPTION) |
| SUPPORT * | getSupport (const string &meshName, MED_EN::medEntityMesh entity) const throw (MEDEXCEPTION) |
| void | updateSupport () |
Friends |
| class | MED_MED_RDONLY_DRIVER21 |
| class | MED_MED_WRONLY_DRIVER21 |
| class | MED_MED_RDWR_DRIVER21 |
| class | MED_MED_RDONLY_DRIVER22 |
| class | MED_MED_WRONLY_DRIVER22 |
| class | MED_MED_RDWR_DRIVER22 |
Detailed Description
This class is use to group together some MESH, SUPPORT and FIELD objects.
Constructor & Destructor Documentation
Member Function Documentation
| void MED::addField |
( |
FIELD_ *const |
ptrField |
) |
throw (MED_EXCEPTION) |
| void MED::addMesh |
( |
MESH *const |
ptrMesh |
) |
throw (MED_EXCEPTION) |
Adds the given MESH object. MED object control it, and destroy it, so you must not destroy it after.
The meshName is given by the MESH object.
| void MED::updateNamesInMaps |
( |
|
) |
|
| void MED::rmDriver |
( |
int |
index = 0 |
) |
throw (MEDEXCEPTION) |
Remove the driver referenced by its index.
| void MED::readFileStruct |
( |
int |
index = 0 |
) |
throw (MEDEXCEPTION) |
Parse all the file and generate empty object.
All object must be read explicitly later with their own method read or use MED::read to read all.
This method is automatically called by constructor with driver information.
| void MED::read |
( |
int |
index = 0 |
) |
throw (MEDEXCEPTION) |
Read all objects in the file specified in the driver given by its index.
| void MED::writeFrom |
( |
int |
index = 0 |
) |
throw (MEDEXCEPTION) |
template<class T >
| FIELD< T > * MEDMEM::MED::getFieldT |
( |
const string & |
fieldName, |
|
|
const int |
dt, |
|
|
const int |
it | |
|
) |
| | const throw (MEDEXCEPTION) |
| FIELD_ * MED::getField2 |
( |
const string & |
fieldName, |
|
|
double |
time, |
|
|
int |
it = 0 | |
|
) |
| | const throw (MEDEXCEPTION) |
Returns a reference to the FIELD object named fieldName with time and iteration nb it.
| const map< MED_EN::medEntityMesh, SUPPORT * > & MED::getSupports |
( |
const string & |
meshName |
) |
const throw (MEDEXCEPTION) |
Returns a map<MED_EN::medEntityMesh,SUPPORT*> which contain foreach entity, a reference to the SUPPORT on all elements.
| void MED::updateSupport |
( |
|
) |
|
The need for this method arises from the following situation. When loading a mesh, Medmem reads the constituent elements in the Med file. It is possible at this stage that not all constituent elements are stored in memory (For instance, reading a 2D mesh, not all the edges are present, because only the boundaries were stored in the file). When computing descending connectivities, Medmem stores all the faces and has a corresponding numbering. This introduces a discrepancy between the support numbering which was determined at file loading and the new numbering. The following method synchronizes the two numberings.
References MEDMEM::SUPPORT::update().
Friends And Related Function Documentation
friend class MED_MED_RDONLY_DRIVER21 [friend] |
friend class MED_MED_WRONLY_DRIVER21 [friend] |
friend class MED_MED_RDWR_DRIVER21 [friend] |
friend class MED_MED_RDONLY_DRIVER22 [friend] |
friend class MED_MED_WRONLY_DRIVER22 [friend] |
friend class MED_MED_RDWR_DRIVER22 [friend] |