+/*!
+ * Sets localization of Gauss points for a given geometric type of cell.
+ * \param [in] type - the geometric type of cell for which the Gauss localization is set.
+ * \param [in] refCoo - coordinates of points of the reference cell. Size of this vector
+ * must be \c nbOfNodesPerCell * \c dimOfType.
+ * \param [in] gsCoo - coordinates of Gauss points on the reference cell. Size of this vector
+ * must be _wg_.size() * \c dimOfType.
+ * \param [in] wg - the weights of Gauss points.
+ * \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.
+ * \throw If size of any vector do not match the \a type.
+ */
+void MEDCouplingField::setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
+ const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception)
+{
+ if(!_mesh)
+ throw INTERP_KERNEL::Exception("Mesh has to be set before calling setGaussLocalizationOnType method !");
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call setGaussLocalizationOnType method !");
+ _type->setGaussLocalizationOnType(_mesh,type,refCoo,gsCoo,wg);
+}
+
+/*!
+ * Sets localization of Gauss points for given cells specified by their ids.
+ * \param [in] begin - an array of cell ids of interest.
+ * \param [in] end - the end of \a begin, i.e. a pointer to its (last+1)-th element.
+ * \param [in] refCoo - coordinates of points of the reference cell. Size of this vector
+ * must be \c nbOfNodesPerCell * \c dimOfType.
+ * \param [in] gsCoo - coordinates of Gauss points on the reference cell. Size of this vector
+ * must be _wg_.size() * \c dimOfType.
+ * \param [in] wg - the weights of Gauss points.
+ * \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.
+ * \throw If size of any vector do not match the type of cell # \a begin[0].
+ * \throw If type of any cell in \a begin differs from that of cell # \a begin[0].
+ * \throw If the range [_begin_,_end_) is empty.
+ */
+void MEDCouplingField::setGaussLocalizationOnCells(const int *begin, const int *end, const std::vector<double>& refCoo,
+ const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception)
+{
+ if(!_mesh)
+ throw INTERP_KERNEL::Exception("Mesh has to be set before calling setGaussLocalizationOnCells method !");
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call setGaussLocalizationOnCells method !");
+ _type->setGaussLocalizationOnCells(_mesh,begin,end,refCoo,gsCoo,wg);
+}
+
+/*!
+ * Clears data on Gauss points localization.
+ * \throw If \a this field is not on Gauss points.
+ * \throw If the spatial discretization of \a this field is NULL.
+ */
+void MEDCouplingField::clearGaussLocalizations()
+{
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call clearGaussLocalizations method !");
+ _type->clearGaussLocalizations();
+}
+
+/*!
+ * Returns a reference to the Gauss localization object by its id.
+ * \warning This method is not const, so the returned object can be modified without any
+ * problem.
+ * \param [in] locId - the id of the Gauss localization object of interest.
+ * It must be in range <em> 0 <= locId < getNbOfGaussLocalization() </em>.
+ * \return \ref MEDCouplingGaussLocalization & - the Gauss localization object.
+ * \throw If \a this field is not on Gauss points.
+ * \throw If \a locId is not within the valid range.
+ * \throw If the spatial discretization of \a this field is NULL.
+ */
+MEDCouplingGaussLocalization& MEDCouplingField::getGaussLocalization(int locId)
+{
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalization method !");
+ return _type->getGaussLocalization(locId);
+}
+
+/*!
+ * Returns an id of the Gauss localization object corresponding to a given cell type.
+ * \param [in] type - the cell type of interest.
+ * \return int - the id 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 no Gauss localization object found for the given cell \a type.
+ * \throw If more than one Gauss localization object found for the given cell \a type.
+ */
+int MEDCouplingField::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const
+{
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdOfOneType method !");
+ return _type->getGaussLocalizationIdOfOneType(type);
+}
+
+/*!
+ * 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
+ */
+std::set<int> MEDCouplingField::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
+{
+ 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.
+ */
+int MEDCouplingField::getNbOfGaussLocalization() const
+{
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNbOfGaussLocalization method !");
+ return _type->getNbOfGaussLocalization();
+}
+
+/*!
+ * Returns an id of the Gauss localization object corresponding to a type of a given cell.
+ * \param [in] cellId - an id of the cell of interest.
+ * \return int - the id 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 no Gauss localization object found for the given cell.
+ */
+int MEDCouplingField::getGaussLocalizationIdOfOneCell(int cellId) const
+{
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdOfOneCell method !");
+ return _type->getGaussLocalizationIdOfOneCell(cellId);
+}
+
+/*!
+ * Returns ids of cells that share the same Gauss localization given by its id.
+ * \param [in] locId - the id of the Gauss localization object of interest.
+ * It must be in range <em> 0 <= locId < getNbOfGaussLocalization() </em>.
+ * \param [in,out] cellIds - a vector returning ids of found cells. It is cleared before
+ * filling in. It remains empty if no cells found.
+ * \throw If \a this field is not on Gauss points.
+ * \throw If \a locId is not within the valid range.
+ * \throw If the spatial discretization of \a this field is NULL.
+ */
+void MEDCouplingField::getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const
+{
+ cellIds.clear();
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getCellIdsHavingGaussLocalization method !");
+ _type->getCellIdsHavingGaussLocalization(locId,cellIds);
+}
+
+/*!
+ * Returns a reference to the Gauss localization object by its id.
+ * \warning This method is const, so the returned object is not apt for modification.
+ * \param [in] locId - the id of the Gauss localization object of interest.
+ * It must be in range <em> 0 <= locId < getNbOfGaussLocalization() </em>.
+ * \return \ref const MEDCouplingGaussLocalization & - the Gauss localization object.
+ * \throw If \a this field is not on Gauss points.
+ * \throw If \a locId is not within the valid range.
+ * \throw If the spatial discretization of \a this field is NULL.
+ */
+const MEDCouplingGaussLocalization& MEDCouplingField::getGaussLocalization(int locId) const
+{
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalization method !");
+ return _type->getGaussLocalization(locId);
+}
+