From: ageay Date: Thu, 5 Jan 2012 09:21:46 +0000 (+0000) Subject: Conservation of time disc of fields through interpolation process. X-Git-Tag: V6_main_FINAL~915 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c27b15732cc7d39f1062728428324355f9d8244e;p=tools%2Fmedcoupling.git Conservation of time disc of fields through interpolation process. --- diff --git a/src/MEDCoupling/MEDCouplingRemapper.cxx b/src/MEDCoupling/MEDCouplingRemapper.cxx index 1297c1211..aadf86a42 100644 --- a/src/MEDCoupling/MEDCouplingRemapper.cxx +++ b/src/MEDCoupling/MEDCouplingRemapper.cxx @@ -128,7 +128,8 @@ MEDCouplingFieldDouble *MEDCouplingRemapper::transferField(const MEDCouplingFiel { if(_src_method!=srcField->getDiscretization()->getStringRepr()) throw INTERP_KERNEL::Exception("Incoherency with prepare call for source field"); - MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(MEDCouplingFieldDiscretization::getTypeOfFieldFromStringRepr(_target_method.c_str())); + MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(MEDCouplingFieldDiscretization::getTypeOfFieldFromStringRepr(_target_method.c_str()),srcField->getTimeDiscretization()); + ret->copyTinyAttrFrom(srcField); ret->setNature(srcField->getNature()); ret->setMesh(_target_mesh); transfer(srcField,ret,dftValue); @@ -139,7 +140,8 @@ MEDCouplingFieldDouble *MEDCouplingRemapper::reverseTransferField(const MEDCoupl { if(_target_method!=targetField->getDiscretization()->getStringRepr()) throw INTERP_KERNEL::Exception("Incoherency with prepare call for target field"); - MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(MEDCouplingFieldDiscretization::getTypeOfFieldFromStringRepr(_target_method.c_str())); + MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(MEDCouplingFieldDiscretization::getTypeOfFieldFromStringRepr(_target_method.c_str()),targetField->getTimeDiscretization()); + ret->copyTinyAttrFrom(targetField); ret->setNature(targetField->getNature()); ret->setMesh(_src_mesh); reverseTransfer(ret,targetField,dftValue);