Version: 5.1.6

MEDMEM.SUPPORT Class Reference

#include <MEDMEM_Support.hxx>

Inheritance diagram for MEDMEM.SUPPORT:
Inheritance graph

Public Member Functions

 SUPPORT ()
 SUPPORT (MESH *Mesh, string Name="", MED_EN::medEntityMesh Entity=MED_EN::MED_CELL)
 SUPPORT (const SUPPORT &m)
virtual ~SUPPORT ()
SUPPORToperator= (const SUPPORT &support)
bool operator== (const SUPPORT &support) const
bool deepCompare (const SUPPORT &support) const
void update ()
void setName (string Name)
void setDescription (string Description)
void setMesh (MESH *Mesh) const
void setMeshDirectly (MESH *Mesh) const
void setMeshName (const string &meshName)
void setAll (bool All)
void setEntity (MED_EN::medEntityMesh Entity)
void setNumberOfGeometricType (int NumberOfGeometricType)
void setGeometricType (const MED_EN::medGeometryElement *GeometricType)
void setNumberOfElements (const int *NumberOfElements)
void setNumber (MEDSKYLINEARRAY *Number)
void setNumber (const int *index, const int *value, bool shallowCopy=false)
string getName () const
string getDescription () const
virtual MESHgetMesh () const
string getMeshName () const
MED_EN::medEntityMesh getEntity () const
bool isOnAllElements () const
int getNumberOfTypes () const
const MED_EN::medGeometryElementgetTypes () const
int getNumberOfElements (MED_EN::medGeometryElement GeometricType) const throw (MEDEXCEPTION)
const intgetNumberOfElements () const throw (MEDEXCEPTION)
virtual MEDSKYLINEARRAYgetnumber () const throw (MEDEXCEPTION)
virtual MEDSKYLINEARRAYgetnumberFromFile () const throw (MEDEXCEPTION)
virtual const intgetNumber (MED_EN::medGeometryElement GeometricType) const throw (MEDEXCEPTION)
virtual const intgetNumberFromFile (MED_EN::medGeometryElement GeometricType) const throw (MEDEXCEPTION)
virtual const intgetNumberIndex () const throw (MEDEXCEPTION)
virtual int getValIndFromGlobalNumber (const int number) const throw (MEDEXCEPTION)
void blending (const SUPPORT *mySupport) throw (MEDEXCEPTION)
void setpartial (string Description, int NumberOfGeometricType, int TotalNumberOfEntity, const MED_EN::medGeometryElement *GeometricType, const int *NumberOfEntity, const int *NumberValue)
void setpartial (MEDSKYLINEARRAY *number, bool shallowCopy=false) throw (MEDEXCEPTION)
void setpartial_fromfile (MEDSKYLINEARRAY *number, bool shallowCopy=false) throw (MEDEXCEPTION)
void setProfilNames (vector< string > profilNames) throw (MEDEXCEPTION)
vector< string > getProfilNames () const throw (MEDEXCEPTION)
void getBoundaryElements () throw (MEDEXCEPTION)
void changeElementsNbs (MED_EN::medEntityMesh entity, const int *renumberingFromOldToNew, int limitNbClassicPoly, const int *renumberingFromOldToNewPoly=0)
void intersecting (SUPPORT *mySupport) throw (MEDEXCEPTION)
bool belongsTo (const SUPPORT &other, bool deepCompare=false) const
SUPPORTgetComplement () const
SUPPORTsubstract (const SUPPORT &other) const throw (MEDEXCEPTION)
SUPPORTgetBoundaryElements (MED_EN::medEntityMesh Entity) const throw (MEDEXCEPTION)
SUPPORTbuildSupportOnNode () const throw (MEDEXCEPTION)
 Builds a nodal SUPPORT basing on nodes of this one.
void fillFromNodeList (const list< int > &listOfNode) throw (MEDEXCEPTION)
void fillFromElementList (const list< int > &listOfElt) throw (MEDEXCEPTION)
void clearDataOnNumbers ()
MESHmakeMesh ()
 creates a MESH that contains only the elements in the current support.
virtual void addReference () const
virtual void removeReference () const

Static Public Member Functions

