- * 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)
+ * Returns ids of Gauss localization objects corresponding to a given cell type.
+ * \param [in] type - the cell type of interest.
+ * \return std::set<int> - ids of the Gauss localization object.
+ * \throw If \a this field is not on Gauss points.
+ * \throw If the spatial discretization of \a this field is NULL.
+ * \throw If the mesh is not set.
+ */
+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 !");
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdsOfOneType method !");
+ return _type->getGaussLocalizationIdsOfOneType(type);
+}
+
+/*!
+ * Returns number of Gauss localization objects available. Implicitly all ids in
+ * [0,getNbOfGaussLocalization()) are valid Gauss localization ids.
+ * \return int - the number of available Gauss localization objects.
+ * \throw If \a this field is not on Gauss points.
+ * \throw If the spatial discretization of \a this field is NULL.
+ * \throw If the mesh is not set.