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 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 setTotalNumberOfElements (int TotalNumberOfElements)
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 const intgetNumber (MED_EN::medGeometryElement GeometricType) const throw (MEDEXCEPTION)
virtual const intgetNumberIndex () const throw (MEDEXCEPTION)
virtual int getValIndFromGlobalNumber (const int number) const throw (MEDEXCEPTION)
void blending (SUPPORT *mySupport) throw (MEDEXCEPTION)
void setpartial (string Description, int NumberOfGeometricType, int TotalNumberOfEntity, MED_EN::medGeometryElement *GeometricType, int *NumberOfEntity, int *NumberValue)
void setpartial (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)
void fillFromNodeList (const list< int > &listOfNode) throw (MEDEXCEPTION)
void fillFromElementList (const list< int > &listOfElt) throw (MEDEXCEPTION)
void clearDataOnNumbers ()
virtual void addReference () const
virtual void removeReference () const

Static Protected 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)

Protected Attributes

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
vector< string > _profilNames

Friends

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

Constructor & Destructor Documentation

SUPPORT::SUPPORT  ) 
 

Constructor.

MEDMEM.SUPPORT.SUPPORT MESH Mesh,
string  Name = "",
MED_EN::medEntityMesh  Entity = MED_EN::MED_CELL
 

SUPPORT::SUPPORT const SUPPORT m  ) 
 

Copy constructor.

SUPPORT::~SUPPORT  )  [virtual]
 

Destructor.


Member Function Documentation

SUPPORT & SUPPORT::operator= const SUPPORT m  ) 
 

Affectation operator. operator = perform et deep copy except for attribute _mesh

bool MEDMEM.SUPPORT::operator== const SUPPORT support  )  const
 

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

bool MEDMEM.SUPPORT::deepCompare const SUPPORT support  )  const
 

operator == + in case false a test if coordinates and connectivity of _mesh and support->_mesh are the same

void SUPPORT::update  ) 
 

Updade the SUPPORT attributs with rigth MESH information.

It has an effect only if SUPPORT is on all elements.

No more need in future release.

void MEDMEM.SUPPORT::setName string  Name  ) 
 

set the attribute _name to Name

void MEDMEM.SUPPORT::setDescription string  Description  ) 
 

set the attribute _description to Description

void SUPPORT::setMesh MESH Mesh  )  const
 

set the reference _mesh to Mesh

void MEDMEM.SUPPORT::setMeshName const string &  meshName  ) 
 

set the meshName if there is ni reference _mesh to Mesh

void MEDMEM.SUPPORT::setAll bool  All  ) 
 

set the attribute _isOnAllElts to All Even if _isonAllElts is true, geometric types definning the FIELD's SUPPORT must be read from the SUPPORT not from the associated MESH (the geometric types definning 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).

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

set the attribute _entity to Entity

void MEDMEM.SUPPORT::setNumberOfGeometricType int  NumberOfGeometricType  ) 
 

set the attribute _numberOfGeometricType to NumberOfGeometricType

void MEDMEM.SUPPORT::setGeometricType const MED_EN::medGeometryElement GeometricType  ) 
 

set the attribute _geometricType to geometricType

void MEDMEM.SUPPORT::setNumberOfElements const int NumberOfElements  ) 
 

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

void MEDMEM.SUPPORT::setTotalNumberOfElements int  TotalNumberOfElements  ) 
 

set the attribute _totalNumberOfElements to TotalNumberOfElements

void MEDMEM.SUPPORT::setNumber MEDSKYLINEARRAY Number  ) 
 

set the attribute _number to Number

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

set the attribute _number with index and value arrays

string MEDMEM.SUPPORT::getName  )  const
 

returns the name of the support.

string MEDMEM.SUPPORT::getDescription  )  const
 

returns the description of the support.

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

returns a reference to the mesh

string SUPPORT::getMeshName  )  const
 

returns the mesh name

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)

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.

int MEDMEM.SUPPORT::getNumberOfTypes  )  const
 

Returns number of geometric Types defines in the support

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

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

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 else it returns number of elements in the mesh.

Example : number of MED_TRIA3 or MED_ALL_ELEMENTS elements in entity of support.

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

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

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

Reimplemented in MEDMEM.SUPPORTClient.

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.

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.

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.

void SUPPORT::blending SUPPORT mySupport  )  throw (MEDEXCEPTION)
 

Blend the given SUPPORT mySupport into the calling object SUPPORT.

void MEDMEM.SUPPORT.setpartial string  Description,
int  NumberOfGeometricType,
int  TotalNumberOfEntity,
MED_EN::medGeometryElement GeometricType,
int NumberOfEntity,
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.

void SUPPORT::setProfilNames vector< string >  profilNames  )  throw (MEDEXCEPTION)
 

vector< string > SUPPORT::getProfilNames  )  const throw (MEDEXCEPTION)
 

void SUPPORT::getBoundaryElements  )  throw (MEDEXCEPTION)
 

This method gets the boundary elements of the mesh. The support has to be build using the constructor SUPPORT(MESH *,string, medEntityMesh) or SUPPORT() followed by setMesh(MESH*) setName(string) and setEntity(medEntityMesh) before using this method.

void SUPPORT::changeElementsNbs MED_EN::medEntityMesh  entity,
const int renumberingFromOldToNew,
int  limitNbClassicPoly,
const int renumberingFromOldToNewPoly = 0
 

void SUPPORT::intersecting SUPPORT mySupport  )  throw (MEDEXCEPTION)
 

intersect the given SUPPORT mySupport into the calling SUPPORT object.

bool MEDMEM.SUPPORT::belongsTo const SUPPORT other,
bool  deepCompare = false
const
 

States if this is included in other.

SUPPORT * MEDMEM.SUPPORT::getComplement  )  const
 

returns a new SUPPORT (responsability to caller to destroy it) that is the complement to "this", lying on the same entity than "this".

SUPPORT * MEDMEM.SUPPORT::substract const SUPPORT other  )  const throw (MEDEXCEPTION)
 

returns a new support the user should delete.

SUPPORT * MEDMEM.SUPPORT::getBoundaryElements MED_EN::medEntityMesh  Entity  )  const throw (MEDEXCEPTION)
 

returns a new support the user has to delete. Entity is either MED_NODE to obtain node elements lying on boundary of "this" or MED_FACE,MED_EDGE (depends on the this->_mesh dimension).

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.

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.

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, protected]
 

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 !

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

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 !


Friends And Related Function Documentation

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

operator <<.


Field Documentation

string MEDMEM.SUPPORT._name [protected]
 

string MEDMEM.SUPPORT._meshName [mutable, protected]
 

string MEDMEM.SUPPORT._description [protected]
 

MESH* MEDMEM.SUPPORT._mesh [mutable, protected]
 

MED_EN::medEntityMesh MEDMEM.SUPPORT._entity [protected]
 

int MEDMEM.SUPPORT._numberOfGeometricType [protected]
 

PointerOf<MED_EN::medGeometryElement> MEDMEM.SUPPORT._geometricType [protected]
 

bool MEDMEM.SUPPORT._isOnAllElts [protected]
 

PointerOf<int> MEDMEM.SUPPORT._numberOfElements [protected]
 

int MEDMEM.SUPPORT._totalNumberOfElements [protected]
 

MEDSKYLINEARRAY* MEDMEM.SUPPORT._number [mutable, protected]
 

vector< string > MEDMEM.SUPPORT._profilNames [protected]