//#define VOL_PREC 1.0e-6
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace INTERP_KERNEL;
double Interpolation3DTest::sumRow(const IntersectionMatrix& m, int i) const
}
-void Interpolation3DTest::getVolumes(ParaMEDMEM::MEDCouplingUMesh& mesh, double *tab) const
+void Interpolation3DTest::getVolumes(MEDCoupling::MEDCouplingUMesh& mesh, double *tab) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> vol=mesh->getMeasureField(true);
std::copy(vol->getArray()->begin(),vol->getArray()->end(),tab);
#include <iostream>
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
namespace INTERP_TEST
{
#include "MEDMeshMaker.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
-ParaMEDMEM::MEDCouplingUMesh *MEDMeshMaker(int dim, int nbedge)
+MEDCoupling::MEDCouplingUMesh *MEDMeshMaker(int dim, int nbedge)
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingCMesh> c=MEDCouplingCMesh::New();
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::New();
#include "MEDCouplingUMesh.hxx"
-ParaMEDMEM::MEDCouplingUMesh *MEDMeshMaker(int dim, int nbedge);
+MEDCoupling::MEDCouplingUMesh *MEDMeshMaker(int dim, int nbedge);
}
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
}
double sumCol(const IntersectionMatrix& m, int i) const;
- void getVolumes(ParaMEDMEM::MEDCouplingUMesh& mesh, double* tab) const;
+ void getVolumes(MEDCoupling::MEDCouplingUMesh& mesh, double* tab) const;
- bool testVolumes(const IntersectionMatrix& m, ParaMEDMEM::MEDCouplingUMesh& sMesh, ParaMEDMEM::MEDCouplingUMesh& tMesh) const;
+ bool testVolumes(const IntersectionMatrix& m, MEDCoupling::MEDCouplingUMesh& sMesh, MEDCoupling::MEDCouplingUMesh& tMesh) const;
double sumVolume(const IntersectionMatrix& m) const;
#include <cppunit/extensions/HelperMacros.h>
//#define VOL_PREC 1.0e-6
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace INTERP_KERNEL;
namespace INTERP_TEST
* @param tab pointer to double[no. elements of mesh] array in which to store the volumes
*/
template <int SPACEDIM, int MESHDIM>
- void MeshTestToolkit<SPACEDIM,MESHDIM>::getVolumes(ParaMEDMEM::MEDCouplingUMesh& mesh, double *tab) const
+ void MeshTestToolkit<SPACEDIM,MESHDIM>::getVolumes(MEDCoupling::MEDCouplingUMesh& mesh, double *tab) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> vol=mesh.getMeasureField(true);
std::copy(vol->getArray()->begin(),vol->getArray()->end(),tab);
* @return true if the condition is verified, false if not.
*/
template <int SPACEDIM, int MESHDIM>
- bool MeshTestToolkit<SPACEDIM,MESHDIM>::testVolumes(const IntersectionMatrix& m, ParaMEDMEM::MEDCouplingUMesh& sMesh, ParaMEDMEM::MEDCouplingUMesh& tMesh) const
+ bool MeshTestToolkit<SPACEDIM,MESHDIM>::testVolumes(const IntersectionMatrix& m, MEDCoupling::MEDCouplingUMesh& sMesh, MEDCoupling::MEDCouplingUMesh& tMesh) const
{
bool ok = true;
#include <map>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDPARTITIONER::ConnectZone::ConnectZone():
_name("")
return _local_domain_number;
}
-ParaMEDMEM::MEDCouplingUMesh *MEDPARTITIONER::ConnectZone::getLocalMesh() const
+MEDCoupling::MEDCouplingUMesh *MEDPARTITIONER::ConnectZone::getLocalMesh() const
{
return _local_mesh;
}
-ParaMEDMEM::MEDCouplingUMesh *MEDPARTITIONER::ConnectZone::getDistantMesh() const
+MEDCoupling::MEDCouplingUMesh *MEDPARTITIONER::ConnectZone::getDistantMesh() const
{
return _distant_mesh;
}
return _node_corresp->getNumberOf();
}
-const ParaMEDMEM::MEDCouplingSkyLineArray * MEDPARTITIONER::ConnectZone::getNodeCorresp() const
+const MEDCoupling::MEDCouplingSkyLineArray * MEDPARTITIONER::ConnectZone::getNodeCorresp() const
{
return _node_corresp;
}
return _face_corresp->getNumberOf();
}
-const ParaMEDMEM::MEDCouplingSkyLineArray * MEDPARTITIONER::ConnectZone::getFaceCorresp() const
+const MEDCoupling::MEDCouplingSkyLineArray * MEDPARTITIONER::ConnectZone::getFaceCorresp() const
{
return _face_corresp;
}
return 0;
}
-const ParaMEDMEM::MEDCouplingSkyLineArray *
+const MEDCoupling::MEDCouplingSkyLineArray *
MEDPARTITIONER::ConnectZone::getEntityCorresp(int localEntity, int distantEntity) const
{
typedef std::map<std::pair<int,int>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
_local_domain_number=localDomainNumber;
}
-void MEDPARTITIONER::ConnectZone::setLocalMesh(ParaMEDMEM::MEDCouplingUMesh * localMesh)
+void MEDPARTITIONER::ConnectZone::setLocalMesh(MEDCoupling::MEDCouplingUMesh * localMesh)
{
_local_mesh=localMesh;
}
-void MEDPARTITIONER::ConnectZone::setDistantMesh(ParaMEDMEM::MEDCouplingUMesh * distantMesh)
+void MEDPARTITIONER::ConnectZone::setDistantMesh(MEDCoupling::MEDCouplingUMesh * distantMesh)
{
_distant_mesh=distantMesh;
}
void MEDPARTITIONER::ConnectZone::setEntityCorresp(int localEntity, int distantEntity,
MEDCouplingSkyLineArray *array)
{
- ParaMEDMEM::MEDCouplingSkyLineArray * nullArray = 0;
- std::map < std::pair <int,int>, ParaMEDMEM::MEDCouplingSkyLineArray * >::iterator it;
+ MEDCoupling::MEDCouplingSkyLineArray * nullArray = 0;
+ std::map < std::pair <int,int>, MEDCoupling::MEDCouplingSkyLineArray * >::iterator it;
it = _entity_corresp.insert
( std::make_pair( std::make_pair(localEntity,distantEntity), nullArray )).first;
if ( it->second != nullArray ) delete it->second;
#include "MEDPARTITIONER.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
class MEDCouplingSkyLineArray;
std::string getDescription() const ;
int getDistantDomainNumber() const ;
int getLocalDomainNumber() const ;
- ParaMEDMEM::MEDCouplingUMesh *getLocalMesh() const ;
- ParaMEDMEM::MEDCouplingUMesh *getDistantMesh() const ;
+ MEDCoupling::MEDCouplingUMesh *getLocalMesh() const ;
+ MEDCoupling::MEDCouplingUMesh *getDistantMesh() const ;
bool isEntityCorrespPresent(int localEntity,int distantEntity) const;
const int *getNodeCorrespIndex() const;
const int *getNodeCorrespValue() const;
int getNodeNumber() const;
- const ParaMEDMEM::MEDCouplingSkyLineArray * getNodeCorresp() const;
+ const MEDCoupling::MEDCouplingSkyLineArray * getNodeCorresp() const;
const int *getFaceCorrespIndex() const;
const int *getFaceCorrespValue() const;
int getFaceNumber() const;
- const ParaMEDMEM::MEDCouplingSkyLineArray * getFaceCorresp() const;
+ const MEDCoupling::MEDCouplingSkyLineArray * getFaceCorresp() const;
const int *getEntityCorrespIndex(int localEntity,
int distantEntity) const;
const int *getEntityCorrespValue(int localEntity,
int distantEntity) const;
int getEntityCorrespLength(int localEntity,
int distantEntity) const;
- const ParaMEDMEM::MEDCouplingSkyLineArray * getEntityCorresp(int localEntity,
+ const MEDCoupling::MEDCouplingSkyLineArray * getEntityCorresp(int localEntity,
int distantEntity) const;
std::vector< std::pair< int,int > > getEntities() const;
void setDescription(const std::string& description) ;
void setDistantDomainNumber(int distantDomainNumber) ;
void setLocalDomainNumber(int distantDomainNumber) ;
- void setLocalMesh(ParaMEDMEM::MEDCouplingUMesh * localMesh) ;
- void setDistantMesh(ParaMEDMEM::MEDCouplingUMesh * distantMesh) ;
+ void setLocalMesh(MEDCoupling::MEDCouplingUMesh * localMesh) ;
+ void setDistantMesh(MEDCoupling::MEDCouplingUMesh * distantMesh) ;
void setNodeCorresp(const int * nodeCorresp, int nbnode);
- void setNodeCorresp(ParaMEDMEM::MEDCouplingSkyLineArray* array);
+ void setNodeCorresp(MEDCoupling::MEDCouplingSkyLineArray* array);
void setFaceCorresp(const int * faceCorresp, int nbface);
- void setFaceCorresp(ParaMEDMEM::MEDCouplingSkyLineArray* array);
+ void setFaceCorresp(MEDCoupling::MEDCouplingSkyLineArray* array);
void setEntityCorresp(int localEntity, int distantEntity,
const int * entityCorresp, int nbentity);
void setEntityCorresp(int localEntity, int distantEntity,
- ParaMEDMEM::MEDCouplingSkyLineArray *array);
+ MEDCoupling::MEDCouplingSkyLineArray *array);
private :
std::string _name;
std::string _description;
int _local_domain_number;
int _distant_domain_number;
- ParaMEDMEM::MEDCouplingUMesh * _local_mesh;
- ParaMEDMEM::MEDCouplingUMesh * _distant_mesh;
+ MEDCoupling::MEDCouplingUMesh * _local_mesh;
+ MEDCoupling::MEDCouplingUMesh * _distant_mesh;
- ParaMEDMEM::MEDCouplingSkyLineArray * _node_corresp;
- ParaMEDMEM::MEDCouplingSkyLineArray * _face_corresp;
+ MEDCoupling::MEDCouplingSkyLineArray * _node_corresp;
+ MEDCoupling::MEDCouplingSkyLineArray * _face_corresp;
- std::map < std::pair <int,int>, ParaMEDMEM::MEDCouplingSkyLineArray * > _entity_corresp;
+ std::map < std::pair <int,int>, MEDCoupling::MEDCouplingSkyLineArray * > _entity_corresp;
};
}
# endif
#include <set>
-MEDPARTITIONER::Graph::Graph(ParaMEDMEM::MEDCouplingSkyLineArray *array, int *edgeweight):_graph(array),_partition(0),_edge_weight(edgeweight),_cell_weight(0)
+MEDPARTITIONER::Graph::Graph(MEDCoupling::MEDCouplingSkyLineArray *array, int *edgeweight):_graph(array),_partition(0),_edge_weight(edgeweight),_cell_weight(0)
{
}
{
std::set<int> domains;
if ( _partition )
- if ( ParaMEDMEM::DataArrayInt* array = _partition->getValueArray() )
+ if ( MEDCoupling::DataArrayInt* array = _partition->getValueArray() )
{
for ( const int * dom = array->begin(); dom != array->end(); ++dom )
domains.insert( *dom );
#include <string>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingSkyLineArray;
}
Graph(){};
//creates a graph from a SKYLINEARRAY
- Graph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, int* edgeweight=0);
+ Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, int* edgeweight=0);
virtual ~Graph();
void setEdgesWeights(int *edgeweight) { _edge_weight=edgeweight; }
// returns nb of domains in _partition
int nbDomains() const;
- const ParaMEDMEM::MEDCouplingSkyLineArray *getGraph() const { return _graph; }
- const ParaMEDMEM::MEDCouplingSkyLineArray *getPartition() const { return _partition; }
+ const MEDCoupling::MEDCouplingSkyLineArray *getGraph() const { return _graph; }
+ const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const { return _partition; }
protected:
- ParaMEDMEM::MEDCouplingSkyLineArray* _graph;
- ParaMEDMEM::MEDCouplingSkyLineArray* _partition;
+ MEDCoupling::MEDCouplingSkyLineArray* _graph;
+ MEDCoupling::MEDCouplingSkyLineArray* _partition;
int* _edge_weight;
int* _cell_weight;
};
int nbproc=_domain_selector->nbProcs();
std::vector<BBTreeOfDim* > bbtree(nbdomain,(BBTreeOfDim*) 0);
std::vector<double* > bbxi(nbdomain,(double*) 0);
- std::vector<ParaMEDMEM::DataArrayInt*> rev(nbdomain,(ParaMEDMEM::DataArrayInt*) 0);
- std::vector<ParaMEDMEM::DataArrayInt*> revIndx(nbdomain,(ParaMEDMEM::DataArrayInt*) 0);
+ std::vector<MEDCoupling::DataArrayInt*> rev(nbdomain,(MEDCoupling::DataArrayInt*) 0);
+ std::vector<MEDCoupling::DataArrayInt*> revIndx(nbdomain,(MEDCoupling::DataArrayInt*) 0);
int meshDim=-1;
int spaceDim=-1;
{
if(!_domain_selector->isMyDomain(mydomain))
continue;
- const ParaMEDMEM::MEDCouplingUMesh* myMesh=_mesh_collection.getMesh(mydomain);
+ const MEDCoupling::MEDCouplingUMesh* myMesh=_mesh_collection.getMesh(mydomain);
meshDim = myMesh->getMeshDimension();
spaceDim= myMesh->getSpaceDimension();
- rev[mydomain] = ParaMEDMEM::DataArrayInt::New();
- revIndx[mydomain] = ParaMEDMEM::DataArrayInt::New();
+ rev[mydomain] = MEDCoupling::DataArrayInt::New();
+ revIndx[mydomain] = MEDCoupling::DataArrayInt::New();
myMesh->getReverseNodalConnectivity(rev[mydomain],revIndx[mydomain]);
double* bbx=new double[2*spaceDim*myMesh->getNumberOfNodes()];
for (int i=0; i<myMesh->getNumberOfNodes()*spaceDim; i++)
{
for (int itarget=0; itarget<nbdomain; itarget++)
{
- const ParaMEDMEM::MEDCouplingUMesh* sourceMesh=_mesh_collection.getMesh(isource);
+ const MEDCoupling::MEDCouplingUMesh* sourceMesh=_mesh_collection.getMesh(isource);
if (_domain_selector->isMyDomain(isource)&&_domain_selector->isMyDomain(itarget))
continue;
if (_domain_selector->isMyDomain(isource))
parallelizer.evaluateMemory();
}
-MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const ParaMEDMEM::MEDFileData* filedata, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory):
+MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* filedata, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory):
_input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 )
{
MyGlobals::_World_Size = 1;
parallelizer.evaluateMemory();
}
-MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const ParaMEDMEM::MEDFileData* filedata, MEDPARTITIONER ::Graph* graph, bool creates_boundary_faces, bool create_joints, bool mesure_memory):
+MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* filedata, MEDPARTITIONER ::Graph* graph, bool creates_boundary_faces, bool create_joints, bool mesure_memory):
_input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 )
{
MyGlobals::_World_Size = 1;
parallelizer.evaluateMemory();
}
-ParaMEDMEM::MEDFileData* MEDPARTITIONER::MEDPartitioner::getMEDFileData()
+MEDCoupling::MEDFileData* MEDPARTITIONER::MEDPartitioner::getMEDFileData()
{
return _output_collection->retrieveDriver()->getMEDFileData();
}
-MEDPARTITIONER::Graph* MEDPARTITIONER::MEDPartitioner::Graph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, Graph::splitter_type split, int* edgeweight)
+MEDPARTITIONER::Graph* MEDPARTITIONER::MEDPartitioner::Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split, int* edgeweight)
{
MEDPARTITIONER::Graph* cellGraph=0;
- ParaMEDMEM::MEDCouplingSkyLineArray* arr = new ParaMEDMEM::MEDCouplingSkyLineArray(graph->getIndexArray(), graph->getValueArray());
+ MEDCoupling::MEDCouplingSkyLineArray* arr = new MEDCoupling::MEDCouplingSkyLineArray(graph->getIndexArray(), graph->getValueArray());
switch (split)
{
case Graph::METIS:
#include <map>
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDFileData;
}
{
public:
MEDPartitioner(const std::string& filename, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
- MEDPartitioner(const ParaMEDMEM::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
- MEDPartitioner(const ParaMEDMEM::MEDFileData* fileData, Graph* graph, bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
- static MEDPARTITIONER::Graph* Graph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0);
+ MEDPartitioner(const MEDCoupling::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
+ MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
+ static MEDPARTITIONER::Graph* Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0);
void write(const std::string& filename);
- ParaMEDMEM::MEDFileData* getMEDFileData();
+ MEDCoupling::MEDFileData* getMEDFileData();
~MEDPartitioner();
- ParaMEDMEM::MEDFileData *convertToMEDFileData(MeshCollection* meshcollection);
+ MEDCoupling::MEDFileData *convertToMEDFileData(MeshCollection* meshcollection);
void createPartitionCollection(int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory);
private:
_joint_finder(0)
{
std::vector<std::vector<std::vector<int> > > new2oldIds(initialCollection.getTopology()->nbDomain());
- std::vector<ParaMEDMEM::DataArrayInt*> o2nRenumber;
+ std::vector<MEDCoupling::DataArrayInt*> o2nRenumber;
castCellMeshes(initialCollection, new2oldIds, o2nRenumber );
void MEDPARTITIONER::MeshCollection::castCellMeshes(MeshCollection& initialCollection,
std::vector<std::vector<std::vector<int> > >& new2oldIds,
- std::vector<ParaMEDMEM::DataArrayInt*> & o2nRenumber)
+ std::vector<MEDCoupling::DataArrayInt*> & o2nRenumber)
{
if (MyGlobals::_Verbose>10)
std::cout << "proc " << MyGlobals::_Rank << " : castCellMeshes" << std::endl;
o2nRenumber.resize(nbNewDomain,0);
int rank=MyGlobals::_Rank;
//splitting the initial domains into smaller bits
- std::vector<std::vector<ParaMEDMEM::MEDCouplingUMesh*> > splitMeshes;
+ std::vector<std::vector<MEDCoupling::MEDCouplingUMesh*> > splitMeshes;
splitMeshes.resize(nbNewDomain);
for (int inew=0; inew<nbNewDomain; inew++)
{
- splitMeshes[inew].resize(nbOldDomain, (ParaMEDMEM::MEDCouplingUMesh*)0);
+ splitMeshes[inew].resize(nbOldDomain, (MEDCoupling::MEDCouplingUMesh*)0);
}
for (int iold=0; iold<nbOldDomain; iold++)
}
for (int inew=0; inew<nbNewDomain; inew++)
{
- splitMeshes[inew][iold]=(ParaMEDMEM::MEDCouplingUMesh*)
+ splitMeshes[inew][iold]=(MEDCoupling::MEDCouplingUMesh*)
(initialCollection.getMesh())[iold]->buildPartOfMySelf(&new2oldIds[iold][inew][0],
&new2oldIds[iold][inew][0]+new2oldIds[iold][inew].size(),
true);
std::cout << "proc " << rank << " : castCellMeshes fusing" << std::endl;
for (int inew=0; inew<nbNewDomain ;inew++)
{
- std::vector<const ParaMEDMEM::MEDCouplingUMesh*> meshes;
+ std::vector<const MEDCoupling::MEDCouplingUMesh*> meshes;
for (int i=0; i<(int)splitMeshes[inew].size(); i++)
if (splitMeshes[inew][i]!=0)
}
else
{
- _mesh[inew]=ParaMEDMEM::MEDCouplingUMesh::MergeUMeshes(meshes);
+ _mesh[inew]=MEDCoupling::MEDCouplingUMesh::MergeUMeshes(meshes);
o2nRenumber[inew]=_mesh[inew]->sortCellsInMEDFileFrmt();
bool areNodesMerged;
int nbNodesMerged;
if (meshes.size()>1)
{
- ParaMEDMEM::DataArrayInt* array=_mesh[inew]->mergeNodes(1e-12,areNodesMerged,nbNodesMerged);
+ MEDCoupling::DataArrayInt* array=_mesh[inew]->mergeNodes(1e-12,areNodesMerged,nbNodesMerged);
array->decrRef(); // array is not used in this case
}
_mesh[inew]->zipCoords();
if (!isParallelMode() || (_domain_selector->isMyDomain(iold)))
{
// std::map<pair<double,pair<double, double> >, int > nodeClassifier;
- ParaMEDMEM::DataArrayDouble* coords = initialCollection.getMesh(iold)->getCoords();
+ MEDCoupling::DataArrayDouble* coords = initialCollection.getMesh(iold)->getCoords();
double* coordsPtr=coords->getPointer();
dim = coords->getNumberOfComponents();
int nvertices=initialCollection.getMesh(iold)->getNumberOfNodes();
_domain_selector->sendMesh(*(getMesh(inew)), _domain_selector->getProcessorID(iold));
else if (isParallelMode() && !_domain_selector->isMyDomain(inew)&& _domain_selector->isMyDomain(iold))
{
- ParaMEDMEM::MEDCouplingUMesh* mesh;
+ MEDCoupling::MEDCouplingUMesh* mesh;
_domain_selector->recvMesh(mesh, _domain_selector->getProcessorID(inew));
- ParaMEDMEM::DataArrayDouble* coords = mesh->getCoords();
+ MEDCoupling::DataArrayDouble* coords = mesh->getCoords();
for (int inode=0; inode<mesh->getNumberOfNodes();inode++)
{
double* coordsPtr=coords->getPointer()+inode*dim;
if (!isParallelMode() || (_domain_selector->isMyDomain(inew) && _domain_selector->isMyDomain(iold)))
#endif
{
- ParaMEDMEM::DataArrayDouble* coords = getMesh(inew)->getCoords();
+ MEDCoupling::DataArrayDouble* coords = getMesh(inew)->getCoords();
for (int inode=0; inode<_mesh[inew]->getNumberOfNodes();inode++)
{
double* coordsPtr=coords->getPointer()+inode*dim;
}
-void getNodeIds(ParaMEDMEM::MEDCouplingUMesh& meshOne, ParaMEDMEM::MEDCouplingUMesh& meshTwo, std::vector<int>& nodeIds)
+void getNodeIds(MEDCoupling::MEDCouplingUMesh& meshOne, MEDCoupling::MEDCouplingUMesh& meshTwo, std::vector<int>& nodeIds)
{
using std::vector;
using MEDPARTITIONER::BBTreeOfDim;
double* bbox;
BBTreeOfDim* tree = 0;
int nv1=meshOne.getNumberOfNodes();
- ParaMEDMEM::DataArrayDouble* coords=meshOne.getCoords();
+ MEDCoupling::DataArrayDouble* coords=meshOne.getCoords();
int dim = coords->getNumberOfComponents();
bbox=new double[nv1*2*dim];
int nbNewDomain=_topology->nbDomain();
int nbOldDomain=initialCollection.getTopology()->nbDomain();
- vector<ParaMEDMEM::MEDCouplingUMesh*>& meshesCastFrom=initialCollection.getFaceMesh();
- vector<ParaMEDMEM::MEDCouplingUMesh*>& meshesCastTo=this->getFaceMesh();
+ vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastFrom=initialCollection.getFaceMesh();
+ vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastTo=this->getFaceMesh();
- vector< vector<ParaMEDMEM::MEDCouplingUMesh*> > splitMeshes;
+ vector< vector<MEDCoupling::MEDCouplingUMesh*> > splitMeshes;
splitMeshes.resize(nbNewDomain);
for (int inew=0; inew<nbNewDomain; inew++)
{
- splitMeshes[inew].resize(nbOldDomain, (ParaMEDMEM::MEDCouplingUMesh*)0);
+ splitMeshes[inew].resize(nbOldDomain, (MEDCoupling::MEDCouplingUMesh*)0);
}
new2oldIds.resize(nbOldDomain);
for (int iold=0; iold<nbOldDomain; iold++) new2oldIds[iold].resize(nbNewDomain);
if (meshesCastFrom[iold]->getNumberOfCells() > 0)
{
splitMeshes[inew][iold]=
- (ParaMEDMEM::MEDCouplingUMesh*)
+ (MEDCoupling::MEDCouplingUMesh*)
( meshesCastFrom[iold]->buildPartOfMySelf(&new2oldIds[iold][inew][0],
&new2oldIds[iold][inew][0]+new2oldIds[iold][inew].size(),
true)
//send/receive stuff
if (isParallelMode())
{
- ParaMEDMEM::MEDCouplingUMesh *empty=CreateEmptyMEDCouplingUMesh();
+ MEDCoupling::MEDCouplingUMesh *empty=CreateEmptyMEDCouplingUMesh();
for (int iold=0; iold<nbOldDomain; iold++)
for (int inew=0; inew<nbNewDomain; inew++)
{
meshesCastTo.resize(nbNewDomain);
for (int inew=0; inew<nbNewDomain; inew++)
{
- vector<const ParaMEDMEM::MEDCouplingUMesh*> myMeshes;
+ vector<const MEDCoupling::MEDCouplingUMesh*> myMeshes;
for (int iold=0; iold<nbOldDomain; iold++)
{
- ParaMEDMEM::MEDCouplingUMesh *umesh=splitMeshes[inew][iold];
+ MEDCoupling::MEDCouplingUMesh *umesh=splitMeshes[inew][iold];
if (umesh!=0)
if (umesh->getNumberOfCells()>0)
myMeshes.push_back(umesh);
}
- ParaMEDMEM::MEDCouplingUMesh *bndMesh = 0;
+ MEDCoupling::MEDCouplingUMesh *bndMesh = 0;
if ( _subdomain_boundary_creates &&
_mesh[inew] &&
_mesh[inew]->getNumberOfCells()>0 )
{
bndMesh =
- ((ParaMEDMEM::MEDCouplingUMesh *)_mesh[inew]->buildBoundaryMesh(/*keepCoords=*/true));
+ ((MEDCoupling::MEDCouplingUMesh *)_mesh[inew]->buildBoundaryMesh(/*keepCoords=*/true));
if (bndMesh->getNumberOfCells()>0)
myMeshes.push_back( bndMesh );
}
if (myMeshes.size()>0)
{
- meshesCastTo[inew]=ParaMEDMEM::MEDCouplingUMesh::MergeUMeshes(myMeshes);
+ meshesCastTo[inew]=MEDCoupling::MEDCouplingUMesh::MergeUMeshes(myMeshes);
meshesCastTo[inew]->sortCellsInMEDFileFrmt()->decrRef();
}
else
{
- ParaMEDMEM::MEDCouplingUMesh *empty=CreateEmptyMEDCouplingUMesh();
+ MEDCoupling::MEDCouplingUMesh *empty=CreateEmptyMEDCouplingUMesh();
meshesCastTo[inew]=empty;
}
for (int iold=0; iold<nbOldDomain; iold++)
-void MEDPARTITIONER::MeshCollection::castIntField(std::vector<ParaMEDMEM::MEDCouplingUMesh*>& meshesCastFrom,
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>& meshesCastTo,
- std::vector<ParaMEDMEM::DataArrayInt*>& arrayFrom,
+void MEDPARTITIONER::MeshCollection::castIntField(std::vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastFrom,
+ std::vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastTo,
+ std::vector<MEDCoupling::DataArrayInt*>& arrayFrom,
std::string nameArrayTo)
{
using std::vector;
if (MyGlobals::_Verbose>99)
std::cout<<"making accelerating structures"<<std::endl;
std::vector<BBTreeOfDim* > acceleratingStructures(ioldMax);
- std::vector<ParaMEDMEM::DataArrayDouble*>bbox(ioldMax);
+ std::vector<MEDCoupling::DataArrayDouble*>bbox(ioldMax);
for (int iold =0; iold< ioldMax; iold++)
if (isParallelMode() && _domain_selector->isMyDomain(iold))
{
- ParaMEDMEM::DataArrayDouble* sourceCoords=meshesCastFrom[iold]->getBarycenterAndOwner();
+ MEDCoupling::DataArrayDouble* sourceCoords=meshesCastFrom[iold]->getBarycenterAndOwner();
bbox[iold]=sourceCoords->computeBBoxPerTuple(1.e-6);
acceleratingStructures[iold]=new BBTreeOfDim( sourceCoords->getNumberOfComponents(), bbox[iold]->getConstPointer(),0,0,bbox[iold]->getNumberOfTuples());
sourceCoords->decrRef();
{
//receive mesh
vector<int> recvIds;
- ParaMEDMEM::MEDCouplingUMesh* recvMesh;
+ MEDCoupling::MEDCouplingUMesh* recvMesh;
_domain_selector->recvMesh(recvMesh,_domain_selector->getProcessorID(iold));
//receive vector
if (MyGlobals::_Verbose>400) std::cout<<"proc "<<_domain_selector->rank()<<" : castIntField recIntVec "<<std::endl;
}
void MEDPARTITIONER::MeshCollection::remapIntField(int inew, int iold,
- const ParaMEDMEM::MEDCouplingUMesh& sourceMesh,
- const ParaMEDMEM::MEDCouplingUMesh& targetMesh,
+ const MEDCoupling::MEDCouplingUMesh& sourceMesh,
+ const MEDCoupling::MEDCouplingUMesh& targetMesh,
const int* fromArray,
std::string nameArrayTo,
const BBTreeOfDim* myTree)
{
if (sourceMesh.getNumberOfCells()<=0) return; //empty mesh could exist
- ParaMEDMEM::DataArrayDouble* targetCoords=targetMesh.getBarycenterAndOwner();
+ MEDCoupling::DataArrayDouble* targetCoords=targetMesh.getBarycenterAndOwner();
const double* tc=targetCoords->getConstPointer();
int targetSize=targetMesh.getNumberOfCells();
int sourceSize=sourceMesh.getNumberOfCells();
const BBTreeOfDim* tree;
bool cleantree=false;
- ParaMEDMEM::DataArrayDouble* sourceBBox=0;
+ MEDCoupling::DataArrayDouble* sourceBBox=0;
int dim = targetCoords->getNumberOfComponents();
if (myTree==0)
{
{
if (MyGlobals::_Is0verbose>100)
std::cout << "create " << cle << " size " << targetSize << std::endl;
- ParaMEDMEM::DataArrayInt* p=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
p->alloc(targetSize,1);
p->fillWithZero();
toArray=p->getPointer();
if (isParallelMode() && _domain_selector->isMyDomain(iold) && !_domain_selector->isMyDomain(inew))
{
int target=_domain_selector->getProcessorID(inew);
- ParaMEDMEM::DataArrayDouble* field=initialCollection.getField(descriptionField,iold);
+ MEDCoupling::DataArrayDouble* field=initialCollection.getField(descriptionField,iold);
if (MyGlobals::_Verbose>10)
std::cout << "proc " << _domain_selector->rank() << " : castAllFields sendDouble" << std::endl;
SendDataArrayDouble(field, target);
//receive vector
if (MyGlobals::_Verbose>10)
std::cout << "proc " << _domain_selector->rank() << " : castAllFields recvDouble" << std::endl;
- ParaMEDMEM::DataArrayDouble* field=RecvDataArrayDouble(source);
+ MEDCoupling::DataArrayDouble* field=RecvDataArrayDouble(source);
remapDoubleField(inew,iold,field,nameArrayTo,descriptionField);
}
}
for (int iold=0; iold<ioldMax; iold++)
if (!isParallelMode() || ( _domain_selector->isMyDomain(iold) && _domain_selector->isMyDomain(inew)))
{
- ParaMEDMEM::DataArrayDouble* field=initialCollection.getField(descriptionField,iold);
+ MEDCoupling::DataArrayDouble* field=initialCollection.getField(descriptionField,iold);
remapDoubleField(inew,iold,field,nameArrayTo,descriptionField);
}
}
}
void MEDPARTITIONER::MeshCollection::remapDoubleField(int inew, int iold,
- ParaMEDMEM::DataArrayDouble* fromArray,
+ MEDCoupling::DataArrayDouble* fromArray,
std::string nameArrayTo,
std::string descriptionField)
//here we use 'cellFamily_ccI inew iold' set in remapIntField
throw INTERP_KERNEL::Exception("Error remapDoubleField only on cellFieldDouble");
std::string key=Cle2ToStr("cellFamily_ccI",inew,iold);
- std::map<std::string,ParaMEDMEM::DataArrayInt*>::iterator it1;
+ std::map<std::string,MEDCoupling::DataArrayInt*>::iterator it1;
it1=_map_dataarray_int.find(key);
if (it1==_map_dataarray_int.end())
{
return;
}
//create ccI in remapIntField
- ParaMEDMEM::DataArrayInt *ccI=it1->second;
+ MEDCoupling::DataArrayInt *ccI=it1->second;
if (MyGlobals::_Verbose>300)
std::cout << "proc " << MyGlobals::_Rank << " : remapDoubleField " << key << " size " << ccI->getNbOfElems() << std::endl;
" nbComponents " << fromArray->getNumberOfComponents() << std::endl;
}
- ParaMEDMEM::DataArrayDouble* field=0;
- std::map<std::string,ParaMEDMEM::DataArrayDouble*>::iterator it2;
+ MEDCoupling::DataArrayDouble* field=0;
+ std::map<std::string,MEDCoupling::DataArrayDouble*>::iterator it2;
it2=_map_dataarray_double.find(key);
if (it2==_map_dataarray_double.end())
{
if (MyGlobals::_Verbose>300)
std::cout << "proc "<< MyGlobals::_Rank << " : remapDoubleField key '" << key << "' not found and create it" << std::endl;
- field=ParaMEDMEM::DataArrayDouble::New();
+ field=MEDCoupling::DataArrayDouble::New();
_map_dataarray_double[key]=field;
field->alloc(nbcell*nbPtGauss,nbcomp);
field->fillWithZero();
namespace
{
- using namespace ParaMEDMEM;
+ using namespace MEDCoupling;
//================================================================================
/*!
* \brief Sort correspondence ids of one domain and permute ids of the other accordingly
//================================================================================
void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeMapping,
- const std::vector<ParaMEDMEM::DataArrayInt*> & o2nRenumber,
+ const std::vector<MEDCoupling::DataArrayInt*> & o2nRenumber,
int nbInitialDomains)
{
if ( !MyGlobals::_Create_Joints || _topology->nbDomain() < 2 )
cz->getLocalDomainNumber () > (int)_mesh.size() ||
cz->getDistantDomainNumber() > (int)_mesh.size() )
continue;
- ParaMEDMEM::MEDCouplingUMesh* mesh1 = _mesh[ cz->getLocalDomainNumber () ];
- ParaMEDMEM::MEDCouplingUMesh* mesh2 = _mesh[ cz->getDistantDomainNumber() ];
+ MEDCoupling::MEDCouplingUMesh* mesh1 = _mesh[ cz->getLocalDomainNumber () ];
+ MEDCoupling::MEDCouplingUMesh* mesh2 = _mesh[ cz->getDistantDomainNumber() ];
// separate ids of two domains
- const ParaMEDMEM::MEDCouplingSkyLineArray *corrArray = cz->getEntityCorresp( 0, 0 );
+ const MEDCoupling::MEDCouplingSkyLineArray *corrArray = cz->getEntityCorresp( 0, 0 );
const DataArrayInt* ids12 = corrArray->getValueArray();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids1, ids2, ids12Sorted;
ids1 = ids12->selectByTupleId2( 0, corrArray->getLength(), 2 );
cz21 = czVec[j];
// separate ids of two domains
- const ParaMEDMEM::MEDCouplingSkyLineArray *corrArray = cz->getNodeCorresp();
+ const MEDCoupling::MEDCouplingSkyLineArray *corrArray = cz->getNodeCorresp();
const DataArrayInt *ids12 = corrArray->getValueArray();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids1, ids2, ids12Sorted;
ids1 = ids12->selectByTupleId2( 0, corrArray->getLength(), 2 );
if ( getMeshDimension() < 2 )
return;
- using ParaMEDMEM::MEDCouplingUMesh;
- using ParaMEDMEM::DataArrayDouble;
- using ParaMEDMEM::DataArrayInt;
+ using MEDCoupling::MEDCouplingUMesh;
+ using MEDCoupling::DataArrayDouble;
+ using MEDCoupling::DataArrayInt;
std::vector<MEDCouplingUMesh*>& faceMeshes = getFaceMesh();
int nbMeshes = faceMeshes.size();
{
if ( totalNbFaces > 0 )
{
- ParaMEDMEM::DataArrayInt* p=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
p->alloc( totalNbFaces, 1 );
p->fillWithZero();
famIDs = p->getPointer();
if (_face_family_ids[i]!=0)
_face_family_ids[i]->decrRef();
- for (std::map<std::string, ParaMEDMEM::DataArrayInt*>::iterator it=_map_dataarray_int.begin() ; it!=_map_dataarray_int.end(); it++ )
+ for (std::map<std::string, MEDCoupling::DataArrayInt*>::iterator it=_map_dataarray_int.begin() ; it!=_map_dataarray_int.end(); it++ )
if ((*it).second!=0)
(*it).second->decrRef();
- for (std::map<std::string, ParaMEDMEM::DataArrayDouble*>::iterator it=_map_dataarray_double.begin() ; it!=_map_dataarray_double.end(); it++ )
+ for (std::map<std::string, MEDCoupling::DataArrayDouble*>::iterator it=_map_dataarray_double.begin() ; it!=_map_dataarray_double.end(); it++ )
if ((*it).second!=0)
(*it).second->decrRef();
return nb;
}
-std::vector<ParaMEDMEM::MEDCouplingUMesh*>& MEDPARTITIONER::MeshCollection::getMesh()
+std::vector<MEDCoupling::MEDCouplingUMesh*>& MEDPARTITIONER::MeshCollection::getMesh()
{
return _mesh;
}
-std::vector<ParaMEDMEM::MEDCouplingUMesh*>& MEDPARTITIONER::MeshCollection::getFaceMesh()
+std::vector<MEDCoupling::MEDCouplingUMesh*>& MEDPARTITIONER::MeshCollection::getFaceMesh()
{
return _face_mesh;
}
-ParaMEDMEM::MEDCouplingUMesh* MEDPARTITIONER::MeshCollection::getMesh(int idomain) const
+MEDCoupling::MEDCouplingUMesh* MEDPARTITIONER::MeshCollection::getMesh(int idomain) const
{
return _mesh[idomain];
}
-ParaMEDMEM::MEDCouplingUMesh* MEDPARTITIONER::MeshCollection::getFaceMesh(int idomain)
+MEDCoupling::MEDCouplingUMesh* MEDPARTITIONER::MeshCollection::getFaceMesh(int idomain)
{
return _face_mesh[idomain];
}
* \param edgeweight returns the pointer to the table that contains the edgeweights
* (only used if indivisible regions are required)
*/
-void MEDPARTITIONER::MeshCollection::buildCellGraph(ParaMEDMEM::MEDCouplingSkyLineArray* & array, int *& edgeweights )
+void MEDPARTITIONER::MeshCollection::buildCellGraph(MEDCoupling::MEDCouplingSkyLineArray* & array, int *& edgeweights )
{
using std::map;
using std::pair;
if (_topology->nbDomain()>1) throw INTERP_KERNEL::Exception("buildCellGraph should be used for one domain only");
- const ParaMEDMEM::MEDCouplingUMesh* mesh=_mesh[0];
+ const MEDCoupling::MEDCouplingUMesh* mesh=_mesh[0];
if (MyGlobals::_Verbose>50)
std::cout<<"getting nodal connectivity"<<std::endl;
vector<int> value;
vector<int> index(1,0);
- array=new ParaMEDMEM::MEDCouplingSkyLineArray(index,value);
+ array=new MEDCoupling::MEDCouplingSkyLineArray(index,value);
return;
}
array=mesh->generateGraph();
* \param edgeweight returns the pointer to the table that contains the edgeweights
* (only used if indivisible regions are required)
*/
-void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(ParaMEDMEM::MEDCouplingSkyLineArray* & array, int *& edgeweights )
+void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDCoupling::MEDCouplingSkyLineArray* & array, int *& edgeweights )
{
using std::multimap;
using std::vector;
continue;
meshDim = _mesh[idomain]->getMeshDimension();
- ParaMEDMEM::DataArrayInt* index=ParaMEDMEM::DataArrayInt::New();
- ParaMEDMEM::DataArrayInt* revConn=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* index=MEDCoupling::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* revConn=MEDCoupling::DataArrayInt::New();
int nbNodes=_mesh[idomain]->getNumberOfNodes();
_mesh[idomain]->getReverseNodalConnectivity(revConn,index);
//problem saturation over 1 000 000 nodes for 1 proc
}
}
- array=new ParaMEDMEM::MEDCouplingSkyLineArray(index,value);
+ array=new MEDCoupling::MEDCouplingSkyLineArray(index,value);
if (MyGlobals::_Verbose>100)
{
if (nbdomain <1)
throw INTERP_KERNEL::Exception("Number of subdomains must be > 0");
- ParaMEDMEM::MEDCouplingSkyLineArray* array=0;
+ MEDCoupling::MEDCouplingSkyLineArray* array=0;
int* edgeweights=0;
if (_topology->nbDomain()>1 || isParallelMode())
*/
MEDPARTITIONER::Topology* MEDPARTITIONER::MeshCollection::createPartition(const int* partition)
{
- ParaMEDMEM::MEDCouplingSkyLineArray* array=0;
+ MEDCoupling::MEDCouplingSkyLineArray* array=0;
int* edgeweights=0;
if ( _topology->nbDomain()>1)
}
}
-ParaMEDMEM::DataArrayDouble *MEDPARTITIONER::MeshCollection::getField(std::string descriptionField, int iold)
+MEDCoupling::DataArrayDouble *MEDPARTITIONER::MeshCollection::getField(std::string descriptionField, int iold)
//getField look for and read it if not done, and assume decrRef() in ~MeshCollection;
//something like MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldCell(name,f1->getMesh()->getName(),0,f1->getName(),0,1);
{
{
if (MyGlobals::_Verbose>300)
std::cout << "proc " << rank << " : YET READ getField : " << descriptionIold << std::endl;
- ParaMEDMEM::DataArrayDouble* res=_map_dataarray_double[descriptionIold];
+ MEDCoupling::DataArrayDouble* res=_map_dataarray_double[descriptionIold];
return res;
}
if (MyGlobals::_Verbose>200)
FieldShortDescriptionToData(descriptionIold, fieldName, typeField, entity, DT, IT);
meshName=MyGlobals::_Mesh_Names[iold];
- ParaMEDMEM::MEDCouplingFieldDouble* f2=MEDLoader::ReadField((ParaMEDMEM::TypeOfField) typeField,
+ MEDCoupling::MEDCouplingFieldDouble* f2=MEDLoader::ReadField((MEDCoupling::TypeOfField) typeField,
fileName, meshName, 0, fieldName, DT, IT);
- ParaMEDMEM::DataArrayDouble* res=f2->getArray();
+ MEDCoupling::DataArrayDouble* res=f2->getArray();
//to know names of components
std::vector<std::string> browse=BrowseFieldDouble(f2);
std::string localFieldInformation=descriptionIold+SerializeFromVectorOfString(browse);
{
if (MyGlobals::_Verbose>200)
std::cout << "proc " << MyGlobals::_Rank << " : filterFaceOnCell on inewDomain " << inew << " nbOfFaces " << _face_mesh[inew]->getNumberOfCells() << std::endl;
- ParaMEDMEM::MEDCouplingUMesh* mcel=_mesh[inew];
- ParaMEDMEM::MEDCouplingUMesh* mfac=_face_mesh[inew];
+ MEDCoupling::MEDCouplingUMesh* mcel=_mesh[inew];
+ MEDCoupling::MEDCouplingUMesh* mfac=_face_mesh[inew];
//to have cellnode=f(facenode)... inodeCell=nodeIds[inodeFace]
std::vector<int> nodeIds;
if (nodeIds.size()==0)
continue; //one empty mesh nothing to do
- ParaMEDMEM::DataArrayInt *revNodalCel=ParaMEDMEM::DataArrayInt::New();
- ParaMEDMEM::DataArrayInt *revNodalIndxCel=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt *revNodalCel=MEDCoupling::DataArrayInt::New();
+ MEDCoupling::DataArrayInt *revNodalIndxCel=MEDCoupling::DataArrayInt::New();
mcel->getReverseNodalConnectivity(revNodalCel,revNodalIndxCel);
int *revC=revNodalCel->getPointer();
int *revIndxC=revNodalIndxCel->getPointer();
if ( faceOnCell.empty() )
_face_mesh[inew] = CreateEmptyMEDCouplingUMesh();
else
- _face_mesh[inew] = (ParaMEDMEM::MEDCouplingUMesh *)
+ _face_mesh[inew] = (MEDCoupling::MEDCouplingUMesh *)
mfac->buildPartOfMySelf( &faceOnCell[0], &faceOnCell[0] + faceOnCell.size(),true);
mfac->decrRef();
std::string key = Cle1ToStr("faceFamily_toArray",inew);
if ( getMapDataArrayInt().count( key ))
{
- ParaMEDMEM::DataArrayInt * & fam = getMapDataArrayInt()[ key ];
- ParaMEDMEM::DataArrayInt * famFilter = ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt * & fam = getMapDataArrayInt()[ key ];
+ MEDCoupling::DataArrayInt * famFilter = MEDCoupling::DataArrayInt::New();
famFilter->alloc(faceOnCell.size(),1);
int* pfamFilter = famFilter->getPointer();
int* pfam = fam->getPointer();
#include "BBTree.txx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
class DataArrayInt;
void setDriverType(MEDPARTITIONER::DriverType type) { _driver_type=type; }
//creation of the cell graph
- void buildCellGraph(ParaMEDMEM::MEDCouplingSkyLineArray* & array,int *& edgeweights );
+ void buildCellGraph(MEDCoupling::MEDCouplingSkyLineArray* & array,int *& edgeweights );
//creation of the cell graph
- void buildParallelCellGraph(ParaMEDMEM::MEDCouplingSkyLineArray* & array,int *& edgeweights );
+ void buildParallelCellGraph(MEDCoupling::MEDCouplingSkyLineArray* & array,int *& edgeweights );
//creation and partition of the associated graph
Topology* createPartition(int nbdomain, Graph::splitter_type type = Graph::METIS,
int getNbOfLocalFaces() const;
//getting a reference to mesh vector
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>& getMesh();
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>& getFaceMesh();
- std::vector<std::vector<ParaMEDMEM::MEDCouplingUMesh*> >& getGroupMeshes();
+ std::vector<MEDCoupling::MEDCouplingUMesh*>& getMesh();
+ std::vector<MEDCoupling::MEDCouplingUMesh*>& getFaceMesh();
+ std::vector<std::vector<MEDCoupling::MEDCouplingUMesh*> >& getGroupMeshes();
- ParaMEDMEM::MEDCouplingUMesh* getMesh(int idomain) const;
- ParaMEDMEM::MEDCouplingUMesh* getFaceMesh(int idomain);
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>& getGroupMeshes(int idomain);
+ MEDCoupling::MEDCouplingUMesh* getMesh(int idomain) const;
+ MEDCoupling::MEDCouplingUMesh* getFaceMesh(int idomain);
+ std::vector<MEDCoupling::MEDCouplingUMesh*>& getGroupMeshes(int idomain);
- std::vector<ParaMEDMEM::DataArrayInt*>& getCellFamilyIds() { return _cell_family_ids; }
- std::vector<ParaMEDMEM::DataArrayInt*>& getFaceFamilyIds() { return _face_family_ids; }
+ std::vector<MEDCoupling::DataArrayInt*>& getCellFamilyIds() { return _cell_family_ids; }
+ std::vector<MEDCoupling::DataArrayInt*>& getFaceFamilyIds() { return _face_family_ids; }
- std::map<std::string, ParaMEDMEM::DataArrayInt*>& getMapDataArrayInt() { return _map_dataarray_int; }
- std::map<std::string, ParaMEDMEM::DataArrayDouble*>& getMapDataArrayDouble() { return _map_dataarray_double; }
+ std::map<std::string, MEDCoupling::DataArrayInt*>& getMapDataArrayInt() { return _map_dataarray_int; }
+ std::map<std::string, MEDCoupling::DataArrayDouble*>& getMapDataArrayDouble() { return _map_dataarray_double; }
std::map<std::string,int>& getFamilyInfo() { return _family_info; }
std::map<std::string, std::vector<std::string> >& getGroupInfo() { return _group_info; }
- ParaMEDMEM::DataArrayDouble* getField(std::string descriptionField, int iold);
+ MEDCoupling::DataArrayDouble* getField(std::string descriptionField, int iold);
std::vector<std::string>& getFieldDescriptions() { return _field_descriptions; }
void prepareFieldDescriptions();
void filterFaceOnCell();
void castCellMeshes(MeshCollection& initialCollection,
std::vector<std::vector<std::vector<int> > >& new2oldIds,
- std::vector<ParaMEDMEM::DataArrayInt*> & o2nRenumber);
+ std::vector<MEDCoupling::DataArrayInt*> & o2nRenumber);
//creates faces on the new collection
void castFaceMeshes(MeshCollection& initialCollection,
//constructing connect zones
void buildConnectZones( const NodeMapping& nodeMapping,
- const std::vector<ParaMEDMEM::DataArrayInt*> & o2nRenumber,
+ const std::vector<MEDCoupling::DataArrayInt*> & o2nRenumber,
int nbInitialDomains );
// Find faces common with neighbor domains and put them in groups
void buildBoundaryFaces();
private:
- void castIntField(std::vector<ParaMEDMEM::MEDCouplingUMesh*>& meshesCastFrom,
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>& meshesCastTo,
- std::vector<ParaMEDMEM::DataArrayInt*>& arrayFrom,
+ void castIntField(std::vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastFrom,
+ std::vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastTo,
+ std::vector<MEDCoupling::DataArrayInt*>& arrayFrom,
std::string nameArrayTo);
void castAllFields(MeshCollection& initialCollection,
void remapIntField(int inew, int iold,
- const ParaMEDMEM::MEDCouplingUMesh& sourceMesh,
- const ParaMEDMEM::MEDCouplingUMesh& targetMesh,
+ const MEDCoupling::MEDCouplingUMesh& sourceMesh,
+ const MEDCoupling::MEDCouplingUMesh& targetMesh,
const int* fromArray,
std::string nameArrayTo,
const BBTreeOfDim* tree);
void remapDoubleField(int inew, int iold,
- ParaMEDMEM::DataArrayDouble* fromArray,
+ MEDCoupling::DataArrayDouble* fromArray,
std::string nameArrayTo,
std::string descriptionField);
ParaDomainSelector* _domain_selector;
//links to meshes
- std::vector<ParaMEDMEM::MEDCouplingUMesh*> _mesh;
- std::vector<ParaMEDMEM::MEDCouplingUMesh*> _face_mesh;
+ std::vector<MEDCoupling::MEDCouplingUMesh*> _mesh;
+ std::vector<MEDCoupling::MEDCouplingUMesh*> _face_mesh;
//index of a non empty mesh within _mesh (in parallel mode all of meshes can be empty)
int _i_non_empty_mesh;
//family ids storages
- std::vector<ParaMEDMEM::DataArrayInt*> _cell_family_ids;
- std::vector<ParaMEDMEM::DataArrayInt*> _face_family_ids;
+ std::vector<MEDCoupling::DataArrayInt*> _cell_family_ids;
+ std::vector<MEDCoupling::DataArrayInt*> _face_family_ids;
//DataArrayInt* storages
- std::map<std::string, ParaMEDMEM::DataArrayInt*> _map_dataarray_int;
+ std::map<std::string, MEDCoupling::DataArrayInt*> _map_dataarray_int;
//DataArrayDouble* storages
- std::map<std::string, ParaMEDMEM::DataArrayDouble*> _map_dataarray_double;
+ std::map<std::string, MEDCoupling::DataArrayDouble*> _map_dataarray_double;
//fields to be partitioned
std::vector<std::string> _field_descriptions;
MyGlobals::_File_Names.resize(1);
MyGlobals::_File_Names[0]=std::string(filename);
- ParaMEDMEM::MEDFileUMesh* mfm=ParaMEDMEM::MEDFileUMesh::New(filename,meshname);
+ MEDCoupling::MEDFileUMesh* mfm=MEDCoupling::MEDFileUMesh::New(filename,meshname);
//puts the only mesh in the mesh vector
(_collection->getMesh()).push_back(mfm->getLevel0Mesh(false));
(_collection->getFaceMesh()).push_back(mfm->getLevelM1Mesh(false));
//reading family ids
- ParaMEDMEM::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCpy());
- ParaMEDMEM::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCpy());
+ MEDCoupling::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCpy());
+ MEDCoupling::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCpy());
(_collection->getCellFamilyIds()).push_back(cellIds);
(_collection->getFaceFamilyIds()).push_back(faceIds);
}
-void MeshCollectionDriver::readMEDFileData(const ParaMEDMEM::MEDFileData* filedata)
+void MeshCollectionDriver::readMEDFileData(const MEDCoupling::MEDFileData* filedata)
{
const int nbDomains = filedata->getMeshes()->getNumberOfMeshes();
_collection->getMesh() .resize( nbDomains, 0 );
for (int i=0; i<nbDomains; i++)
{
- ParaMEDMEM::MEDFileUMesh *mfm = dynamic_cast<ParaMEDMEM::MEDFileUMesh *>(filedata->getMeshes()->getMeshAtPos(i));
+ MEDCoupling::MEDFileUMesh *mfm = dynamic_cast<MEDCoupling::MEDFileUMesh *>(filedata->getMeshes()->getMeshAtPos(i));
readData(mfm,i);
if ( mfm && mfm->getMeshDimension() > 0 )
_collection->setNonEmptyMesh( i );
void MeshCollectionDriver::readFileData(std::string file,std::string meshname,int idomain) const
{
- ParaMEDMEM::MEDFileUMesh* mfm=ParaMEDMEM::MEDFileUMesh::New(file,meshname);
+ MEDCoupling::MEDFileUMesh* mfm=MEDCoupling::MEDFileUMesh::New(file,meshname);
readData(mfm,idomain);
mfm->decrRef();
}
-void MeshCollectionDriver::readData(ParaMEDMEM::MEDFileUMesh* mfm, int idomain) const
+void MeshCollectionDriver::readData(MEDCoupling::MEDFileUMesh* mfm, int idomain) const
{
std::vector<int> nonEmpty=mfm->getNonEmptyLevels();
try
{
(_collection->getMesh())[idomain]=mfm->getLevel0Mesh(false);
//reading families groups
- ParaMEDMEM::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCpy());
+ MEDCoupling::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCpy());
(_collection->getCellFamilyIds())[idomain]=cellIds;
}
catch(...)
{
(_collection->getMesh())[idomain]=CreateEmptyMEDCouplingUMesh(); // or 0 if you want tests;
- ParaMEDMEM::DataArrayInt* empty=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* empty=MEDCoupling::DataArrayInt::New();
empty->alloc(0,1);
(_collection->getCellFamilyIds())[idomain]=empty;
std::cout<<"\nNO Level0Mesh (Cells)\n";
{
(_collection->getFaceMesh())[idomain]=mfm->getLevelM1Mesh(false);
//reading families groups
- ParaMEDMEM::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCpy());
+ MEDCoupling::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCpy());
(_collection->getFaceFamilyIds())[idomain]=faceIds;
if (MyGlobals::_Verbose>10)
std::cout << "proc " << MyGlobals::_Rank << " : WITH Faces\n";
catch(...)
{
(_collection->getFaceMesh())[idomain]=CreateEmptyMEDCouplingUMesh(); // or 0 if you want test;
- ParaMEDMEM::DataArrayInt* empty=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* empty=MEDCoupling::DataArrayInt::New();
(_collection->getFaceFamilyIds())[idomain]=empty;
if (MyGlobals::_Verbose>10)
std::cout << "proc " << MyGlobals::_Rank << " : WITHOUT Faces\n";
MyGlobals::_Field_Descriptions.push_back(SerializeFromVectorOfString(localFields));
}
-ParaMEDMEM::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const
+MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const
{
- ParaMEDMEM::MEDFileUMesh* mfm = ParaMEDMEM::MEDFileUMesh::New();
+ MEDCoupling::MEDFileUMesh* mfm = MEDCoupling::MEDFileUMesh::New();
- ParaMEDMEM::MEDCouplingUMesh* cellMesh=_collection->getMesh(idomain);
- ParaMEDMEM::MEDCouplingUMesh* faceMesh=_collection->getFaceMesh(idomain);
+ MEDCoupling::MEDCouplingUMesh* cellMesh=_collection->getMesh(idomain);
+ MEDCoupling::MEDCouplingUMesh* faceMesh=_collection->getFaceMesh(idomain);
// std::string cleFilter=Cle1ToStr("filterFaceOnCell",idomain);
- // ParaMEDMEM::DataArrayInt* filter=0;
+ // MEDCoupling::DataArrayInt* filter=0;
// if (_collection->getMapDataArrayInt().find(cleFilter)!=_collection->getMapDataArrayInt().end())
// {
// filter=_collection->getMapDataArrayInt().find(cleFilter)->second;
// int* index=filter->getPointer();
- // faceMeshFilter=(ParaMEDMEM::MEDCouplingUMesh *) faceMesh->buildPartOfMySelf(index,index+filter->getNbOfElems(),true);
+ // faceMeshFilter=(MEDCoupling::MEDCouplingUMesh *) faceMesh->buildPartOfMySelf(index,index+filter->getNbOfElems(),true);
// faceMesh=faceMeshFilter;
// }
// if (faceMeshFilter!=0)
mfm->setMeshAtLevel( -1, faceMesh );
}
- // ParaMEDMEM::MEDCouplingUMesh* boundaryMesh=0;
+ // MEDCoupling::MEDCouplingUMesh* boundaryMesh=0;
// if (MyGlobals::_Creates_Boundary_Faces>0)
// {
// //try to write Boundary meshes
// bool keepCoords=false; //TODO or true
- // boundaryMesh=(ParaMEDMEM::MEDCouplingUMesh *) cellMesh->buildBoundaryMesh(keepCoords);
+ // boundaryMesh=(MEDCoupling::MEDCouplingUMesh *) cellMesh->buildBoundaryMesh(keepCoords);
// boundaryMesh->setName("boundaryMesh");
// if (boundaryMesh!=0)
// {
// add joints
- using ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr;
- using ParaMEDMEM::MEDCouplingSkyLineArray;
- using ParaMEDMEM::MEDFileJoint;
- using ParaMEDMEM::MEDFileJointCorrespondence;
- using ParaMEDMEM::MEDFileJointOneStep;
- using ParaMEDMEM::MEDFileJoints;
- using ParaMEDMEM::MEDFileJoints;
+ using MEDCoupling::MEDCouplingAutoRefCountObjectPtr;
+ using MEDCoupling::MEDCouplingSkyLineArray;
+ using MEDCoupling::MEDFileJoint;
+ using MEDCoupling::MEDFileJointCorrespondence;
+ using MEDCoupling::MEDFileJointOneStep;
+ using MEDCoupling::MEDFileJoints;
+ using MEDCoupling::MEDFileJoints;
if ( _collection->getCZ().size() > 0 )
{
return mfm;
}
-ParaMEDMEM::MEDCouplingFieldDouble* MeshCollectionDriver::getField(std::string key, std::string description, ParaMEDMEM::DataArrayDouble* data, ParaMEDMEM::MEDFileMesh* mfm, int idomain) const
+MEDCoupling::MEDCouplingFieldDouble* MeshCollectionDriver::getField(std::string key, std::string description, MEDCoupling::DataArrayDouble* data, MEDCoupling::MEDFileMesh* mfm, int idomain) const
{
std::string desc=description;
if (MyGlobals::_Verbose>20)
double time=StrToDouble(ExtractFromDescription(desc, "time="));
int typeData=StrToInt(ExtractFromDescription(desc, "typeData="));
std::string entityName=ExtractFromDescription(desc, "entityName=");
- ParaMEDMEM::MEDCouplingFieldDouble* field=0;
+ MEDCoupling::MEDCouplingFieldDouble* field=0;
if (typeData!=6)
{
std::cout << "WARNING : writeMedFile : typeData " << typeData << " not implemented for fields\n";
if (entityName=="MED_CELL")
{
//there is a field of idomain to write
- field=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ field=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
}
if (entityName=="MED_NODE_ELEMENT")
{
//there is a field of idomain to write
- field=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_GAUSS_NE,ParaMEDMEM::ONE_TIME);
+ field=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_GAUSS_NE,MEDCoupling::ONE_TIME);
}
if (!field)
{
{
field->setName(fieldName);
field->setMesh(mfm->getMeshAtLevel(0));
- ParaMEDMEM::DataArrayDouble *da=data;
+ MEDCoupling::DataArrayDouble *da=data;
//get information for components etc..
std::vector<std::string> r1;
r1=SelectTagsInVectorOfString(MyGlobals::_General_Informations,"fieldName="+fieldName);
void MeshCollectionDriver::writeMedFile(int idomain, const std::string& distfilename) const
{
- ParaMEDMEM::MEDFileMesh* mfm = getMesh( idomain );
+ MEDCoupling::MEDFileMesh* mfm = getMesh( idomain );
mfm->write(distfilename,2);
std::string key="/inewFieldDouble="+IntToStr(idomain)+"/";
- std::map<std::string,ParaMEDMEM::DataArrayDouble*>::iterator it;
+ std::map<std::string,MEDCoupling::DataArrayDouble*>::iterator it;
int nbfFieldFound=0;
for (it=_collection->getMapDataArrayDouble().begin() ; it!=_collection->getMapDataArrayDouble().end(); it++)
{
size_t found=(*it).first.find(key);
if (found==std::string::npos)
continue;
- ParaMEDMEM::MEDCouplingFieldDouble* field=0;
+ MEDCoupling::MEDCouplingFieldDouble* field=0;
field = getField(key, (*it).first, (*it).second, mfm, idomain);
nbfFieldFound++;
try
mfm->decrRef();
}
-ParaMEDMEM::MEDFileData* MeshCollectionDriver::getMEDFileData()
+MEDCoupling::MEDFileData* MeshCollectionDriver::getMEDFileData()
{
- ParaMEDMEM::MEDFileData* newdata = ParaMEDMEM::MEDFileData::New();
+ MEDCoupling::MEDFileData* newdata = MEDCoupling::MEDFileData::New();
- ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileMeshes> meshes;
- ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFields> fields;
- meshes = ParaMEDMEM::MEDFileMeshes::New();
- fields = ParaMEDMEM::MEDFileFields::New();
+ MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileMeshes> meshes;
+ MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileFields> fields;
+ meshes = MEDCoupling::MEDFileMeshes::New();
+ fields = MEDCoupling::MEDFileFields::New();
for (size_t i=0; i<_collection->getMesh().size(); i++)
{
- ParaMEDMEM::MEDFileMesh* mfm = getMesh( i );
+ MEDCoupling::MEDFileMesh* mfm = getMesh( i );
meshes->pushMesh(mfm);
std::string key="/inewFieldDouble="+IntToStr(i)+"/";
- std::map<std::string,ParaMEDMEM::DataArrayDouble*>::iterator it;
- ParaMEDMEM::MEDFileFieldMultiTS* fieldsMTS = ParaMEDMEM::MEDFileFieldMultiTS::New();
+ std::map<std::string,MEDCoupling::DataArrayDouble*>::iterator it;
+ MEDCoupling::MEDFileFieldMultiTS* fieldsMTS = MEDCoupling::MEDFileFieldMultiTS::New();
for (it=_collection->getMapDataArrayDouble().begin() ; it!=_collection->getMapDataArrayDouble().end(); it++)
{
size_t found=(*it).first.find(key);
if (found==std::string::npos)
continue;
- ParaMEDMEM::MEDCouplingFieldDouble* field=0;
+ MEDCoupling::MEDCouplingFieldDouble* field=0;
field=getField(key, (*it).first, (*it).second, mfm, i);
- ParaMEDMEM::MEDFileField1TS* f1ts = ParaMEDMEM::MEDFileField1TS::New();
+ MEDCoupling::MEDFileField1TS* f1ts = MEDCoupling::MEDFileField1TS::New();
f1ts->setFieldNoProfileSBT(field);
fieldsMTS->pushBackTimeStep(f1ts);
#include <vector>
#include <string>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArrayDouble;
class MEDCouplingFieldDouble;
virtual ~MeshCollectionDriver() { }
virtual int read(const char*, ParaDomainSelector* sel=0) = 0;
int readSeq(const char*,const char*);
- ParaMEDMEM::MEDFileData *getMEDFileData();
+ MEDCoupling::MEDFileData *getMEDFileData();
virtual void write(const char*, ParaDomainSelector* sel=0) const = 0;
- void readMEDFileData(const ParaMEDMEM::MEDFileData* filedata);
+ void readMEDFileData(const MEDCoupling::MEDFileData* filedata);
protected:
void readSubdomain(int idomain);
- void readData(ParaMEDMEM::MEDFileUMesh* mfm, int idomain) const;
+ void readData(MEDCoupling::MEDFileUMesh* mfm, int idomain) const;
void readFileData(std::string file,std::string meshname,int idomain) const;
- ParaMEDMEM::MEDFileMesh* getMesh(int idomain) const;
- ParaMEDMEM::MEDCouplingFieldDouble* getField(std::string key, std::string description, ParaMEDMEM::DataArrayDouble* data, ParaMEDMEM::MEDFileMesh* mfm, int idomain) const;
+ MEDCoupling::MEDFileMesh* getMesh(int idomain) const;
+ MEDCoupling::MEDCouplingFieldDouble* getField(std::string key, std::string description, MEDCoupling::DataArrayDouble* data, MEDCoupling::MEDFileMesh* mfm, int idomain) const;
void writeMedFile(int idomain, const std::string& distfilename) const;
protected:
MeshCollection* _collection;
*\param filename ascii file containing the list of MED v2.3 files
* */
-int MeshCollectionMedAsciiDriver::read(ParaMEDMEM::MEDFileData* filedata)
+int MeshCollectionMedAsciiDriver::read(MEDCoupling::MEDFileData* filedata)
{
readMEDFileData(filedata);
MeshCollectionMedAsciiDriver(MeshCollection*);
virtual ~MeshCollectionMedAsciiDriver() { }
int read(const char*, ParaDomainSelector* sel=0);
- int read(ParaMEDMEM::MEDFileData*);
+ int read(MEDCoupling::MEDFileData*);
void write(const char*, ParaDomainSelector* sel=0) const;
private:
std::string _master_filename;
{
}
-METISGraph::METISGraph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, int* edgeweight)
+METISGraph::METISGraph(MEDCoupling::MEDCouplingSkyLineArray* graph, int* edgeweight)
:Graph(graph,edgeweight)
{
}
//creating a skylinearray with no copy of the index and partition array
//the fifth argument true specifies that only the pointers are passed
//to the object
- _partition = new ParaMEDMEM::MEDCouplingSkyLineArray(index,value);
+ _partition = new MEDCoupling::MEDCouplingSkyLineArray(index,value);
#endif
}
{
public:
METISGraph();
- METISGraph(ParaMEDMEM::MEDCouplingSkyLineArray*, int *edgeweight=0);
+ METISGraph(MEDCoupling::MEDCouplingSkyLineArray*, int *edgeweight=0);
virtual ~METISGraph();
void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0);
};
{
}
-ParMETISGraph::ParMETISGraph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, int* edgeweight)
+ParMETISGraph::ParMETISGraph(MEDCoupling::MEDCouplingSkyLineArray* graph, int* edgeweight)
:Graph(graph,edgeweight)
{
}
//the fifth argument true specifies that only the pointers are passed
//to the object
- _partition = new ParaMEDMEM::MEDCouplingSkyLineArray(index,value);
+ _partition = new MEDCoupling::MEDCouplingSkyLineArray(index,value);
#endif
}
{
public:
ParMETISGraph();
- ParMETISGraph(ParaMEDMEM::MEDCouplingSkyLineArray*, int *edgeweight=0);
+ ParMETISGraph(MEDCoupling::MEDCouplingSkyLineArray*, int *edgeweight=0);
virtual ~ParMETISGraph();
void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0);
};
* 1) for MED_CELL to know global id shift for domains at graph construction;
* 2) for sub-entity to know total nb of sub-entities before creating those of joints
*/
-void MEDPARTITIONER::ParaDomainSelector::gatherNbOf(const std::vector<ParaMEDMEM::MEDCouplingUMesh*>& domain_meshes)
+void MEDPARTITIONER::ParaDomainSelector::gatherNbOf(const std::vector<MEDCoupling::MEDCouplingUMesh*>& domain_meshes)
{
evaluateMemory();
// get nb of elems of each domain mesh
\param target processor id of the target
*/
-void MEDPARTITIONER::ParaDomainSelector::sendMesh(const ParaMEDMEM::MEDCouplingUMesh& mesh, int target) const
+void MEDPARTITIONER::ParaDomainSelector::sendMesh(const MEDCoupling::MEDCouplingUMesh& mesh, int target) const
{
#ifndef HAVE_MPI
throw INTERP_KERNEL::Exception("ParaDomainSelector::sendMesh : incoherent call in non_MPI mode");
if (mesh.getNumberOfCells()>0) //no sends if empty
{
- ParaMEDMEM::DataArrayInt *v1Local=0;
- ParaMEDMEM::DataArrayDouble *v2Local=0;
+ MEDCoupling::DataArrayInt *v1Local=0;
+ MEDCoupling::DataArrayDouble *v2Local=0;
//serialization of local mesh to send data to distant proc.
mesh.serialize(v1Local,v2Local);
int nbLocalElems=0;
\param mesh pointer to mesh that is filled
\param source processor id of the incoming messages
*/
-void MEDPARTITIONER::ParaDomainSelector::recvMesh(ParaMEDMEM::MEDCouplingUMesh*& mesh, int source)const
+void MEDPARTITIONER::ParaDomainSelector::recvMesh(MEDCoupling::MEDCouplingUMesh*& mesh, int source)const
{
#ifndef HAVE_MPI
throw INTERP_KERNEL::Exception("ParaDomainSelector::recvMesh : incoherent call in non_MPI mode");
int NumberOfCells=tinyInfoDistant[tinyVecSize-1];
if (NumberOfCells>0)
{
- ParaMEDMEM::DataArrayInt *v1Distant=ParaMEDMEM::DataArrayInt::New();
- ParaMEDMEM::DataArrayDouble *v2Distant=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayInt *v1Distant=MEDCoupling::DataArrayInt::New();
+ MEDCoupling::DataArrayDouble *v2Distant=MEDCoupling::DataArrayDouble::New();
//Building the right instance of copy of distant mesh.
- ParaMEDMEM::MEDCouplingPointSet *distant_mesh_tmp=
- ParaMEDMEM::MEDCouplingPointSet::BuildInstanceFromMeshType(
- (ParaMEDMEM::MEDCouplingMeshType) tinyInfoDistant[0]);
+ MEDCoupling::MEDCouplingPointSet *distant_mesh_tmp=
+ MEDCoupling::MEDCouplingPointSet::BuildInstanceFromMeshType(
+ (MEDCoupling::MEDCouplingMeshType) tinyInfoDistant[0]);
std::vector<std::string> unusedTinyDistantSts;
- mesh=dynamic_cast<ParaMEDMEM::MEDCouplingUMesh*> (distant_mesh_tmp);
+ mesh=dynamic_cast<MEDCoupling::MEDCouplingUMesh*> (distant_mesh_tmp);
mesh->resizeForUnserialization(tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
int nbDistElem=0;
#include <memory>
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
}
int getNbTotalFaces() { return _face_shift_by_domain.back(); };
//Collect nb of entities on procs
- void gatherNbOf(const std::vector<ParaMEDMEM::MEDCouplingUMesh*>& domain_meshes);
+ void gatherNbOf(const std::vector<MEDCoupling::MEDCouplingUMesh*>& domain_meshes);
//distribution of the graph vertices among the processors
int* getProcVtxdist() const;
//Evaluate current memory usage and return the maximal one in KB
int evaluateMemory() const;
- void sendMesh(const ParaMEDMEM::MEDCouplingUMesh& mesh, int target) const;
- void recvMesh(ParaMEDMEM::MEDCouplingUMesh*& mesh, int source) const;
+ void sendMesh(const MEDCoupling::MEDCouplingUMesh& mesh, int target) const;
+ void recvMesh(MEDCoupling::MEDCouplingUMesh*& mesh, int source) const;
private:
int _rank; //my rank
int _world_size; //nb of processors
}
//constructing topology according to mesh collection without global numerotation (use setGlobalNumerotation later)
-ParallelTopology::ParallelTopology(const std::vector<ParaMEDMEM::MEDCouplingUMesh*>& meshes)
+ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMesh*>& meshes)
{
_nb_domain=meshes.size();
_nb_cells.resize(_nb_domain);
}
//constructing topology according to mesh collection
-ParallelTopology::ParallelTopology(const std::vector<ParaMEDMEM::MEDCouplingUMesh*>& meshes,
+ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMesh*>& meshes,
const std::vector<MEDPARTITIONER::ConnectZone*>& cz,
std::vector<int*>& cellglobal,
std::vector<int*>& nodeglobal,
{
cellCorresp[ idomain ].resize( nb_domain );
}
- const ParaMEDMEM::MEDCouplingSkyLineArray* skylinegraph = graph->getGraph();
+ const MEDCoupling::MEDCouplingSkyLineArray* skylinegraph = graph->getGraph();
const int* index = skylinegraph->getIndex();
const int* value = skylinegraph->getValue();
const int nbCells = skylinegraph->getNumberOf();
public:
ParallelTopology();
- ParallelTopology(const std::vector<ParaMEDMEM::MEDCouplingUMesh*>&);
- ParallelTopology(const std::vector<ParaMEDMEM::MEDCouplingUMesh*>&,
+ ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMesh*>&);
+ ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMesh*>&,
const std::vector<MEDPARTITIONER::ConnectZone*>&,
std::vector<int*>&,
std::vector<int*>&,
{
}
-SCOTCHGraph::SCOTCHGraph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, int* edgeweight):Graph(graph,edgeweight)
+SCOTCHGraph::SCOTCHGraph(MEDCoupling::MEDCouplingSkyLineArray* graph, int* edgeweight):Graph(graph,edgeweight)
{
}
//creating a skylinearray with no copy of the index and partition array
//the fifth argument true specifies that only the pointers are passed
//to the object
- _partition = new ParaMEDMEM::MEDCouplingSkyLineArray(index,value);
+ _partition = new MEDCoupling::MEDCouplingSkyLineArray(index,value);
#endif
}
{
public:
SCOTCHGraph();
- SCOTCHGraph(ParaMEDMEM::MEDCouplingSkyLineArray*, int* edgeweight=0);
+ SCOTCHGraph(MEDCoupling::MEDCouplingSkyLineArray*, int* edgeweight=0);
virtual ~SCOTCHGraph();
void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector* sel=0);
};
#include <map>
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
}
{
public:
Topology() { }
- Topology(std::vector<ParaMEDMEM::MEDCouplingUMesh*>, std::vector<MEDPARTITIONER::ConnectZone*>) { }
+ Topology(std::vector<MEDCoupling::MEDCouplingUMesh*>, std::vector<MEDPARTITIONER::ConnectZone*>) { }
virtual ~Topology() { }
/*! converts a list of global cell numbers
* (domain numbers range from 0 to ndomain-1
* \param n number of cells in the mesh
*/
-UserGraph::UserGraph(ParaMEDMEM::MEDCouplingSkyLineArray *array, const int *partition, int n):Graph(array,0)
+UserGraph::UserGraph(MEDCoupling::MEDCouplingSkyLineArray *array, const int *partition, int n):Graph(array,0)
{
std::vector<int> index(n+1),value(n);
value[i]=partition[i];
}
- _partition = new ParaMEDMEM::MEDCouplingSkyLineArray(index,value);
+ _partition = new MEDCoupling::MEDCouplingSkyLineArray(index,value);
}
class MEDPARTITIONER_EXPORT UserGraph : public Graph
{
public:
- UserGraph(ParaMEDMEM::MEDCouplingSkyLineArray*, const int*, int);
+ UserGraph(MEDCoupling::MEDCouplingSkyLineArray*, const int*, int);
virtual ~UserGraph();
void partGraph(int, const std::string& options=std::string(""), ParaDomainSelector *sel=0);
};
IT=StrToInt(ExtractFromDescription(description,"IT="));
}
-ParaMEDMEM::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v)
+MEDCoupling::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v)
{
- ParaMEDMEM::DataArrayInt* p=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
p->alloc(v.size(),1);
std::copy(v.begin(),v.end(),p->getPointer());
return p;
}
-ParaMEDMEM::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v,const int nbComponents)
+MEDCoupling::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v,const int nbComponents)
{
- ParaMEDMEM::DataArrayInt* p=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
if (v.size()%nbComponents!=0)
throw INTERP_KERNEL::Exception("Problem size modulo nbComponents != 0");
p->alloc(v.size()/nbComponents,nbComponents);
return p;
}
-ParaMEDMEM::DataArrayDouble* MEDPARTITIONER::CreateDataArrayDoubleFromVector(const std::vector<double>& v)
+MEDCoupling::DataArrayDouble* MEDPARTITIONER::CreateDataArrayDoubleFromVector(const std::vector<double>& v)
{
- ParaMEDMEM::DataArrayDouble* p=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble* p=MEDCoupling::DataArrayDouble::New();
p->alloc(v.size(),1);
std::copy(v.begin(),v.end(),p->getPointer());
return p;
/*!
*/
-std::vector<std::string> MEDPARTITIONER::BrowseFieldDouble(const ParaMEDMEM::MEDCouplingFieldDouble* fd)
+std::vector<std::string> MEDPARTITIONER::BrowseFieldDouble(const MEDCoupling::MEDCouplingFieldDouble* fd)
{
std::vector<std::string> res;
if (fd->getArray())
MEDLoader::GetAllFieldNamesOnMesh(myfile,meshNames[i]);
for (std::size_t j = 0; j < fieldNames.size(); j++)
{
- std::vector< ParaMEDMEM::TypeOfField > typeFields=
+ std::vector< MEDCoupling::TypeOfField > typeFields=
MEDLoader::GetTypesOfField(myfile, meshNames[i], fieldNames[j]);
for (std::size_t k = 0; k < typeFields.size(); k++)
{
resi.push_back("fileName="); resi.back()+=fileName;
resi.push_back("meshName="); resi.back()+=curMeshName;
resi.push_back("fieldName="); resi.back()+=curFieldName;
- resi.push_back("typeField="); resi.back()+=IntToStr((int)ParaMEDMEM::ON_NODES);
+ resi.push_back("typeField="); resi.back()+=IntToStr((int)MEDCoupling::ON_NODES);
resi.push_back("typeData="); resi.back()+=IntToStr((int)typcha); //6 for double?
resi.push_back("nbComponent="); resi.back()+=IntToStr((int)ncomp);
resi.push_back("DT="); resi.back()+=IntToStr((int)numdt);
nbOfVal << " profilName '" << pflname << "' profileSize " << profilesize << " nbPtGauss " << nbi << std::endl;
int typeField=-1; //unknown
if (enttype==MED_CELL)
- typeField=ParaMEDMEM::ON_CELLS;
+ typeField=MEDCoupling::ON_CELLS;
if (enttype==MED_NODE_ELEMENT)
- typeField=ParaMEDMEM::ON_GAUSS_NE;
+ typeField=MEDCoupling::ON_GAUSS_NE;
//if (enttype==??) typeField=ON_GAUSS_PT;
std::vector<std::string> resi;
resi.push_back("idomain="); resi.back()+=IntToStr(idomain);
/*!
* create empty MEDCouplingUMesh* dim 3
*/
-ParaMEDMEM::MEDCouplingUMesh* MEDPARTITIONER::CreateEmptyMEDCouplingUMesh()
+MEDCoupling::MEDCouplingUMesh* MEDPARTITIONER::CreateEmptyMEDCouplingUMesh()
{
- ParaMEDMEM::MEDCouplingUMesh* umesh=ParaMEDMEM::MEDCouplingUMesh::New();
+ MEDCoupling::MEDCouplingUMesh* umesh=MEDCoupling::MEDCouplingUMesh::New();
umesh->setMeshDimension(3);
umesh->allocateCells(0);
umesh->finishInsertingCells();
- ParaMEDMEM::DataArrayDouble *myCoords=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *myCoords=MEDCoupling::DataArrayDouble::New();
myCoords->alloc(0,3);
umesh->setCoords(myCoords);
umesh->setName("EMPTY");
MEDPARTITIONER_EXPORT void FieldShortDescriptionToData(const std::string& description,
std::string& fieldName, int& typeField, int& entity, int& DT, int& IT);
- ParaMEDMEM::DataArrayInt *CreateDataArrayIntFromVector(const std::vector<int>& v);
- ParaMEDMEM::DataArrayInt *CreateDataArrayIntFromVector(const std::vector<int>& v, const int nbComponents);
- ParaMEDMEM::DataArrayDouble *CreateDataArrayDoubleFromVector(const std::vector<double>& v);
+ MEDCoupling::DataArrayInt *CreateDataArrayIntFromVector(const std::vector<int>& v);
+ MEDCoupling::DataArrayInt *CreateDataArrayIntFromVector(const std::vector<int>& v, const int nbComponents);
+ MEDCoupling::DataArrayDouble *CreateDataArrayDoubleFromVector(const std::vector<double>& v);
- ParaMEDMEM::MEDCouplingUMesh *CreateEmptyMEDCouplingUMesh();
+ MEDCoupling::MEDCouplingUMesh *CreateEmptyMEDCouplingUMesh();
- std::vector<std::string> BrowseFieldDouble(const ParaMEDMEM::MEDCouplingFieldDouble* fd);
+ std::vector<std::string> BrowseFieldDouble(const MEDCoupling::MEDCouplingFieldDouble* fd);
std::vector<std::string> BrowseAllFields(const std::string& myfile);
std::vector<std::string> BrowseAllFieldsOnMesh(const std::string& myfile, const std::string& mymesh, const int idomain);
std::vector<std::string> GetInfosOfField(const char *fileName, const char *meshName, const int idomain );
std::vector<int>* RecvIntVec(int source);
void RecvIntVec(std::vector<int>& vec, const int source);
- void SendDataArrayInt(const ParaMEDMEM::DataArrayInt* da, const int target);
- ParaMEDMEM::DataArrayInt *RecvDataArrayInt(const int source);
- void SendDataArrayDouble(const ParaMEDMEM::DataArrayDouble* da, const int target);
- ParaMEDMEM::DataArrayDouble *RecvDataArrayDouble(const int source);
+ void SendDataArrayInt(const MEDCoupling::DataArrayInt* da, const int target);
+ MEDCoupling::DataArrayInt *RecvDataArrayInt(const int source);
+ void SendDataArrayDouble(const MEDCoupling::DataArrayDouble* da, const int target);
+ MEDCoupling::DataArrayDouble *RecvDataArrayDouble(const int source);
void TestVectorOfStringMpi();
void TestMapOfStringIntMpi();
\param da dataArray to be sent
\param target processor id of the target
*/
-void MEDPARTITIONER::SendDataArrayInt(const ParaMEDMEM::DataArrayInt *da, const int target)
+void MEDPARTITIONER::SendDataArrayInt(const MEDCoupling::DataArrayInt *da, const int target)
{
if (da==0)
throw INTERP_KERNEL::Exception("Problem send DataArrayInt* NULL");
\param da dataArrayInt that is filled
\param source processor id of the incoming messages
*/
-ParaMEDMEM::DataArrayInt *MEDPARTITIONER::RecvDataArrayInt(const int source)
+MEDCoupling::DataArrayInt *MEDPARTITIONER::RecvDataArrayInt(const int source)
{
int tag = 111004;
int size[3];
std::cout << "proc " << MyGlobals::_Rank << " : <-- RecvDataArrayInt " << size[0] << std::endl;
if (size[0]!=(size[1]*size[2]))
throw INTERP_KERNEL::Exception("Problem in RecvDataArrayInt incoherent sizes");
- ParaMEDMEM::DataArrayInt* da=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* da=MEDCoupling::DataArrayInt::New();
da->alloc(size[1],size[2]);
int *p=da->getPointer();
MPI_Recv(const_cast<int*>(&p[0]), size[0], MPI_INT, source, tag+100, MPI_COMM_WORLD, &status);
\param da dataArray to be sent
\param target processor id of the target
*/
-void MEDPARTITIONER::SendDataArrayDouble(const ParaMEDMEM::DataArrayDouble *da, const int target)
+void MEDPARTITIONER::SendDataArrayDouble(const MEDCoupling::DataArrayDouble *da, const int target)
{
if (da==0)
throw INTERP_KERNEL::Exception("Problem send DataArrayDouble* NULL");
\param da dataArrayDouble that is filled
\param source processor id of the incoming messages
*/
-ParaMEDMEM::DataArrayDouble* MEDPARTITIONER::RecvDataArrayDouble(const int source)
+MEDCoupling::DataArrayDouble* MEDPARTITIONER::RecvDataArrayDouble(const int source)
{
int tag = 111005;
int size[3];
std::cout << "proc " << MyGlobals::_Rank << " : <-- RecvDataArrayDouble " << size[0] << std::endl;
if (size[0]!=(size[1]*size[2]))
throw INTERP_KERNEL::Exception("Problem in RecvDataArrayDouble incoherent sizes");
- ParaMEDMEM::DataArrayDouble* da=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble* da=MEDCoupling::DataArrayDouble::New();
da->alloc(size[1],size[2]);
double *p=da->getPointer();
MPI_Recv(const_cast<double*>(&p[0]), size[0], MPI_DOUBLE, source, tag+100, MPI_COMM_WORLD, &status);
int rank=MyGlobals::_Rank;
//int
{
- ParaMEDMEM::DataArrayInt* send=ParaMEDMEM::DataArrayInt::New();
- ParaMEDMEM::DataArrayInt* recv=0;
+ MEDCoupling::DataArrayInt* send=MEDCoupling::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* recv=0;
int nbOfTuples=5;
int numberOfComponents=3;
send->alloc(nbOfTuples,numberOfComponents);
}
//double
{
- ParaMEDMEM::DataArrayDouble* send=ParaMEDMEM::DataArrayDouble::New();
- ParaMEDMEM::DataArrayDouble* recv=0;
+ MEDCoupling::DataArrayDouble* send=MEDCoupling::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble* recv=0;
int nbOfTuples=5;
int numberOfComponents=3;
send->alloc(nbOfTuples,numberOfComponents);
#endif
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace MEDPARTITIONER;
void MEDPARTITIONERTest::setSize(int ni, int nj, int nk)
{
}
-ParaMEDMEM::MEDCouplingUMesh * MEDPARTITIONERTest::buildCUBE3DMesh()
+MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildCUBE3DMesh()
//only hexa8
{
vector<int> conn;
return mesh;
}
-ParaMEDMEM::MEDCouplingUMesh * MEDPARTITIONERTest::buildCARRE3DMesh()
+MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildCARRE3DMesh()
//only quad4 in oblique (k=j)
{
vector<int> conn;
return mesh;
}
-ParaMEDMEM::MEDCouplingUMesh * MEDPARTITIONERTest::buildFACE3DMesh()
+MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildFACE3DMesh()
//only quad4 on a global face of the CUBE3D (k=0)
{
vector<int> conn;
}
{
- vector<const ParaMEDMEM::MEDCouplingUMesh*> meshes;
+ vector<const MEDCoupling::MEDCouplingUMesh*> meshes;
MEDCouplingUMesh * mesh1 = buildCUBE3DMesh();
MEDCouplingUMesh * mesh2 = buildFACE3DMesh();
mesh1->setName("testMesh");
meshes.push_back(mesh2);
MEDLoader::WriteUMeshes(_file_name_with_faces.c_str(), meshes, true);
- ParaMEDMEM::MEDFileUMesh* mfm=ParaMEDMEM::MEDFileUMesh::New(_file_name_with_faces.c_str(), mesh1->getName().c_str());
+ MEDCoupling::MEDFileUMesh* mfm=MEDCoupling::MEDFileUMesh::New(_file_name_with_faces.c_str(), mesh1->getName().c_str());
DataArrayInt* FacesFam=DataArrayInt::New();
FacesFam->alloc(mfm->getSizeAtLevel(-1),1);
FacesFam->fillWithValue(-1);
CellsFam->decrRef();
/*ce truc marche pas!
- ParaMEDMEM::MEDFileUMesh* mfm=ParaMEDMEM::MEDFileUMesh::New(_file_name_with_faces.c_str(), mesh1->getName());
- vector<const ParaMEDMEM::MEDCouplingUMesh*> ms;
+ MEDCoupling::MEDFileUMesh* mfm=MEDCoupling::MEDFileUMesh::New(_file_name_with_faces.c_str(), mesh1->getName());
+ vector<const MEDCoupling::MEDCouplingUMesh*> ms;
ms.push_back(mesh2);
mfm->setGroupsFromScratch(-1, ms);
mfm->write(_file_name_with_faces.c_str(),0);
execName=getPartitionerExe();
fileName=_file_name_with_faces;
- ParaMEDMEM::MEDFileUMesh* initialMesh=ParaMEDMEM::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
- ParaMEDMEM::MEDCouplingUMesh* faceMesh=initialMesh->getLevelM1Mesh(false);
+ MEDCoupling::MEDFileUMesh* initialMesh=MEDCoupling::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDCouplingUMesh* faceMesh=initialMesh->getLevelM1Mesh(false);
cmd=execName+" --ndomains=5 --split-method="+MetisOrScotch; //on same proc
sourceName=fileName;
MEDPARTITIONER::ParaDomainSelector parallelizer(false);
MEDPARTITIONER::MeshCollection collection(input,parallelizer);
CPPUNIT_ASSERT_EQUAL(3, collection.getMeshDimension());
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>cellMeshes=collection.getMesh();
+ std::vector<MEDCoupling::MEDCouplingUMesh*>cellMeshes=collection.getMesh();
CPPUNIT_ASSERT_EQUAL(5, (int) cellMeshes.size());
int nbcells=0;
for (std::size_t i = 0; i < cellMeshes.size(); i++)
nbcells+=cellMeshes[i]->getNumberOfCells();
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), nbcells);
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>faceMeshes=collection.getFaceMesh();
+ std::vector<MEDCoupling::MEDCouplingUMesh*>faceMeshes=collection.getFaceMesh();
CPPUNIT_ASSERT_EQUAL(5, (int) faceMeshes.size());
int nbfaces=0;
for (std::size_t i=0; i < faceMeshes.size(); i++)
CPPUNIT_ASSERT_EQUAL(0, res);
string refusedName=targetName+"1.med";
- ParaMEDMEM::MEDFileUMesh* refusedMesh=ParaMEDMEM::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
- ParaMEDMEM::MEDCouplingUMesh* refusedFaceMesh=refusedMesh->getLevelM1Mesh(false);
+ MEDCoupling::MEDFileUMesh* refusedMesh=MEDCoupling::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDCouplingUMesh* refusedFaceMesh=refusedMesh->getLevelM1Mesh(false);
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), refusedCellMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(faceMesh->getNumberOfCells(), refusedFaceMesh->getNumberOfCells());
/*not the good job
- ParaMEDMEM::MEDCouplingMesh* mergeCell=cellMesh->mergeMyselfWith(refusedCellMesh);
+ MEDCoupling::MEDCouplingMesh* mergeCell=cellMesh->mergeMyselfWith(refusedCellMesh);
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), mergeCell->getNumberOfCells());
- ParaMEDMEM::MEDCouplingMesh* mergeFace=faceMesh->mergeMyselfWith(refusedFaceMesh);
+ MEDCoupling::MEDCouplingMesh* mergeFace=faceMesh->mergeMyselfWith(refusedFaceMesh);
CPPUNIT_ASSERT_EQUAL(faceMesh->getNumberOfCells(), mergeFace->getNumberOfCells());
CPPUNIT_ASSERT(faceMesh->isEqual(refusedFaceMesh,1e-12));
fileName=_file_name;
fileName.replace(fileName.find(".med"),4,"_WithVecFieldOnCells.med");
- ParaMEDMEM::MEDFileUMesh* initialMesh=ParaMEDMEM::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDFileUMesh* initialMesh=MEDCoupling::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
cmd=execName+" --ndomains=5 --split-method="+MetisOrScotch; //on same proc
sourceName=fileName;
CPPUNIT_ASSERT_EQUAL(0, res);
string refusedName=targetName+"1.med";
- ParaMEDMEM::MEDFileUMesh* refusedMesh=ParaMEDMEM::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDFileUMesh* refusedMesh=MEDCoupling::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), refusedCellMesh->getNumberOfCells());
fileName=_file_name;
fileName.replace(fileName.find(".med"),4,"_WithVecFieldOnGaussNe.med");
- ParaMEDMEM::MEDFileUMesh* initialMesh=ParaMEDMEM::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDFileUMesh* initialMesh=MEDCoupling::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
cmd=execName+" --ndomains=5 --split-method="+MetisOrScotch; //on same proc
sourceName=fileName;
CPPUNIT_ASSERT_EQUAL(0, res);
string refusedName=targetName+"1.med";
- ParaMEDMEM::MEDFileUMesh* refusedMesh=ParaMEDMEM::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDFileUMesh* refusedMesh=MEDCoupling::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), refusedCellMesh->getNumberOfCells());
std::map< int, int > famId2nb; // count total nb of cells in divided families
std::map< int, int >::iterator id2nn;
{
- const std::vector<ParaMEDMEM::DataArrayInt*>& famIdsVec = new_collection.getCellFamilyIds();
+ const std::vector<MEDCoupling::DataArrayInt*>& famIdsVec = new_collection.getCellFamilyIds();
for ( size_t i = 0; i < famIdsVec.size(); ++i )
{
- ParaMEDMEM::DataArrayInt* famIdsArr = famIdsVec[i];
+ MEDCoupling::DataArrayInt* famIdsArr = famIdsVec[i];
for ( int j = famIdsArr->getNbOfElems()-1; j >= 0; --j )
{
id2nn = famId2nb.insert( make_pair( famIdsArr->getPointer()[j], 0 )).first;
// Check that "creates boundary faces option is handled"
famId2nb.clear();
- const std::vector<ParaMEDMEM::DataArrayInt*>& famIdsVec = new_collection.getFaceFamilyIds();
+ const std::vector<MEDCoupling::DataArrayInt*>& famIdsVec = new_collection.getFaceFamilyIds();
for ( size_t i = 0; i < famIdsVec.size(); ++i )
{
- ParaMEDMEM::DataArrayInt* famIdsArr = famIdsVec[i];
+ MEDCoupling::DataArrayInt* famIdsArr = famIdsVec[i];
for ( int j = famIdsArr->getNbOfElems()-1; j >= 0; --j )
{
id2nn = famId2nb.insert( make_pair( famIdsArr->getPointer()[j], 0 )).first;
void setbigSize();
std::string getPartitionerExe() const;
std::string getPartitionerParaExe() const;
- ParaMEDMEM::MEDCouplingUMesh * buildCUBE3DMesh();
- ParaMEDMEM::MEDCouplingUMesh * buildFACE3DMesh();
- ParaMEDMEM::MEDCouplingUMesh * buildCARRE3DMesh();
- ParaMEDMEM::MEDCouplingFieldDouble * buildVecFieldOnCells(std::string myfileName);
- ParaMEDMEM::MEDCouplingFieldDouble * buildVecFieldOnNodes();
+ MEDCoupling::MEDCouplingUMesh * buildCUBE3DMesh();
+ MEDCoupling::MEDCouplingUMesh * buildFACE3DMesh();
+ MEDCoupling::MEDCouplingUMesh * buildCARRE3DMesh();
+ MEDCoupling::MEDCouplingFieldDouble * buildVecFieldOnCells(std::string myfileName);
+ MEDCoupling::MEDCouplingFieldDouble * buildVecFieldOnNodes();
void createTestMeshWithoutField();
void createTestMeshWithVecFieldOnCells();
void createTestMeshWithVecFieldOnNodes();
#include <mpi.h>
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace MEDPARTITIONER;
#if defined(HAVE_MPI)
execName=getPartitionerParaExe();
fileName=_file_name_with_faces;
- ParaMEDMEM::MEDFileUMesh* initialMesh=ParaMEDMEM::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
- ParaMEDMEM::MEDCouplingUMesh* faceMesh=initialMesh->getLevelM1Mesh(false);
+ MEDCoupling::MEDFileUMesh* initialMesh=MEDCoupling::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDCouplingUMesh* faceMesh=initialMesh->getLevelM1Mesh(false);
cmd="mpirun -np 5 "+execName+" --ndomains=5 --split-method=metis"; //on same proc
sourceName=fileName;
MEDPARTITIONER::ParaDomainSelector parallelizer(false);
MEDPARTITIONER::MeshCollection collection(input,parallelizer);
CPPUNIT_ASSERT_EQUAL(3, collection.getMeshDimension());
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>cellMeshes=collection.getMesh();
+ std::vector<MEDCoupling::MEDCouplingUMesh*>cellMeshes=collection.getMesh();
CPPUNIT_ASSERT_EQUAL(5, (int) cellMeshes.size());
int nbcells=0;
for (std::size_t i = 0; i < cellMeshes.size(); i++)
nbcells+=cellMeshes[i]->getNumberOfCells();
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), nbcells);
- std::vector<ParaMEDMEM::MEDCouplingUMesh*>faceMeshes=collection.getFaceMesh();
+ std::vector<MEDCoupling::MEDCouplingUMesh*>faceMeshes=collection.getFaceMesh();
CPPUNIT_ASSERT_EQUAL(5, (int) faceMeshes.size());
int nbfaces=0;
for (std::size_t i=0; i < faceMeshes.size(); i++)
CPPUNIT_ASSERT_EQUAL(0, res);
string refusedName=targetName+"1.med";
- ParaMEDMEM::MEDFileUMesh* refusedMesh=ParaMEDMEM::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
- ParaMEDMEM::MEDCouplingUMesh* refusedFaceMesh=refusedMesh->getLevelM1Mesh(false);
+ MEDCoupling::MEDFileUMesh* refusedMesh=MEDCoupling::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDCouplingUMesh* refusedFaceMesh=refusedMesh->getLevelM1Mesh(false);
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), refusedCellMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(faceMesh->getNumberOfCells(), refusedFaceMesh->getNumberOfCells());
/*not the good job
- ParaMEDMEM::MEDCouplingMesh* mergeCell=cellMesh->mergeMyselfWith(refusedCellMesh);
+ MEDCoupling::MEDCouplingMesh* mergeCell=cellMesh->mergeMyselfWith(refusedCellMesh);
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), mergeCell->getNumberOfCells());
- ParaMEDMEM::MEDCouplingMesh* mergeFace=faceMesh->mergeMyselfWith(refusedFaceMesh);
+ MEDCoupling::MEDCouplingMesh* mergeFace=faceMesh->mergeMyselfWith(refusedFaceMesh);
CPPUNIT_ASSERT_EQUAL(faceMesh->getNumberOfCells(), mergeFace->getNumberOfCells());
CPPUNIT_ASSERT(faceMesh->isEqual(refusedFaceMesh,1e-12));
fileName=_file_name;
fileName.replace(fileName.find(".med"),4,"_WithVecFieldOnCells.med");
- ParaMEDMEM::MEDFileUMesh* initialMesh=ParaMEDMEM::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDFileUMesh* initialMesh=MEDCoupling::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
cmd="mpirun -np 5 "+execName+" --ndomains=5 --split-method=metis"; //on same proc
sourceName=fileName;
CPPUNIT_ASSERT_EQUAL(0, res);
string refusedName=targetName+"1.med";
- ParaMEDMEM::MEDFileUMesh* refusedMesh=ParaMEDMEM::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDFileUMesh* refusedMesh=MEDCoupling::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), refusedCellMesh->getNumberOfCells());
fileName=_file_name;
fileName.replace(fileName.find(".med"),4,"_WithVecFieldOnGaussNe.med");
- ParaMEDMEM::MEDFileUMesh* initialMesh=ParaMEDMEM::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDFileUMesh* initialMesh=MEDCoupling::MEDFileUMesh::New(fileName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* cellMesh=initialMesh->getLevel0Mesh(false);
cmd="mpirun -np 5 "+execName+" --ndomains=5 --split-method=metis"; //on same proc
sourceName=fileName;
CPPUNIT_ASSERT_EQUAL(0, res);
string refusedName=targetName+"1.med";
- ParaMEDMEM::MEDFileUMesh* refusedMesh=ParaMEDMEM::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
- ParaMEDMEM::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
+ MEDCoupling::MEDFileUMesh* refusedMesh=MEDCoupling::MEDFileUMesh::New(refusedName.c_str(),_mesh_name.c_str());
+ MEDCoupling::MEDCouplingUMesh* refusedCellMesh=refusedMesh->getLevel0Mesh(false);
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), refusedCellMesh->getNumberOfCells());
#include "MEDPARTITIONER.hxx"
#include "MEDPARTITIONER_Graph.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace INTERP_KERNEL;
using namespace MEDPARTITIONER;
%}
%newobject MEDPARTITIONER::MEDPartitioner::New;
%newobject MEDPARTITIONER::MEDPartitioner::Graph;
%newobject MEDPARTITIONER::MEDPartitioner::getMEDFileData;
-%feature("unref") ParaMEDMEM::MEDFileData "$this->decrRef();"
+%feature("unref") MEDCoupling::MEDFileData "$this->decrRef();"
%nodefaultctor;
{
public:
virtual void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0) throw(INTERP_KERNEL::Exception);
- const ParaMEDMEM::MEDCouplingSkyLineArray *getGraph() const;
- const ParaMEDMEM::MEDCouplingSkyLineArray *getPartition() const;
+ const MEDCoupling::MEDCouplingSkyLineArray *getGraph() const;
+ const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const;
int nbVertices() const;
};
{
public:
MEDPartitioner(const std::string& filename, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
- MEDPartitioner(const ParaMEDMEM::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
- MEDPartitioner(const ParaMEDMEM::MEDFileData* fileData, Graph* graph, bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
- static MEDPARTITIONER::Graph* Graph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0) throw(INTERP_KERNEL::Exception);
- ParaMEDMEM::MEDFileData* getMEDFileData() throw(INTERP_KERNEL::Exception);
+ MEDPartitioner(const MEDCoupling::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
+ MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
+ static MEDPARTITIONER::Graph* Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0) throw(INTERP_KERNEL::Exception);
+ MEDCoupling::MEDFileData* getMEDFileData() throw(INTERP_KERNEL::Exception);
void write(const std::string& filename) throw(INTERP_KERNEL::Exception);
};
}
#include <boost/graph/properties.hpp>
#include <boost/graph/bandwidth.hpp>
-void BOOSTRenumbering::renumber(const int *graph, const int *index_graph, int nbCell, ParaMEDMEM::DataArrayInt *&iperm, ParaMEDMEM::DataArrayInt *&perm)
+void BOOSTRenumbering::renumber(const int *graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm)
{
- ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayInt> out0(ParaMEDMEM::DataArrayInt::New()),out1(ParaMEDMEM::DataArrayInt::New());
+ MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::DataArrayInt> out0(MEDCoupling::DataArrayInt::New()),out1(MEDCoupling::DataArrayInt::New());
out0->alloc(nbCell,1); out1->alloc(nbCell,1);
out0->fillWithZero(); out1->fillWithZero();
//
class RENUMBER_EXPORT BOOSTRenumbering:public Renumbering
{
public:
- void renumber(const int *graph, const int *index_graph, int nbCell, ParaMEDMEM::DataArrayInt *&iperm, ParaMEDMEM::DataArrayInt *&perm);
+ void renumber(const int *graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm);
};
#endif /*BOOSTRENUMBERING_HXX_*/
#include "RENUMBER_METISRenumbering.hxx"
-void METISRenumbering::renumber(const int *graph, const int *index_graph, int nbCell, ParaMEDMEM::DataArrayInt *&iperm, ParaMEDMEM::DataArrayInt *&perm)
+void METISRenumbering::renumber(const int *graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm)
{
- ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayInt> out0(ParaMEDMEM::DataArrayInt::New()),out1(ParaMEDMEM::DataArrayInt::New());
+ MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::DataArrayInt> out0(MEDCoupling::DataArrayInt::New()),out1(MEDCoupling::DataArrayInt::New());
out0->alloc(nbCell,1); out1->alloc(nbCell,1);
out0->fillWithZero(); out1->fillWithZero();
int num_flag=1;
class RENUMBER_EXPORT METISRenumbering:public Renumbering
{
public:
- virtual void renumber(const int *graph, const int *index_graph, int nb_cell, ParaMEDMEM::DataArrayInt *&iperm, ParaMEDMEM::DataArrayInt *&perm);
+ virtual void renumber(const int *graph, const int *index_graph, int nb_cell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm);
};
#endif /*METISRENUMBERING_HXX_*/
#include "RENUMBERDefines.hxx"
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArrayInt;
}
class RENUMBER_EXPORT Renumbering
{
public:
- virtual void renumber(const int *graph, const int *index_graph, int nbCell, ParaMEDMEM::DataArrayInt *&iperm, ParaMEDMEM::DataArrayInt *&perm) = 0;
+ virtual void renumber(const int *graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm) = 0;
virtual ~Renumbering() { }
};
#include <iostream>
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace MED_RENUMBER;
int main(int argc, char** argv)
#include "RenumberingFactory.hxx"
#include "RENUMBER_Renumbering.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace INTERP_KERNEL;
using namespace MED_RENUMBER;
%}
public:
%extend
{
- virtual PyObject *renumber(const ParaMEDMEM::DataArrayInt *graph, const ParaMEDMEM::DataArrayInt *index_graph) throw(INTERP_KERNEL::Exception)
+ virtual PyObject *renumber(const MEDCoupling::DataArrayInt *graph, const MEDCoupling::DataArrayInt *index_graph) throw(INTERP_KERNEL::Exception)
{
if(!graph || !index_graph)
throw INTERP_KERNEL::Exception("wrap of Renumbering::renumber : One of the input arrays is NULL !");
if(!graph->isAllocated() || !index_graph->isAllocated())
throw INTERP_KERNEL::Exception("wrap of Renumbering::renumber : One of the input arrays is not allocated !");
- ParaMEDMEM::DataArrayInt *out0(0),*out1(0);
+ MEDCoupling::DataArrayInt *out0(0),*out1(0);
self->renumber(graph->begin(),index_graph->begin(),index_graph->getNumberOfTuples()-1,out0,out1);
PyObject *ret=PyTuple_New(2);
- PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(out0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
- PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(out1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(out0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(out1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
return ret;
}
}