#include "MEDFileMeshLL.hxx"
#include "MEDLoader.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDFileMesh *ParaMEDFileMesh::New(int iPart, int nbOfParts, const std::string& fileName, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs)
{
MEDFileUtilities::CheckFileForRead(fileName);
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
MEDFileUtilities::AutoFid fid(MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY));
int dummy0,dummy1;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingAxisType dummy3;
MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy3,dummy0,dummy1,dummy2);
switch(meshType)
{
MEDFileMesh *ParaMEDFileMesh::ParaNew(int iPart, int nbOfParts, const MPI_Comm& com, const MPI_Info& nfo, const std::string& fileName, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs)
{
MEDFileUtilities::CheckFileForRead(fileName);
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
MEDFileUtilities::AutoFid fid(MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY));
int dummy0,dummy1;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingAxisType dummy3;
MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy3,dummy0,dummy1,dummy2);
switch(meshType)
{
#include <string>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDFileMesh;
class MEDFileUMesh;
#include <fstream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
ParaMEDLoader::ParaMEDLoader()
{
}
-void ParaMEDLoader::WriteParaMesh(const char *fileName, ParaMEDMEM::ParaMESH *mesh)
+void ParaMEDLoader::WriteParaMesh(const char *fileName, MEDCoupling::ParaMESH *mesh)
{
if(!mesh->getBlockTopology()->getProcGroup()->containsMyRank())
return ;
#include <string>
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ParaMESH;
class ParaFIELD;
class ParaMEDLoader
{
public:
- static void WriteParaMesh(const char *fileName, ParaMEDMEM::ParaMESH *mesh);
+ static void WriteParaMesh(const char *fileName, MEDCoupling::ParaMESH *mesh);
static void WriteMasterFile(const char *fileName, const std::vector<std::string>& fileNames, const char *meshName);
private:
ParaMEDLoader();
dans MxN_Mapping.hxx
. Le choix des options se fait avec le Data Exchange Channel :
- + ParaMEDMEM::InterpKernelDEC dec (*source_group,*target_group);
+ + MEDCoupling::InterpKernelDEC dec (*source_group,*target_group);
+ dec.setOption("Asynchronous",true);
+ dec.setOption("TimeInterpolation",LinearTimeInterp);
+ dec.setOption("AllToAllMethod",PointToPoint);
et TimeInterpolation : methodes Asynchronous et
SetTimeInterpolator de MPI_AccessDEC.
-. ParaMEDMEM::InterpKernelDEC comporte maintenant une surcharge des
+. MEDCoupling::InterpKernelDEC comporte maintenant une surcharge des
methodes recvData() et sendData() :
+ void InterpKernelDEC::recvData( double time ) qui appelle
SetTime(time) de MPI_AccessDEC et
SetTime(time,deltatime) de MPI_AccessDEC et
sendData()
-. recvData() et sendData() de ParaMEDMEM::InterpKernelDEC
+. recvData() et sendData() de MEDCoupling::InterpKernelDEC
appellent multiply et transposeMultiply de l'InterpolationMatrix
qui appellent sendRecv et reverseSendRecv de MxN_Mapping
qui appellent comm_interface.allToAllV en mode "Native"
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
* Default ctor.
}
_cycle_type.resize(_dimension);
for (int i=0; i<_dimension; i++)
- _cycle_type[i]=ParaMEDMEM::Block;
+ _cycle_type[i]=MEDCoupling::Block;
}
/*!
_nb_elems+=nbelems_per_proc[i-1];
}
_cycle_type.resize(1);
- _cycle_type[0]=ParaMEDMEM::Block;
+ _cycle_type[0]=MEDCoupling::Block;
delete[] nbelems_per_proc;
}
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ComponentTopology;
class MEDCouplingCMesh;
#include "CommInterface.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*! \anchor CommInterface-det
\class CommInterface
{
//initialization
MPI_Init(&argc, &argv);
- ParaMEDMEM::CommInterface comm_interface;
+ MEDCoupling::CommInterface comm_interface;
//setting up a processor group with proc 0
set<int> procs;
procs.insert(0);
- ParaMEDMEM::ProcessorGroup group(procs, comm_interface);
+ MEDCoupling::ProcessorGroup group(procs, comm_interface);
//cleanup
MPI_Finalize();
#define __COMMINTERFACE_HXX__
#include <mpi.h>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class CommInterface
#include "ProcessorGroup.hxx"
#include "InterpolationUtils.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/* Generic constructor for \a nb_comp components equally parted
* in \a nb_blocks blocks
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ProcessorGroup;
#include <cmath>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
DEC::DEC():_comm_interface(0)
{
#include "NormalizedUnstructuredMesh.hxx"
#include "DECOptions.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class CommInterface;
#include <string>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
//! Enum describing the allToAll method used in the communication pattern
typedef enum { Native, PointToPoint } AllToAllMethod;
#include <iostream>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
*
* Abstract interface class representing a link between two
* processor groups for exchanging mesh or field data. The two processor groups must
- * have a void intersection (\ref ParaMEDMEM::OverlapDEC "OverlapDEC" is to be considered otherwise).
+ * have a void intersection (\ref MEDCoupling::OverlapDEC "OverlapDEC" is to be considered otherwise).
* The %DEC is initialized by attaching a field on the receiving or on the
* sending side.
*
* The data is sent or received through calls to the (abstract) methods recvData() and sendData().
*
- * One can attach either a \c ParaMEDMEM::ParaFIELD, or a
- * \c ICoCo::Field, or directly a \c ParaMEDMEM::MEDCouplingFieldDouble instance.
+ * One can attach either a \c MEDCoupling::ParaFIELD, or a
+ * \c ICoCo::Field, or directly a \c MEDCoupling::MEDCouplingFieldDouble instance.
* See the various signatures of the method DisjointDEC::attachLocalField()
*
* The derivations of this class should be considered for practical instanciation:
*
* \section DisjointDEC-options DisjointDEC options
* The options supported by %DisjointDEC objects are the same that the ones supported for all
- * DECs in general and are all inherited from the class \ref ParaMEDMEM::DECOptions "DECOptions"
+ * DECs in general and are all inherited from the class \ref MEDCoupling::DECOptions "DECOptions"
*
*/
_comm_interface(0),
_union_comm(MPI_COMM_NULL)
{
- ParaMEDMEM::CommInterface comm;
+ MEDCoupling::CommInterface comm;
// Create the list of procs including source and target
std::set<int> union_ids; // source and target ids in world_comm
union_ids.insert(source_ids.begin(),source_ids.end());
class MEDField;
}
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ProcessorGroup;
class ParaFIELD;
//#define USE_DIRECTED_BB
-namespace ParaMEDMEM
+namespace MEDCoupling
{
ElementLocator::ElementLocator(const ParaFIELD& sourceField,
const ProcessorGroup& distant_group,
#include <vector>
#include <set>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ParaFIELD;
class ProcessorGroup;
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
#include <map>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class BlockTopology;
#include "ExplicitMapping.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
ExplicitMapping::ExplicitMapping():
#include <map>
#include <set>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
* Internal class, not part of the public API.
#include <algorithm>
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
ExplicitTopology::ExplicitTopology():
#include <utility>
#include <iostream>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ParaMESH;
class Topology;
\a field.
*/
- MEDField::MEDField(ParaMEDMEM::MEDCouplingFieldDouble *field):_field(field)
+ MEDField::MEDField(MEDCoupling::MEDCouplingFieldDouble *field):_field(field)
{
if(_field)
_field->incrRef();
{
public:
MEDField():_field(0) { }
- MEDField(ParaMEDMEM::MEDCouplingFieldDouble* field);
+ MEDField(MEDCoupling::MEDCouplingFieldDouble* field);
MEDField(const MEDField& field);
MEDField& operator=(const MEDField& field);
virtual ~MEDField();
- ParaMEDMEM::MEDCouplingFieldDouble *getField() const { return _field; }
- const ParaMEDMEM::MEDCouplingMesh *getMesh() const { return _field->getMesh(); }
+ MEDCoupling::MEDCouplingFieldDouble *getField() const { return _field; }
+ const MEDCoupling::MEDCouplingMesh *getMesh() const { return _field->getMesh(); }
private:
- ParaMEDMEM::MEDCouplingFieldDouble *_field;
+ MEDCoupling::MEDCouplingFieldDouble *_field;
};
}
#include "InterpKernelDEC.hxx"
#include "ElementLocator.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
The name "InterpKernelDEC" comes from the fact that this class uses exactly the same algorithms
as the sequential remapper. Both this class and the sequential
- \ref ParaMEDMEM::MEDCouplingRemapper "MEDCouplingRemapper" are built on top of the %INTERP_KERNEL
+ \ref MEDCoupling::MEDCouplingRemapper "MEDCouplingRemapper" are built on top of the %INTERP_KERNEL
algorithms (notably the computation of the intersection volumes).
Among the important properties inherited from the parent abstract class \ref DisjointDEC-det "DisjointDEC",
\f]
\section InterpKernelDEC-options Options
- On top of the usual \ref ParaMEDMEM::DECOptions "DEC options", the options supported by %InterpKernelDEC objects are
+ On top of the usual \ref MEDCoupling::DECOptions "DEC options", the options supported by %InterpKernelDEC objects are
related to the underlying \ref InterpKerIntersectors "intersector class".
All the options available in the intersector objects are
available for the %InterpKernelDEC object. The various options available for intersectors can
#include "MxN_Mapping.hxx"
#include "InterpolationOptions.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class InterpolationMatrix;
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/**!
\param target_group processor group containing the distant processors
\param method interpolation method
*/
- InterpolationMatrix::InterpolationMatrix(const ParaMEDMEM::ParaFIELD *source_field,
+ InterpolationMatrix::InterpolationMatrix(const MEDCoupling::ParaFIELD *source_field,
const ProcessorGroup& source_group,
const ProcessorGroup& target_group,
const DECOptions& dec_options,
#include "InterpolationOptions.hxx"
#include "DECOptions.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ElementLocator;
{
public:
- InterpolationMatrix(const ParaMEDMEM::ParaFIELD *source_field,
+ InterpolationMatrix(const MEDCoupling::ParaFIELD *source_field,
const ProcessorGroup& source_group,
const ProcessorGroup& target_group,
const DECOptions& dec_opt,
private:
bool isSurfaceComputationNeeded(const std::string& method) const;
private:
- const ParaMEDMEM::ParaFIELD *_source_field;
+ const MEDCoupling::ParaFIELD *_source_field;
std::vector<int> _row_offsets;
std::map<std::pair<int,int>, int > _col_offsets;
MEDCouplingPointSet *_source_support;
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
LinearTimeInterpolator::LinearTimeInterpolator( double InterpPrecision, int nStepBefore,
#include <map>
#include <iostream>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DEC;
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/**!
\anchor MPIAccess-det
{
//initialization
MPI_Init(&argc, &argv);
- ParaMEDMEM::CommInterface comm_interface;
+ MEDCoupling::CommInterface comm_interface;
//setting up a processor group with proc 0
set<int> procs;
procs.insert(0);
- ParaMEDMEM::ProcessorGroup group(procs, comm_interface);
+ MEDCoupling::ProcessorGroup group(procs, comm_interface);
- ParaMEDMEM::MPIAccess mpi_access(group);
+ MEDCoupling::MPIAccess mpi_access(group);
//cleanup
MPI_Finalize();
source = aMPIStatus.MPI_SOURCE ;
MPITag = aMPIStatus.MPI_TAG ;
int MethodId = (MPITag % MODULO_TAG) ;
- myDatatype = datatype( (ParaMEDMEM::_MessageIdent) MethodId ) ;
+ myDatatype = datatype( (MEDCoupling::_MessageIdent) MethodId ) ;
_comm_interface.getCount(&aMPIStatus, myDatatype, &outcount ) ;
if ( _trace )
cout << "MPIAccess::Probe" << _my_rank << " FromSource " << FromSource
source = aMPIStatus.MPI_SOURCE ;
MPITag = aMPIStatus.MPI_TAG ;
int MethodId = (MPITag % MODULO_TAG) ;
- myDataType = datatype( (ParaMEDMEM::_MessageIdent) MethodId ) ;
+ myDataType = datatype( (MEDCoupling::_MessageIdent) MethodId ) ;
_comm_interface.getCount(&aMPIStatus, myDataType, &outcount ) ;
if ( _trace )
cout << "MPIAccess::IProbe" << _my_rank << " FromSource " << FromSource
#include <vector>
#include <iostream>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
typedef struct
{
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
procs.insert(i) ;
}
MPIProcessorGroup *mpilg = static_cast<MPIProcessorGroup *>(const_cast<ProcessorGroup *>(&source_group));
- _MPI_union_group = new ParaMEDMEM::MPIProcessorGroup( union_group->getCommInterface(),procs,mpilg->getWorldComm());
+ _MPI_union_group = new MEDCoupling::MPIProcessorGroup( union_group->getCommInterface(),procs,mpilg->getWorldComm());
delete union_group ;
_my_rank = _MPI_union_group->myRank() ;
_group_size = _MPI_union_group->size() ;
#include <map>
#include <iostream>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*
* Internal class, not part of the public API.
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
\anchor MPIProcessorGroup-det
#include <set>
#include <mpi.h>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class CommInterface;
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
MxN_Mapping::MxN_Mapping(const ProcessorGroup& source_group, const ProcessorGroup& target_group,const DECOptions& dec_options)
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ProcessorGroup;
#include <fvm_locator.h>
}
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
if (_source_group->containsMyRank())
{
MEDMEM::MESH* mesh = _local_field->getField()->getSupport()->getMesh();
- fvm_nodal_t* source_nodal = ParaMEDMEM::medmemMeshToFVMMesh(mesh);
+ fvm_nodal_t* source_nodal = MEDCoupling::medmemMeshToFVMMesh(mesh);
int target_size = _target_group->size() ;
int start_rank= _source_group->size();
{
MEDMEM::MESH* mesh = _local_field->getField()->getSupport()->getMesh();
- fvm_nodal_t* target_nodal = ParaMEDMEM::medmemMeshToFVMMesh(mesh);
+ fvm_nodal_t* target_nodal = MEDCoupling::medmemMeshToFVMMesh(mesh);
int source_size = _source_group->size();
int start_rank= 0 ;
const MPI_Comm* comm = (dynamic_cast<const MPIProcessorGroup*> (_union_group))->getComm();
typedef enum {NN} InterpolationMethod;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class NonCoincidentDEC : public DEC
{
#include "OverlapElementLocator.hxx"
#include "OverlapInterpolationMatrix.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
\anchor OverlapDEC-det
Here the pair (0,2) does not appear because the bounding box of fieldtemplateA of proc#2 does
not intersect that of fieldtemplate B on proc#0.
- Stage performed by ParaMEDMEM::OverlapElementLocator::computeBoundingBoxes.
+ Stage performed by MEDCoupling::OverlapElementLocator::computeBoundingBoxes.
\subsection ParaMEDMEMOverlapDECAlgoStep2 Step 2 : Computation of local TODO list
keep track of the ids sent to proc \#m for te matrix-vector computation.
This is incarnated by OverlapMapping::keepTracksOfSourceIds in proc k.
- This step is performed in ParaMEDMEM::OverlapElementLocator::exchangeMeshes method.
+ This step is performed in MEDCoupling::OverlapElementLocator::exchangeMeshes method.
\subsection ParaMEDMEMOverlapDECAlgoStep4 Step 4 : Computation of the interpolation matrix
the \b local TODO list per proc is expected to
be as well balanced as possible.
- The interpolation is performed as the \ref ParaMEDMEM::MEDCouplingRemapper "remapper" does.
+ The interpolation is performed as the \ref MEDCoupling::MEDCouplingRemapper "remapper" does.
This operation is performed by OverlapInterpolationMatrix::addContribution method.
is equal to k.
After this step, the matrix repartition is the following after a call to
- ParaMEDMEM::OverlapMapping::prepare :
+ MEDCoupling::OverlapMapping::prepare :
- proc\#0 : (0,0),(1,0),(2,0)
- proc\#1 : (0,1),(2,1)
"prepare". This is an example of item 0 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2".
Tuple (0,1) computed on proc 1 is stored in proc 1 too. This is an example of item 1 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2".
- In the end ParaMEDMEM::OverlapMapping::_proc_ids_to_send_vector_st will contain :
+ In the end MEDCoupling::OverlapMapping::_proc_ids_to_send_vector_st will contain :
- Proc\#0 : 0,1
- Proc\#1 : 0,2
- Proc\#2 : 0,1,2
- In the end ParaMEDMEM::OverlapMapping::_proc_ids_to_recv_vector_st will contain :
+ In the end MEDCoupling::OverlapMapping::_proc_ids_to_recv_vector_st will contain :
- Proc\#0 : 0,1,2
- Proc\#1 : 0,2
- Proc\#2 : 1,2
- The method in charge to perform this is : ParaMEDMEM::OverlapMapping::prepare.
+ The method in charge to perform this is : MEDCoupling::OverlapMapping::prepare.
*/
OverlapDEC::OverlapDEC(const std::set<int>& procIds, const MPI_Comm& world_comm):
_load_balancing_algo(1),
_default_field_value(0.0),
_comm(MPI_COMM_NULL)
{
- ParaMEDMEM::CommInterface comm;
+ MEDCoupling::CommInterface comm;
int *ranks_world=new int[procIds.size()]; // ranks of sources and targets in world_comm
std::copy(procIds.begin(),procIds.end(),ranks_world);
MPI_Group group,world_group;
delete _locator;
if (_comm != MPI_COMM_NULL)
{
- ParaMEDMEM::CommInterface comm;
+ MEDCoupling::CommInterface comm;
comm.commFree(&_comm);
}
}
#include <mpi.h>
#include <string>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class OverlapInterpolationMatrix;
class OverlapElementLocator;
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
const int OverlapElementLocator::START_TAG_MESH_XCH = 1140;
//#define DEC_DEBUG
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ParaFIELD;
class ProcessorGroup;
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
OverlapInterpolationMatrix::OverlapInterpolationMatrix(ParaFIELD *source_field,
ParaFIELD *target_field,
#include "InterpolationOptions.hxx"
#include "DECOptions.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ParaFIELD;
class MEDCouplingPointSet;
#include <numeric>
#include <algorithm>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
OverlapMapping::OverlapMapping(const ProcessorGroup& group, const OverlapElementLocator & loc):
_group(group),_locator(loc)
#include <map>
//#define DEC_DEBUG
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ProcessorGroup;
class DataArrayInt;
#include <numeric>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
\anchor ParaFIELD-det
#include "MEDCouplingRefCountObject.hxx"
#include "ComponentTopology.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArrayInt;
class ParaMESH;
ParaFIELD(MEDCouplingFieldDouble* field, ParaMESH *sup, const ProcessorGroup& group);
virtual ~ParaFIELD();
- void synchronizeTarget( ParaMEDMEM::ParaFIELD* source_field);
- void synchronizeSource( ParaMEDMEM::ParaFIELD* target_field);
+ void synchronizeTarget( MEDCoupling::ParaFIELD* source_field);
+ void synchronizeSource( MEDCoupling::ParaFIELD* target_field);
MEDCouplingFieldDouble* getField() const { return _field; }
void setOwnSupport(bool v) const { _own_support=v; }
DataArrayInt* returnCumulativeGlobalNumbering() const;
private:
MEDCouplingFieldDouble* _field;
- ParaMEDMEM::ComponentTopology _component_topology;
+ MEDCoupling::ComponentTopology _component_topology;
Topology* _topology;
mutable bool _own_support;
ParaMESH* _support;
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
ParaGRID::ParaGRID(MEDCouplingCMesh* global_grid, Topology* topology) throw(INTERP_KERNEL::Exception) :
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class Topology;
class BlockTopology;
private:
MEDCouplingCMesh* _grid;
// structured grid topology
- ParaMEDMEM::BlockTopology* _block_topology;
+ MEDCoupling::BlockTopology* _block_topology;
// stores the x,y,z axes on the global grid
std::vector<std::vector<double> > _global_axis;
//id of the local grid
//inclusion for the namespaces
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
ParaMESH::ParaMESH( MEDCouplingPointSet *subdomain_mesh, MEDCouplingPointSet *subdomain_face,
DataArrayInt *CorrespElt_local2global, DataArrayInt *CorrespFace_local2global,
#include <string>
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class Topology;
class BlockTopology;
int _my_domain_id;
//global topology of the cells
- ParaMEDMEM::BlockTopology* _block_topology;
+ MEDCoupling::BlockTopology* _block_topology;
Topology* _explicit_topology;
// pointers to global numberings
DataArrayInt* _node_global;
#include "ProcessorGroup.hxx"
#include "InterpolationUtils.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
ProcessorGroup::ProcessorGroup (const CommInterface& interface, int start, int end):_comm_interface(interface)
{
#include <set>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
* Abstract class defining a group of processors (computation nodes) in a parallel run of a code.
using namespace std;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
#include "BlockTopology.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DEC;
class BlockTopology;
#include "TimeInterpolator.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
TimeInterpolator::TimeInterpolator( double InterpPrecision, int nStepBefore, int nStepAfter )
{
#include <map>
#include <iostream>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
/*!
#include "Topology.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
Topology::Topology()
{
#ifndef __TOPOLOGY_HXX__
#define __TOPOLOGY_HXX__
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ProcessorGroup;
void testBasicMPI2_1();
};
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPI2ParaMEDMEMTest::testBasicMPI2_1()
{
MPI_Comm gcom;
std::string service = "SERVICE";
std::ostringstream meshfilename, meshname;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::MEDCouplingUMesh *mesh;
- ParaMEDMEM::ParaFIELD *parafield=0;
- ParaMEDMEM::CommInterface *interface;
- ParaMEDMEM::MPIProcessorGroup *source, *target;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::MEDCouplingUMesh *mesh;
+ MEDCoupling::ParaFIELD *parafield=0;
+ MEDCoupling::CommInterface *interface;
+ MEDCoupling::MPIProcessorGroup *source, *target;
MPI_Comm_size( MPI_COMM_WORLD, &lsize );
MPI_Comm_rank( MPI_COMM_WORLD, &lrank );
CPPUNIT_ASSERT(false);
return;
}
- interface = new ParaMEDMEM::CommInterface;
- source = new ParaMEDMEM::MPIProcessorGroup(*interface,0,lsize-1,gcom);
- target = new ParaMEDMEM::MPIProcessorGroup(*interface,lsize,gsize-1,gcom);
+ interface = new MEDCoupling::CommInterface;
+ source = new MEDCoupling::MPIProcessorGroup(*interface,0,lsize-1,gcom);
+ target = new MEDCoupling::MPIProcessorGroup(*interface,lsize,gsize-1,gcom);
const double sourceCoordsAll[2][8]={{0.4,0.5,0.4,1.5,1.6,1.5,1.6,0.5},
{0.3,-0.5,1.6,-0.5,1.6,-1.5,0.3,-1.5}};
mesh->setCoords(myCoords);
myCoords->decrRef();
paramesh=new ParaMESH(mesh,*source,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
double *value=parafield->getField()->getArray()->getPointer();
value[0]=34+13*((double)grank);
- ParaMEDMEM::InterpKernelDEC dec(*source,*target);
+ MEDCoupling::InterpKernelDEC dec(*source,*target);
parafield->getField()->setNature(ConservativeVolumic);
void testBasicMPI2_1();
};
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPI2ParaMEDMEMTest::testBasicMPI2_1()
{
MPI_Comm gcom;
std::string service = "SERVICE";
std::ostringstream meshfilename, meshname;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::MEDCouplingUMesh* mesh;
- ParaMEDMEM::ParaFIELD *parafield=0;
- ParaMEDMEM::CommInterface* interface;
- ParaMEDMEM::MPIProcessorGroup* source, *target;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::MEDCouplingUMesh* mesh;
+ MEDCoupling::ParaFIELD *parafield=0;
+ MEDCoupling::CommInterface* interface;
+ MEDCoupling::MPIProcessorGroup* source, *target;
MPI_Comm_size( MPI_COMM_WORLD, &lsize );
MPI_Comm_rank( MPI_COMM_WORLD, &lrank );
return;
}
- interface = new ParaMEDMEM::CommInterface;
- source = new ParaMEDMEM::MPIProcessorGroup(*interface,0,gsize-lsize-1,gcom);
- target = new ParaMEDMEM::MPIProcessorGroup(*interface,gsize-lsize,gsize-1,gcom);
+ interface = new MEDCoupling::CommInterface;
+ source = new MEDCoupling::MPIProcessorGroup(*interface,0,gsize-lsize-1,gcom);
+ target = new MEDCoupling::MPIProcessorGroup(*interface,gsize-lsize,gsize-1,gcom);
const double targetCoordsAll[3][16]={{0.7,1.45,0.7,1.65,0.9,1.65,0.9,1.45, 1.1,1.4,1.1,1.6,1.3,1.6,1.3,1.4},
{0.7,-0.6,0.7,0.7,0.9,0.7,0.9,-0.6, 1.1,-0.7,1.1,0.6,1.3,0.6,1.3,-0.7},
mesh->setCoords(myCoords);
myCoords->decrRef();
paramesh=new ParaMESH (mesh,*target,"target mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- ParaMEDMEM::InterpKernelDEC dec(*source,*target);
+ MEDCoupling::InterpKernelDEC dec(*source,*target);
parafield->getField()->setNature(ConservativeVolumic);
dec.setMethod("P0");
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
/*
* Check methods defined in BlockTopology.hxx
#include <set>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void ParaMEDMEMTest::testFabienAPI1()
{
int procs_target_c[1]={1};
std::set<int> procs_target(procs_target_c,procs_target_c+1);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD *parafield=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD *parafield=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
MPI_Barrier(MPI_COMM_WORLD);
double targetCoords[8]={ 0.,0., 1., 0., 0., 1., 1., 1. };
CommInterface comm;
//
- ParaMEDMEM::InterpKernelDEC *dec=new ParaMEDMEM::InterpKernelDEC(procs_source,procs_target);
+ MEDCoupling::InterpKernelDEC *dec=new MEDCoupling::InterpKernelDEC(procs_source,procs_target);
if(dec->isInSourceSide())
{
mesh=MEDCouplingUMesh::New();
mesh->allocateCells(1);
mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
mesh->finishInsertingCells();
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*dec->getSourceGrp(),"source mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafield->getField()->setNature(ConservativeVolumic);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3);
mesh->finishInsertingCells();
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*dec->getTargetGrp(),"target mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafield->getField()->setNature(ConservativeVolumic);
int procs_target_c[1]={1};
std::set<int> procs_target(procs_target_c,procs_target_c+1);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD *parafield=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD *parafield=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
MPI_Barrier(MPI_COMM_WORLD);
double targetCoords[8]={ 0.,0., 1., 0., 0., 1., 1., 1. };
CommInterface comm;
//
- ParaMEDMEM::InterpKernelDEC *dec=new ParaMEDMEM::InterpKernelDEC(procs_source,procs_target);
+ MEDCoupling::InterpKernelDEC *dec=new MEDCoupling::InterpKernelDEC(procs_source,procs_target);
if(dec->isInSourceSide())
{
mesh=MEDCouplingUMesh::New();
mesh->allocateCells(1);
mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
mesh->finishInsertingCells();
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*dec->getSourceGrp(),"source mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafield->getField()->setNature(ConservativeVolumic);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3);
mesh->finishInsertingCells();
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*dec->getTargetGrp(),"target mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafield->getField()->setNature(ConservativeVolumic);
#include <math.h>
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace ICoCo;
void afficheGauthier1(const ParaFIELD& field, const double *vals, int lgth)
for (int rec=0;rec<2;rec++)
{
InterpKernelDEC dec_emetteur(emetteur_group, recepteur_group);
- ParaMEDMEM::ParaFIELD *champ_emetteur(0),*champ_recepteur(0);
- ParaMEDMEM::ParaMESH *paramesh(0);
+ MEDCoupling::ParaFIELD *champ_emetteur(0),*champ_recepteur(0);
+ MEDCoupling::ParaMESH *paramesh(0);
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mesh;
dec_emetteur.setOrientation(2);
if (send==0)
{
mesh=init_triangleGauthier1(is_master);
}
- paramesh=new ParaMEDMEM::ParaMESH(mesh,recepteur_group.containsMyRank()?recepteur_group:emetteur_group,"emetteur mesh");
- ParaMEDMEM::ComponentTopology comptopo;
- champ_emetteur=new ParaMEDMEM::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
+ paramesh=new MEDCoupling::ParaMESH(mesh,recepteur_group.containsMyRank()?recepteur_group:emetteur_group,"emetteur mesh");
+ MEDCoupling::ComponentTopology comptopo;
+ champ_emetteur=new MEDCoupling::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
champ_emetteur->getField()->setNature(ConservativeVolumic);
champ_emetteur->setOwnSupport(true);
if (rec==0)
{
mesh=init_quadGauthier1(is_master);
}
- paramesh=new ParaMEDMEM::ParaMESH(mesh,recepteur_group.containsMyRank()?recepteur_group:emetteur_group,"recepteur mesh");
- champ_recepteur=new ParaMEDMEM::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
+ paramesh=new MEDCoupling::ParaMESH(mesh,recepteur_group.containsMyRank()?recepteur_group:emetteur_group,"recepteur mesh");
+ champ_recepteur=new MEDCoupling::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
champ_recepteur->getField()->setNature(ConservativeVolumic);
champ_recepteur->setOwnSupport(true);
if (cas=="emetteur")
MPIProcessorGroup entree_chaude_group(comm,entree_chaude_ids);
MPIProcessorGroup Genepi_group(comm,Genepi_ids);
- ParaMEDMEM::ParaFIELD *vitesse(0);
+ MEDCoupling::ParaFIELD *vitesse(0);
InterpKernelDEC dec_vit_in_chaude(entree_chaude_group, Genepi_group);
if ( entree_chaude_group.containsMyRank())
arr=DataArrayDouble::New(); arr->alloc(63,3);
std::copy(valsOfField,valsOfField+189,arr->getPointer());
f->setArray(arr); f->setNature(ConservativeVolumic);
- ParaMEDMEM::ParaMESH *paramesh(new ParaMEDMEM::ParaMESH(mesh,entree_chaude_group,"emetteur mesh"));
- vitesse=new ParaMEDMEM::ParaFIELD(f,paramesh,entree_chaude_group);
+ MEDCoupling::ParaMESH *paramesh(new MEDCoupling::ParaMESH(mesh,entree_chaude_group,"emetteur mesh"));
+ vitesse=new MEDCoupling::ParaFIELD(f,paramesh,entree_chaude_group);
vitesse->setOwnSupport(true);
dec_vit_in_chaude.setMethod("P1");
}
f->setMesh(mesh); f->setName("vitesse_in_chaude");
arr=DataArrayDouble::New(); arr->alloc(f->getNumberOfTuplesExpected()*3); arr->fillWithZero(); arr->rearrange(3);
f->setArray(arr); f->setNature(ConservativeVolumic);
- ParaMEDMEM::ParaMESH *paramesh(new ParaMEDMEM::ParaMESH(mesh,Genepi_group,"recepteur mesh"));
- vitesse=new ParaMEDMEM::ParaFIELD(f,paramesh,Genepi_group);
+ MEDCoupling::ParaMESH *paramesh(new MEDCoupling::ParaMESH(mesh,Genepi_group,"recepteur mesh"));
+ vitesse=new MEDCoupling::ParaFIELD(f,paramesh,Genepi_group);
vitesse->setOwnSupport(true);
dec_vit_in_chaude.setMethod(f->getDiscretization()->getRepr());
}
std::vector<InterpKernelDEC> decu(1);
decu[0]=InterpKernelDEC(emetteur_group,recepteur_group);
InterpKernelDEC& dec_emetteur=decu[0];
- ParaMEDMEM::ParaFIELD *champ_emetteur(0),*champ_recepteur(0);
- ParaMEDMEM::ParaMESH *paramesh(0);
+ MEDCoupling::ParaFIELD *champ_emetteur(0),*champ_recepteur(0);
+ MEDCoupling::ParaMESH *paramesh(0);
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mesh;
dec_emetteur.setOrientation(2);
if (send==0)
{
mesh=init_triangleGauthier1(is_master);
}
- paramesh=new ParaMEDMEM::ParaMESH(mesh,recepteur_group.containsMyRank()?recepteur_group:emetteur_group,"emetteur mesh");
- ParaMEDMEM::ComponentTopology comptopo;
- champ_emetteur=new ParaMEDMEM::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
+ paramesh=new MEDCoupling::ParaMESH(mesh,recepteur_group.containsMyRank()?recepteur_group:emetteur_group,"emetteur mesh");
+ MEDCoupling::ComponentTopology comptopo;
+ champ_emetteur=new MEDCoupling::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
champ_emetteur->getField()->setNature(ConservativeVolumic);
champ_emetteur->setOwnSupport(true);
if (rec==0)
{
mesh=init_quadGauthier1(is_master);
}
- paramesh=new ParaMEDMEM::ParaMESH(mesh,recepteur_group.containsMyRank()?recepteur_group:emetteur_group,"recepteur mesh");
- champ_recepteur=new ParaMEDMEM::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
+ paramesh=new MEDCoupling::ParaMESH(mesh,recepteur_group.containsMyRank()?recepteur_group:emetteur_group,"recepteur mesh");
+ champ_recepteur=new MEDCoupling::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
champ_recepteur->getField()->setNature(ConservativeVolumic);
champ_recepteur->setOwnSupport(true);
if (cas=="emetteur")
procs_target.insert(i);
self_procs.insert(rank);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD* parafield=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD* parafield=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
- ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//
MPI_Barrier(MPI_COMM_WORLD);
if(source_group->containsMyRank())
mesh->setCoords(myCoords);
myCoords->decrRef();
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh,comptopo);
double *value=parafield->getField()->getArray()->getPointer();
std::copy(sourceVals,sourceVals+19,value);
mesh->setCoords(myCoords);
myCoords->decrRef();
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
}
else if(rank==2)
mesh->setCoords(myCoords);
myCoords->decrRef();
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
}
}
//test 1 - primaire -> secondaire
- ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
dec.setIntersectionType(INTERP_KERNEL::PointLocator);
parafield->getField()->setNature(ConservativeVolumic);//very important
if (source_group->containsMyRank())
#include <assert.h>
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace ICoCo;
typedef enum {sync_and,sync_or} synctype;
InterpKernelDEC dec_emetteur(emetteur_group,recepteur_group);
dec_emetteur.setOrientation(2);
- ParaMEDMEM::ParaFIELD *champ_emetteur(0),*champ_recepteur(0);
- ParaMEDMEM::ParaMESH *paramesh(0);
+ MEDCoupling::ParaFIELD *champ_emetteur(0),*champ_recepteur(0);
+ MEDCoupling::ParaMESH *paramesh(0);
if (cas=="emetteur")
{
- MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingUMesh> mesh_emetteur(init_triangle());
- paramesh=new ParaMEDMEM::ParaMESH(mesh_emetteur,emetteur_group,"emetteur mesh");
- ParaMEDMEM::ComponentTopology comptopo;
- champ_emetteur=new ParaMEDMEM::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
+ MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDCouplingUMesh> mesh_emetteur(init_triangle());
+ paramesh=new MEDCoupling::ParaMESH(mesh_emetteur,emetteur_group,"emetteur mesh");
+ MEDCoupling::ComponentTopology comptopo;
+ champ_emetteur=new MEDCoupling::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
champ_emetteur->getField()->setNature(ConservativeVolumic);
champ_emetteur->setOwnSupport(true);
champ_emetteur->getField()->getArray()->fillWithValue(1.);
}
else
{
- MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingUMesh> mesh_recepteur(init_quad());
- paramesh=new ParaMEDMEM::ParaMESH(mesh_recepteur,recepteur_group,"recepteur mesh");
- ParaMEDMEM::ComponentTopology comptopo;
- champ_recepteur=new ParaMEDMEM::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
+ MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDCouplingUMesh> mesh_recepteur(init_quad());
+ paramesh=new MEDCoupling::ParaMESH(mesh_recepteur,recepteur_group,"recepteur mesh");
+ MEDCoupling::ComponentTopology comptopo;
+ champ_recepteur=new MEDCoupling::ParaFIELD(ON_CELLS,ONE_TIME,paramesh,comptopo);
champ_recepteur->getField()->setNature(ConservativeVolumic);
champ_recepteur->setOwnSupport(true);
}
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void ParaMEDMEMTest::testInterpKernelDEC_2D()
{
procs_target.insert(i);
self_procs.insert(rank);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD *parafieldP0=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD *parafieldP0=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
- ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//
MPI_Barrier(MPI_COMM_WORLD);
if(source_group->containsMyRank())
myCoords->decrRef();
}
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
double *valueP0=parafieldP0->getField()->getArray()->getPointer();
parafieldP0->getField()->setNature(ConservativeVolumic);
myCoords->decrRef();
paramesh=new ParaMESH(mesh,*target_group,targetMeshName);
}
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafieldP0->getField()->setNature(ConservativeVolumic);
}
// test 1
- ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
if (source_group->containsMyRank())
{
dec.setMethod("P0");
procs_target.insert(i);
self_procs.insert(rank);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD *parafieldP0=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD *parafieldP0=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
- ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//
MPI_Barrier(MPI_COMM_WORLD);
if(source_group->containsMyRank())
myCoords->decrRef();
}
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
double *valueP0=parafieldP0->getField()->getArray()->getPointer();
parafieldP0->getField()->setNature(ConservativeVolumic);
myCoords->decrRef();
paramesh=new ParaMESH(mesh,*target_group,targetMeshName);
}
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafieldP0->getField()->setNature(ConservativeVolumic);
}
// test 1
- ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
if (source_group->containsMyRank())
{
dec.setMethod("P0");
procs_target.insert(i);
self_procs.insert(rank);
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
- ParaMEDMEM::ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ParaMEDMEM::ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ParaMEDMEM::ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ MEDCoupling::ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ MEDCoupling::ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ MEDCoupling::ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//loading the geometry for the source group
- ParaMEDMEM::InterpKernelDEC dec (*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec (*source_group,*target_group);
- ParaMEDMEM::MEDCouplingUMesh* mesh;
- ParaMEDMEM::ParaMESH* paramesh;
- ParaMEDMEM::ParaFIELD* parafield;
+ MEDCoupling::MEDCouplingUMesh* mesh;
+ MEDCoupling::ParaMESH* paramesh;
+ MEDCoupling::ParaFIELD* parafield;
ICoCo::MEDField* icocofield ;
string filename_xml1 = "square1_split";
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
- // ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT( support,*source_group);
- ParaMEDMEM::ComponentTopology comptopo;
+ // MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT( support,*source_group);
+ MEDCoupling::ComponentTopology comptopo;
if(srcM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
- // ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
- ParaMEDMEM::ComponentTopology comptopo;
+ // MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
+ MEDCoupling::ComponentTopology comptopo;
if(targetM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
procs_target.insert(i);
self_procs.insert(rank);
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
- ParaMEDMEM::ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ParaMEDMEM::ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ParaMEDMEM::ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ MEDCoupling::ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ MEDCoupling::ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ MEDCoupling::ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//loading the geometry for the source group
- ParaMEDMEM::InterpKernelDEC dec (*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec (*source_group,*target_group);
- ParaMEDMEM::MEDCouplingUMesh* mesh;
- ParaMEDMEM::MEDCouplingFieldDouble* mcfield;
+ MEDCoupling::MEDCouplingUMesh* mesh;
+ MEDCoupling::MEDCouplingFieldDouble* mcfield;
string filename_xml1 = "square1_split";
string filename_xml2 = "square2_split";
meshname<< "Mesh_2_"<< rank+1;
mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
if(srcM=="P0")
{
mcfield = MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
ostringstream meshname ;
meshname<< "Mesh_3_"<<rank-nproc_source+1;
mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
if(targetM=="P0")
{
mcfield = MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
procs_target.insert(i);
self_procs.insert(rank);
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
- ParaMEDMEM::ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ParaMEDMEM::ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ParaMEDMEM::ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ MEDCoupling::ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ MEDCoupling::ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ MEDCoupling::ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//loading the geometry for the source group
- ParaMEDMEM::InterpKernelDEC dec (*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec (*source_group,*target_group);
- ParaMEDMEM::MEDCouplingUMesh* mesh;
- ParaMEDMEM::ParaMESH* paramesh;
- ParaMEDMEM::ParaFIELD* parafield;
+ MEDCoupling::MEDCouplingUMesh* mesh;
+ MEDCoupling::ParaMESH* paramesh;
+ MEDCoupling::ParaFIELD* parafield;
ICoCo::MEDField* icocofield ;
char * tmp_dir_c = getenv("TMP");
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
- // ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT( support,*source_group);
- ParaMEDMEM::ComponentTopology comptopo;
+ // MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT( support,*source_group);
+ MEDCoupling::ComponentTopology comptopo;
if(srcM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
- // ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
- ParaMEDMEM::ComponentTopology comptopo;
+ // MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
+ MEDCoupling::ComponentTopology comptopo;
if(targetM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
procs_target.insert(i);
self_procs.insert(rank);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD* parafield=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD* parafield=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
- ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//
MPI_Barrier(MPI_COMM_WORLD);
if(source_group->containsMyRank())
mesh->setCoords(myCoords);
myCoords->decrRef();
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
double *value=parafield->getField()->getArray()->getPointer();
value[0]=34+13*((double)rank);
mesh->setCoords(myCoords);
myCoords->decrRef();
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
}
//test 1 - Conservative volumic
- ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
parafield->getField()->setNature(ConservativeVolumic);
if (source_group->containsMyRank())
{
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13);
}
//test 2 - Integral
- ParaMEDMEM::InterpKernelDEC dec2(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec2(*source_group,*target_group);
parafield->getField()->setNature(Integral);
if (source_group->containsMyRank())
{
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13);
}
//test 3 - Integral with global constraint
- ParaMEDMEM::InterpKernelDEC dec3(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec3(*source_group,*target_group);
parafield->getField()->setNature(IntegralGlobConstraint);
if (source_group->containsMyRank())
{
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13);
}
//test 4 - RevIntegral
- ParaMEDMEM::InterpKernelDEC dec4(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec4(*source_group,*target_group);
parafield->getField()->setNature(RevIntegral);
if (source_group->containsMyRank())
{
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13);
}
//test 5 - Conservative volumic reversed
- ParaMEDMEM::InterpKernelDEC dec5(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec5(*source_group,*target_group);
parafield->getField()->setNature(ConservativeVolumic);
if (source_group->containsMyRank())
{
dec5.sendData();
}
//test 6 - Integral reversed
- ParaMEDMEM::InterpKernelDEC dec6(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec6(*source_group,*target_group);
parafield->getField()->setNature(Integral);
if (source_group->containsMyRank())
{
dec6.sendData();
}
//test 7 - Integral with global constraint reversed
- ParaMEDMEM::InterpKernelDEC dec7(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec7(*source_group,*target_group);
parafield->getField()->setNature(IntegralGlobConstraint);
if (source_group->containsMyRank())
{
dec7.sendData();
}
//test 8 - Integral with RevIntegral reversed
- ParaMEDMEM::InterpKernelDEC dec8(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec8(*source_group,*target_group);
parafield->getField()->setNature(RevIntegral);
if (source_group->containsMyRank())
{
procs_target.insert(i);
self_procs.insert(rank);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD *parafieldP0=0,*parafieldP1=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD *parafieldP0=0,*parafieldP1=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
- ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//
MPI_Barrier(MPI_COMM_WORLD);
if(source_group->containsMyRank())
myCoords->decrRef();
}
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafieldP1 = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
double *valueP0=parafieldP0->getField()->getArray()->getPointer();
paramesh->setNodeGlobal(da);
da->decrRef();
}
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafieldP1 = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
parafieldP0->getField()->setNature(ConservativeVolumic);
parafieldP1->getField()->setNature(ConservativeVolumic);
}
// test 1 - P0 P1
- ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
if (source_group->containsMyRank())
{
dec.setMethod("P0");
for (int i=nproc_source;i<size; i++)
procs_target.insert(i);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD *parafield=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD *parafield=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
- ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//
MPI_Barrier(MPI_COMM_WORLD);
if(source_group->containsMyRank())
mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+7);
mesh->finishInsertingCells();
}
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafield->getField()->setNature(ConservativeVolumic);
else
{
mesh=MEDCouplingUMesh::New("an example of -1 D mesh",-1);
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*target_group,"target mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafield->getField()->setNature(ConservativeVolumic);
}
- ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
if(source_group->containsMyRank())
{
dec.setMethod("P0");
CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[0],1e-12);
dec.sendData();
}
- ParaMEDMEM::InterpKernelDEC dec2(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec2(*source_group,*target_group);
dec2.setMethod("P0");
parafield->getField()->setNature(IntegralGlobConstraint);
if(source_group->containsMyRank())
dec2.sendData();
}
//
- ParaMEDMEM::InterpKernelDEC dec3(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec3(*source_group,*target_group);
dec3.setMethod("P0");
parafield->getField()->setNature(Integral);
if(source_group->containsMyRank())
dec3.sendData();
}
//
- ParaMEDMEM::InterpKernelDEC dec4(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec4(*source_group,*target_group);
dec4.setMethod("P0");
parafield->getField()->setNature(RevIntegral);
if(source_group->containsMyRank())
procs_source.insert(0);
procs_target.insert(1);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD *parafield=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD *parafield=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
MPI_Barrier(MPI_COMM_WORLD);
double targetCoords[8]={ 0.,0., 1., 0., 0., 1., 1., 1. };
ProcessorGroup* target_group=0;
ProcessorGroup* source_group=0;
//
- ParaMEDMEM::InterpKernelDEC *dec=0;
+ MEDCoupling::InterpKernelDEC *dec=0;
if(rank==0 || rank==1)
{
- target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target,partialComm);
- source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source,partialComm);
+ target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target,partialComm);
+ source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source,partialComm);
if(source_group->containsMyRank())
{
mesh=MEDCouplingUMesh::New();
mesh->allocateCells(1);
mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
mesh->finishInsertingCells();
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafield->getField()->setNature(ConservativeVolumic);
double *vals=parafield->getField()->getArray()->getPointer();
vals[0]=7.;
- dec=new ParaMEDMEM::InterpKernelDEC(*source_group,*target_group);
+ dec=new MEDCoupling::InterpKernelDEC(*source_group,*target_group);
dec->attachLocalField(parafield);
dec->synchronize();
dec->sendData();
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3);
mesh->finishInsertingCells();
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*target_group,"target mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafield->getField()->setNature(ConservativeVolumic);
- dec=new ParaMEDMEM::InterpKernelDEC(*source_group,*target_group);
+ dec=new MEDCoupling::InterpKernelDEC(*source_group,*target_group);
dec->attachLocalField(parafield);
dec->synchronize();
dec->recvData();
procs_target.insert(i);
self_procs.insert(rank);
//
- ParaMEDMEM::MEDCouplingUMesh *mesh=0;
- ParaMEDMEM::ParaMESH *paramesh=0;
- ParaMEDMEM::ParaFIELD *parafieldP0=0;
+ MEDCoupling::MEDCouplingUMesh *mesh=0;
+ MEDCoupling::ParaMESH *paramesh=0;
+ MEDCoupling::ParaFIELD *parafieldP0=0;
//
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
//
- ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//
MPI_Barrier(MPI_COMM_WORLD);
if(source_group->containsMyRank())
myCoords->decrRef();
//
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
double *valueP0=parafieldP0->getField()->getArray()->getPointer();
parafieldP0->getField()->setNature(ConservativeVolumic);
myCoords->decrRef();
paramesh=new ParaMESH(mesh,*target_group,targetMeshName);
}
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafieldP0->getField()->setNature(ConservativeVolumic);
}
// test 1
- ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
if (source_group->containsMyRank())
{
dec.setMethod("P0");
procs_target.insert(i);
self_procs.insert(rank);
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
- ParaMEDMEM::ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ParaMEDMEM::ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ParaMEDMEM::ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ MEDCoupling::ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ MEDCoupling::ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ MEDCoupling::ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//loading the geometry for the source group
- ParaMEDMEM::InterpKernelDEC dec (*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec (*source_group,*target_group);
- ParaMEDMEM::MEDCouplingUMesh* mesh;
- ParaMEDMEM::ParaMESH* paramesh;
- ParaMEDMEM::ParaFIELD* parafield;
+ MEDCoupling::MEDCouplingUMesh* mesh;
+ MEDCoupling::ParaMESH* paramesh;
+ MEDCoupling::ParaFIELD* parafield;
ICoCo::MEDField* icocofield ;
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
- // ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT( support,*source_group);
- ParaMEDMEM::ComponentTopology comptopo;
+ // MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT( support,*source_group);
+ MEDCoupling::ComponentTopology comptopo;
if(srcM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
- // ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
- ParaMEDMEM::ComponentTopology comptopo;
+ // MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
+ MEDCoupling::ComponentTopology comptopo;
if(targetM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
using namespace std;
using namespace INTERP_KERNEL;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
/*
* Check methods defined in MPPIProcessorGroup.hxx
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace MEDMEM;
/*
procs_target.insert(i);
self_procs.insert(rank);
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
- ParaMEDMEM::ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ParaMEDMEM::ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ParaMEDMEM::ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ MEDCoupling::ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ MEDCoupling::ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ MEDCoupling::ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
- ParaMEDMEM::ParaMESH* source_mesh=0;
- ParaMEDMEM::ParaMESH* target_mesh=0;
- ParaMEDMEM::ParaSUPPORT* parasupport=0;
+ MEDCoupling::ParaMESH* source_mesh=0;
+ MEDCoupling::ParaMESH* target_mesh=0;
+ MEDCoupling::ParaSUPPORT* parasupport=0;
//loading the geometry for the source group
- ParaMEDMEM::NonCoincidentDEC dec (*source_group,*target_group);
+ MEDCoupling::NonCoincidentDEC dec (*source_group,*target_group);
MEDMEM::MESH* mesh;
MEDMEM::SUPPORT* support;
MEDMEM::FIELD<double>* field;
- ParaMEDMEM::ParaMESH* paramesh;
- ParaMEDMEM::ParaFIELD* parafield;
+ MEDCoupling::ParaMESH* paramesh;
+ MEDCoupling::ParaFIELD* parafield;
string filename_xml1 = getResourceFile(filename1);
string filename_xml2 = getResourceFile(filename2);
paramesh=new ParaMESH (*mesh,*source_group,"source mesh");
parasupport=new UnstructuredParaSUPPORT( support,*source_group);
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(parasupport, comptopo);
paramesh=new ParaMESH (*mesh,*target_group,"target mesh");
parasupport=new UnstructuredParaSUPPORT(support,*target_group);
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(parasupport, comptopo);
#include "MEDCouplingMemArray.hxx"
#include "MEDCouplingRemapper.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
typedef MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> MUMesh;
typedef MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> MFDouble;
//
//void ParaMEDMEMTest::testOverlapDEC_LMEC_para()
//{
-// using namespace ParaMEDMEM;
+// using namespace MEDCoupling;
//
// int size;
// int rank;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
/*
* Check methods defined in StructuredCoincidentDEC.hxx
return;
}
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
- ParaMEDMEM::MPIProcessorGroup self_group (interface,rank,rank);
- ParaMEDMEM::MPIProcessorGroup target_group(interface,3,size-1);
- ParaMEDMEM::MPIProcessorGroup source_group (interface,0,2);
+ MEDCoupling::MPIProcessorGroup self_group (interface,rank,rank);
+ MEDCoupling::MPIProcessorGroup target_group(interface,3,size-1);
+ MEDCoupling::MPIProcessorGroup source_group (interface,0,2);
- ParaMEDMEM::MEDCouplingUMesh* mesh;
- ParaMEDMEM::ParaMESH* paramesh;
- ParaMEDMEM::ParaFIELD* parafield;
+ MEDCoupling::MEDCouplingUMesh* mesh;
+ MEDCoupling::ParaMESH* paramesh;
+ MEDCoupling::ParaFIELD* parafield;
string filename_xml1 = INTERP_TEST::getResourceFile("square1_split");
string filename_2 = INTERP_TEST::getResourceFile("square1.med");
//loading the geometry for the source group
- ParaMEDMEM::StructuredCoincidentDEC dec(source_group, target_group);
+ MEDCoupling::StructuredCoincidentDEC dec(source_group, target_group);
MPI_Barrier(MPI_COMM_WORLD);
if (source_group.containsMyRank()) {
paramesh=new ParaMESH (mesh,source_group,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo(6);
+ MEDCoupling::ComponentTopology comptopo(6);
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
int nb_local=mesh->getNumberOfCells();
mesh = MEDLoader::ReadUMeshFromFile(filename_2.c_str(),meshname2.c_str(),0);
paramesh=new ParaMESH (mesh,self_group,"target mesh");
- ParaMEDMEM::ComponentTopology comptopo(6, &target_group);
+ MEDCoupling::ComponentTopology comptopo(6, &target_group);
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessDECTest::test_AllToAllDECSynchronousPointToPoint() {
test_AllToAllDEC( false ) ;
test_AllToAllDEC( true ) ;
}
-static void chksts( int sts , int myrank , ParaMEDMEM::MPIAccess mpi_access ) {
+static void chksts( int sts , int myrank , MEDCoupling::MPIAccess mpi_access ) {
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
if ( sts != MPI_SUCCESS ) {
debugStream << "test_AllToAllDEC" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
std::set<int> sourceprocs;
std::set<int> targetprocs;
int i ;
targetprocs.insert(i);
}
- ParaMEDMEM::MPIProcessorGroup* sourcegroup = new ParaMEDMEM::MPIProcessorGroup(interface,sourceprocs) ;
- ParaMEDMEM::MPIProcessorGroup* targetgroup = new ParaMEDMEM::MPIProcessorGroup(interface,targetprocs) ;
+ MEDCoupling::MPIProcessorGroup* sourcegroup = new MEDCoupling::MPIProcessorGroup(interface,sourceprocs) ;
+ MEDCoupling::MPIProcessorGroup* targetgroup = new MEDCoupling::MPIProcessorGroup(interface,targetprocs) ;
MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup ,
Asynchronous ) ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessDECTest::test_AllToAllTimeDECSynchronousPointToPoint() {
test_AllToAllTimeDEC( false ) ;
test_AllToAllTimeDEC( true ) ;
}
-static void chksts( int sts , int myrank , ParaMEDMEM::MPIAccess * mpi_access ) {
+static void chksts( int sts , int myrank , MEDCoupling::MPIAccess * mpi_access ) {
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
if ( sts != MPI_SUCCESS ) {
debugStream << "test_AllToAllTimeDEC" << myrank << " Asynchronous " << Asynchronous << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
std::set<int> sourceprocs;
std::set<int> targetprocs;
int i ;
targetprocs.insert(i);
}
- ParaMEDMEM::MPIProcessorGroup* sourcegroup = new ParaMEDMEM::MPIProcessorGroup(interface,sourceprocs) ;
- ParaMEDMEM::MPIProcessorGroup* targetgroup = new ParaMEDMEM::MPIProcessorGroup(interface,targetprocs) ;
+ MEDCoupling::MPIProcessorGroup* sourcegroup = new MEDCoupling::MPIProcessorGroup(interface,sourceprocs) ;
+ MEDCoupling::MPIProcessorGroup* targetgroup = new MEDCoupling::MPIProcessorGroup(interface,targetprocs) ;
// LinearTimeInterpolator * aLinearInterpDEC = new LinearTimeInterpolator( 0.5 ) ;
MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup ,
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessDECTest::test_AllToAllvDECSynchronousPointToPoint() {
test_AllToAllvDEC( false ) ;
test_AllToAllvDEC( true ) ;
}
-static void chksts( int sts , int myrank , ParaMEDMEM::MPIAccess mpi_access ) {
+static void chksts( int sts , int myrank , MEDCoupling::MPIAccess mpi_access ) {
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
if ( sts != MPI_SUCCESS ) {
debugStream << "test_AllToAllvDEC" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
std::set<int> sourceprocs;
std::set<int> targetprocs;
int i ;
targetprocs.insert(i);
}
- ParaMEDMEM::MPIProcessorGroup* sourcegroup = new ParaMEDMEM::MPIProcessorGroup(interface,sourceprocs) ;
- ParaMEDMEM::MPIProcessorGroup* targetgroup = new ParaMEDMEM::MPIProcessorGroup(interface,targetprocs) ;
+ MEDCoupling::MPIProcessorGroup* sourcegroup = new MEDCoupling::MPIProcessorGroup(interface,sourceprocs) ;
+ MEDCoupling::MPIProcessorGroup* targetgroup = new MEDCoupling::MPIProcessorGroup(interface,targetprocs) ;
MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup ,
Asynchronous ) ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessDECTest::test_AllToAllvTimeDECSynchronousNative() {
test_AllToAllvTimeDEC( false , true ) ;
test_AllToAllvTimeDEC( true , false ) ;
}
-static void chksts( int sts , int myrank , ParaMEDMEM::MPIAccess * mpi_access ) {
+static void chksts( int sts , int myrank , MEDCoupling::MPIAccess * mpi_access ) {
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
if ( sts != MPI_SUCCESS ) {
debugStream << "test_AllToAllvTimeDEC" << myrank << " Asynchronous " << Asynchronous
<< " UseMPI_Alltoallv " << UseMPI_Alltoallv << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
std::set<int> sourceprocs;
std::set<int> targetprocs;
int i ;
targetprocs.insert(i);
}
- ParaMEDMEM::MPIProcessorGroup* sourcegroup = new ParaMEDMEM::MPIProcessorGroup(interface,sourceprocs) ;
- ParaMEDMEM::MPIProcessorGroup* targetgroup = new ParaMEDMEM::MPIProcessorGroup(interface,targetprocs) ;
+ MEDCoupling::MPIProcessorGroup* sourcegroup = new MEDCoupling::MPIProcessorGroup(interface,sourceprocs) ;
+ MEDCoupling::MPIProcessorGroup* targetgroup = new MEDCoupling::MPIProcessorGroup(interface,targetprocs) ;
// TimeInterpolator * aLinearInterpDEC = new LinearTimeInterpolator( 0.5 ) ;
MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup ,
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessDECTest::test_AllToAllvTimeDoubleDECSynchronousPointToPoint() {
test_AllToAllvTimeDoubleDEC( false ) ;
test_AllToAllvTimeDoubleDEC( true ) ;
}
-static void chksts( int sts , int myrank , ParaMEDMEM::MPIAccess * mpi_access ) {
+static void chksts( int sts , int myrank , MEDCoupling::MPIAccess * mpi_access ) {
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
if ( sts != MPI_SUCCESS ) {
debugStream << "test_AllToAllvTimeDoubleDEC" << myrank << " Asynchronous " << Asynchronous << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
std::set<int> sourceprocs;
std::set<int> targetprocs;
int i ;
targetprocs.insert(i);
}
- ParaMEDMEM::MPIProcessorGroup* sourcegroup = new ParaMEDMEM::MPIProcessorGroup(interface,sourceprocs) ;
- ParaMEDMEM::MPIProcessorGroup* targetgroup = new ParaMEDMEM::MPIProcessorGroup(interface,targetprocs) ;
+ MEDCoupling::MPIProcessorGroup* sourcegroup = new MEDCoupling::MPIProcessorGroup(interface,sourceprocs) ;
+ MEDCoupling::MPIProcessorGroup* targetgroup = new MEDCoupling::MPIProcessorGroup(interface,targetprocs) ;
// TimeInterpolator * aLinearInterpDEC = new LinearTimeInterpolator( 0 ) ;
MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup ,
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_Cancel() {
debugStream << "test_MPI_Access_Cancel" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_Cyclic_ISend_IRecv() {
debugStream << "test_MPI_Access_Cyclic_ISend_IRecv" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
#define maxsend 100
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_Cyclic_Send_Recv() {
debugStream << "test_MPI_Access_Cyclic_Send_Recv" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
if ( myrank >= 3 ) {
mpi_access.barrier() ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_IProbe() {
debugStream << "test_MPI_Access_IProbe" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_ISendRecv() {
debugStream << "test_MPI_Access_ISendRecv" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_ISend_IRecv() {
debugStream << "test_MPI_Access_ISend_IRecv" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
#define maxreq 100
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_ISend_IRecv_BottleNeck() {
debugStream << "test_MPI_Access_ISend_IRecv_BottleNeck" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
#define maxreq 10000
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length() {
debugStream << "test_MPI_Access_ISend_IRecv_Length" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
#define maxreq 10
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length_1() {
debugStream << "test_MPI_Access_ISend_IRecv_Length_1" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
#define maxreq 10
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_Probe() {
debugStream << "test_MPI_Access_Probe" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_SendRecv() {
debugStream << "MPIAccessTest::test_MPI_Access_SendRecv" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_Send_Recv() {
debugStream << "test_MPI_Access_Send_Recv" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_Send_Recv_Length() {
debugStream << "test_MPI_Access_Send_Recv_Length" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessTest::test_MPI_Access_Time() {
debugStream << "test_MPI_Access_Time" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess mpi_access( group ) ;
+ MEDCoupling::MPIAccess mpi_access( group ) ;
#define maxreq 10
int sendbuf[maxreq] ;
int recvbuf[maxreq] ;
int i = 0 ;
- ParaMEDMEM::TimeMessage aSendTimeMsg[maxreq] ;
- ParaMEDMEM::TimeMessage aRecvTimeMsg[maxreq] ;
+ MEDCoupling::TimeMessage aSendTimeMsg[maxreq] ;
+ MEDCoupling::TimeMessage aRecvTimeMsg[maxreq] ;
double t ;
double dt = 1. ;
double maxt = 10. ;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
-void chksts( int sts , int myrank , ParaMEDMEM::MPIAccess * mpi_access ) {
+void chksts( int sts , int myrank , MEDCoupling::MPIAccess * mpi_access ) {
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
if ( sts != MPI_SUCCESS ) {
debugStream << "test_MPI_Access_Time_0 rank" << myrank << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
- ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM::MPIProcessorGroup(interface) ;
+ MEDCoupling::MPIProcessorGroup* group = new MEDCoupling::MPIProcessorGroup(interface) ;
- ParaMEDMEM::MPIAccess * mpi_access = new ParaMEDMEM::MPIAccess( group ) ;
+ MEDCoupling::MPIAccess * mpi_access = new MEDCoupling::MPIAccess( group ) ;
if ( myrank >= 2 ) {
debugStream << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->barrier" << endl ;
int sts ;
int sendbuf[maxreq] ;
int recvbuf[maxreq] ;
- ParaMEDMEM::TimeMessage aSendTimeMsg[maxreq] ;
+ MEDCoupling::TimeMessage aSendTimeMsg[maxreq] ;
int lasttime = -1 ;
- ParaMEDMEM::TimeMessage RecvTimeMessages[maxreq+1] ;
- ParaMEDMEM::TimeMessage *aRecvTimeMsg = &RecvTimeMessages[1] ;
+ MEDCoupling::TimeMessage RecvTimeMessages[maxreq+1] ;
+ MEDCoupling::TimeMessage *aRecvTimeMsg = &RecvTimeMessages[1] ;
// mpi_access->Trace() ;
int istep = 0 ;
for ( t = 0 ; t < maxt ; t = t+dt[myrank] ) {
#endif
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void testInterpKernelDEC_2D(const string& filename1, const string& meshname1,
const string& filename2, const string& meshname2,
procs_target.insert(i);
self_procs.insert(rank);
- ParaMEDMEM::CommInterface interface;
+ MEDCoupling::CommInterface interface;
- ParaMEDMEM::ProcessorGroup* self_group = new ParaMEDMEM::MPIProcessorGroup(interface,self_procs);
- ParaMEDMEM::ProcessorGroup* target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target);
- ParaMEDMEM::ProcessorGroup* source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source);
+ MEDCoupling::ProcessorGroup* self_group = new MEDCoupling::MPIProcessorGroup(interface,self_procs);
+ MEDCoupling::ProcessorGroup* target_group = new MEDCoupling::MPIProcessorGroup(interface,procs_target);
+ MEDCoupling::ProcessorGroup* source_group = new MEDCoupling::MPIProcessorGroup(interface,procs_source);
//loading the geometry for the source group
- ParaMEDMEM::InterpKernelDEC dec (*source_group,*target_group);
+ MEDCoupling::InterpKernelDEC dec (*source_group,*target_group);
if(tri)
dec.setIntersectionType(INTERP_KERNEL::Triangulation);
else
dec.setIntersectionType(INTERP_KERNEL::Convex);
- ParaMEDMEM::MEDCouplingUMesh* mesh;
- ParaMEDMEM::ParaMESH* paramesh;
- ParaMEDMEM::ParaFIELD* parafield;
+ MEDCoupling::MEDCouplingUMesh* mesh;
+ MEDCoupling::ParaMESH* paramesh;
+ MEDCoupling::ParaFIELD* parafield;
ICoCo::MEDField* icocofield ;
// To remove tmp files from disk
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_CELLS, NO_TIME, paramesh, comptopo);
int nb_local=mesh->getNumberOfCells();
mesh->incrRef();
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
- ParaMEDMEM::ComponentTopology comptopo;
+ MEDCoupling::ComponentTopology comptopo;
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
int nb_local=mesh->getNumberOfCells();
#include <mpi.h>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace ICoCo;
enum mpi_constants { mpi_comm_world, mpi_comm_self, mpi_double, mpi_int };
};
#endif
-%extend ParaMEDMEM::ParaMESH
+%extend MEDCoupling::ParaMESH
{
PyObject *getGlobalNumberingCell2() const
{