Version: 6.5.0
Public Member Functions | Protected Attributes | Friends | List of all members
MEDMEM::MESH Class Reference
Inheritance diagram for MEDMEM::MESH:
Inheritance graph
[legend]
Collaboration diagram for MEDMEM::MESH:
Collaboration graph
[legend]

Public Member Functions

 MESH ()
 MESH (MESH &m)
virtual ~MESH ()
 MESH (driverTypes driverType, const string &fileName="", const string &meshName="") throw (MEDEXCEPTION)
void init ()
MESHoperator= (const MESH &m)
virtual bool operator== (const MESH &other) const
virtual bool deepCompare (const GMESH &other) const
virtual bool isEmpty () const
virtual void printMySelf (ostream &os) const
virtual int getMeshDimension () const
virtual bool getIsAGrid () const
virtual const MESHconvertInMESH () const
int getNumberOfNodes () const
virtual const COORDINATE * getCoordinateptr () const
string getCoordinatesSystem () const
virtual const double * getCoordinates (MED_EN::medModeSwitch Mode) const
virtual const double getCoordinate (int Number, int Axis) const
const string * getCoordinatesNames () const
const string * getCoordinatesUnits () const
virtual int getNumberOfTypes (MED_EN::medEntityMesh Entity) const
virtual const
MED_EN::medGeometryElement * 
getTypes (MED_EN::medEntityMesh Entity) const
virtual const CELLMODEL * getCellsTypes (MED_EN::medEntityMesh Entity) const
virtual string * getCellTypeNames (MED_EN::medEntityMesh Entity) const
virtual const int * getGlobalNumberingIndex (MED_EN::medEntityMesh Entity) const
virtual int getNumberOfElements (MED_EN::medEntityMesh Entity, MED_EN::medGeometryElement Type) const
virtual bool existConnectivity (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity) const
virtual MED_EN::medGeometryElement getElementType (MED_EN::medEntityMesh Entity, int Number) const
virtual void calculateConnectivity (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity) const
virtual int getConnectivityLength (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity, MED_EN::medGeometryElement Type) const
virtual const int * getConnectivity (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity, MED_EN::medGeometryElement Type) const
virtual const int * getConnectivityIndex (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity) const
virtual int getElementNumber (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity, MED_EN::medGeometryElement Type, int *connectivity) const
virtual int getReverseConnectivityLength (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity=MED_EN::MED_CELL) const
virtual const int * getReverseConnectivity (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity=MED_EN::MED_CELL) const
virtual int getReverseConnectivityIndexLength (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity=MED_EN::MED_CELL) const
virtual const int * getReverseConnectivityIndex (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity=MED_EN::MED_CELL) const
virtual const CONNECTIVITY * getConnectivityptr () const
void setConnectivityptr (CONNECTIVITY *)
virtual SUPPORTgetBoundaryElements (MED_EN::medEntityMesh Entity) const throw (MEDEXCEPTION)
virtual SUPPORTgetSkin (const SUPPORT *Support3D) throw (MEDEXCEPTION)
virtual FIELD< double > * getVolume (const SUPPORT *Support, bool isAbs=true) const throw (MEDEXCEPTION)
virtual FIELD< double > * getArea (const SUPPORT *Support) const throw (MEDEXCEPTION)
virtual FIELD< double > * getLength (const SUPPORT *Support) const throw (MEDEXCEPTION)
virtual FIELD< double > * getNormal (const SUPPORT *Support) const throw (MEDEXCEPTION)
virtual FIELD< double > * getBarycenter (const SUPPORT *Support) const throw (MEDEXCEPTION)
SUPPORTbuildSupportOnNodeFromElementList (const list< int > &listOfElt, MED_EN::medEntityMesh entity) const throw (MEDEXCEPTION)
void fillSupportOnNodeFromElementList (const list< int > &listOfElt, SUPPORT *supportToFill) const throw (MEDEXCEPTION)
int getElementContainingPoint (const double *coord)
vector< vector< double > > getBoundingBox () const
void convertToPoly ()
- Public Member Functions inherited from MEDMEM::GMESH
 GMESH ()
 GMESH (GMESH &m)
virtual ~GMESH ()
GMESHoperator= (const GMESH &m)
virtual bool operator== (const GMESH &other) const
virtual void printMySelf (std::ostream &os) const =0
int addDriver (driverTypes driverType, const std::string &fileName="Default File Name.med", const std::string &driverName="Default Mesh Name", MED_EN::med_mode_acces access=MED_EN::RDWR)
int addDriver (GENDRIVER &driver)
void rmDriver (int index=0)
virtual void read (int index=0)
virtual void read (const GENDRIVER &genDriver)
virtual void read (driverTypes driverType, const std::string &filename, const std::string &meshname)
virtual void write (int index=0) const
virtual void write (const GENDRIVER &genDriver, MED_EN::med_mode_acces medMode=MED_EN::WRONLY) const
virtual void write (driverTypes driverType, const std::string &filename, const std::string &meshname="", MED_EN::med_mode_acces medMode=MED_EN::WRONLY) const
void setName (std::string name)
std::string getName () const
void setDescription (std::string description)
std::string getDescription () const
int getSpaceDimension () const
virtual int getNumberOfFamilies (MED_EN::medEntityMesh Entity) const
virtual const std::vector
< FAMILY * > 
getFamilies (MED_EN::medEntityMesh Entity) const
virtual const FAMILY * getFamily (MED_EN::medEntityMesh Entity, int i) const
virtual int getNumberOfGroups (MED_EN::medEntityMesh Entity) const
virtual const std::vector
< GROUP * > 
getGroups (MED_EN::medEntityMesh Entity) const
virtual const GROUP * getGroup (MED_EN::medEntityMesh Entity, int i) const
virtual const GROUP * getGroup (const std::string &name) const throw (MEDEXCEPTION)
virtual const SUPPORTgetSupportOnAll (MED_EN::medEntityMesh Entity) const throw (MEDEXCEPTION)
virtual SUPPORTbuildSupportOnNodeFromElementList (const std::list< int > &listOfElt, MED_EN::medEntityMesh entity) const =0 throw (MEDEXCEPTION)
virtual void fillSupportOnNodeFromElementList (const std::list< int > &listOfElt, SUPPORT *supportToFill) const =0 throw (MEDEXCEPTION)
virtual SUPPORTbuildSupportOnElementsFromElementList (const std::list< int > &listOfElt, MED_EN::medEntityMesh entity) const throw (MEDEXCEPTION)
void createFamilies ()
void createGroups ()

Protected Attributes

int _numberOfNodes
COORDINATE * _coordinate
CONNECTIVITY * _connectivity
int _arePresentOptionnalNodesNumbers
map< int, int > _optionnalToCanonicNodesNumbers
- Protected Attributes inherited from MEDMEM::GMESH
std::string _name
std::string _description
int _spaceDimension
std::vector< FAMILY * > _familyNode
std::vector< FAMILY * > _familyCell
std::vector< FAMILY * > _familyFace
std::vector< FAMILY * > _familyEdge
std::vector< GROUP * > _groupNode
std::vector< GROUP * > _groupCell
std::vector< GROUP * > _groupFace
std::vector< GROUP * > _groupEdge
std::vector< GENDRIVER * > _drivers
std::map
< MED_EN::medEntityMesh,
SUPPORT * > 
_entitySupport

Friends

class MED_MESH_RDONLY_DRIVER
class MED_MESH_WRONLY_DRIVER
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
class GIBI_MESH_RDONLY_DRIVER
class GIBI_MESH_WRONLY_DRIVER
class GIBI_MESH_RDWR_DRIVER
class PORFLOW_MESH_RDONLY_DRIVER
class PORFLOW_MESH_WRONLY_DRIVER
class PORFLOW_MESH_RDWR_DRIVER
class VTK_MESH_DRIVER
class ENSIGHT_MESH_RDONLY_DRIVER
ostream & operator<< (ostream &os, const MESH &my)

Additional Inherited Members

- Static Public Member Functions inherited from MEDMEM::GMESH
static SUPPORTmergeSupports (const std::vector< SUPPORT * > Supports) throw (MEDEXCEPTION)
static SUPPORTintersectSupports (const std::vector< SUPPORT * > Supports) throw (MEDEXCEPTION)
template<class T >
static FIELD< T > * mergeFields (const std::vector< FIELD< T > * > &others, bool meshCompare=false)

Detailed Description

This class contains all the informations related with a MESH :

Examples:
FIELDcreate.cxx, MESHcoordinates.cxx, and MESHgeneral.cxx.

Constructor & Destructor Documentation

MESH::MESH ( )

Create an empty MESH.

References init().

MESH::~MESH ( )
virtual

References _connectivity, and _coordinate.

Member Function Documentation

void MESH::init ( )
virtual

Initialization of fields.

Reimplemented from MEDMEM::GMESH.

Referenced by MESH().

MESH & MESH::operator= ( const MESH m)
bool MESH::operator== ( const MESH other) const
virtual
bool MESH::deepCompare ( const GMESH gother) const
virtual

Returns true if mesh other has same coordinates (to 1E-15 precision ) and same connectivity as the calling object. Information like name or description is not taken into account for the comparison.

Implements MEDMEM::GMESH.

References _connectivity, _coordinate, getConnectivityptr(), getCoordinateptr(), getCoordinates(), getIsAGrid(), MEDMEM::GMESH::getIsAGrid(), getNumberOfNodes(), and MEDMEM::GMESH::getSpaceDimension().

bool MESH::isEmpty ( ) const
virtual
void MESH::printMySelf ( ostream &  os) const
virtual
bool MESH::getIsAGrid ( ) const
virtual

Check nature of GMESH.

Implements MEDMEM::GMESH.

Referenced by deepCompare().

const MESH * MESH::convertInMESH ( ) const
virtual
const CELLMODEL * MEDMEM::MESH::getCellsTypes ( MED_EN::medEntityMesh  Entity) const
virtual

Get the whole list of CELLMODEL used by cells of given type (medEntityMesh). Passing MED_NODE as an entity type will throw an exception.

string * MEDMEM::MESH::getCellTypeNames ( MED_EN::medEntityMesh  Entity) const
virtual

Get an array (it should deleted after use) of the whole list of CELLMODEL Name of a given type (medEntityMesh).

REMARK : Don't use MED_NODE as medEntityMesh

bool MEDMEM::MESH::existConnectivity ( MED_EN::medConnectivity  connectivityType,
MED_EN::medEntityMesh  entity 
) const
virtual

Returns true if the wanted connectivity exist, else returns false (to use before a getSomething method).

void MEDMEM::MESH::calculateConnectivity ( MED_EN::medConnectivity  ConnectivityType,
MED_EN::medEntityMesh  entity 
) const
virtual

Calculates the required connectivity. Returns an exception if this could not be done. Do nothing if connectivity already exist.

int MEDMEM::MESH::getConnectivityLength ( MED_EN::medConnectivity  ConnectivityType,
MED_EN::medEntityMesh  entity,
MED_EN::medGeometryElement  Type 
) const
virtual

Returns the corresponding length of the array returned by MESH::getConnectivity with exactly the same arguments. Used particulary for wrapping CORBA and python.

int MESH::getElementNumber ( MED_EN::medConnectivity  ConnectivityType,
MED_EN::medEntityMesh  Entity,
MED_EN::medGeometryElement  Type,
int *  connectivity 
) const
virtual

Get global number of element which have same connectivity than connectivity argument.

It do not take care of connectivity order (3,4,7,10 is same as 7,3,10,4).

Return -1 if not found.

References getReverseConnectivity(), and getReverseConnectivityIndex().

int MEDMEM::MESH::getReverseConnectivityLength ( MED_EN::medConnectivity  ConnectivityType,
MED_EN::medEntityMesh  Entity = MED_EN::MED_CELL 
) const
virtual

Returns the corresponding length of the array returned by MESH::getReverseConnectivity with exactly the same arguments. Used particulary for wrapping CORBA and python.

const int * MEDMEM::MESH::getReverseConnectivity ( MED_EN::medConnectivity  ConnectivityType,
MED_EN::medEntityMesh  Entity = MED_EN::MED_CELL 
) const
virtual

Returns the reverse connectivity required by ConnectivityType :

  • If ConnectivityType=MED_NODAL : returns connectivity node-cell
  • If ConnectivityType=MED_DESCENDING : returns connectivity face-cell

You must get ReverseConnectivityIndex array to use it.

Referenced by getBoundaryElements(), MEDMEM::SUPPORT::getBoundaryElements(), getElementNumber(), and getSkin().