static list< int > * sub (int start, int end, const int *idsToSuppress, int lgthIdsToSuppress)
static list< int > * sub (const int *ids, int lgthIds, const int *idsToSuppress, int lgthIdsToSuppress)

Data Fields

string _name
string _meshName
string _description
MESH_mesh
MED_EN::medEntityMesh _entity
int _numberOfGeometricType
PointerOf
< MED_EN::medGeometryElement
_geometricType
bool _isOnAllElts
PointerOf< int_numberOfElements
int _totalNumberOfElements
MEDSKYLINEARRAY_number
MEDSKYLINEARRAY_number_fromfile
vector< string > _profilNames

Friends

ostream & operator<< (ostream &os, const SUPPORT &my)

Detailed Description

This class describe a support of elements on an entity of the mesh.

It contains the list of meshes elements for an entity (MED_NODE, MED_CELL, MED_FACE or MED_EDGE).


Constructor & Destructor Documentation

SUPPORT::SUPPORT (  ) 

Constructor.

References MESSAGE_MED.

MEDMEM.SUPPORT.SUPPORT ( MESH Mesh,
string  Name = "",
MED_EN::medEntityMesh  Entity = MED_EN::MED_CELL 
)
SUPPORT::~SUPPORT (  )  [virtual]

Destructor.

References MEDMEM.SUPPORT.clearDataOnNumbers(), and MESSAGE_MED.


Member Function Documentation

SUPPORT & SUPPORT::operator= ( const SUPPORT m  ) 
bool MEDMEM.SUPPORT::operator== ( const SUPPORT support  )  const

operator == This operator does not compare attributs _name and _description.

References BEGIN_OF_MED, END_OF_MED, and medClient_test.support.

bool MEDMEM.SUPPORT::deepCompare ( const SUPPORT support  )  const
void SUPPORT::update (  ) 
void MEDMEM.SUPPORT::setName ( string  Name  ) 

set the attribute _name to Name

References MEDMEM.SUPPORT._name.

void MEDMEM.SUPPORT::setDescription ( string  Description  ) 

set the attribute _description to Description

References MEDMEM.SUPPORT._description.

void SUPPORT::setMesh ( MESH Mesh  )  const

set the reference _mesh to Mesh

void MEDMEM.SUPPORT.setMeshDirectly ( MESH Mesh  )  const
void MEDMEM.SUPPORT::setMeshName ( const string &  meshName  ) 

set the meshName if there is ni reference _mesh to Mesh

References MEDMEM.SUPPORT._mesh, and MEDMEM.SUPPORT._meshName.

void MEDMEM.SUPPORT::setAll ( bool  All  ) 

Creates a support on all elements of the type specified in the constructor.

Even if _isonAllElts is true, geometric types defining the FIELD's SUPPORT must be read from the SUPPORT not from the associated MESH (the geometric types defining the FIELD's SUPPORT may be a subset of the geometric types defined in the MESH even if for each SUPPORT geometric type all MESH entities are used).

References MEDMEM.SUPPORT._isOnAllElts.

void MEDMEM.SUPPORT::setEntity ( MED_EN::medEntityMesh  Entity  ) 

set the attribute _entity to Entity

References MEDMEM.SUPPORT._entity.

void MEDMEM.SUPPORT::setNumberOfGeometricType ( int  NumberOfGeometricType  ) 
void MEDMEM.SUPPORT::setGeometricType ( const MED_EN::medGeometryElement GeometricType  ) 
void MEDMEM.SUPPORT::setNumberOfElements ( const int NumberOfElements  ) 

Set the attribute _numberOfElements to NumberOfElements and calculate the total number of elements.

References MEDMEM.SUPPORT._numberOfElements, MEDMEM.SUPPORT._numberOfGeometricType, MEDMEM.SUPPORT._totalNumberOfElements, NULL, and MEDMEM.PointerOf< T >.set().

void MEDMEM.SUPPORT::setNumber ( MEDSKYLINEARRAY Number  ) 

set the attribute _totalNumberOfElements to TotalNumberOfElements

set the attribute _number to Number

References MEDMEM.SUPPORT._isOnAllElts, MEDMEM.SUPPORT._number, and NULL.

