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

MEDSPLITTER.ParallelTopology Class Reference

#include <MEDSPLITTER_ParallelTopology.hxx>

Inheritance diagram for MEDSPLITTER.ParallelTopology:
Inheritance graph

Public Member Functions

 ParallelTopology ()
 ParallelTopology (const std::vector< MEDMEM::MESH * > &, const std::vector< MEDMEM::CONNECTZONE * > &, std::vector< int * > &, std::vector< int * > &, std::vector< int * > &)
 ParallelTopology (boost::shared_ptr< Graph > graph, int nbdomain, int mesh_dimension)
 constructing ParallelTopology from an old topology and a graph
 ~ParallelTopology ()
void convertGlobalNodeList (const int *, int, int *, int *)
 converts a list of global cell numbers to a distributed array with local cell numbers
void convertGlobalNodeList (const int *, int, int *, int)
void convertGlobalNodeListWithTwins (const int *face_list, int nbnode, int *&local, int *&ip, int *&full_array, int &size)
void convertGlobalCellList (const int *, int, int *, int *)
 converts a list of global node numbers to a distributed array with local cell numbers
void convertGlobalFaceList (const int *, int, int *, int *)
 converts a list of global face numbers to a distributed array with local face numbers
void convertGlobalFaceList (const int *, int, int *, int)
void convertGlobalFaceListWithTwins (const int *face_list, int nbface, int *&local, int *&ip, int *&full_array, int &size)
void createNodeMapping (std::map< MED_EN::medGeometryElement, int * > &type_connectivity, std::map< MED_EN::medGeometryElement, int > &present_type_numbers, std::vector< int > &conn, std::vector< int > &conn_index, std::vector< int > &polyhedron_conn, std::vector< int > &polyhedron_conn_index, std::vector< int > &polyhedron_face_index, int idomain)
 creating node mapping
void createFaceMapping (const MESHCollection &, const MESHCollection &)
void createFaceMapping2ndversion (const MESHCollection &)
void convertToLocal (std::map< MED_EN::medGeometryElement, int * > &type_connectivity, std::map< MED_EN::medGeometryElement, int > &present_type_numbers, int idomain, MED_EN::medEntityMesh entity)
 converting node global numberings to local numberings
void convertToLocal2ndVersion (int *nodes, int nbnodes, int idomain)
void computeNodeNodeCorrespondencies (int nbdomain, vector< MEDMEM::MEDSKYLINEARRAY * > &) const
 computing arrays with node/node correspondencies
void computeCellCellCorrespondencies (int nbdomain, vector< MEDMEM::MEDSKYLINEARRAY * > &, const Graph *) const
 computing arrays with node/node correspondencies
int convertNodeToGlobal (int ip, int icell) const
 retrieving Graph
int convertFaceToGlobal (int ip, int iface) const
 converting face local numbering to global
int convertCellToGlobal (int ip, int icell) const
void convertNodeToGlobal (int ip, const int *local, int n, int *global) const
void convertCellToGlobal (int ip, const int *local, int n, int *global) const
void convertFaceToGlobal (int ip, const int *local, int n, int *global) const
int nbDomain () const
int nbCells () const
int nbCells (int idomain) const
int getNodeNumber (int idomain) const
 retrieving number of nodes
int getNodeNumber () const
void getNodeList (int idomain, int *list) const
 retrieving list of nodes in global numbers
std::vector< int > & getFusedCellNumbers (int idomain)
const std::vector< int > & getFusedCellNumbers (int idomain) const
 retrieving face numbers after fusing in parallel mode
std::vector< int > & getFusedFaceNumbers (int idomain)
const std::vector< int > & getFusedFaceNumbers (int idomain) const
int getCellNumber (int idomain) const
 retrieving number of nodes
int getCellDomainNumber (int global) const
void getCellList (int idomain, int *list) const
 retrieving list of nodes in global numbers
int getFaceNumber (int idomain) const
int getFaceNumber () const
void getFaceList (int idomain, int *list) const
 retrieving list of faces in global numbers
std::pair< int, int > convertGlobalCell (int iglobal) const
 converting a global cell number to a local representation (domain + local number)
int convertGlobalFace (int iglobal, int idomain)
int convertGlobalNode (int iglobal, int idomain)
void appendFace (int idomain, int ilocal, int iglobal)
 adding a face to the topology
int getMaxGlobalFace () const
 Return max global face number.
boost::shared_ptr< Graph > getGraph () const
void recreateFaceMapping (const TGeom2FacesByDomian &face_map)
 recreating a face mapping from scratch
