-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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
interpMethod+=srcMeth;
//creating the interpolator structure
vector<map<int,double> > surfaces;
- int colSize=0;
//computation of the intersection volumes between source and target elements
MEDCouplingUMesh *distant_supportC=dynamic_cast<MEDCouplingUMesh *>(&distant_support);
MEDCouplingUMesh *source_supportC=dynamic_cast<MEDCouplingUMesh *>(_source_support);
{
MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(source_supportC);
INTERP_KERNEL::Interpolation2D interpolation(*this);
- colSize=interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth.c_str());
+ interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth);
}
else if(source_supportC->getMeshDimension()==3 && source_supportC->getSpaceDimension()==3)
{
MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(source_supportC);
INTERP_KERNEL::Interpolation3D interpolation(*this);
- colSize=interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth.c_str());
+ interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth);
}
else if(source_supportC->getMeshDimension()==2 && source_supportC->getSpaceDimension()==3)
{
MEDCouplingNormalizedUnstructuredMesh<3,2> source_mesh_wrapper(source_supportC);
INTERP_KERNEL::Interpolation3DSurf interpolation(*this);
- colSize=interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth.c_str());
+ interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth);
}
else
throw INTERP_KERNEL::Exception("No para interpolation available for the given mesh and space dimension of source mesh to -1D targetMesh");
{
MEDCouplingNormalizedUnstructuredMesh<2,2> distant_mesh_wrapper(distant_supportC);
INTERP_KERNEL::Interpolation2D interpolation(*this);
- colSize=interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth.c_str());
+ interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth);
}
else if(distant_supportC->getMeshDimension()==3 && distant_supportC->getSpaceDimension()==3)
{
MEDCouplingNormalizedUnstructuredMesh<3,3> distant_mesh_wrapper(distant_supportC);
INTERP_KERNEL::Interpolation3D interpolation(*this);
- colSize=interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth.c_str());
+ interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth);
}
else if(distant_supportC->getMeshDimension()==2 && distant_supportC->getSpaceDimension()==3)
{
MEDCouplingNormalizedUnstructuredMesh<3,2> distant_mesh_wrapper(distant_supportC);
INTERP_KERNEL::Interpolation3DSurf interpolation(*this);
- colSize=interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth.c_str());
+ interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth);
}
else
throw INTERP_KERNEL::Exception("No para interpolation available for the given mesh and space dimension of distant mesh to -1D sourceMesh");
MEDCouplingNormalizedUnstructuredMesh<3,3> target_wrapper(distant_supportC);
MEDCouplingNormalizedUnstructuredMesh<3,3> source_wrapper(source_supportC);
INTERP_KERNEL::Interpolation3D2D interpolator (*this);
- colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
+ interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod);
target_wrapper.releaseTempArrays();
source_wrapper.releaseTempArrays();
}
MEDCouplingNormalizedUnstructuredMesh<2,2> target_wrapper(distant_supportC);
MEDCouplingNormalizedUnstructuredMesh<2,2> source_wrapper(source_supportC);
INTERP_KERNEL::Interpolation2D1D interpolator (*this);
- colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
+ interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod);
+ target_wrapper.releaseTempArrays();
+ source_wrapper.releaseTempArrays();
+ }
+ else if ( distant_support.getMeshDimension() == 3
+ && _source_support->getMeshDimension() == 1
+ && distant_support.getSpaceDimension() == 3 && _source_support->getSpaceDimension() == 3)
+ {
+ MEDCouplingNormalizedUnstructuredMesh<3,3> target_wrapper(distant_supportC);
+ MEDCouplingNormalizedUnstructuredMesh<3,3> source_wrapper(source_supportC);
+ INTERP_KERNEL::Interpolation3D interpolator (*this);
+ interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod);
target_wrapper.releaseTempArrays();
source_wrapper.releaseTempArrays();
}
MEDCouplingNormalizedUnstructuredMesh<1,1> source_wrapper(source_supportC);
INTERP_KERNEL::Interpolation1D interpolation(*this);
- colSize=interpolation.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
+ interpolation.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod);
target_wrapper.releaseTempArrays();
source_wrapper.releaseTempArrays();
}
MEDCouplingNormalizedUnstructuredMesh<2,1> source_wrapper(source_supportC);
INTERP_KERNEL::Interpolation2DCurve interpolation(*this);
- colSize=interpolation.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
+ interpolation.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod);
target_wrapper.releaseTempArrays();
source_wrapper.releaseTempArrays();
}
MEDCouplingNormalizedUnstructuredMesh<3,2> source_wrapper(source_supportC);
INTERP_KERNEL::Interpolation3DSurf interpolator (*this);
- colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
+ interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod);
target_wrapper.releaseTempArrays();
source_wrapper.releaseTempArrays();
}
MEDCouplingNormalizedUnstructuredMesh<2,2> source_wrapper(source_supportC);
INTERP_KERNEL::Interpolation2D interpolator (*this);
- colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
+ interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod);
target_wrapper.releaseTempArrays();
source_wrapper.releaseTempArrays();
}
MEDCouplingNormalizedUnstructuredMesh<3,3> source_wrapper(source_supportC);
INTERP_KERNEL::Interpolation3D interpolator (*this);
- colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
+ interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod);
target_wrapper.releaseTempArrays();
source_wrapper.releaseTempArrays();
}