void MEDMEM.SUPPORT::setNumber ( const int index,
const int value,
bool  shallowCopy = false 
)

set the attribute _number with index and value arrays

References MEDMEM.SUPPORT._number, MEDMEM.SUPPORT._numberOfGeometricType, MEDMEM.SUPPORT._totalNumberOfElements, and NULL.

string MEDMEM.SUPPORT::getName (  )  const

returns the name of the support.

References MEDMEM.SUPPORT._name.

string MEDMEM.SUPPORT::getDescription (  )  const

returns the description of the support.

References MEDMEM.SUPPORT._description.

MESH * MEDMEM.SUPPORT::getMesh (  )  const [virtual]

returns a reference to the mesh

References MEDMEM.SUPPORT._mesh.

string SUPPORT::getMeshName (  )  const

returns the mesh name

References MEDMEM.SUPPORT._mesh, MEDMEM.SUPPORT._meshName, and MEDMEM.MESH.getName().

MED_EN::medEntityMesh MEDMEM.SUPPORT::getEntity (  )  const

Returns the medEntityMesh's type used by the support. Note : A support deals only with one entity's type (for example : MED_FACE or MED_NODE)

References MEDMEM.SUPPORT._entity.

bool MEDMEM.SUPPORT::isOnAllElements (  )  const

Returns true if all elements of this entity are concerned, false otherwise. If true, you must use mesh reference (getMesh) to get more information.

References MEDMEM.SUPPORT._isOnAllElts.

int MEDMEM.SUPPORT::getNumberOfTypes (  )  const

Returns number of geometric Types defines in the support

References MEDMEM.SUPPORT._numberOfGeometricType.

const MED_EN::medGeometryElement * MEDMEM.SUPPORT::getTypes (  )  const

If isOnAllElements is false, returns an array of medGeometryElement types used by the support.

References MEDMEM.SUPPORT._geometricType.

int MEDMEM.SUPPORT::getNumberOfElements ( MED_EN::medGeometryElement  GeometricType  )  const throw (MEDEXCEPTION)

This method returns the number of all elements of the type GeometricType.

If isOnAllElements is false, it returns the number of elements in the support otherwise it returns number of elements in the mesh.

Example : number of MED_TRIA3 or MED_ALL_ELEMENTS elements in support.

Note : If SUPPORT is defined on MED_NODE, use MED_ALL_ELEMENTS as medGeometryElement GeometricType and it will return the number of nodes in the support (or in the mesh).

References MED_EN.MED_ALL_ELEMENTS.

const int * MEDMEM.SUPPORT::getNumberOfElements (  )  const throw (MEDEXCEPTION)

Returns the total number of elements in the support.

References MEDMEM.SUPPORT._numberOfElements.

MEDSKYLINEARRAY * MEDMEM.SUPPORT::getnumber (  )  const throw (MEDEXCEPTION) [virtual]

Reimplemented in MEDMEM.SUPPORTClient.

References MEDMEM.SUPPORT._number, and NULL.

MEDSKYLINEARRAY * MEDMEM.SUPPORT::getnumberFromFile (  )  const throw (MEDEXCEPTION) [virtual]
const int * MEDMEM.SUPPORT::getNumber ( MED_EN::medGeometryElement  GeometricType  )  const throw (MEDEXCEPTION) [virtual]

If isOnAllElements is false, returns an array which contains all number of given medGeometryElement.

Numbering is global, ie numbers are bounded by 1 and MESH.getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and MESH.getNumberOfElement(entity,geomElement).

Note : If SUPPORT is defined on MED_NODE, use MED_NONE medGeometryElement type.

Reimplemented in MEDMEM.SUPPORTClient.

References med_test_skin.GeometricType, and MED_EN.MED_ALL_ELEMENTS.

const int * MEDMEM.SUPPORT::getNumberFromFile ( MED_EN::medGeometryElement  GeometricType  )  const throw (MEDEXCEPTION) [virtual]
const int * MEDMEM.SUPPORT::getNumberIndex (  )  const throw (MEDEXCEPTION) [virtual]

If isOnAllElements is false, returns index of element number. Use it with getNumber(MED_ALL_ELEMENTS).

Note : See getConnectivityIndex for details.

