Version: 6.3.1
Data Structures | Public Member Functions | Private Types | Private Member Functions | Private Attributes

MEDMEM.MeshFuse Class Reference

Mesh able to concatenate other meshes. More...

#include <MEDMEM_MeshFuse.hxx>

Inheritance diagram for MEDMEM.MeshFuse:
Inheritance graph

Data Structures

struct  TConnData

Public Member Functions

 MeshFuse ()
virtual ~MeshFuse ()
void concatenate (const MESH *mesh, const std::vector< int > &node_glob_numbers)
 Fuse me and other mesh.
void append (MED_EN::medEntityMesh entity, std::vector< int > &glob_numbers, const std::vector< int > &add_glob_numbers)
 Unite numbers of elements taking into account their types.
void setNodeNumbers (const std::vector< int > &node_glob_numbers)
 set global numbers of nodes if MeshFuse has been filled via MESHING
const std::vector< int > & getNodeNumbers () const

Private Types

enum  { INIT_OLD = 0, INIT_ADD, RSLT_ADD, NB_INDICES }
typedef std::map
< MED_EN::medGeometryElement,
int
TNbOfGeom

Private Member Functions

int makeNewNodeIds (const std::vector< int > &node_glob_numbers)
 Return number of nodes in the expanded mesh.
void expandCoordinates (int final_nb_nodes)
 Update coordinates.
void expandConnectivity (int final_nb_nodes)
 Concatenate connectivity of meshes.
void updateNodeIds (CONNECTIVITY *connectivity)
 Update node ids in the copied connectivity of theadded mesh.
int appendConnectivity (TConnData &data, const MESH *mesh, MED_EN::medEntityMesh entity, MED_EN::medGeometryElement type)
 Concatenate connectivities.
template<class TSUPPORT >
TSUPPORT * updateOldSupport (TSUPPORT *support) const
 Return updated old support.
template<class TSUPPORT >
TSUPPORT * makeSupport (const TSUPPORT *add_support, TSUPPORT *same_name_support)
 Creates a copy of support being added or extands the present one.
void expandSupports ()
 Concatenate families and groups.
int getElemNbShift (const MED_EN::medEntityMesh &entity, MED_EN::medGeometryElement type, int which, bool prev) const
 Return shift for conversion of element numbers.
void uniteSupportElements (const SUPPORT *add_support, SUPPORT *old_support, MED_EN::medGeometryElement type, std::vector< int > &elements)
 Fills in elements of support of given type.
void makeNewElemIds (MED_EN::medEntityMesh entity, MED_EN::medGeometryElement type, std::vector< int > &new_ids)
 Fills in ids of elements of added mesh in the resulting mesh.
void findEqualOldElements (MED_EN::medEntityMesh entity, MED_EN::medGeometryElement type, std::vector< int > &old_ids)
 Finds ids of elements of the old mesh equal to merged elements of the added one.

Private Attributes

const MESH_mesh
std::vector< int_node_glob_numbers
std::map
< MED_EN::medGeometryElement,
std::vector< int > > 
_merged_of_type
std::map
< MED_EN::medGeometryElement,
std::vector< int > > 
_equalo_of_type
std::map
< MED_EN::medGeometryElement,
std::vector< int > > 
_new_elem_ids_of_type
vector< TNbOfGeom_nb_index [NB_INDICES]

Detailed Description

Mesh able to concatenate other meshes.


Member Typedef Documentation


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
INIT_OLD 
INIT_ADD 
RSLT_ADD 
NB_INDICES 

Constructor & Destructor Documentation

MeshFuse::MeshFuse ( )
MeshFuse::~MeshFuse ( ) [virtual]

Member Function Documentation

void MeshFuse::concatenate ( const MESH mesh,
const std::vector< int > &  node_glob_numbers 
)
void MeshFuse::append ( MED_EN::medEntityMesh  entity,
std::vector< int > &  glob_numbers,
const std::vector< int > &  add_glob_numbers 
)
void MeshFuse::setNodeNumbers ( const std::vector< int > &  node_glob_numbers)

set global numbers of nodes if MeshFuse has been filled via MESHING

References MEDMEM.MeshFuse._node_glob_numbers, and MEDMEM.MESH.getNumberOfNodes().

