//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
- if(!_type->isEqual(other->_type,1.))
+ if(!_type || !other->_type)
+ throw INTERP_KERNEL::Exception("MEDCouplingField::areCompatibleForMerge : this or other has a nullptr spatial discretization !");
+ if(_type->getEnum()!=other->_type->getEnum())
* \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.
*/
* \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,
+void MEDCouplingField::setGaussLocalizationOnCells(const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
* problem.
* \param [in] locId - the id of the Gauss localization object of interest.
* It must be in range <em> 0 <= locId < getNbOfGaussLocalization() </em>.
* problem.
* \param [in] locId - the id of the Gauss localization object of interest.
* It must be in range <em> 0 <= locId < getNbOfGaussLocalization() </em>.
* Gauss localization object.
* \throw If \a this field is not on Gauss points.
* \throw If \a locId is not within the valid range.
* Gauss localization object.
* \throw If \a this field is not on Gauss points.
* \throw If \a locId is not within the valid range.
/*!
* Returns an id of the Gauss localization object corresponding to a given cell type.
* \param [in] type - the cell type of interest.
/*!
* Returns an id of the Gauss localization object corresponding to a given cell type.
* \param [in] type - the cell type of interest.
* \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.
*/
* \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.
*/
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdOfOneType method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdOfOneType method !");
/*!
* Returns ids of Gauss localization objects corresponding to a given cell type.
* \param [in] type - the cell type of interest.
/*!
* Returns ids of Gauss localization objects corresponding to a given cell type.
* \param [in] type - the cell type of interest.
* \throw If \a this field is not on Gauss points.
* \throw If the spatial discretization of \a this field is NULL
*/
* \throw If \a this field is not on Gauss points.
* \throw If the spatial discretization of \a this field is NULL
*/
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdsOfOneType method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdsOfOneType method !");
/*!
* Returns number of Gauss localization objects available. Implicitly all ids in
* [0,getNbOfGaussLocalization()) are valid Gauss localization ids.
/*!
* Returns number of Gauss localization objects available. Implicitly all ids in
* [0,getNbOfGaussLocalization()) are valid Gauss localization ids.
* \throw If \a this field is not on Gauss points.
* \throw If the spatial discretization of \a this field is NULL.
*/
* \throw If \a this field is not on Gauss points.
* \throw If the spatial discretization of \a this field is NULL.
*/
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNbOfGaussLocalization method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNbOfGaussLocalization method !");
/*!
* 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.
/*!
* 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.
* \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.
*/
* \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.
*/
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdOfOneCell method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdOfOneCell method !");
* \throw If \a locId is not within the valid range.
* \throw If the spatial discretization of \a this field is NULL.
*/
* \throw If \a locId is not within the valid range.
* \throw If the spatial discretization of \a this field is NULL.
*/
* \param [in] start - an array of cell ids to include to the result mesh.
* \param [in] end - specifies the end of the array \a start, so that
* the last value of \a start is \a end[ -1 ].
* \param [in] start - an array of cell ids to include to the result mesh.
* \param [in] end - specifies the end of the array \a start, so that
* the last value of \a start is \a end[ -1 ].
* cells, Gauss points). The caller is to delete this array using decrRef() as it
* is no more needed.
* \return MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to
* cells, Gauss points). The caller is to delete this array using decrRef() as it
* is no more needed.
* \return MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to
-MEDCouplingMesh *MEDCouplingField::buildSubMeshData(const int *start, const int *end, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingField::buildSubMeshData(const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call buildSubMeshData method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call buildSubMeshData method !");
-MEDCouplingMesh *MEDCouplingField::buildSubMeshDataRange(int begin, int end, int step, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingField::buildSubMeshDataRange(mcIdType begin, mcIdType end, mcIdType step, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call buildSubMeshDataRange method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call buildSubMeshDataRange method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call computeTupleIdsToSelectFromCellIds method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call computeTupleIdsToSelectFromCellIds method !");
/*!
* Returns number of tuples expected regarding the spatial discretization of \a this
* field and number of entities in the underlying mesh. This method behaves exactly as MEDCouplingFieldDouble::getNumberOfTuples.
/*!
* Returns number of tuples expected regarding the spatial discretization of \a this
* field and number of entities in the underlying mesh. This method behaves exactly as MEDCouplingFieldDouble::getNumberOfTuples.
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNumberOfTuplesExpected method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNumberOfTuplesExpected method !");
/*!
* Returns number of mesh entities in the underlying mesh of \a this field regarding the
* spatial discretization.
/*!
* Returns number of mesh entities in the underlying mesh of \a this field regarding the
* spatial discretization.
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNumberOfMeshPlacesExpected method !");
{
if(!((const MEDCouplingFieldDiscretization *)_type))
throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNumberOfMeshPlacesExpected method !");
* \throw If input code point to invalid zones in spatial discretization.
* \throw If spatial discretization in \a this requires a mesh and those mesh is invalid (null,...)
*/
* \throw If input code point to invalid zones in spatial discretization.
* \throw If spatial discretization in \a this requires a mesh and those mesh is invalid (null,...)
*/