Salome HOME
Merge from V6_main 11/02/2013
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingExtrudedMesh.cxx
index 71a7e65c8f244bed9270e3fd55c253d6c24b2bc0..875889dadc19cb4d5f2d0c61752c5d8594fe2c16 100644 (file)
@@ -16,6 +16,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Author : Anthony Geay (CEA/DEN)
 
 #include "MEDCouplingExtrudedMesh.hxx"
 #include "MEDCouplingUMesh.hxx"
@@ -63,6 +64,18 @@ MEDCouplingMeshType MEDCouplingExtrudedMesh::getType() const
   return EXTRUDED;
 }
 
+std::size_t MEDCouplingExtrudedMesh::getHeapMemorySize() const
+{
+  std::size_t ret=0;
+  if(_mesh2D)
+    ret+=_mesh2D->getHeapMemorySize();
+  if(_mesh1D)
+    ret+=_mesh1D->getHeapMemorySize();
+  if(_mesh3D_ids)
+    ret+=_mesh3D_ids->getHeapMemorySize();
+  return MEDCouplingMesh::getHeapMemorySize()+ret;
+}
+
 /*!
  * This method copyies all tiny strings from other (name and components name).
  * @throw if other and this have not same mesh type.
@@ -397,8 +410,9 @@ MEDCouplingFieldDouble *MEDCouplingExtrudedMesh::getMeasureField(bool) const
   int nbOf1DCells=_mesh1D->getNumberOfCells();
   int nbOf3DCells=nbOf2DCells*nbOf1DCells;
   const int *renum=_mesh3D_ids->getConstPointer();
-  MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
+  MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   ret->setMesh(this);
+  ret->synchronizeTimeWithMesh();
   DataArrayDouble *da=DataArrayDouble::New();
   da->alloc(nbOf3DCells,1);
   double *retPtr=da->getPointer();