Reimplemented in MEDMEM.SUPPORTClient.

References MEDMEM.SUPPORT._isOnAllElts, MEDMEM.SUPPORT._number, and MEDMEM.MEDSKYLINEARRAY.getIndex().

int SUPPORT::getValIndFromGlobalNumber ( const int  number  )  const throw (MEDEXCEPTION) [virtual]

Get the field value index (in fortran mode) from the support global number. Becareful, it doesn't take care of the field number of components

Reimplemented in MEDMEM.SUPPORTClient.

References LOCALIZED, MED_EN.MED_ALL_ELEMENTS, batchmode_medcorba_test.number, and med_test1.valInd.

void MEDMEM.SUPPORT.setpartial ( string  Description,
int  NumberOfGeometricType,
int  TotalNumberOfEntity,
const MED_EN::medGeometryElement GeometricType,
const int NumberOfEntity,
const int NumberValue 
)
void SUPPORT::setpartial ( MEDSKYLINEARRAY number,
bool  shallowCopy = false 
) throw (MEDEXCEPTION)

This function allows the user to set a support not on all entities Entity, it should be used after an initialisation of : SUPPORT(MESH* Mesh, string Name="", medEntityMesh Entity=MED_CELL) and after calling at least setGeometricType and perharps setEntity. It allocates and initialises all the attributs of the class SUPPORT but doesn't set a description, a SUPPORT name, a meshName and an associated MESH.

References BEGIN_OF_MED, END_OF_MED, LOCALIZED, NULL, and batchmode_medcorba_test.number.

void SUPPORT::setpartial_fromfile ( MEDSKYLINEARRAY number,
bool  shallowCopy = false 
) throw (MEDEXCEPTION)
void SUPPORT::setProfilNames ( vector< string >  profilNames  )  throw (MEDEXCEPTION)

References BEGIN_OF_MED, END_OF_MED, and LOCALIZED.

vector< string > SUPPORT::getProfilNames (  )  const throw (MEDEXCEPTION)
void MEDMEM.SUPPORT.changeElementsNbs ( MED_EN::medEntityMesh  entity,
const int renumberingFromOldToNew,
int  limitNbClassicPoly,
const int renumberingFromOldToNewPoly = 0 
)
bool MEDMEM.SUPPORT::belongsTo ( const SUPPORT other,
bool  deepCompare = false 
) const
SUPPORT * MEDMEM.SUPPORT::getComplement (  )  const
SUPPORT * MEDMEM.SUPPORT::substract ( const SUPPORT other  )  const throw (MEDEXCEPTION)
SUPPORT* MEDMEM.SUPPORT.getBoundaryElements ( MED_EN::medEntityMesh  Entity  )  const throw (MEDEXCEPTION)
SUPPORT * SUPPORT::buildSupportOnNode (  )  const throw (MEDEXCEPTION)
void MEDMEM.SUPPORT::fillFromNodeList ( const list< int > &  listOfNode  )  throw (MEDEXCEPTION)

Method that fills this and updates all its attributes in order to lye on the the listOfNode.

References MED_EN.MED_ALL_ELEMENTS, MED_EN.MED_NODE, MED_EN.MED_NONE, medMeshing_test.numberOfElements, test_NonCoincidentDEC.size, and dumpMEDMEM.tab.

void MEDMEM.SUPPORT::fillFromElementList ( const list< int > &  listOfElt  )  throw (MEDEXCEPTION)
void MEDMEM.SUPPORT::clearDataOnNumbers (  ) 

Method that cleans up all the fields related to _numbers. Defined for code factorization.

References MEDMEM.SUPPORT._number, MEDMEM.SUPPORT._number_fromfile, MEDMEM.SUPPORT._totalNumberOfElements, and NULL.

MESH * SUPPORT::makeMesh (  ) 

creates a MESH that contains only the elements in the current support.

SUPPORT_advanced

The output mesh has no group, nor elements of connectivity lesser than that of the present support. Nodes are renumbered so that they are numberd from 1 to N in the new mesh. The order of the elements in the new mesh corresponds to that of the elements in the original support.

