Salome HOME
projects
/
tools
/
medcoupling.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adapt for C++17
[tools/medcoupling.git]
/
src
/
ParaMEDMEMTest
/
ParaMEDMEMTest_FabienAPI.cxx
diff --git
a/src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx
b/src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx
index dce4eab1455898fe51292b3343e3471ae12aa01d..357ec3433f80d6705398d6421ce852e446fcc4d5 100644
(file)
--- a/
src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx
+++ b/
src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
14
CEA/DEN, EDF R&D
+// Copyright (C) 2007-20
20
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
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-29,7
+29,7
@@
#include <set>
#include <set>
-using namespace
ParaMEDMEM
;
+using namespace
MEDCoupling
;
void ParaMEDMEMTest::testFabienAPI1()
{
void ParaMEDMEMTest::testFabienAPI1()
{
@@
-45,17
+45,17
@@
void ParaMEDMEMTest::testFabienAPI1()
int procs_target_c[1]={1};
std::set<int> procs_target(procs_target_c,procs_target_c+1);
//
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;
//
//
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();
if(dec->isInSourceSide())
{
mesh=MEDCouplingUMesh::New();
@@
-65,14
+65,14
@@
void ParaMEDMEMTest::testFabienAPI1()
std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
mesh->setCoords(myCoords);
myCoords->decrRef();
std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
mesh->setCoords(myCoords);
myCoords->decrRef();
-
int
targetConn[4]={0,2,3,1};
+
mcIdType
targetConn[4]={0,2,3,1};
mesh->allocateCells(1);
mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
mesh->finishInsertingCells();
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);
paramesh=new ParaMESH(mesh,*dec->getSourceGrp(),"source mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(
ConservativeVolumic
);
+ parafield->getField()->setNature(
IntensiveMaximum
);
double *vals=parafield->getField()->getArray()->getPointer();
vals[0]=7.;
}
double *vals=parafield->getField()->getArray()->getPointer();
vals[0]=7.;
}
@@
-85,15
+85,15
@@
void ParaMEDMEMTest::testFabienAPI1()
std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
mesh->setCoords(myCoords);
myCoords->decrRef();
std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
mesh->setCoords(myCoords);
myCoords->decrRef();
-
int
targetConn[6]={0,2,1,2,3,1};
+
mcIdType
targetConn[6]={0,2,1,2,3,1};
mesh->allocateCells(2);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3);
mesh->finishInsertingCells();
mesh->allocateCells(2);
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);
paramesh=new ParaMESH(mesh,*dec->getTargetGrp(),"target mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(
ConservativeVolumic
);
+ parafield->getField()->setNature(
IntensiveMaximum
);
}
dec->attachLocalField(parafield);
dec->synchronize();
}
dec->attachLocalField(parafield);
dec->synchronize();
@@
-130,17
+130,17
@@
void ParaMEDMEMTest::testFabienAPI2()
int procs_target_c[1]={1};
std::set<int> procs_target(procs_target_c,procs_target_c+1);
//
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;
//
//
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();
if(dec->isInSourceSide())
{
mesh=MEDCouplingUMesh::New();
@@
-150,14
+150,14
@@
void ParaMEDMEMTest::testFabienAPI2()
std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
mesh->setCoords(myCoords);
myCoords->decrRef();
std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
mesh->setCoords(myCoords);
myCoords->decrRef();
-
int
targetConn[4]={0,2,3,1};
+
mcIdType
targetConn[4]={0,2,3,1};
mesh->allocateCells(1);
mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
mesh->finishInsertingCells();
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);
paramesh=new ParaMESH(mesh,*dec->getSourceGrp(),"source mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(
ConservativeVolumic
);
+ parafield->getField()->setNature(
IntensiveMaximum
);
double *vals=parafield->getField()->getArray()->getPointer();
vals[0]=7.;
}
double *vals=parafield->getField()->getArray()->getPointer();
vals[0]=7.;
}
@@
-170,15
+170,15
@@
void ParaMEDMEMTest::testFabienAPI2()
std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
mesh->setCoords(myCoords);
myCoords->decrRef();
std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
mesh->setCoords(myCoords);
myCoords->decrRef();
-
int
targetConn[6]={0,2,1,2,3,1};
+
mcIdType
targetConn[6]={0,2,1,2,3,1};
mesh->allocateCells(2);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3);
mesh->finishInsertingCells();
mesh->allocateCells(2);
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);
paramesh=new ParaMESH(mesh,*dec->getTargetGrp(),"target mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(
ConservativeVolumic
);
+ parafield->getField()->setNature(
IntensiveMaximum
);
}
dec->attachLocalField(parafield);
dec->synchronize();
}
dec->attachLocalField(parafield);
dec->synchronize();