]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Conservation of time disc of fields through interpolation process.
authorageay <ageay>
Thu, 5 Jan 2012 09:21:46 +0000 (09:21 +0000)
committerageay <ageay>
Thu, 5 Jan 2012 09:21:46 +0000 (09:21 +0000)
src/MEDCoupling/MEDCouplingRemapper.cxx

index 1297c12116bf9635503c53d710c698361ea47bc7..aadf86a4259ae1ef11d4c1ede2258e459f3ee6ba 100644 (file)
@@ -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);