Version: 6.5.0
Functions
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 MED_EN::medEntityMesh Entity, const MED_EN::medGeometryElement Type, const int *Connectivity, const int *PolyConnectivityIndex=0) 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)

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::GRID::convertInMESH(), and MEDMEM::SUPPORT::makeMesh().

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

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::GRID::convertInMESH(), and MEDMEM::SUPPORT::makeMesh().

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

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

Referenced by MEDMEM::GRID::convertInMESH(), and MEDMEM::SUPPORT::makeMesh().

void MEDMEM::MESHING::setConnectivity ( const MED_EN::medEntityMesh  Entity,
const MED_EN::medGeometryElement  Type,
const int *  Connectivity,
const int *  PolyConnectivityIndex = 0 
) throw (MEDEXCEPTION)

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. To define connectivity of MED_POLYGON and MED_POLYHEDRA, PolyConnectivityIndex is also necessary, which defines index of the first node of each element. Connectiviy of polyhedron must contain -1 as a separator of faces. For example, a tetrahedron with connectivity {1,2,3,4} can be represented as a polyhedron by the following arrays:
Connectivity : {1,2,3,-1,2,3,4,-1,3,4,1,-1,4,1,2}
Connectivity_index : {1,16}

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(MED_CELL,MED_TRIA3,{1,2,3,6,8,9,4,5,6});
myMeshing.setConnectivity(MED_CELL,MED_QUAD4,{1,3,4,5,4,5,7,8});

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

Referenced by MEDMEM::GRID::convertInMESH(), and MEDMEM::SUPPORT::makeMesh().

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