X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParaMEDMEMTest%2FParaMEDMEMTestMPI2_2.cxx;h=154d447f2fe9553e2dde11dc3dc6100a5f90e2a9;hb=4c22ba01f2901896d1ec9ca302640f4d7e50d147;hp=e5379ed1e79a6fa8047a1be80e55f2079d080c3b;hpb=1123dccd6613b2e8abba35182759d5c4a11ecc8d;p=tools%2Fmedcoupling.git diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTestMPI2_2.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTestMPI2_2.cxx index e5379ed1e..154d447f2 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTestMPI2_2.cxx +++ b/src/ParaMEDMEMTest/ParaMEDMEMTestMPI2_2.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -41,7 +41,7 @@ public: void testBasicMPI2_1(); }; -using namespace ParaMEDMEM; +using namespace MEDCoupling; void MPI2ParaMEDMEMTest::testBasicMPI2_1() { @@ -49,11 +49,11 @@ 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 ); @@ -63,7 +63,7 @@ void MPI2ParaMEDMEMTest::testBasicMPI2_1() return; } - /* Connection to remote programm */ + /* Connection to remote program */ MPI2Connector *mpio = new MPI2Connector; gcom = mpio->remoteMPI2Connect(service); @@ -75,14 +75,14 @@ void MPI2ParaMEDMEMTest::testBasicMPI2_1() 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}, {0.7,-1.55,0.7,-1.35,0.9,-1.35,0.9,-1.55, 1.1,-1.65,1.1,-1.45,1.3,-1.45,1.3,-1.65}}; - int conn4All[8]={0,1,2,3,4,5,6,7}; + mcIdType conn4All[8]={0,1,2,3,4,5,6,7}; double targetResults[3][2]={{34.,34.},{38.333333333333336,42.666666666666664},{47.,47.}}; std::ostringstream stream; stream << "targetmesh2D proc " << grank-(gsize-lsize); @@ -98,11 +98,11 @@ void MPI2ParaMEDMEMTest::testBasicMPI2_1() 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); - parafield->getField()->setNature(ConservativeVolumic); + MEDCoupling::InterpKernelDEC dec(*source,*target); + parafield->getField()->setNature(IntensiveMaximum); dec.setMethod("P0"); dec.attachLocalField(parafield); @@ -113,7 +113,7 @@ void MPI2ParaMEDMEMTest::testBasicMPI2_1() const double *expected=targetResults[grank-(gsize-lsize)]; CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13); CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13); - /* Deconnection of remote programm */ + /* Deconnection of remote program */ mpio->remoteMPI2Disconnect(service); /* clean-up */ delete mpio;