-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 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
#include "MEDCouplingRemapperTest.hxx"
#include "MEDCouplingUMesh.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingMemArray.hxx"
#include <cmath>
#include <numeric>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MEDCouplingRemapperTest::test2DInterpP0P0_1()
{
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.57);
const double *values=trgfield->getArray()->getConstPointer();
const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5};
- CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(IntegralGlobConstraint);
+ srcField->setNature(ExtensiveConservation);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected2[5]={3.75 ,1.75 ,1.75,4.,3.75};
- CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(IntegralGlobConstraint);
+ srcField->setNature(ExtensiveConservation);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(Integral);
+ srcField->setNature(ExtensiveMaximum);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(RevIntegral);
+ srcField->setNature(IntensiveConservation);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12);
trgfield->decrRef();
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
MEDCouplingFieldDouble *targetField=MEDCouplingFieldDouble::New(ON_CELLS);
- targetField->setNature(ConservativeVolumic);
- targetField->setMesh(sourceMesh);
+ targetField->setNature(IntensiveMaximum);
+ targetField->setMesh(targetMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(targetMesh->getNumberOfCells(),1);
targetField->setArray(array);
MEDCouplingFieldDouble *srcfield=remapper.reverseTransferField(targetField,4.57);
const double *values=srcfield->getArray()->getConstPointer();
const double valuesExpected[2]={8.75 ,9.5};
- CPPUNIT_ASSERT_EQUAL(2,srcfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,srcfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)srcfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)srcfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12);
srcfield->decrRef();
//
- targetField->setNature(IntegralGlobConstraint);
+ targetField->setNature(ExtensiveConservation);
srcfield=remapper.reverseTransferField(targetField,4.57);
values=srcfield->getArray()->getConstPointer();
const double valuesExpected2[2]={26., 19.};
- CPPUNIT_ASSERT_EQUAL(2,srcfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,srcfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)srcfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)srcfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12);
srcfield->decrRef();
MEDCouplingRemapper remapper;
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.57);
const double *values=trgfield->getArray()->getConstPointer();
const double valuesExpected1[2]={9.0540540540540526,7.4};
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected1[i0],values[i0],1e-12);
trgfield->decrRef();
const double valuesExpected2[2]={24.75,5.75};
- srcField->setNature(Integral);
+ srcField->setNature(ExtensiveMaximum);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12);
trgfield->decrRef();
//
const double valuesExpected3[2]={24.75,9.25};
- srcField->setNature(IntegralGlobConstraint);
+ srcField->setNature(ExtensiveConservation);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12);
trgfield->decrRef();
//
const double valuesExpected4[2]={7.4444444444444446,7.4};
- srcField->setNature(RevIntegral);
+ srcField->setNature(IntensiveConservation);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12);
trgfield->decrRef();
targetMesh=MEDCouplingBasicsTest::build2DCurveTargetMesh_2();
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
//
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected1[i0],values[i0],1e-12);
trgfield->decrRef();
- srcField->setNature(Integral);
+ srcField->setNature(ExtensiveMaximum);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(IntegralGlobConstraint);
+ srcField->setNature(ExtensiveConservation);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(RevIntegral);
+ srcField->setNature(IntensiveConservation);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12);
trgfield->decrRef();
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.57);
const double *values=trgfield->getArray()->getConstPointer();
const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5};
- CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12);
trgfield->decrRef();
//
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P1P0"));
srcField=MEDCouplingFieldDouble::New(ON_NODES);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfNodes(),1);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected2[5]={7.,7.666666666666667,8.6666666666666661,8.8333333333333339,10.};
- CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12);
trgfield->decrRef();
//
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(targetMesh,sourceMesh,"P0P1"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(targetMesh);
array=DataArrayDouble::New();
array->alloc(targetMesh->getNumberOfCells(),1);
trgfield=remapper.transferField(srcField,4.57);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected3[4]={7.5,8.5,10.,10.625};
- CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<4;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12);
trgfield->decrRef();
targetMesh=MEDCouplingBasicsTest::build2DTargetMesh_2();
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P1P1"));
srcField=MEDCouplingFieldDouble::New(ON_NODES);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfNodes(),1);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected4[9]={ 7.,7.35,8.,7.7,8.2857142857142865,
9.5333333333333332,9.,9.7666666666666657,10.};
- CPPUNIT_ASSERT_EQUAL(9,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(9,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<9;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12);
trgfield->decrRef();
remapper.setIntersectionType(INTERP_KERNEL::Triangulation);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
MEDCouplingFieldDouble *trgField=remapper.transferField(srcField,4.57);
const double *values=trgField->getArray()->getConstPointer();
const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5};
- CPPUNIT_ASSERT_EQUAL(5,trgField->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgField->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents());
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12);
trgField->decrRef();
targetMesh=MEDCouplingBasicsTest::build3DSurfTargetMesh_1();
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
ptr[i]=(double)(i+8);
array->decrRef();
trgField=remapper.transferField(srcField,4.57);
- CPPUNIT_ASSERT_EQUAL(5,trgField->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)trgField->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents());
const double valuesExpected2[5]={8.5,8.,8.,9.,8.5};
values=trgField->getArray()->getConstPointer();
for(int i0=0;i0<5;i0++)
targetMesh=MEDCouplingBasicsTest::build3DTargetMesh_1();
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
ptr[i]=(double)(i+7);
array->decrRef();
trgField=remapper.transferField(srcField,4.57);
- CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(8,(int)trgField->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents());
const double valuesExpected3[8]={13.166666666666668, 13.888888888888888, 10.722222222222223, 10.870370370370372,
14.555555555555555, 13.888888888888889, 14.444444444444443, 11.72222222222222};
values=trgField->getArray()->getConstPointer();
remapper.setIntersectionType(INTERP_KERNEL::PointLocator);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
ptr[i]=(double)(i+7);
array->decrRef();
trgField=remapper.transferField(srcField,4.57);
- CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(8,(int)trgField->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents());
const double valuesExpected4[8]={7.,11.,8.,12.,9.,13.,10.,14.};
values=trgField->getArray()->getConstPointer();
for(int i0=0;i0<8;i0++)
remapper.setIntersectionType(INTERP_KERNEL::PointLocator);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
ptr[i]=(double)(i+7);
array->decrRef();
trgField=remapper.transferField(srcField,4.57);
- CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(8,(int)trgField->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents());
const double valuesExpected5[8]={7.,9.,11.,13.,8.,10.,12.,14.};
values=trgField->getArray()->getConstPointer();
for(int i0=0;i0<8;i0++)
remapper.setIntersectionType(INTERP_KERNEL::PointLocator);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
remapper.setIntersectionType(INTERP_KERNEL::PointLocator);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
sourceMesh=MEDCouplingBasicsTest::build2DTargetMesh_1();
targetMesh=MEDCouplingUMesh::New("an example of -1 D mesh",-1);
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
trgField=remapper.transferField(srcField,4.57);
values=trgField->getArray()->getConstPointer();
- CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents());
CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,values[0],1e-14);
srcField->decrRef();
srcField=remapper.reverseTransferField(trgField,4.220173);
- CPPUNIT_ASSERT_EQUAL(5,srcField->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,srcField->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)srcField->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)srcField->getNumberOfComponents());
values=srcField->getArray()->getConstPointer();
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,values[i0],1e-14);
srcField->decrRef();
- trgField->setNature(Integral);
+ trgField->setNature(ExtensiveMaximum);
srcField=remapper.reverseTransferField(trgField,4.220173);
- CPPUNIT_ASSERT_EQUAL(5,srcField->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,srcField->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,(int)srcField->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)srcField->getNumberOfComponents());
values=srcField->getArray()->getConstPointer();
const double valuesExpected6[5]={2.28125,1.140625,1.140625,2.28125,2.28125};
for(int i0=0;i0<5;i0++)
// ------------- -1D -> 2D
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(targetMesh,sourceMesh,"P0P0"));
trgField=MEDCouplingFieldDouble::New(ON_CELLS);
- trgField->setNature(ConservativeVolumic);
+ trgField->setNature(IntensiveMaximum);
trgField->setMesh(targetMesh);
array=DataArrayDouble::New();
array->alloc(targetMesh->getNumberOfCells(),1);
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,values[i0],1e-14);
srcField->decrRef();
- trgField->setNature(IntegralGlobConstraint);
+ trgField->setNature(ExtensiveConservation);
srcField=remapper.transferField(trgField,4.221073);
values=srcField->getArray()->getConstPointer();
const double valuesExpected7[5]={1.75,0.875,0.875,1.75,1.75};
for(int i0=0;i0<5;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected7[i0],values[i0],1e-14);
srcField->decrRef();
- trgField->setNature(Integral);
+ trgField->setNature(ExtensiveMaximum);
srcField=remapper.transferField(trgField,4.221073);
values=srcField->getArray()->getConstPointer();
for(int i0=0;i0<5;i0++)
remapper.setIntersectionType(INTERP_KERNEL::Geometric2D);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(4,1); array->iota(2.);
srcField->setArray(array); array->decrRef();
trgField=remapper.transferField(srcField,4.57);
const double valuesExpected10[3]={3.9674868868103834, 2.8, 3.6372633449255796};
- CPPUNIT_ASSERT_EQUAL(3,trgField->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(3,(int)trgField->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents());
for(int i=0;i<3;i++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected10[i],trgField->getIJ(i,0),1e-13);
srcField->decrRef();
remapper.setIntersectionType(INTERP_KERNEL::Geometric2D);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(targetMesh,sourceMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(targetMesh);
array=DataArrayDouble::New();
array->alloc(3,1); array->iota(2.);
srcField->setArray(array); array->decrRef();
trgField=remapper.transferField(srcField,4.57);
const double valuesExpected11[4]={3., 2.9264705882352944, 3.8518518518518516, 2.3170731707317076};
- CPPUNIT_ASSERT_EQUAL(4,trgField->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(4,(int)trgField->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents());
for(int i=0;i<4;i++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected11[i],trgField->getIJ(i,0),1e-13);
srcField->decrRef();
remapper.setIntersectionType(INTERP_KERNEL::Triangulation);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(7,1); array->iota(2.);
srcField->setArray(array); array->decrRef();
trgField=remapper.transferField(srcField,4.57);
const double valuesExpected12[3]={5.70909090909091, 6.08362715128042, 6.92857142857143};
- CPPUNIT_ASSERT_EQUAL(3,trgField->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(3,(int)trgField->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents());
for(int i=0;i<3;i++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected12[i],trgField->getIJ(i,0),1e-13);
srcField->decrRef();
//------------- 3D -> 2D
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(targetMesh,sourceMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(targetMesh);
array=DataArrayDouble::New();
array->alloc(3,1); array->iota(2.);
srcField->setArray(array); array->decrRef();
trgField=remapper.transferField(srcField,4.57);
const double valuesExpected13[7]={3., 4., 2.5, 2.909090909090909, 2., 3.5, 3.3571428571428572};
- CPPUNIT_ASSERT_EQUAL(7,trgField->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(7,(int)trgField->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents());
for(int i=0;i<7;i++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected13[i],trgField->getIJ(i,0),1e-13);
srcField->decrRef();
remapper.setIntersectionType(INTERP_KERNEL::Triangulation);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.220173);
const double *values=trgfield->getArray()->getConstPointer();
const double valuesExpected[4]={7.75, 7.0625, 4.220173,8.0};
- CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<4;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(IntegralGlobConstraint);
+ srcField->setNature(ExtensiveConservation);
trgfield=remapper.transferField(srcField,4.220173);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected2[4]={2.8374999999999999, 7.3624999999999998, 4.220173, 4.7999999999999998};
- CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<4;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(Integral);
+ srcField->setNature(ExtensiveMaximum);
trgfield=remapper.transferField(srcField,4.220173);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected3[4]={1.24, 4.5199999999999996, 4.220173, 1.9199999999999999};
- CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<4;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(RevIntegral);
+ srcField->setNature(IntensiveConservation);
trgfield=remapper.transferField(srcField,4.220173);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected9[4]={2.48, 3.766666666666666, 4.220173, 1.9199999999999999};
- CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<4;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected9[i0],values[i0],1e-12);
trgfield->decrRef();
srcField->decrRef();
// REVERSE ***********
trgfield=MEDCouplingFieldDouble::New(ON_CELLS);
- trgfield->setNature(ConservativeVolumic);
+ trgfield->setNature(IntensiveMaximum);
trgfield->setMesh(targetMesh);
array=DataArrayDouble::New();
array->alloc(targetMesh->getNumberOfCells(),1);
srcField=remapper.reverseTransferField(trgfield,4.220173);
values=srcField->getArray()->getConstPointer();
const double valuesExpected4[2]={7.9375, 8.9};
- CPPUNIT_ASSERT_EQUAL(2,srcField->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,srcField->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)srcField->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)srcField->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12);
srcField->decrRef();
//
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
trgfield=remapper.transferField(srcField,4.220173);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected5[2]={7.9375, 8.9};
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected5[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(IntegralGlobConstraint);
+ srcField->setNature(ExtensiveConservation);
trgfield=remapper.transferField(srcField,4.220173);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected6[4]={9.25, 15.75};
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected6[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(Integral);
+ srcField->setNature(ExtensiveMaximum);
trgfield=remapper.transferField(srcField,4.220173);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected7[2]={4.56, 4.3466666666666667};
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected7[i0],values[i0],1e-12);
trgfield->decrRef();
//
- srcField->setNature(RevIntegral);
+ srcField->setNature(IntensiveConservation);
trgfield=remapper.transferField(srcField,4.220173);
values=trgfield->getArray()->getConstPointer();
const double valuesExpected10[2]={5.08, 3.56};
- CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<2;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected10[i0],values[i0],1e-12);
trgfield->decrRef();
srcField->decrRef();
// REVERSE ***********
trgfield=MEDCouplingFieldDouble::New(ON_CELLS);
- trgfield->setNature(ConservativeVolumic);
+ trgfield->setNature(IntensiveMaximum);
trgfield->setMesh(targetMesh);
array=DataArrayDouble::New();
array->alloc(targetMesh->getNumberOfCells(),1);
srcField=remapper.reverseTransferField(trgfield,4.220173);
values=srcField->getArray()->getConstPointer();
const double valuesExpected8[4]={7.75, 7.0625,4.220173, 8.0};
- CPPUNIT_ASSERT_EQUAL(4,srcField->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,srcField->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(4,(int)srcField->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)srcField->getArray()->getNumberOfComponents());
for(int i0=0;i0<4;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected8[i0],values[i0],1e-12);
srcField->decrRef();
{
MEDCouplingUMesh *mesh2DS=0;
MEDCouplingUMesh *mesh3DS=build3DExtrudedUMesh_1(mesh2DS);
- MEDCouplingExtrudedMesh *extS=MEDCouplingExtrudedMesh::New(mesh3DS,mesh2DS,1);
+ MEDCouplingMappedExtrudedMesh *extS=MEDCouplingMappedExtrudedMesh::New(mesh3DS,mesh2DS,1);
mesh3DS->decrRef();
mesh2DS->decrRef();
MEDCouplingUMesh *mesh2DT=0;
MEDCouplingUMesh *mesh3DT=build3DExtrudedUMesh_1(mesh2DT);
- MEDCouplingExtrudedMesh *extT=MEDCouplingExtrudedMesh::New(mesh3DT,mesh2DT,1);
+ MEDCouplingMappedExtrudedMesh *extT=MEDCouplingMappedExtrudedMesh::New(mesh3DT,mesh2DT,1);
//
//
mesh3DT->decrRef();
MEDCouplingUMesh *meshTF2D=(MEDCouplingUMesh *)meshTF->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true);
n.clear();
//
- MEDCouplingExtrudedMesh *meshNE=MEDCouplingExtrudedMesh::New(meshN,meshN2D,0);
- MEDCouplingExtrudedMesh *meshTTE=MEDCouplingExtrudedMesh::New(meshTT,meshTT2D,0);
- MEDCouplingExtrudedMesh *meshTFE=MEDCouplingExtrudedMesh::New(meshTF,meshTF2D,0);
+ MEDCouplingMappedExtrudedMesh *meshNE=MEDCouplingMappedExtrudedMesh::New(meshN,meshN2D,0);
+ MEDCouplingMappedExtrudedMesh *meshTTE=MEDCouplingMappedExtrudedMesh::New(meshTT,meshTT2D,0);
+ MEDCouplingMappedExtrudedMesh *meshTFE=MEDCouplingMappedExtrudedMesh::New(meshTF,meshTF2D,0);
//
MEDCouplingRemapper remapper;
remapper.setPrecision(1e-12);
- remapper.setIntersectionType(INTERP_KERNEL::Geometric2D);
+ remapper.setIntersectionType(INTERP_KERNEL::Triangulation);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(meshNE,meshTTE,"P0P0"));
MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(IntegralGlobConstraint);
+ srcField->setNature(ExtensiveConservation);
srcField->setMesh(meshNE);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(meshNE->getNumberOfCells(),1);
1000.,1000.,1020.,1030.,1040.,1000.,1000.,1070.,1080.,1090.,1000.,1000.,1120.,1130.,1140.,1000.,1000.,1170.,1180.,1190.,
2000.,2000.,2020.,2030.,2040.,2000.,2000.,2070.,2080.,2090.,2000.,2000.,2120.,2130.,2140.,2000.,2000.,2170.,2180.,2190.,
};
- CPPUNIT_ASSERT_EQUAL((int)(sizeof(vals1)/sizeof(double)),meshNE->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL((int)(sizeof(vals1)/sizeof(double)),(int)meshNE->getNumberOfCells());
std::copy(vals1,vals1+meshNE->getNumberOfCells(),array->getPointer());
array->decrRef();
MEDCouplingFieldDouble *trgField=remapper.transferField(srcField,4.220173);
};
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(meshNE,meshTTE,"P0P0"));
trgField=MEDCouplingFieldDouble::New(ON_CELLS);
- trgField->setNature(ConservativeVolumic);
+ trgField->setNature(IntensiveMaximum);
trgField->setMesh(meshTTE);
array=DataArrayDouble::New();
array->alloc(meshTTE->getNumberOfCells(),1);
};
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(meshNE,meshTFE,"P0P0"));
trgField=MEDCouplingFieldDouble::New(ON_CELLS);
- trgField->setNature(ConservativeVolumic);
+ trgField->setNature(IntensiveMaximum);
trgField->setMesh(meshTFE);
array=DataArrayDouble::New();
array->alloc(meshTFE->getNumberOfCells(),1);
srcFt->decrRef();
trgFt->decrRef();
MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.220173);
const double *values=trgfield->getArray()->getConstPointer();
const double valuesExpected[4]={7.75, 7.0625, 4.220173,8.0};
- CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents());
for(int i0=0;i0<4;i0++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12);
trgfield->decrRef();
remapper.setIntersectionType(INTERP_KERNEL::PointLocator);
CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0"));
MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS);
- srcField->setNature(ConservativeVolumic);
+ srcField->setNature(IntensiveMaximum);
srcField->setMesh(sourceMesh);
DataArrayDouble *array=DataArrayDouble::New();
array->alloc(sourceMesh->getNumberOfCells(),1);
ptr[i]=(double)(i+7);
array->decrRef();
MEDCouplingFieldDouble *trgField=MEDCouplingFieldDouble::New(ON_CELLS);
- trgField->setNature(ConservativeVolumic);
+ trgField->setNature(IntensiveMaximum);
trgField->setMesh(targetMesh);
array=DataArrayDouble::New();
array->alloc(targetMesh->getNumberOfCells(),1);