const std::vector<int>& MEDMEM.MeshFuse.getNodeNumbers ( ) const
int MeshFuse::makeNewNodeIds ( const std::vector< int > &  node_glob_numbers) [private]
void MeshFuse::expandCoordinates ( int  final_nb_nodes) [private]
void MeshFuse::expandConnectivity ( int  final_nb_nodes) [private]
void MeshFuse::updateNodeIds ( CONNECTIVITY connectivity) [private]
int MeshFuse::appendConnectivity ( TConnData data,
const MESH mesh,
MED_EN::medEntityMesh  entity,
MED_EN::medGeometryElement  type 
) [private]
template<class TSUPPORT >
TSUPPORT * MeshFuse::updateOldSupport ( TSUPPORT *  support) const [private]
template<class TSUPPORT >
TSUPPORT * MeshFuse::makeSupport ( const TSUPPORT *  add_support,
TSUPPORT *  same_name_support 
) [private]

Creates a copy of support being added or extands the present one.

Parameters:
add_support- support of the added mesh
same_name_support- the present support with the same name
Return values:
SUPPORT*- resulting support

References _NODE_TYPE_, medClient_test.index, MED_EN.MED_NODE, medClient_test.type, and MEDMEM.MeshFuse.uniteSupportElements().

void MeshFuse::expandSupports ( ) [private]
int MeshFuse::getElemNbShift ( const MED_EN::medEntityMesh entity,
MED_EN::medGeometryElement  type,
int  which,
bool  prev 
) const [private]

Return shift for conversion of element numbers.

Parameters:
which- to select a global numbering index
prev- true means "shift of type previous to given type"

References MEDMEM.MeshFuse._nb_index.

void MeshFuse::uniteSupportElements ( const SUPPORT add_support,
SUPPORT old_support,
MED_EN::medGeometryElement  type,
std::vector< int > &  elements 
) [private]

Fills in elements of support of given type.

Parameters:
add_support- support of the added mesh
old_support- the present support with the same name
type- geometric type to process
elements- output array of element

References MEDMEM.MeshFuse._merged_of_type, MEDMEM.MeshFuse._new_elem_ids_of_type, med_opsupp_test.entity, MEDMEM.MeshFuse.getElemNbShift(), MEDMEM.SUPPORT.getNumber(), MEDMEM.SUPPORT.getNumberOfElements(), MEDMEM.MeshFuse.INIT_ADD, MEDMEM.MeshFuse.INIT_OLD, MEDMEM.SUPPORT.isOnAllElements(), MEDMEM.MeshFuse.makeNewElemIds(), MED_EN.MED_ALL_ELEMENTS, MEDMEM.MeshFuse.RSLT_ADD, and medClient_test.type.

void MeshFuse::makeNewElemIds ( MED_EN::medEntityMesh  entity,
MED_EN::medGeometryElement  type,
std::vector< int > &  new_ids 
) [private]

Fills in ids of elements of added mesh in the resulting mesh.

Parameters:
type- element type to treat
new_ids- output array

References MEDMEM.MeshFuse._equalo_of_type, MEDMEM.MeshFuse._merged_of_type, MEDMEM.MeshFuse._mesh, MEDMEM.MeshFuse.getElemNbShift(), MEDMEM.MESH.getNumberOfElements(), MEDMEM.MeshFuse.INIT_OLD, LOCALIZED, MED_EN.MED_NODE, MEDMEM.MeshFuse.RSLT_ADD, and medClient_test.type.

void MeshFuse::findEqualOldElements ( MED_EN::medEntityMesh  entity,
MED_EN::medGeometryElement  type,
std::vector< int > &  old_ids 
) [private]

Field Documentation

const MESH* MEDMEM.MeshFuse._mesh [private]
std::vector<int> MEDMEM.MeshFuse._node_glob_numbers [private]
std::map< MED_EN::medGeometryElement, std::vector<int> > MEDMEM.MeshFuse._merged_of_type [private]
std::map< MED_EN::medGeometryElement, std::vector<int> > MEDMEM.MeshFuse._equalo_of_type [private]
vector< TNbOfGeom > MEDMEM.MeshFuse._nb_index[NB_INDICES] [private]
Copyright © 2007-2011 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