From 0fefcd962b9fae8a26e45c537e87e723ca4c9be9 Mon Sep 17 00:00:00 2001 From: ageay Date: Wed, 13 Mar 2013 08:11:08 +0000 Subject: [PATCH] Gauss<->Gauss interpolation --- src/MEDCoupling/MEDCouplingField.cxx | 5 +---- src/MEDCoupling/MEDCouplingRemapper.cxx | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/MEDCoupling/MEDCouplingField.cxx b/src/MEDCoupling/MEDCouplingField.cxx index f1f259e7e..527ff74e4 100644 --- a/src/MEDCoupling/MEDCouplingField.cxx +++ b/src/MEDCoupling/MEDCouplingField.cxx @@ -355,10 +355,7 @@ MEDCouplingField::MEDCouplingField(const MEDCouplingField& other, bool deepCopy) if(deepCopy) _type=other._type->clone(); else - { - _type=other._type; - _type->incrRef(); - } + _type=other._type; } /*! diff --git a/src/MEDCoupling/MEDCouplingRemapper.cxx b/src/MEDCoupling/MEDCouplingRemapper.cxx index 171e43d09..69df8d929 100644 --- a/src/MEDCoupling/MEDCouplingRemapper.cxx +++ b/src/MEDCoupling/MEDCouplingRemapper.cxx @@ -711,6 +711,8 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyCC() throw(INTERP_KERNEL::Except int MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss() throw(INTERP_KERNEL::Exception) { + if(getIntersectionType()!=INTERP_KERNEL::PointLocator) + throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss : The intersection type is not supported ! Only PointLocator is supported for Gauss->Gauss interpolation ! Please invoke setIntersectionType(PointLocator) on the MEDCouplingRemapper instance !"); MEDCouplingAutoRefCountObjectPtr trgLoc=_target_ft->getLocalizationOfDiscr(); const double *trgLocPtr=trgLoc->begin(); int trgSpaceDim=trgLoc->getNumberOfComponents(); -- 2.39.2