Version: 6.3.1
Data Structures | Typedefs | Functions | Variables

Package MEDMEM_ENSIGHT

Data Structures

struct  TEnSightElemType
 EnSight element type name and an array to convert med connectivity to EnSight one. More...
class  _CaseFileDriver
 Reader/writer of EnSight Case file. More...
class  _CaseFileDriver_User
 Base of all Ensight drivers. It stores data passed from case file. More...
struct  _SubPartDesc
 Descriptor of the sub-part: part number and elem type or "block" etc. More...
struct  _SubPart
 A type within EnSight part. It stores data needed by field driver to know nb of values of a geometric type and what place they get in MED group. More...
struct  _Support
 EnSight variable support composed of _SubPart's. More...
struct  _InterMed
 Structure to temporarily store data read from EnSight geom file. More...
struct  _ValueOwner
 Simple owner of C array. More...
class  _ValueIterator
 Iterator on values of a component. More...
class  _ASCIIFileReader
 Reader of ASCII files. More...
class  _BinaryFileReader
 Reader of binary files. More...
class  _BinaryFileWriter
 Writer of binary files. More...

Typedefs

typedef std::set< _SubPartDesc_SupportDesc
typedef _ValueOwner< char > TStrOwner
typedef _ValueOwner< intTIntOwner
typedef _ValueOwner< doubleTDblOwner
typedef _ValueOwner< float > TFltOwner

Functions

bool isToIgnore (const _CaseFileDriver_User *driver)
 Add a driver to the registry and return true if was already in.
void unregister (const _CaseFileDriver_User *driver)
 Remove a driver from the registry.
_InterMedgetMeshData (const string &key)
 Return mesh data needed by field driver.
STRING compatibilityPb (const string &exceptionText)
 Prepend "EnSight-MEDMEM compatibility problem" to the text of an exception.
bool toIgnoreIncompatibility ()
 To ignore incompatibility or not.
template<class TSet >
bool isValidIndex (const string &index, const map< int, TSet > &aMap)
 Return true if set index is empty or corresponds to an existing set.
const TEnSightElemTypegetEnSightType (medGeometryElement medType)
 Return EnSight type corresponding to med one.
const TEnSightElemTypegetEnSightType (const string &theTypeName)
 Return EnSight type having a given name.
bool contains (const char *what, const char *inString)
 Search substring in a string.
std::ostream & operator<< (std::ostream &os, const _SubPartDesc &desc)
 print _SubPartDesc
bool isGhostType (const string &typeName)
 Return true if typeName begins with "g_".
static float _toFloat (const double &value)
 Cast value to float and protect from overflow.
static float _toFloat (const int &value)
static float _toFloat (const long &value)

Variables

set< const _CaseFileDriver_User * > theCaseUsers
 Registry of drivers creating _CaseFileDriver.
map< string, _InterMed * > theInterMedMap
 Storage of data read by mesh driver to be used by field drivers.
const int MAX_LINE_LENGTH = 80
 Maximal EnSight line length.
const int MAX_FIELD_NAME_LENGTH = 19
 Maximal length of field name in EnSight.
const string ILLEGAL_FIELD_NAME_CHARACTERS = " !@#$^()[]*/+-"
 Maximal length of field name in EnSight.
const int INT_WIDTH_6 = 8
 Width of fields in ASCII file.
const int INT_WIDTH_GOLD = 10
const int FLT_WIDTH = 12
const int SPACE_DIM = 3
 EnSight space dimension.
static const char * TIME_STEP_BEG = "BEGIN TIME STEP"
 Time step data boundaries in single-file mode.
static const char * TIME_STEP_END = "END TIME STEP"
const size_t TIME_STEP_BEG_LEN = 15
const size_t TIME_STEP_END_LEN = 13

Typedef Documentation


Function Documentation

bool MEDMEM_ENSIGHT::isToIgnore ( const _CaseFileDriver_User *  driver)

Add a driver to the registry and return true if was already in.

References theCaseUsers.

void MEDMEM_ENSIGHT::unregister ( const _CaseFileDriver_User *  driver)

Remove a driver from the registry.

References theCaseUsers, and theInterMedMap.

_InterMed * MEDMEM_ENSIGHT::getMeshData ( const string &  key)
STRING MEDMEM_ENSIGHT::compatibilityPb ( const string &  exceptionText)

Prepend "EnSight-MEDMEM compatibility problem" to the text of an exception.

bool MEDMEM_ENSIGHT::toIgnoreIncompatibility ( )

To ignore incompatibility or not.

References MEDMEM.theIgnoreIncompatibility.

template<class TSet >
bool MEDMEM_ENSIGHT.isValidIndex ( const string &  index,
const map< int, TSet > &  aMap 
)

Return true if set index is empty or corresponds to an existing set.

References _ATOI.

const TEnSightElemType & MEDMEM_ENSIGHT::getEnSightType ( medGeometryElement  medType)
const TEnSightElemType & MEDMEM_ENSIGHT::getEnSightType ( const string &  theTypeName)
bool MEDMEM_ENSIGHT::contains ( const char *  what,
const char *  inString 
)

Search substring in a string.

< search substring in a string

std::ostream & MEDMEM_ENSIGHT::operator<< ( std::ostream &  os,
const _SubPartDesc &  desc 
)
bool MEDMEM_ENSIGHT.isGhostType ( const string &  typeName)

Return true if typeName begins with "g_".

static float MEDMEM_ENSIGHT._toFloat ( const double value) [static]

Cast value to float and protect from overflow.

References compatibilityPb().

static float MEDMEM_ENSIGHT._toFloat ( const int value) [static]
static float MEDMEM_ENSIGHT._toFloat ( const long &  value) [static]

Variable Documentation

Registry of drivers creating _CaseFileDriver.

The problem is that if the mesh/field driver is created by the user, it is to write Case file, but if it is created by MED driver, it should not, in order not to overwrite the Case file written by MED driver. To assure this feature, we register all mesh/field drivers added to a case file by a MED driver and then ignore thier calls to _CaseFileDriver.

Storage of data read by mesh driver to be used by field drivers.

The field driver needs info read by the mesh driver (nb of elements by type in each part and what place the element gets in MEDMED support). So we store needed data unless it is no more needed (i.e. no driver is alive). The map key is "<case_file>:<mesh index>".

Maximal EnSight line length.

Maximal length of field name in EnSight.

const string MEDMEM_ENSIGHT.ILLEGAL_FIELD_NAME_CHARACTERS = " !@#$^()[]*/+-"

Maximal length of field name in EnSight.

Width of fields in ASCII file.

EnSight space dimension.

const char* MEDMEM_ENSIGHT.TIME_STEP_BEG = "BEGIN TIME STEP" [static]

Time step data boundaries in single-file mode.

const char* MEDMEM_ENSIGHT.TIME_STEP_END = "END TIME STEP" [static]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS