Med Memory Users' Guide 5.1.3

Connectivity settings

Functions

void MEDMEM::MESHING::setNumberOfTypes (const int NumberOfTypes, const MED_EN::medEntityMesh Entity) throw (MEDEXCEPTION)
void MEDMEM::MESHING::setTypes (const MED_EN::medGeometryElement *Types, const MED_EN::medEntityMesh Entity) throw (MEDEXCEPTION)
void MEDMEM::MESHING::setNumberOfElements (const int *NumberOfElements, const MED_EN::medEntityMesh Entity) throw (MEDEXCEPTION)
void MEDMEM::MESHING::setConnectivity (const int *Connectivity, const MED_EN::medEntityMesh Entity, const MED_EN::medGeometryElement Type) throw (MEDEXCEPTION)

Detailed Description

When defining the connectivity, MED_CELL elements connectivity should be defined first. If necessary, constituent connectivities (MED_FACE and/or MED_EDGE) can be defined afterwards.

Warning:
It should be kept in mind that when defining connectivities, elements should be sorted in ascending type order (the type order being defined by the number of nodes).

Function Documentation

void MEDMEM::MESHING::setNumberOfTypes ( const int  NumberOfTypes,
const MED_EN::medEntityMesh  Entity 
) throw (MEDEXCEPTION) [inherited]

Creates a new connectivity object with the given number of type and entity. If a connectivity already exist, it is deleted by the call.

For exemple setNumberOfTypes(3,MED_CELL) creates a connectivity with 3 medGeometryElement in MESH for MED_CELL entity (like MED_TETRA4, MED_PYRA5 and MED_HEXA6 for example).

Returns an exception if it could not create the connectivity (as if we set MED_FACE connectivity before MED_CELL).

Referenced by MEDMEM::SUPPORT::makeMesh().

void MEDMEM::MESHING::setTypes ( const MED_EN::medGeometryElement *  Types,
const MED_EN::medEntityMesh  entity 
) throw (MEDEXCEPTION) [inherited]

Sets the list of geometric types used by a given entity. medEntityMesh entity could be : MED_CELL, MED_FACE, MED_EDGE. This method is used to set the differents geometrics types ({MED_TETRA4,MED_PYRA5,MED_HEXA8} for example). Geometric types should be given in increasing order of number of nodes for entity type entity.

Remark : Don't use MED_NODE and MED_ALL_ENTITIES.

If entity is not defined, the method will throw an exception.

Referenced by MEDMEM::SUPPORT::makeMesh().

void MEDMEM::MESHING::setNumberOfElements ( const int *  NumberOfElements,
const MED_EN::medEntityMesh  Entity 
) throw (MEDEXCEPTION) [inherited]

,MED_FACE); If there are two types of face (MED_TRIA3 and MED_QUAD4), this sets 12 triangles and 23 quadrangles.

Referenced by MEDMEM::SUPPORT::makeMesh().

void MEDMEM::MESHING::setConnectivity ( const int *  Connectivity,
const MED_EN::medEntityMesh  Entity,
const MED_EN::medGeometryElement  Type 
) throw (MEDEXCEPTION) [inherited]

Sets the nodal connectivity for geometric type Type of entity Entity. The nodal connectivity must be defined one element type at a time : MED_ALL_ELEMENTS is not a valid Type argument.

Example :

MESHING myMeshing ;
myMeshing.setCoordinates(SpaceDimension,NumberOfNodes,Coordinates,System,Mode);

myMeshing.setNumberOfTypes(2,MED_CELL);
myMeshing.setTypes({MED_TRIA3,MED_QUAD4},MED_CELL);
myMeshing.setNumberOfElements({3,2},MED_CELL); // 3 MED_TRIA3 and 2 MED_QUAD4
myMeshing.setConnectivity({1,2,3,6,8,9,4,5,6},MED_CELL,MED_TRIA3);
myMeshing.setConnectivity({1,3,4,5,4,5,7,8},MED_CELL,MED_QUAD4);

Example : setConnectivity({1,2,3,1,4,2},MED_FACE,MED_TRIA3) Define 2 triangles face defined with nodes 1,2,3 and 1,4,2.

Referenced by MEDMEM::SUPPORT::makeMesh().