Public Member Functions | |
SUPPORT () | |
SUPPORT (MESH *Mesh, string Name="", MED_EN::medEntityMesh Entity=MED_EN::MED_CELL) | |
SUPPORT (const SUPPORT &m) | |
virtual | ~SUPPORT () |
SUPPORT & | operator= (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 MESH * | getMesh () const |
string | getMeshName () const |
MED_EN::medEntityMesh | getEntity () const |
bool | isOnAllElements () const |
int | getNumberOfTypes () const |
const MED_EN::medGeometryElement * | getTypes () const |
int | getNumberOfElements (MED_EN::medGeometryElement GeometricType) const throw (MEDEXCEPTION) |
const int * | getNumberOfElements () const throw (MEDEXCEPTION) |
virtual MEDSKYLINEARRAY * | getnumber () const throw (MEDEXCEPTION) |
virtual MEDSKYLINEARRAY * | getnumberFromFile () const throw (MEDEXCEPTION) |
virtual const int * | getNumber (MED_EN::medGeometryElement GeometricType) const throw (MEDEXCEPTION) |
virtual const int * | getNumberFromFile (MED_EN::medGeometryElement GeometricType) const throw (MEDEXCEPTION) |
virtual const int * | getNumberIndex () 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, 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 |
SUPPORT * | getComplement () const |
SUPPORT * | substract (const SUPPORT &other) const throw (MEDEXCEPTION) |
SUPPORT * | getBoundaryElements (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 () |
MESH * | makeMesh () |
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 |
MEDSKYLINEARRAY * | _number_fromfile |
vector< string > | _profilNames |
Friends | |
MEDMEM_EXPORT ostream & | operator<< (ostream &os, const SUPPORT &my) |
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).
SUPPORT::SUPPORT | ( | ) |
Constructor.
MEDMEM::SUPPORT::SUPPORT | ( | MESH * | Mesh, | |
string | Name = "" , |
|||
MED_EN::medEntityMesh | Entity = MED_EN::MED_CELL | |||
) |
SUPPORT::~SUPPORT | ( | ) | [virtual] |
Destructor.
References clearDataOnNumbers().
References _description, _entity, _geometricType, _isOnAllElts, _mesh, _name, _number, _numberOfElements, _numberOfGeometricType, _profilNames, and _totalNumberOfElements.
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
References _entity, _geometricType, _isOnAllElts, _mesh, _numberOfElements, _numberOfGeometricType, _totalNumberOfElements, MEDMEM::MESH::deepCompare(), and getNumber().
void SUPPORT::update | ( | ) |
Updade the SUPPORT attributs with right MESH information.
It has an effect only if SUPPORT is on all elements.
No more need in future release.
References _entity, _geometricType, _isOnAllElts, _mesh, _name, _numberOfElements, _numberOfGeometricType, _totalNumberOfElements, MEDMEM::MESH::getNumberOfElementsWithPoly(), MEDMEM::MESH::getNumberOfNodes(), MEDMEM::MESH::getNumberOfTypesWithPoly(), and MEDMEM::MESH::getTypesWithPoly().
Referenced by MEDMEM::MED::updateSupport().
void MEDMEM::SUPPORT::setName | ( | string | Name | ) |
void MEDMEM::SUPPORT::setDescription | ( | string | Description | ) |
set the attribute _description to Description
References _description.
void SUPPORT::setMesh | ( | MESH * | Mesh | ) | const |
set the reference _mesh to Mesh
Referenced by getComplement(), and substract().
void MEDMEM::SUPPORT::setMeshDirectly | ( | MESH * | Mesh | ) | const |
void MEDMEM::SUPPORT::setMeshName | ( | const string & | meshName | ) |
void MEDMEM::SUPPORT::setEntity | ( | MED_EN::medEntityMesh | Entity | ) |
set the attribute _entity to Entity
References _entity.
Referenced by getComplement(), and substract().
void MEDMEM::SUPPORT::setNumberOfGeometricType | ( | int | NumberOfGeometricType | ) |
set the attribute _numberOfGeometricType to NumberOfGeometricType
References _geometricType, _numberOfElements, and _numberOfGeometricType.
Referenced by getBoundaryElements(), and MEDMEM::MESH::getSkin().
void MEDMEM::SUPPORT::setGeometricType | ( | const MED_EN::medGeometryElement * | GeometricType | ) |
set the attribute _geometricType to geometricType
References _geometricType, _name, _numberOfGeometricType, and _profilNames.
Referenced by getBoundaryElements(), and MEDMEM::MESH::getSkin().
void MEDMEM::SUPPORT::setNumberOfElements | ( | const int * | NumberOfElements | ) |
Set the attribute _numberOfElements to NumberOfElements and calculate the total number of elements.
References _numberOfElements, _numberOfGeometricType, and _totalNumberOfElements.
Referenced by getBoundaryElements(), and MEDMEM::MESH::getSkin().
void MEDMEM::SUPPORT::setNumber | ( | MEDSKYLINEARRAY * | Number | ) |
set the attribute _totalNumberOfElements to TotalNumberOfElements
set the attribute _number to Number
References _isOnAllElts, and _number.
Referenced by MEDMEM::MESH::getSkin().
void MEDMEM::SUPPORT::setNumber | ( | const int * | index, | |
const int * | value, | |||
bool | shallowCopy = false | |||
) |
set the attribute _number with index and value arrays
References _number, _numberOfGeometricType, and _totalNumberOfElements.
string MEDMEM::SUPPORT::getName | ( | ) | const |
string MEDMEM::SUPPORT::getDescription | ( | ) | const |
returns the description of the support.
References _description.
MESH * MEDMEM::SUPPORT::getMesh | ( | ) | const [virtual] |
returns a reference to the mesh
References _mesh.
Referenced by MEDMEM::FIELD_::_getFieldSize(), MEDMEM::MED::addField(), MEDMEM::FIELD< T, INTERLACING_TAG >::buildGradient(), and MEDMEM::FIELD< T, INTERLACING_TAG >::normL2().
string SUPPORT::getMeshName | ( | ) | const |
returns the mesh name
References _mesh, _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 _entity.
Referenced by MEDMEM::MED::addField(), and MEDMEM::FIELD< T, INTERLACING_TAG >::buildGradient().
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 _isOnAllElts.
Referenced by MEDMEM::FIELD< T, INTERLACING_TAG >::isOnAllElements().
int MEDMEM::SUPPORT::getNumberOfTypes | ( | ) | const |
Returns number of geometric Types defines in the support
References _numberOfGeometricType.
Referenced by MEDMEM::FIELD< T, INTERLACING_TAG >::getNumberOfGeometricTypes().
const MED_EN::medGeometryElement * MEDMEM::SUPPORT::getTypes | ( | ) | const |
If isOnAllElements is false, returns an array of medGeometryElement types used by the support.
References _geometricType.
Referenced by MEDMEM::FIELD< T, INTERLACING_TAG >::getGeometricTypes(), and makeMesh().
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
void MEDMEM::SUPPORT::setpartial | ( | string | Description, | |
int | NumberOfGeometricType, | |||
int | TotalNumberOfEntity, | |||
MED_EN::medGeometryElement * | GeometricType, | |||
const int * | NumberOfEntity, | |||
const int * | NumberValue | |||
) |
void SUPPORT::setpartial | ( | MEDSKYLINEARRAY * | number, | |
bool | shallowCopy = false | |||
) | throw (MEDEXCEPTION) |
void SUPPORT::setpartial_fromfile | ( | MEDSKYLINEARRAY * | number, | |
bool | shallowCopy = false | |||
) | throw (MEDEXCEPTION) |
void SUPPORT::setProfilNames | ( | vector< string > | profilNames | ) | throw (MEDEXCEPTION) |
vector< string > SUPPORT::getProfilNames | ( | ) | const throw (MEDEXCEPTION) |
References _profilNames.
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 |
States if this is included in other.
References _entity, _geometricType, _isOnAllElts, _mesh, _number, _numberOfElements, _numberOfGeometricType, and MEDMEM::MESH::deepCompare().
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".
References _entity, _isOnAllElts, _mesh, _name, _number, MEDMEM::MESH::buildSupportOnElementsFromElementList(), MEDMEM::MESH::buildSupportOnNodeFromElementList(), getNumberOfElements(), MEDMEM::MESH::getNumberOfElements(), setEntity(), setMesh(), setName(), and sub().
Referenced by substract().
returns a new support the user should delete.
References getComplement(), setEntity(), and setMesh().
SUPPORT* MEDMEM::SUPPORT::getBoundaryElements | ( | MED_EN::medEntityMesh | Entity | ) | 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.
void MEDMEM::SUPPORT::fillFromElementList | ( | const list< int > & | listOfElt | ) | throw (MEDEXCEPTION) |
Referenced by MEDMEM::MESH::buildSupportOnElementsFromElementList().
void MEDMEM::SUPPORT::clearDataOnNumbers | ( | ) |
Method that cleans up all the fields related to _numbers. Defined for code factorization.
References _number, and _totalNumberOfElements.
Referenced by ~SUPPORT().
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. The method does not handle polygon or polyhedral elements. 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 _entity, _isOnAllElts, _mesh, _numberOfElements, 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(), getName(), getNumber(), MEDMEM::MESH::getNumberOfElements(), 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(), getTypes(), 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(), and MEDMEM::MESHING::setTypes().
void MEDMEM::SUPPORT::addReference | ( | ) | const [virtual] |
addReference : reference counter presently disconnected in C++ -> just connected for client.
Referenced by MEDMEM::FIELD_::FIELD_(), and MEDMEM::FIELD_::setSupport().
void MEDMEM::SUPPORT::removeReference | ( | ) | const [virtual] |
removeReference : reference counter presently disconnected in C++ -> just connected for client.
Referenced by MEDMEM::FIELD_::setSupport().
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 !
References compareId().
Referenced by getComplement().
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 !
References compareId().
MEDMEM_EXPORT ostream& operator<< | ( | ostream & | os, | |
const SUPPORT & | my | |||
) | [friend] |
string MEDMEM::SUPPORT::_name [protected] |
Referenced by getComplement(), getName(), operator=(), setGeometricType(), setName(), SUPPORT(), and update().
string MEDMEM::SUPPORT::_meshName [mutable, protected] |
Referenced by getMeshName(), and setMeshName().
string MEDMEM::SUPPORT::_description [protected] |
Referenced by getDescription(), operator=(), setDescription(), and SUPPORT().
MESH* MEDMEM::SUPPORT::_mesh [mutable, protected] |
Referenced by belongsTo(), deepCompare(), getBoundaryElements(), getComplement(), getMesh(), getMeshName(), makeMesh(), operator=(), setMeshName(), SUPPORT(), and update().
MED_EN::medEntityMesh MEDMEM::SUPPORT::_entity [protected] |
Referenced by belongsTo(), deepCompare(), getBoundaryElements(), getComplement(), getEntity(), makeMesh(), operator=(), setEntity(), SUPPORT(), and update().
int MEDMEM::SUPPORT::_numberOfGeometricType [protected] |
Referenced by belongsTo(), deepCompare(), getNumberOfTypes(), operator=(), setGeometricType(), setNumber(), setNumberOfElements(), setNumberOfGeometricType(), SUPPORT(), and update().
PointerOf<MED_EN::medGeometryElement> MEDMEM::SUPPORT::_geometricType [protected] |
Referenced by belongsTo(), deepCompare(), getTypes(), operator=(), setGeometricType(), setNumberOfGeometricType(), SUPPORT(), and update().
bool MEDMEM::SUPPORT::_isOnAllElts [protected] |
Referenced by belongsTo(), deepCompare(), getComplement(), getNumberIndex(), isOnAllElements(), makeMesh(), operator=(), setAll(), setNumber(), SUPPORT(), and update().
PointerOf<int> MEDMEM::SUPPORT::_numberOfElements [protected] |
Referenced by belongsTo(), deepCompare(), getNumberOfElements(), makeMesh(), operator=(), setNumberOfElements(), setNumberOfGeometricType(), SUPPORT(), and update().
int MEDMEM::SUPPORT::_totalNumberOfElements [protected] |
Referenced by clearDataOnNumbers(), deepCompare(), operator=(), setNumber(), setNumberOfElements(), SUPPORT(), and update().
MEDSKYLINEARRAY* MEDMEM::SUPPORT::_number [mutable, protected] |
Referenced by belongsTo(), clearDataOnNumbers(), getBoundaryElements(), getComplement(), getnumber(), getNumberIndex(), operator=(), setNumber(), and SUPPORT().
MEDSKYLINEARRAY* MEDMEM::SUPPORT::_number_fromfile [mutable, protected] |
Referenced by getnumberFromFile().
vector< string > MEDMEM::SUPPORT::_profilNames [protected] |
Referenced by getProfilNames(), operator=(), setGeometricType(), and SUPPORT().