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

ParaMEDMEM.OverlapElementLocator Class Reference

#include <OverlapElementLocator.hxx>

Inheritance diagram for ParaMEDMEM.OverlapElementLocator:
Inheritance graph

Public Member Functions

 OverlapElementLocator (const ParaFIELD *sourceField, const ParaFIELD *targetField, const ProcessorGroup &group)
virtual ~OverlapElementLocator ()
const MPI_Comm * getCommunicator () const
void exchangeMeshes (OverlapInterpolationMatrix &matrix)
std::vector< std::pair< int,
int > > 
getToDoList () const
std::vector< std::vector< int > > getProcsInInteraction () const
std::string getSourceMethod () const
std::string getTargetMethod () const
const MEDCouplingPointSet * getSourceMesh (int procId) const
const DataArrayInt * getSourceIds (int procId) const
const MEDCouplingPointSet * getTargetMesh (int procId) const
const DataArrayInt * getTargetIds (int procId) const

Private Member Functions

void computeBoundingBoxes ()
bool intersectsBoundingBox (int i, int j) const
void sendLocalMeshTo (int procId, bool sourceOrTarget, OverlapInterpolationMatrix &matrix) const
void receiveRemoteMesh (int procId, bool sourceOrTarget)
void sendMesh (int procId, const MEDCouplingPointSet *mesh, const DataArrayInt *idsToSend) const
void receiveMesh (int procId, MEDCouplingPointSet *&mesh, DataArrayInt *&ids) const

Private Attributes

const ParaFIELD * _local_source_field
const ParaFIELD * _local_target_field
int _local_space_dim
MEDCouplingPointSet * _local_source_mesh
MEDCouplingPointSet * _local_target_mesh
std::vector
< MEDCouplingPointSet * > 
_distant_cell_meshes
std::vector
< MEDCouplingPointSet * > 
_distant_face_meshes
std::vector< std::vector< int > > _proc_pairs
 of size _group.size(). Contains for each source proc i, the ids of proc j the targets interact with. This vector is common for all procs in _group.
std::vector< std::pair< int,
int > > 
_to_do_list
 list of interpolations couple to be done
std::vector< std::pair< int,
bool > > 
_procs_to_send
std::map< std::pair< int, bool >
, MEDCouplingAutoRefCountObjectPtr
< MEDCouplingPointSet > > 
_remote_meshes
std::map< std::pair< int, bool >
, MEDCouplingAutoRefCountObjectPtr
< DataArrayInt > > 
_remote_elems
double * _domain_bounding_boxes
const ProcessorGroup & _group
std::vector< int > _distant_proc_ids
const MPI_Comm * _comm

Constructor & Destructor Documentation

ParaMEDMEM.OverlapElementLocator::OverlapElementLocator ( const ParaFIELD *  sourceField,
const ParaFIELD *  targetField,
const ProcessorGroup &  group 
)
ParaMEDMEM.OverlapElementLocator::~OverlapElementLocator ( ) [virtual]

Member Function Documentation

const MPI_Comm * ParaMEDMEM.OverlapElementLocator::getCommunicator ( ) const
void ParaMEDMEM.OverlapElementLocator::exchangeMeshes ( OverlapInterpolationMatrix &  matrix)

The aim of this method is to perform the communication to get data corresponding to '_to_do_list' attribute. The principle is the following : if proc n1 and n2 need to perform a cross sending with n1<n2, then n1 will send first and receive then.

References ParaMEDMEM.OverlapElementLocator._group, ParaMEDMEM.OverlapElementLocator._procs_to_send, ParaMEDMEM.OverlapElementLocator._to_do_list, Med_Gen_test.it, ParaMEDMEM.ProcessorGroup.myRank(), ParaMEDMEM.OverlapElementLocator.receiveRemoteMesh(), and ParaMEDMEM.OverlapElementLocator.sendLocalMeshTo().

std::vector< std::pair<int,int> > ParaMEDMEM.OverlapElementLocator.getToDoList ( ) const
std::vector< std::vector< int > > ParaMEDMEM.OverlapElementLocator.getProcsInInteraction ( ) const
std::string ParaMEDMEM.OverlapElementLocator::getSourceMethod ( ) const
std::string ParaMEDMEM.OverlapElementLocator::getTargetMethod ( ) const
const MEDCouplingPointSet * ParaMEDMEM.OverlapElementLocator::getSourceMesh ( int  procId) const
const DataArrayInt * ParaMEDMEM.OverlapElementLocator::getSourceIds ( int  procId) const
const MEDCouplingPointSet * ParaMEDMEM.OverlapElementLocator::getTargetMesh ( int  procId) const
const DataArrayInt * ParaMEDMEM.OverlapElementLocator::getTargetIds ( int  procId) const
void ParaMEDMEM.OverlapElementLocator::computeBoundingBoxes ( ) [private]
bool ParaMEDMEM.OverlapElementLocator::intersectsBoundingBox ( int  i,
int  j 
) const [private]
void ParaMEDMEM.OverlapElementLocator::sendLocalMeshTo ( int  procId,
bool  sourceOrTarget,
OverlapInterpolationMatrix &  matrix 
) const [private]
void ParaMEDMEM.OverlapElementLocator::receiveRemoteMesh ( int  procId,
bool  sourceOrTarget 
) [private]

This method recieves source remote mesh on proc 'procId' if sourceOrTarget==True This method recieves target remote mesh on proc 'procId' if sourceOrTarget==False

References ParaMEDMEM.OverlapElementLocator._remote_elems, ParaMEDMEM.OverlapElementLocator._remote_meshes, TestMedCorba2.m, and ParaMEDMEM.OverlapElementLocator.receiveMesh().

void ParaMEDMEM.OverlapElementLocator::sendMesh ( int  procId,
const MEDCouplingPointSet *  mesh,
const DataArrayInt *  idsToSend 
) const [private]
void ParaMEDMEM.OverlapElementLocator::receiveMesh ( int  procId,
MEDCouplingPointSet *&  mesh,
DataArrayInt *&  ids 
) const [private]

Field Documentation

std::vector< std::vector< int > > ParaMEDMEM.OverlapElementLocator._proc_pairs [private]

of size _group.size(). Contains for each source proc i, the ids of proc j the targets interact with. This vector is common for all procs in _group.

std::vector< std::pair<int,int> > ParaMEDMEM.OverlapElementLocator._to_do_list [private]

list of interpolations couple to be done

std::vector< std::pair<int,bool> > ParaMEDMEM.OverlapElementLocator._procs_to_send [private]
const MPI_Comm* ParaMEDMEM.OverlapElementLocator._comm [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