From c27b15732cc7d39f1062728428324355f9d8244e Mon Sep 17 00:00:00 2001 From: ageay Date: Thu, 5 Jan 2012 09:21:46 +0000 Subject: [PATCH] Conservation of time disc of fields through interpolation process. --- src/MEDCoupling/MEDCouplingRemapper.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.39.2