virtual void recreateMappingAfterFusion (const std::vector< MEDMEM::MESH * > &)

Private Types

typedef INTERP_KERNEL::HashMap
< int, pair< int, int > > 
TGlob2DomainLoc
 mapping global -> local
typedef
INTERP_KERNEL::HashMultiMap
< int, pair< int, int > > 
TGlob2LocsMap
 mapping global -> local

Private Member Functions

bool hasCellWithNodes (const MESHCollection &, int dom, const std::set< int > &nodes)
 Return true if the domain mesh contains a cell based on given global nodes.

Private Attributes

TGlob2DomainLoc m_glob_to_loc
vector< vector< int > > m_loc_to_glob
 mapping local -> global
INTERP_KERNEL::HashMultiMap
< int, pair< int, int > > 
m_node_glob_to_loc
 mapping global -> local
vector< vector< int > > m_node_loc_to_glob
 mapping local -> global
vector< vector< int > > m_cell_loc_to_glob_fuse
vector< vector< int > > m_face_loc_to_glob_fuse
TGlob2LocsMap m_face_glob_to_loc
vector< vector< int > > m_face_loc_to_glob
 mapping local -> global
vector< int > m_nb_cells
vector< int > m_nb_nodes
vector< int > m_nb_faces
int m_nb_total_cells
int m_nb_total_nodes
int m_nb_total_faces
int m_nb_domain
int m_mesh_dimension
boost::shared_ptr< Graph > m_graph

Member Typedef Documentation

mapping global -> local

mapping global -> local


Constructor & Destructor Documentation

ParallelTopology::ParallelTopology ( )
MEDSPLITTER.ParallelTopology.ParallelTopology ( const std::vector< MEDMEM::MESH * > &  ,
const std::vector< MEDMEM::CONNECTZONE * > &  ,
std::vector< int * > &  ,
std::vector< int * > &  ,
std::vector< int * > &   
)
ParallelTopology::ParallelTopology ( boost::shared_ptr< Graph >  graph,
int  nbdomain,
int  mesh_dimension 
)
ParallelTopology::~ParallelTopology ( )

Member Function Documentation

void ParallelTopology::convertGlobalNodeList ( const int *  node_list,
int  nbnode,
int *  local,
int *  ip 
) [virtual]

converts a list of global cell numbers to a distributed array with local cell numbers

Converts a list of global node numbers to a distributed array with local cell numbers.

If a node in the list is represented on several domains, only the first value is returned

Implements MEDSPLITTER.Topology.

References INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.empty(), INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.find(), and MEDSPLITTER.ParallelTopology.m_node_glob_to_loc.

void ParallelTopology::convertGlobalNodeList ( const int *  node_list,
int  nbnode,
int *  local,
int  ip 
) [virtual]

Converts a list of global node numbers on domain ip to a distributed array with local cell numbers.

If a node in the list is represented on several domains, only the value with domain ip is returned

Implements MEDSPLITTER.Topology.

References INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.empty(), INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.equal_range(), Med_Gen_test.it, and MEDSPLITTER.ParallelTopology.m_node_glob_to_loc.

void ParallelTopology::convertGlobalNodeListWithTwins ( const int *  node_list,
int  nbnode,
int *&  local,
int *&  ip,
int *&  full_array,
int &  size 
) [virtual]
void ParallelTopology::convertGlobalCellList ( const int *  cell_list,
int  nbcell,
int *  local,
int *  ip 
) [virtual]

converts a list of global node numbers to a distributed array with local cell numbers

converts a list of global cell numbers to a distributed array with local cell numbers

Implements MEDSPLITTER.Topology.

References INTERP_KERNEL.HashMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.find(), and MEDSPLITTER.ParallelTopology.m_glob_to_loc.

void ParallelTopology::convertGlobalFaceList ( const int *  face_list,
int  nbface,
int *  local,
int *  ip 
) [virtual]

converts a list of global face numbers to a distributed array with local face numbers

Converts a list of global face numbers to a distributed array with local face numbers

Implements MEDSPLITTER.Topology.

References INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.end(), INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.find(), MEDSPLITTER.ParallelTopology.m_face_glob_to_loc, and MED_EXCEPTION.

void ParallelTopology::convertGlobalFaceList ( const int *  face_list,
int  nbface,
int *  local,
int  ip 
) [virtual]

Converts a list of global node numbers on domain ip to a distributed array with local cell numbers.

If a node in the list is represented on several domains, only the value with domain ip is returned

Implements MEDSPLITTER.Topology.

References INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.equal_range(), Med_Gen_test.it, and MEDSPLITTER.ParallelTopology.m_face_glob_to_loc.

void ParallelTopology::convertGlobalFaceListWithTwins ( const int *  face_list,
int  nbface,
int *&  local,
int *&  ip,
int *&  full_array,
int &  size 
) [virtual]

Converts a list of global face numbers to a distributed array with local face numbers.

If a face in the list is represented on several domains, all the values are put in the array

Implements MEDSPLITTER.Topology.

References INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.count(), INTERP_KERNEL.HashMultiMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.equal_range(), medClient_test.index, Med_Gen_test.it, MEDSPLITTER.ParallelTopology.m_face_glob_to_loc, and test_NonCoincidentDEC.size.

void MEDSPLITTER.ParallelTopology.createNodeMapping ( std::map< MED_EN::medGeometryElement, int * > &  type_connectivity,
std::map< MED_EN::medGeometryElement, int > &  present_type_numbers,
std::vector< int > &  conn,
std::vector< int > &  conn_index,
std::vector< int > &  polyhedron_conn,
std::vector< int > &  polyhedron_conn_index,
std::vector< int > &  polyhedron_face_index,
int  idomain 
) [virtual]

creating node mapping

Implements MEDSPLITTER.Topology.

void ParallelTopology::createFaceMapping ( const MESHCollection &  initial_collection,
const MESHCollection &  new_collection 
) [virtual]
void ParallelTopology::createFaceMapping2ndversion ( const MESHCollection &  initial_collection)
void MEDSPLITTER.ParallelTopology.convertToLocal ( std::map< MED_EN::medGeometryElement, int * > &  type_connectivity,
std::map< MED_EN::medGeometryElement, int > &  present_type_numbers,
int  idomain,
MED_EN::medEntityMesh  entity 
) [virtual]

converting node global numberings to local numberings

Implements MEDSPLITTER.Topology.

void ParallelTopology::convertToLocal2ndVersion ( int *  nodes,
int  nbnodes,
int  idomain 
) [virtual]
void ParallelTopology::computeNodeNodeCorrespondencies ( int  nbdomain,
vector< MEDMEM::MEDSKYLINEARRAY * > &  corr 
) const
void ParallelTopology::computeCellCellCorrespondencies ( int  idomain,
vector< MEDMEM::MEDSKYLINEARRAY * > &  corr,
const Graph *  graph 
) const

computing arrays with node/node correspondencies

computing arrays with cell/cell correspondencies

Parameters:
idomain- domain for which to compute correspondencies
corr- out correspondencies
graph- graph containing new cell distribution among domains
id_shift- shitf to get cell id global on this processor from id global over all procs

References med_test1.end, INTERP_KERNEL.HashMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.end(), INTERP_KERNEL.HashMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.find(), MEDSPLITTER.Graph.getGraph(), MEDMEM.MEDSKYLINEARRAY.getIndex(), MEDMEM.MEDSKYLINEARRAY.getValue(), medClient_test.index, Med_Gen_test.it, MEDSPLITTER.ParallelTopology.m_glob_to_loc, MEDSPLITTER.ParallelTopology.m_loc_to_glob, MEDSPLITTER.ParallelTopology.m_nb_cells, MEDSPLITTER.ParallelTopology.m_nb_domain, batchmode_medcorba_test.value, and medMeshing_test.values.

int MEDSPLITTER.ParallelTopology.convertNodeToGlobal ( int  ip,
int  icell 
) const [virtual]

retrieving Graph

converting node local numbering to global

Implements MEDSPLITTER.Topology.

References MEDSPLITTER.ParallelTopology.m_node_loc_to_glob.

int MEDSPLITTER.ParallelTopology.convertFaceToGlobal ( int  ip,
int  iface 
) const [virtual]

converting face local numbering to global

Implements MEDSPLITTER.Topology.

References MEDSPLITTER.ParallelTopology.m_face_loc_to_glob.

int MEDSPLITTER.ParallelTopology.convertCellToGlobal ( int  ip,
int  icell 
) const [virtual]
void MEDSPLITTER.ParallelTopology.convertNodeToGlobal ( int  ip,
const int *  local,
int  n,
int *  global 
) const [virtual]
void MEDSPLITTER.ParallelTopology.convertCellToGlobal ( int  ip,
const int *  local,
int  n,
int *  global 
) const [virtual]
void MEDSPLITTER.ParallelTopology.convertFaceToGlobal ( int  ip,
const int *  local,
int  n,
int *  global 
) const [virtual]
int MEDSPLITTER.ParallelTopology.nbDomain ( ) const [virtual]
int MEDSPLITTER.ParallelTopology.nbCells ( ) const [virtual]
int MEDSPLITTER.ParallelTopology.nbCells ( int  idomain) const [virtual]
int MEDSPLITTER.ParallelTopology.getNodeNumber ( int  idomain) const [virtual]

