Salome HOME
Merge from V6_main 11/02/2013
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingField.cxx
index 08eb6970b29e1744561a2adbefcf106d4d5c117a..da93e7a6e1d555a5e33489db2ddc15ec0c1d89a5 100644 (file)
@@ -127,6 +127,18 @@ void MEDCouplingField::updateTime() const
     updateTimeWith(*_type);
 }
 
+std::size_t MEDCouplingField::getHeapMemorySize() const
+{
+  std::size_t ret=0;
+  ret+=_name.capacity();
+  ret+=_desc.capacity();
+  if(_mesh)
+    ret+=_mesh->getHeapMemorySize();
+  if((const MEDCouplingFieldDiscretization *)_type)
+    ret+=_type->getHeapMemorySize();
+  return ret;
+}
+
 TypeOfField MEDCouplingField::getTypeOfField() const
 {
   return _type->getEnum();
@@ -260,6 +272,13 @@ int MEDCouplingField::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedC
   return _type->getGaussLocalizationIdOfOneType(type);
 }
 
+std::set<int> MEDCouplingField::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception)
+{
+  if(!_mesh)
+    throw INTERP_KERNEL::Exception("Mesh has to be set before calling getGaussLocalizationIdsOfOneType method !");
+  return _type->getGaussLocalizationIdsOfOneType(type);
+}
+
 /*!
  * This method returns number of Gauss localization available. Implicitely all ids in [0,getNbOfGaussLocalization()) is a valid Gauss localisation id.
  * This method throws an exception if there is no mesh, invalid FieldDescription (different from Gauss)