References MEDMEM.SUPPORT._entity, MEDMEM.SUPPORT._isOnAllElts, MEDMEM.SUPPORT._mesh, MEDMEM.SUPPORT._numberOfElements, testRenumbering.conn, MEDMEM.MESH.getConnectivity(), MEDMEM.MESH.getConnectivityIndex(), MEDMEM.MESH.getConnectivityptr(), MEDMEM.MESH.getCoordinates(), MEDMEM.MESH.getCoordinatesNames(), MEDMEM.MESH.getCoordinatesSystem(), MEDMEM.MESH.getCoordinatesUnits(), MEDMEM.MESH.getGlobalNumberingIndex(), MEDMEM.MESH.getMeshDimension(), MEDMEM.SUPPORT.getName(), MEDMEM.SUPPORT.getNumber(), MEDMEM.MESH.getNumberOfElements(), MEDMEM.SUPPORT.getNumberOfElements(), MEDMEM.MESH.getNumberOfNodes(), MEDMEM.MESH.getPolygonsConnectivity(), MEDMEM.MESH.getPolygonsConnectivityIndex(), MEDMEM.MESH.getPolyhedronConnectivity(), MEDMEM.MESH.getPolyhedronFacesIndex(), MEDMEM.MESH.getPolyhedronIndex(), MEDMEM.MESH.getSpaceDimension(), MEDMEM.MESH.getTypes(), MEDMEM.SUPPORT.getTypes(), MED_EN.MED_ALL_ELEMENTS, MED_EN.MED_CELL, MED_EXCEPTION, MED_EN.MED_FACE, MED_EN.MED_FULL_INTERLACE, MED_EN.MED_NODAL, MED_EN.MED_NODE, MED_EN.MED_POLYGON, MED_EN.MED_POLYHEDRA, medutilities.mesh_dim, MEDMEM.PointerOf< T >.set(), MEDMEM.MESHING.setConnectivity(), MEDMEM.MESHING.setCoordinates(), MEDMEM.MESHING.setCoordinatesNames(), MEDMEM.MESHING.setCoordinatesUnits(), MEDMEM.MESHING.setMeshDimension(), MEDMEM.MESH.setName(), MEDMEM.MESHING.setNumberOfElements(), MEDMEM.MESHING.setNumberOfTypes(), MEDMEM.MESHING.setPolygonsConnectivity(), MEDMEM.MESHING.setPolyhedraConnectivity(), MEDMEM.MESHING.setSpaceDimension(), MEDMEM.MESHING.setTypes(), and medClient_test.type.

void MEDMEM.SUPPORT::addReference (  )  const [virtual]

addReference : reference counter presently disconnected in C++ -> just connected for client.

Implements MEDMEM.RCBASE.

Reimplemented in MEDMEM.SUPPORTClient.

void MEDMEM.SUPPORT::removeReference (  )  const [virtual]

removeReference : reference counter presently disconnected in C++ -> just connected for client.

Implements MEDMEM.RCBASE.

Reimplemented in MEDMEM.SUPPORTClient.

list< int > * MEDMEM.SUPPORT::sub ( int  start,
int  end,
const int idsToSuppress,
int  lgthIdsToSuppress 
) [static]

performs a common operation : Sub builds a sorted int array that is obtained by supression of all ids contained in array defined by (idsToSuppress,lgthIdsToSuppress) from array [start ... end] Example sub(0,7,{1,2,5},3) => {0,3,4,6,7} - WARNING returned list should be deallocated !

References compareId(), testMEDMEM.ret, and test_NonCoincidentDEC.size.

list< int > * MEDMEM.SUPPORT::sub ( const int ids,
int  lgthIds,
const int idsToSuppress,
int  lgthIdsToSuppress 
) [static]

performs a common operation : Sub builds a sorted int array that is obtained by supression of all ids contained in array defined by (idsToSuppress,lgthIdsToSuppress) from array [start ... end] Example sub({1,3,4,5,6,7,9},7,{1,2,5},3) => {3,4,6,7,9} - WARNING returned list should be deallocated !

References compareId(), and testMEDMEM.ret.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const SUPPORT my 
) [friend]

Reimplemented in MEDMEM.FAMILY.


Field Documentation

string MEDMEM.SUPPORT._meshName [mutable]
vector< string > MEDMEM.SUPPORT._profilNames