retrieving number of nodes

Implements MEDSPLITTER.Topology.

References MEDSPLITTER.ParallelTopology.m_nb_nodes.

int MEDSPLITTER.ParallelTopology.getNodeNumber ( ) const [virtual]
void MEDSPLITTER.ParallelTopology.getNodeList ( int  idomain,
int *  list 
) const [virtual]

retrieving list of nodes in global numbers

retrieving cell numbers after fusing in parallel mode

Implements MEDSPLITTER.Topology.

References MEDSPLITTER.ParallelTopology.m_nb_nodes, and MEDSPLITTER.ParallelTopology.m_node_loc_to_glob.

std::vector<int>& MEDSPLITTER.ParallelTopology.getFusedCellNumbers ( int  idomain) [virtual]
const std::vector<int>& MEDSPLITTER.ParallelTopology.getFusedCellNumbers ( int  idomain) const [virtual]

retrieving face numbers after fusing in parallel mode

Implements MEDSPLITTER.Topology.

References MEDSPLITTER.ParallelTopology.m_cell_loc_to_glob_fuse.

std::vector<int>& MEDSPLITTER.ParallelTopology.getFusedFaceNumbers ( int  idomain) [virtual]
const std::vector<int>& MEDSPLITTER.ParallelTopology.getFusedFaceNumbers ( int  idomain) const [virtual]
int MEDSPLITTER.ParallelTopology.getCellNumber ( int  idomain) const [virtual]

retrieving number of nodes

Implements MEDSPLITTER.Topology.

References MEDSPLITTER.ParallelTopology.m_nb_cells.

int MEDSPLITTER.ParallelTopology.getCellDomainNumber ( int  global) const
void MEDSPLITTER.ParallelTopology.getCellList ( int  idomain,
int *  list 
) const [virtual]

retrieving list of nodes in global numbers

Implements MEDSPLITTER.Topology.

References MEDSPLITTER.ParallelTopology.m_loc_to_glob, and MEDSPLITTER.ParallelTopology.m_nb_cells.

int MEDSPLITTER.ParallelTopology.getFaceNumber ( int  idomain) const [virtual]
int MEDSPLITTER.ParallelTopology.getFaceNumber ( ) const [virtual]
void MEDSPLITTER.ParallelTopology.getFaceList ( int  idomain,
int *  list 
) const [virtual]

retrieving list of faces in global numbers

Implements MEDSPLITTER.Topology.

References MEDSPLITTER.ParallelTopology.m_face_loc_to_glob, and MEDSPLITTER.ParallelTopology.m_nb_faces.

std::pair<int,int> MEDSPLITTER.ParallelTopology.convertGlobalCell ( int  iglobal) const [virtual]

converting a global cell number to a local representation (domain + local number)

Implements MEDSPLITTER.Topology.

References INTERP_KERNEL.HashMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.find(), and MEDSPLITTER.ParallelTopology.m_glob_to_loc.

int MEDSPLITTER.ParallelTopology.convertGlobalFace ( int  iglobal,
int  idomain 
) [virtual]
int MEDSPLITTER.ParallelTopology.convertGlobalNode ( int  iglobal,
int  idomain 
) [virtual]
void MEDSPLITTER.ParallelTopology.appendFace ( int  idomain,
int  ilocal,
int  iglobal 
) [virtual]
int ParallelTopology::getMaxGlobalFace ( ) const [virtual]
boost::shared_ptr<Graph> MEDSPLITTER.ParallelTopology.getGraph ( ) const [virtual]
void ParallelTopology::recreateFaceMapping ( const TGeom2FacesByDomian &  face_map) [virtual]
virtual void MEDSPLITTER.ParallelTopology.recreateMappingAfterFusion ( const std::vector< MEDMEM::MESH * > &  ) [virtual]

Implements MEDSPLITTER.Topology.

bool ParallelTopology::hasCellWithNodes ( const MESHCollection &  ,
int  dom,
const std::set< int > &  nodes 
) [private]

Field Documentation

vector<vector<int> > MEDSPLITTER.ParallelTopology.m_loc_to_glob [private]

mapping local -> global

mapping global -> local

mapping local -> global

mapping local -> global

boost::shared_ptr<Graph> MEDSPLITTER.ParallelTopology.m_graph [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