int MEDMEM::MESH::getReverseConnectivityIndexLength ( MED_EN::medConnectivity  ConnectivityType,
MED_EN::medEntityMesh  Entity = MED_EN::MED_CELL 
) const
virtual

Returns the corresponding length of the array returned by MESH::getReverseConnectivityIndex with exactly the same arguments. Used particulary for wrapping CORBA and python.

const int * MEDMEM::MESH::getReverseConnectivityIndex ( MED_EN::medConnectivity  ConnectivityType,
MED_EN::medEntityMesh  Entity = MED_EN::MED_CELL 
) const
virtual

Returns the index array required by ConnectivityType.

This array allow to find reverse connectivity of each elements.

Example : Reverse connectivity of i^{th} elements (1<=i<=NumberOfElement) begin at index ReverseConnectivityIndex[i-1] and end at index ReverseConnectivityIndex[i]-1 in ReverseConnectivity array ( ReverseConnectivity[ReverseConnectivityIndex[i-1]-1] is the first value)

Referenced by getBoundaryElements(), MEDMEM::SUPPORT::getBoundaryElements(), getElementNumber(), and getSkin().

const CONNECTIVITY * MEDMEM::MESH::getConnectivityptr ( ) const
virtual
void MEDMEM::MESH::setConnectivityptr ( CONNECTIVITY *  conn)
SUPPORT * MESH::buildSupportOnNodeFromElementList ( const list< int > &  listOfElt,
MED_EN::medEntityMesh  entity 
) const throw (MEDEXCEPTION)

Method created to factorize code. This method creates a new support on NODE (to deallocate) containing all the nodes id contained in elements 'listOfElt' of entity 'entity'.

References fillSupportOnNodeFromElementList(), MEDMEM::SUPPORT::setEntity(), MEDMEM::SUPPORT::setMesh(), and MEDMEM::SUPPORT::setName().

Referenced by getBoundaryElements().

void MESH::fillSupportOnNodeFromElementList ( const list< int > &  listOfElt,
SUPPORT supportToFill 
) const throw (MEDEXCEPTION)

Method that do the same thing as buildSupportOnNodeFromElementList except that a SUPPORT is not created.

References _connectivity.

Referenced by buildSupportOnNodeFromElementList().

Friends And Related Function Documentation

friend class MED_MESH_RDONLY_DRIVER
friend
friend class MED_MESH_WRONLY_DRIVER
friend
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
friend class GIBI_MESH_RDONLY_DRIVER
friend
friend class GIBI_MESH_WRONLY_DRIVER
friend
friend class GIBI_MESH_RDWR_DRIVER
friend
friend class PORFLOW_MESH_RDONLY_DRIVER
friend
friend class PORFLOW_MESH_WRONLY_DRIVER
friend
friend class PORFLOW_MESH_RDWR_DRIVER
friend
friend class VTK_MESH_DRIVER
friend
friend class ENSIGHT_MESH_RDONLY_DRIVER
friend
ostream& operator<< ( ostream &  os,
const MESH my 
)
friend

Member Data Documentation

int MEDMEM::MESH::_numberOfNodes
protected
COORDINATE* MEDMEM::MESH::_coordinate
mutableprotected
CONNECTIVITY* MEDMEM::MESH::_connectivity
mutableprotected
int MEDMEM::MESH::_arePresentOptionnalNodesNumbers
protected

Modification pour prise en compte de la numérotation optionnelle des noeuds ///

La map suivante donne le lien numérotation optionnelle => numérotation cannonique Elle sera calculée apres l'appel de MEDnumLire(...) Et sera utilisée avant chaque appel a MEDconnLire(...) pour renuméroter toutes les mailles de façon canonique [1...n] _coordinate->NodeNumber sera utilisé avant chaque appel à MEDconnEcri pour démunéroter les mailles en leur numérotation originelle Ce traitement devrait prévenir tout plantage du aux numérotations optionnelles DES NOEUDS Et ne ralentira que tres peu les traitements sans numéros optionnels

Referenced by MESH(), and operator=().

map<int,int> MEDMEM::MESH::_optionnalToCanonicNodesNumbers
protected

Referenced by MESH(), and operator=().

Copyright © 2007-2012 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