-// Copyright (C) 2007-2013 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
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "MEDCouplingBasicsTestInterp.hxx"
#include "MEDCouplingUMesh.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingMemArray.hxx"
#include "Interpolation2D.txx"
#include "Interpolation3DSurf.hxx"
#include "Interpolation3D.txx"
#include "Interpolation2D1D.txx"
-#include "Interpolation3D2D.txx"
+#include "Interpolation2D3D.txx"
#include "InterpolationCC.txx"
#include "InterpolationCU.txx"
#include "Interpolation2DCurve.hxx"
#include <cmath>
#include <functional>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
-typedef std::vector<std::map<int,double> > IntersectionMatrix;
+typedef std::vector<std::map<mcIdType,double> > IntersectionMatrix;
void MEDCouplingBasicsTestInterp::test2DInterpP0P0_1()
{
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
INTERP_KERNEL::IntersectionType types[3]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Convex, INTERP_KERNEL::Geometric2D};
for(int i=0;i<3;i++)
{
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
//
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
//
- std::vector<int> cellsIds(targetMesh->getNumberOfCells());
- for(int i=0;i<targetMesh->getNumberOfCells();i++)
+ std::vector<mcIdType> cellsIds(targetMesh->getNumberOfCells());
+ for(mcIdType i=0;i<targetMesh->getNumberOfCells();i++)
cellsIds[i]=i;
targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
//
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
//
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
//
- std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
- for(int i=0;i<sourceMesh->getNumberOfCells();i++)
+ std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
+ for(mcIdType i=0;i<sourceMesh->getNumberOfCells();i++)
cellsIds[i]=i;
sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
//
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
//
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
//
- std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
- for(int i=0;i<sourceMesh->getNumberOfCells();i++)
+ std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
+ for(mcIdType i=0;i<sourceMesh->getNumberOfCells();i++)
cellsIds[i]=i;
sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
cellsIds.resize(targetMesh->getNumberOfCells());
- for(int i=0;i<targetMesh->getNumberOfCells();i++)
+ for(mcIdType i=0;i<targetMesh->getNumberOfCells();i++)
cellsIds[i]=i;
targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
//
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
//
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
for(int i=0;i<2;i++)
{
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1");
MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
//
- std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
- for(int i=0;i<sourceMesh->getNumberOfCells();i++)
+ std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
+ for(mcIdType i=0;i<sourceMesh->getNumberOfCells();i++)
cellsIds[i]=i;
sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
//
cellsIds.resize(targetMesh->getNumberOfCells());
- for(int i=0;i<targetMesh->getNumberOfCells();i++)
+ for(mcIdType i=0;i<targetMesh->getNumberOfCells();i++)
cellsIds[i]=i;
targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
//
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1");
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
- for(int i=0;i<2;i++)
+ for(mcIdType i=0;i<2;i++)
{
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(types[i]);
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
//
- std::vector<int >cellsIds(targetMesh->getNumberOfCells());
- for(int i=0;i<targetMesh->getNumberOfCells();i++)
+ std::vector<mcIdType >cellsIds(targetMesh->getNumberOfCells());
+ for(mcIdType i=0;i<targetMesh->getNumberOfCells();i++)
cellsIds[i]=i;
targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
//
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
for(int i=0;i<2;i++)
{
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
INTERP_KERNEL::IntersectionType types[3]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
for(int i=0;i<2;i++)
{
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
for(int i=0;i<2;i++)
{
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1");
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
for(int i=0;i<2;i++)
{
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
for(int i=0;i<2;i++)
{
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::Triangulation);
{
void MEDCouplingBasicsTestInterp::test3DSurfInterpP0P0_3()
{
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
double vecTrans[3]={0.,0.,1.e-10};
double vec[3]={0.,-1.,0.};
double pt[3]={-0.3,-0.3,5.e-11};
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
for ( int i = 0; i < 4; ++i )
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
{
MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1();
MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
- std::vector<int> cellsIds(targetMesh->getNumberOfCells());
+ std::vector<mcIdType> cellsIds(targetMesh->getNumberOfCells());
for(int i=0;i<targetMesh->getNumberOfCells();i++)
cellsIds[i]=i;
targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
{
MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1();
MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
- std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
+ std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
for(int i=0;i<sourceMesh->getNumberOfCells();i++)
cellsIds[i]=i;
sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
{
MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1();
MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
- std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
+ std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
for(int i=0;i<sourceMesh->getNumberOfCells();i++)
cellsIds[i]=i;
sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
for ( int i = 0; i < 4; ++i )
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
for ( int i = 0; i < 4; ++i )
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
CPPUNIT_ASSERT_EQUAL(8,(int)res.size());
int i=0;
double sum = 0;
//cout.precision(18);
- for(std::vector<std::map<int,double> >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++)
+ for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++)
{
//cout<< "res3D[" <<i<< "][]={";
for(int j=0;j<28;j++)
{
- std::map<int,double>::const_iterator iter2=(*iter1).find(j);
+ std::map<mcIdType,double>::const_iterator iter2=(*iter1).find(j);
if(iter2!=(*iter1).end())
{
//cout<< iter2->second<< ", ";
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
sourceMesh->allocateCells(0);
sourceMesh->finishInsertingCells();
DataArrayDouble *myCoords=DataArrayDouble::New();
- myCoords->alloc(0,0);
+ myCoords->alloc(0,2);
sourceMesh->setCoords(myCoords);
myCoords->decrRef();
MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
//clean up
const double* arr = i ? arr1 : arr2;
const int nb_coord = i ? 3 : 4;
DataArrayDouble* coords = DataArrayDouble::New();
- coords->useArray( arr, /*ownership=*/false, CPP_DEALLOC, nb_coord, 1 );
+ coords->useArray( arr, /*ownership=*/false, DeallocType::CPP_DEALLOC, nb_coord, 1 );
mesh[i] = MEDCouplingCMesh::New();
mesh[i]->setCoords( coords, coords, coords );
CPPUNIT_ASSERT_THROW( sourceWrapper.nbCellsAlongAxis(3), INTERP_KERNEL::Exception);
INTERP_KERNEL::InterpolationCC myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
CPPUNIT_ASSERT_EQUAL(8,int( res.size()));
std::set<double> vals;
double sum = 0;
for ( int i = 0; i < (int)res.size(); ++i )
- for ( std::map<int,double>::iterator s_v = res[i].begin(); s_v != res[i].end(); ++s_v)
+ for ( std::map<mcIdType,double>::iterator s_v = res[i].begin(); s_v != res[i].end(); ++s_v)
{
sum += s_v->second;
double vvv;
MEDCouplingCMesh* meshC = MEDCouplingCMesh::New();
DataArrayDouble* coords = DataArrayDouble::New();
double arr[4] = { -1/3., 1/3., 2/3., 4/3. };
- coords->useArray( arr, /*ownership=*/false, CPP_DEALLOC, 4, 1 );
+ coords->useArray( arr, /*ownership=*/false, DeallocType::CPP_DEALLOC, 4, 1 );
meshC->setCoords( coords );
coords->decrRef();
MEDCouplingNormalizedCartesianMesh<1> sourceWrapper(meshC);
MEDCouplingNormalizedUnstructuredMesh<1,1> targetWrapper(meshU);
INTERP_KERNEL::InterpolationCU myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
const double precis = 1e-13;
myInterpolator.setPrecision(precis);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
MEDCouplingCMesh* meshC = MEDCouplingCMesh::New();
DataArrayDouble* coords = DataArrayDouble::New();
double arr[4] = { -1/3., 1/3., 2/3., 4/3. };
- coords->useArray( arr, /*ownership=*/false, CPP_DEALLOC, 4, 1 );
+ coords->useArray( arr, /*ownership=*/false, DeallocType::CPP_DEALLOC, 4, 1 );
meshC->setCoords( coords, coords );
coords->decrRef();
MEDCouplingNormalizedCartesianMesh<2> sourceWrapper(meshC);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(meshU);
INTERP_KERNEL::InterpolationCU myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0972222 ,res[4][2],precis);
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0138889 ,res[4][5],precis);
- std::vector<std::map<int,double> > resRev;
+ std::vector<std::map<mcIdType,double> > resRev;
myInterpolator.interpolateMeshesRev(targetWrapper,sourceWrapper,resRev,"P0P0");
CPPUNIT_ASSERT_DOUBLES_EQUAL( res[0][0] ,resRev[0][0],precis);
MEDCouplingCMesh* meshC = MEDCouplingCMesh::New();
DataArrayDouble* coords = DataArrayDouble::New();
double arr[4] = { -1/3., 1/3., 2/3., 4/3. };
- coords->useArray( arr, /*ownership=*/false, CPP_DEALLOC, 4, 1 );
+ coords->useArray( arr, /*ownership=*/false, DeallocType::CPP_DEALLOC, 4, 1 );
meshC->setCoords( coords, coords, coords );
coords->decrRef();
MEDCouplingNormalizedCartesianMesh<3> sourceWrapper(meshC);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(meshU);
INTERP_KERNEL::InterpolationCU myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
const double precis = 1e-13;
myInterpolator.setPrecision(precis);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
//
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
- CPPUNIT_ASSERT_EQUAL(5,myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
+ std::vector<std::map<mcIdType,double> > res;
+ CPPUNIT_ASSERT_EQUAL(5,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][1],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][4],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12);
res.clear();
- CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
+ CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
CPPUNIT_ASSERT_EQUAL(5,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[1][0],1e-12);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper2(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator2;
CPPUNIT_ASSERT(myInterpolator2.getMeasureAbsStatus());
- CPPUNIT_ASSERT_EQUAL(5,myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0"));
+ CPPUNIT_ASSERT_EQUAL(5,(int)myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0"));
CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][1],1e-12);
res.clear();
myInterpolator2.setMeasureAbsStatus(false);
CPPUNIT_ASSERT(!myInterpolator2.getMeasureAbsStatus());
- CPPUNIT_ASSERT_EQUAL(5,myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0"));
+ CPPUNIT_ASSERT_EQUAL(5,(int)myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0"));
CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.125,res[0][1],1e-12);
MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1();
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
- std::vector<std::map<int,double> > res;
- CPPUNIT_ASSERT_EQUAL(5,myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
+ std::vector<std::map<mcIdType,double> > res;
+ CPPUNIT_ASSERT_EQUAL(5,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][0],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][1],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][4],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(1.*sqrt(2.),sumAll(res),1e-12);
res.clear();
- CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
+ CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
CPPUNIT_ASSERT_EQUAL(5,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][0],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[1][0],1e-12);
MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
INTERP_KERNEL::Interpolation3D myInterpolator;
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
- std::vector<std::map<int,double> > res;
- CPPUNIT_ASSERT_EQUAL(8,myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
+ std::vector<std::map<mcIdType,double> > res;
+ CPPUNIT_ASSERT_EQUAL(8,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(125000.,res[0][0],1e-6);
CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[0][1],1e-6);
CPPUNIT_ASSERT_DOUBLES_EQUAL(3375000.,res[0][7],1e-6);
CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000.,sumAll(res),1e-6);
res.clear();
- CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
+ CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
CPPUNIT_ASSERT_EQUAL(8,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(125000.,res[0][0],1e-6);
CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[1][0],1e-6);
//
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- std::vector<std::map<int,double> > res;
- CPPUNIT_ASSERT_EQUAL(4,myInterpolator.toIntegralUniform(targetWrapper,res,"P1"));
+ std::vector<std::map<mcIdType,double> > res;
+ CPPUNIT_ASSERT_EQUAL(4,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P1"));
CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][0],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[0][1],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[0][2],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][3],1e-12);
res.clear();
- CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P1"));
+ CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P1"));
CPPUNIT_ASSERT_EQUAL(4,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][0],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[1][0],1e-12);
//
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(sourceMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
- CPPUNIT_ASSERT_EQUAL(9,myInterpolator.toIntegralUniform(targetWrapper,res,"P1"));
+ std::vector<std::map<mcIdType,double> > res;
+ CPPUNIT_ASSERT_EQUAL(9,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P1"));
CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][0],1e-6);
CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][1],1e-6);
CPPUNIT_ASSERT_DOUBLES_EQUAL(2000000.,res[0][8],1e-6);
CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000.,sumAll(res),1e-6);
res.clear();
- CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P1"));
+ CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P1"));
CPPUNIT_ASSERT_EQUAL(9,(int)res.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][0],1e-6);
CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[1][0],1e-6);
MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation2D myInterpolator;
- myInterpolator.setP1P0BaryMethod(true);
- std::vector<std::map<int,double> > res;
- INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
+ std::vector<std::map<mcIdType,double> > res;
+ INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Barycentric,INTERP_KERNEL::BarycentricGeo2D};
for(int i=0;i<2;i++)
{
myInterpolator.setPrecision(1e-12);
MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3DSurf myInterpolator;
- myInterpolator.setP1P0BaryMethod(true);
- std::vector<std::map<int,double> > res;
- INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
+ std::vector<std::map<mcIdType,double> > res;
+ INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Barycentric,INTERP_KERNEL::BarycentricGeo2D};
for(int i=0;i<2;i++)
{
myInterpolator.setPrecision(1e-12);
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- myInterpolator.setP1P0BaryMethod(true);
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
+ myInterpolator.setIntersectionType(INTERP_KERNEL::Barycentric);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
CPPUNIT_ASSERT_EQUAL(5,(int)res.size());
double sum = 0;
int i=0;
- for(std::vector<std::map<int,double> >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++)
+ for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++)
{
for(int j=0;j<28;j++)
{
- std::map<int,double>::const_iterator iter2=(*iter1).find(j);
+ std::map<mcIdType,double>::const_iterator iter2=(*iter1).find(j);
if(iter2!=(*iter1).end())
{
sum += iter2->second;
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
INTERP_KERNEL::Interpolation3D myInterpolator;
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.setPrecision(1e-12);
myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
myInterpolator.setPrecision(precis);
// P0P0
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
CPPUNIT_ASSERT_EQUAL( 3, int( res.size()) );
CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5, res[0][0], precis);
INTERP_KERNEL::Interpolation2DCurve myInterpolator;
const double precis = 1e-13;
myInterpolator.setPrecision(precis);
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
CPPUNIT_ASSERT_EQUAL( 2, int( res.size()) );
const double precis = 1e-13;
myInterpolator.setPrecision(precis);
myInterpolator.setMedianPlane(1.);// median line on target
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
double tolInters = myInterpolator.getBoundingBoxAdjustmentAbs() * sqrt(2.);
INTERP_KERNEL::Interpolation2DCurve myInterpolator;
const double precis = 1e-13;
myInterpolator.setPrecision(precis);
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1");
const double len1 = 1., len0 = sqrt(2.);
INTERP_KERNEL::Interpolation2DCurve myInterpolator;
const double precis = 1e-13;
myInterpolator.setPrecision(precis);
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
const double len1 = 1., len0 = sqrt(2.);
INTERP_KERNEL::Interpolation2DCurve myInterpolator;
const double precis = 1e-13;
myInterpolator.setPrecision(precis);
- std::vector<std::map<int,double> > res;
+ std::vector<std::map<mcIdType,double> > res;
myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
const double len1 = 1., len0 = sqrt(2.);
CPPUNIT_ASSERT_DOUBLES_EQUAL(6., matrix[1][6],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(3., matrix[1][7],1e-12);
- INTERP_KERNEL::Interpolation3D2D::DuplicateFacesType duplicateFaces = myInterpolator.retrieveDuplicateFaces();
+ INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType duplicateFaces = myInterpolator.retrieveDuplicateFaces();
CPPUNIT_ASSERT_EQUAL(1,(int)duplicateFaces.size());
- INTERP_KERNEL::Interpolation3D2D::DuplicateFacesType correctDuplicateFaces;
- std::set<int> face6;
+ INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType correctDuplicateFaces;
+ std::set<mcIdType> face6;
face6.insert(0);
face6.insert(1);
correctDuplicateFaces[6] = face6;
MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
- INTERP_KERNEL::Interpolation3D2D myInterpolator;
+ INTERP_KERNEL::Interpolation2D3D myInterpolator;
myInterpolator.setPrecision(1e-12);
std::vector<std::map<int,double> > matrix;
INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
CPPUNIT_ASSERT_DOUBLES_EQUAL(80. ,matrix[2][5],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(112. ,matrix[2][6],1e-12);
- INTERP_KERNEL::Interpolation3D2D::DuplicateFacesType duplicateFaces = myInterpolator.retrieveDuplicateFaces();
+ INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType duplicateFaces = myInterpolator.retrieveDuplicateFaces();
CPPUNIT_ASSERT_EQUAL(3,(int)duplicateFaces.size());
- INTERP_KERNEL::Interpolation3D2D::DuplicateFacesType correctDuplicateFaces;
- std::set<int> face2;
+ INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType correctDuplicateFaces;
+ std::set<mcIdType> face2;
face2.insert(0);
face2.insert(1);
correctDuplicateFaces[2] = face2;
- std::set<int> face5;
+ std::set<mcIdType> face5;
face5.insert(1);
face5.insert(2);
correctDuplicateFaces[5] = face5;
- std::set<int> face6;
+ std::set<mcIdType> face6;
face6.insert(0);
face6.insert(1);
face6.insert(2);