{
}
-MEDCoupling1GTUMesh *MEDCoupling1GTUMesh::New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
+MEDCoupling1GTUMesh *MEDCoupling1GTUMesh::New(const char *name, INTERP_KERNEL::NormalizedCellType type)
{
if(type==INTERP_KERNEL::NORM_ERROR)
throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::New : NORM_ERROR is not a valid type to be used as base geometric type for a mesh !");
return MEDCoupling1DGTUMesh::New(name,type);
}
-MEDCoupling1GTUMesh *MEDCoupling1GTUMesh::New(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception)
+MEDCoupling1GTUMesh *MEDCoupling1GTUMesh::New(const MEDCouplingUMesh *m)
{
if(!m)
throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::New : input mesh is null !");
return MEDCoupling1DGTUMesh::New(m);
}
-const INTERP_KERNEL::CellModel& MEDCoupling1GTUMesh::getCellModel() const throw(INTERP_KERNEL::Exception)
+const INTERP_KERNEL::CellModel& MEDCoupling1GTUMesh::getCellModel() const
{
return *_cm;
}
-INTERP_KERNEL::NormalizedCellType MEDCoupling1GTUMesh::getCellModelEnum() const throw(INTERP_KERNEL::Exception)
+INTERP_KERNEL::NormalizedCellType MEDCoupling1GTUMesh::getCellModelEnum() const
{
return _cm->getEnum();
}
* \param [in] type the geometric type
* \return cell ids in this having geometric type \a type.
*/
-DataArrayInt *MEDCoupling1GTUMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1GTUMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
if(type==getCellModelEnum())
* For every k in [0,n] ret[3*k+2]==-1 because it has no sense here.
* This parameter is kept only for compatibility with other methode listed above.
*/
-std::vector<int> MEDCoupling1GTUMesh::getDistributionOfTypes() const throw(INTERP_KERNEL::Exception)
+std::vector<int> MEDCoupling1GTUMesh::getDistributionOfTypes() const
{
std::vector<int> ret(3);
ret[0]=(int)getCellModelEnum(); ret[1]=getNumberOfCells(); ret[2]=-1;
* - After \a code contains [NORM_...,nbCells,0], \a idsInPflPerType [[0,1]] and \a idsPerType is [[1,2]] <br>
*/
-void MEDCoupling1GTUMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1GTUMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType) const
{
if(!profile)
throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::splitProfilePerType : input profile is NULL !");
*
* \sa MEDCouplingUMesh::checkTypeConsistencyAndContig
*/
-DataArrayInt *MEDCoupling1GTUMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1GTUMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
{
int nbOfCells=getNumberOfCells();
if(code.size()!=3)
return const_cast<DataArrayInt *>(pfl);
}
-void MEDCoupling1GTUMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1GTUMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=buildUnstructured();
- m->writeVTKLL(ofs,cellData,pointData);
+ m->writeVTKLL(ofs,cellData,pointData,byteData);
}
-std::string MEDCoupling1GTUMesh::getVTKDataSetType() const throw(INTERP_KERNEL::Exception)
+std::string MEDCoupling1GTUMesh::getVTKDataSetType() const
{
return std::string("UnstructuredGrid");
}
-std::size_t MEDCoupling1GTUMesh::getHeapMemorySize() const
+std::size_t MEDCoupling1GTUMesh::getHeapMemorySizeWithoutChildren() const
{
- return MEDCouplingPointSet::getHeapMemorySize();
+ return MEDCouplingPointSet::getHeapMemorySizeWithoutChildren();
}
-bool MEDCoupling1GTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception)
+bool MEDCoupling1GTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const
{
if(!MEDCouplingPointSet::isEqualIfNotWhy(other,prec,reason))
return false;
return true;
}
-void MEDCoupling1GTUMesh::checkCoherency() const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1GTUMesh::checkCoherency() const
{
MEDCouplingPointSet::checkCoherency();
}
return m->buildBoundaryMesh(keepCoords);
}
-void MEDCoupling1GTUMesh::findCommonCells(int compType, int startCellId, DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1GTUMesh::findCommonCells(int compType, int startCellId, DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=buildUnstructured();
m->findCommonCells(compType,startCellId,commonCellsArr,commonCellsIArr);
}
-int MEDCoupling1GTUMesh::getNodalConnectivityLength() const throw(INTERP_KERNEL::Exception)
+int MEDCoupling1GTUMesh::getNodalConnectivityLength() const
{
const DataArrayInt *c1(getNodalConnectivity());
if(!c1)
* \throw If not all the parts have their connectivity set properly.
* \throw If \a parts is empty.
*/
-MEDCouplingUMesh *MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(const std::vector< const MEDCoupling1GTUMesh *>& parts) throw(INTERP_KERNEL::Exception)
+MEDCouplingUMesh *MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(const std::vector< const MEDCoupling1GTUMesh *>& parts)
{
if(parts.empty())
throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh : input parts vector is empty !");
return new MEDCoupling1SGTUMesh;
}
-MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::New(const char *name, INTERP_KERNEL::NormalizedCellType type)
{
if(type==INTERP_KERNEL::NORM_ERROR)
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::New : NORM_ERROR is not a valid type to be used as base geometric type for a mesh !");
return new MEDCoupling1SGTUMesh(name,cm);
}
-MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::New(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception)
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::New(const MEDCouplingUMesh *m)
{
if(!m)
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::New : input mesh is null !");
* \return MEDCouplingUMesh * - A new object instance holding the copy of \a this (deep for connectivity, shallow for coordiantes)
* \sa MEDCoupling1SGTUMesh::deepCpy
*/
-MEDCouplingPointSet *MEDCoupling1SGTUMesh::deepCpyConnectivityOnly() const throw(INTERP_KERNEL::Exception)
+MEDCouplingPointSet *MEDCoupling1SGTUMesh::deepCpyConnectivityOnly() const
{
checkCoherency();
MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(clone(false));
return ret.retn();
}
-void MEDCoupling1SGTUMesh::shallowCopyConnectivityFrom(const MEDCouplingPointSet *other) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::shallowCopyConnectivityFrom(const MEDCouplingPointSet *other)
{
if(!other)
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::shallowCopyConnectivityFrom : input pointer is null !");
updateTimeWith(*c);
}
-std::size_t MEDCoupling1SGTUMesh::getHeapMemorySize() const
+std::size_t MEDCoupling1SGTUMesh::getHeapMemorySizeWithoutChildren() const
{
- std::size_t ret=0;
+ return MEDCoupling1GTUMesh::getHeapMemorySizeWithoutChildren();
+}
+
+std::vector<const BigMemoryObject *> MEDCoupling1SGTUMesh::getDirectChildren() const
+{
+ std::vector<const BigMemoryObject *> ret(MEDCoupling1GTUMesh::getDirectChildren());
const DataArrayInt *c(_conn);
if(c)
- ret+=c->getHeapMemorySize();
- return MEDCoupling1GTUMesh::getHeapMemorySize()+ret;
+ ret.push_back(c);
+ return ret;
}
MEDCouplingMesh *MEDCoupling1SGTUMesh::deepCpy() const
return clone(true);
}
-bool MEDCoupling1SGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception)
+bool MEDCoupling1SGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const
{
if(!other)
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::isEqualIfNotWhy : input other pointer is null !");
return true;
}
-void MEDCoupling1SGTUMesh::checkCoherencyOfConnectivity() const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::checkCoherencyOfConnectivity() const
{
const DataArrayInt *c1(_conn);
if(c1)
throw INTERP_KERNEL::Exception("Nodal connectivity array not defined !");
}
-void MEDCoupling1SGTUMesh::checkCoherency() const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::checkCoherency() const
{
MEDCouplingPointSet::checkCoherency();
checkCoherencyOfConnectivity();
}
-void MEDCoupling1SGTUMesh::checkCoherency1(double eps) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::checkCoherency1(double eps) const
{
checkCoherency();
const DataArrayInt *c1(_conn);
}
}
-void MEDCoupling1SGTUMesh::checkCoherency2(double eps) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::checkCoherency2(double eps) const
{
checkCoherency1(eps);
}
return nbOfTuples/nbOfNodesPerCell;
}
-int MEDCoupling1SGTUMesh::getNumberOfNodesInCell(int cellId) const throw(INTERP_KERNEL::Exception)
+int MEDCoupling1SGTUMesh::getNumberOfNodesInCell(int cellId) const
{
return getNumberOfNodesPerCell();
}
-int MEDCoupling1SGTUMesh::getNumberOfNodesPerCell() const throw(INTERP_KERNEL::Exception)
+int MEDCoupling1SGTUMesh::getNumberOfNodesPerCell() const
{
checkNonDynamicGeoType();
return (int)_cm->getNumberOfNodes();
}
-DataArrayInt *MEDCoupling1SGTUMesh::computeNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::computeNbOfNodesPerCell() const
{
checkNonDynamicGeoType();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
return ret.retn();
}
-DataArrayInt *MEDCoupling1SGTUMesh::computeNbOfFacesPerCell() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::computeNbOfFacesPerCell() const
{
checkNonDynamicGeoType();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
return ret.retn();
}
-DataArrayInt *MEDCoupling1SGTUMesh::computeEffectiveNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::computeEffectiveNbOfNodesPerCell() const
{
checkNonDynamicGeoType();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
}
}
-void MEDCoupling1SGTUMesh::checkNonDynamicGeoType() const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::checkNonDynamicGeoType() const
{
if(_cm->isDynamic())
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::checkNonDynamicGeoType : internal error ! the internal geo type is dynamic ! should be static !");
return ret.str();
}
-DataArrayDouble *MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell() const throw(INTERP_KERNEL::Exception)
+DataArrayDouble *MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell() const
{
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::New();
int spaceDim=getSpaceDimension();
return ret.retn();
}
-void MEDCoupling1SGTUMesh::renumberCells(const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::renumberCells(const int *old2NewBg, bool check)
{
int nbCells=getNumberOfCells();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> o2n=DataArrayInt::New();
return Merge1SGTUMeshes(this,otherC);
}
-MEDCouplingUMesh *MEDCoupling1SGTUMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception)
+MEDCouplingUMesh *MEDCoupling1SGTUMesh::buildUnstructured() const
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName().c_str(),getMeshDimension());
ret->setCoords(getCoords());
return ret.retn();
}
-DataArrayInt *MEDCoupling1SGTUMesh::simplexize(int policy) throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::simplexize(int policy)
{
switch(policy)
{
* \throw If the nodal connectivity of cells is not defined.
* \throw If the nodal connectivity includes an invalid id.
*/
-DataArrayInt *MEDCoupling1SGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
{
nbrOfNodesInUse=-1;
int nbOfNodes=getNumberOfNodes();
updateTime();
}
-MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2) throw(INTERP_KERNEL::Exception)
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2)
{
std::vector<const MEDCoupling1SGTUMesh *> tmp(2);
tmp[0]=const_cast<MEDCoupling1SGTUMesh *>(mesh1); tmp[1]=const_cast<MEDCoupling1SGTUMesh *>(mesh2);
return Merge1SGTUMeshes(tmp);
}
-MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshes(std::vector<const MEDCoupling1SGTUMesh *>& a) throw(INTERP_KERNEL::Exception)
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshes(std::vector<const MEDCoupling1SGTUMesh *>& a)
{
std::size_t sz=a.size();
if(sz==0)
* \throw If presence of a null instance in the input vector \a a.
* \throw If a is empty
*/
-MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(std::vector<const MEDCoupling1SGTUMesh *>& a) throw(INTERP_KERNEL::Exception)
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(std::vector<const MEDCoupling1SGTUMesh *>& a)
{
if(a.empty())
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords : input array must be NON EMPTY !");
/*!
* Assume that all instances in \a a are non null. If null it leads to a crash. That's why this method is assigned to be low level (LL)
*/
-MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesLL(std::vector<const MEDCoupling1SGTUMesh *>& a) throw(INTERP_KERNEL::Exception)
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesLL(std::vector<const MEDCoupling1SGTUMesh *>& a)
{
if(a.empty())
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshes : input array must be NON EMPTY !");
return ret.retn();
}
-void MEDCoupling1SGTUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const
{
int sz((int)nodeIdsInUse.size());
int nbCells(getNumberOfCells());
}
}
-MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception)
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::buildSetInstanceFromThis(int spaceDim) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName().c_str(),*_cm));
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp1;
return ret.retn();
}
-DataArrayInt *MEDCoupling1SGTUMesh::simplexizePol0() throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::simplexizePol0()
{
int nbOfCells=getNumberOfCells();
if(getCellModelEnum()!=INTERP_KERNEL::NORM_QUAD4)
return ret.retn();
}
-DataArrayInt *MEDCoupling1SGTUMesh::simplexizePol1() throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::simplexizePol1()
{
int nbOfCells=getNumberOfCells();
if(getCellModelEnum()!=INTERP_KERNEL::NORM_QUAD4)
return ret.retn();
}
-DataArrayInt *MEDCoupling1SGTUMesh::simplexizePlanarFace5() throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::simplexizePlanarFace5()
{
int nbOfCells=getNumberOfCells();
if(getCellModelEnum()!=INTERP_KERNEL::NORM_HEXA8)
return ret.retn();
}
-DataArrayInt *MEDCoupling1SGTUMesh::simplexizePlanarFace6() throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::simplexizePlanarFace6()
{
int nbOfCells=getNumberOfCells();
if(getCellModelEnum()!=INTERP_KERNEL::NORM_HEXA8)
return ret.retn();
}
-void MEDCoupling1SGTUMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::reprQuickOverview(std::ostream& stream) const
{
stream << "MEDCoupling1SGTUMesh C++ instance at " << this << ". Type=" << _cm->getRepr() << ". Name : \"" << getName() << "\".";
stream << " Mesh dimension : " << getMeshDimension() << ".";
}
}
-void MEDCoupling1SGTUMesh::checkFullyDefined() const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::checkFullyDefined() const
{
if(!((const DataArrayInt *)_conn) || !((const DataArrayDouble *)_coords))
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::checkFullyDefined : part of this is not fully defined.");
* \param [in] prec - the precision used to compare nodes of the two meshes.
* \throw If the two meshes do not match.
*/
-void MEDCoupling1SGTUMesh::checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const
{
MEDCouplingPointSet::checkFastEquivalWith(other,prec);
const MEDCoupling1SGTUMesh *otherC=dynamic_cast<const MEDCoupling1SGTUMesh *>(other);
return Merge1SGTUMeshesOnSameCoords(ms);
}
-void MEDCoupling1SGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const
{
checkFullyDefined();
int nbOfNodes=getNumberOfNodes();
/*!
* Use \a nodalConn array as nodal connectivity of \a this. The input \a nodalConn pointer can be null.
*/
-void MEDCoupling1SGTUMesh::setNodalConnectivity(DataArrayInt *nodalConn) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::setNodalConnectivity(DataArrayInt *nodalConn)
{
if(nodalConn)
nodalConn->incrRef();
/*!
* \return DataArrayInt * - the internal reference to the nodal connectivity. The caller is not reponsible to deallocate it.
*/
-DataArrayInt *MEDCoupling1SGTUMesh::getNodalConnectivity() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1SGTUMesh::getNodalConnectivity() const
{
const DataArrayInt *ret(_conn);
return const_cast<DataArrayInt *>(ret);
*
* \param [in] nbOfCells - estimation of the number of cell \a this mesh will contain.
*/
-void MEDCoupling1SGTUMesh::allocateCells(int nbOfCells) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::allocateCells(int nbOfCells)
{
if(nbOfCells<0)
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::allocateCells : the input number of cells should be >= 0 !");
* attached to \a this.
* \thow If the nodal connectivity array in \a this is null (call MEDCoupling1SGTUMesh::allocateCells before).
*/
-void MEDCoupling1SGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1SGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd)
{
int sz=(int)std::distance(nodalConnOfCellBg,nodalConnOfCellEnd);
int ref=getNumberOfNodesPerCell();
* \throw If \a this is not correctly allocated (coordinates and connectivities have to be correctly set !).
* \throw If at least one node in \a this is orphan (without any simplex cell lying on it !)
*/
-MEDCoupling1GTUMesh *MEDCoupling1SGTUMesh::computeDualMesh() const throw(INTERP_KERNEL::Exception)
+MEDCoupling1GTUMesh *MEDCoupling1SGTUMesh::computeDualMesh() const
{
const INTERP_KERNEL::CellModel& cm(getCellModel());
if(!cm.isSimplex())
}
}
-MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh3D() const throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh3D() const
{
static const int DUAL_TETRA_0[36]={
4,1,0, 6,0,3, 7,3,1,
return ret.retn();
}
-MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh2D() const throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh2D() const
{
static const int DUAL_TRI_0[6]={0,2, 1,0, 2,1};
static const int DUAL_TRI_1[6]={-3,+5, +3,-4, +4,-5};
return ret.retn();
}
+/*!
+ * This method aggregate the bbox of each cell and put it into bbox
+ *
+ * \return DataArrayDouble * - newly created object (to be managed by the caller) \a this number of cells tuples and 2*spacedim components.
+ *
+ * \throw If \a this is not fully set (coordinates and connectivity).
+ * \throw If a cell in \a this has no valid nodeId.
+ */
+DataArrayDouble *MEDCoupling1SGTUMesh::getBoundingBoxForBBTree() const
+{
+ int spaceDim(getSpaceDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes()),nbOfNodesPerCell(getNumberOfNodesPerCell());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
+ double *bbox(ret->getPointer());
+ for(int i=0;i<nbOfCells*spaceDim;i++)
+ {
+ bbox[2*i]=std::numeric_limits<double>::max();
+ bbox[2*i+1]=-std::numeric_limits<double>::max();
+ }
+ const double *coordsPtr(_coords->getConstPointer());
+ const int *conn(_conn->getConstPointer());
+ for(int i=0;i<nbOfCells;i++)
+ {
+ int kk(0);
+ for(int j=0;j<nbOfNodesPerCell;j++,conn++)
+ {
+ int nodeId(*conn);
+ if(nodeId>=0 && nodeId<nbOfNodes)
+ {
+ for(int k=0;k<spaceDim;k++)
+ {
+ bbox[2*spaceDim*i+2*k]=std::min(bbox[2*spaceDim*i+2*k],coordsPtr[spaceDim*nodeId+k]);
+ bbox[2*spaceDim*i+2*k+1]=std::max(bbox[2*spaceDim*i+2*k+1],coordsPtr[spaceDim*nodeId+k]);
+ }
+ kk++;
+ }
+ }
+ if(kk==0)
+ {
+ std::ostringstream oss; oss << "MEDCoupling1SGTUMesh::getBoundingBoxForBBTree : cell #" << i << " contains no valid nodeId !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ }
+ return ret.retn();
+}
+
//==
MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New()
return new MEDCoupling1DGTUMesh;
}
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New(const char *name, INTERP_KERNEL::NormalizedCellType type)
{
if(type==INTERP_KERNEL::NORM_ERROR)
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::New : NORM_ERROR is not a valid type to be used as base geometric type for a mesh !");
* \return MEDCouplingUMesh * - A new object instance holding the copy of \a this (deep for connectivity, shallow for coordiantes)
* \sa MEDCoupling1DGTUMesh::deepCpy
*/
-MEDCouplingPointSet *MEDCoupling1DGTUMesh::deepCpyConnectivityOnly() const throw(INTERP_KERNEL::Exception)
+MEDCouplingPointSet *MEDCoupling1DGTUMesh::deepCpyConnectivityOnly() const
{
checkCoherency();
MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(clone(false));
updateTimeWith(*c);
}
-std::size_t MEDCoupling1DGTUMesh::getHeapMemorySize() const
+std::size_t MEDCoupling1DGTUMesh::getHeapMemorySizeWithoutChildren() const
{
- std::size_t ret=0;
+ return MEDCoupling1GTUMesh::getHeapMemorySizeWithoutChildren();
+}
+
+std::vector<const BigMemoryObject *> MEDCoupling1DGTUMesh::getDirectChildren() const
+{
+ std::vector<const BigMemoryObject *> ret(MEDCoupling1GTUMesh::getDirectChildren());
const DataArrayInt *c(_conn);
if(c)
- ret+=c->getHeapMemorySize();
+ ret.push_back(c);
c=_conn_indx;
if(c)
- ret+=c->getHeapMemorySize();
- return MEDCoupling1GTUMesh::getHeapMemorySize()+ret;
+ ret.push_back(c);
+ return ret;
}
MEDCouplingMesh *MEDCoupling1DGTUMesh::deepCpy() const
return clone(true);
}
-bool MEDCoupling1DGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception)
+bool MEDCoupling1DGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const
{
if(!other)
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::isEqualIfNotWhy : input other pointer is null !");
* \param [in] prec - the precision used to compare nodes of the two meshes.
* \throw If the two meshes do not match.
*/
-void MEDCoupling1DGTUMesh::checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const
{
MEDCouplingPointSet::checkFastEquivalWith(other,prec);
const MEDCoupling1DGTUMesh *otherC=dynamic_cast<const MEDCoupling1DGTUMesh *>(other);
}
}
-void MEDCoupling1DGTUMesh::checkCoherencyOfConnectivity() const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::checkCoherencyOfConnectivity() const
{
const DataArrayInt *c1(_conn);
if(c1)
* In addition you are sure that the length of nodal connectivity index array is bigger than or equal to one.
* In addition you are also sure that length of nodal connectivity is coherent with the content of the last value in the index array.
*/
-void MEDCoupling1DGTUMesh::checkCoherency() const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::checkCoherency() const
{
MEDCouplingPointSet::checkCoherency();
checkCoherencyOfConnectivity();
}
-void MEDCoupling1DGTUMesh::checkCoherency1(double eps) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::checkCoherency1(double eps) const
{
checkCoherency();
const DataArrayInt *c1(_conn),*c2(_conn_indx);
}
}
-void MEDCoupling1DGTUMesh::checkCoherency2(double eps) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::checkCoherency2(double eps) const
{
checkCoherency1(eps);
}
*
* \return a newly allocated array
*/
-DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfNodesPerCell() const
{
checkCoherency();
_conn_indx->checkMonotonic(true);
*
* \return a newly allocated array
*/
-DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfFacesPerCell() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfFacesPerCell() const
{
checkCoherency();
_conn_indx->checkMonotonic(true);
* \return DataArrayInt * - new object to be deallocated by the caller.
* \sa MEDCoupling1DGTUMesh::computeNbOfNodesPerCell
*/
-DataArrayInt *MEDCoupling1DGTUMesh::computeEffectiveNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1DGTUMesh::computeEffectiveNbOfNodesPerCell() const
{
checkCoherency();
_conn_indx->checkMonotonic(true);
}
}
-int MEDCoupling1DGTUMesh::getNumberOfNodesInCell(int cellId) const throw(INTERP_KERNEL::Exception)
+int MEDCoupling1DGTUMesh::getNumberOfNodesInCell(int cellId) const
{
int nbOfCells(getNumberOfCells());//performs checks
if(cellId>=0 && cellId<nbOfCells)
ret << msg0 << "\n";
ret << "Number of cells : ";
bool isOK=true;
- try { checkCoherency(); } catch(INTERP_KERNEL::Exception& e)
+ try { checkCoherency(); } catch(INTERP_KERNEL::Exception& /* e */)
{
ret << "Nodal connectivity arrays are not set or badly set !\n";
isOK=false;
ret << "\n\nNodal Connectivity : \n____________________\n\n";
//
bool isOK=true;
- try { checkCoherency1(); } catch(INTERP_KERNEL::Exception& e)
+ try { checkCoherency1(); } catch(INTERP_KERNEL::Exception& /* e */)
{
ret << "Nodal connectivity arrays are not set or badly set !\n";
isOK=false;
return ret.str();
}
-DataArrayDouble *MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell() const throw(INTERP_KERNEL::Exception)
+DataArrayDouble *MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell() const
{
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::New();
int spaceDim=getSpaceDimension();
return ret.retn();
}
-void MEDCoupling1DGTUMesh::renumberCells(const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::renumberCells(const int *old2NewBg, bool check)
{
int nbCells=getNumberOfCells();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> o2n=DataArrayInt::New();
return Merge1DGTUMeshes(this,otherC);
}
-MEDCouplingUMesh *MEDCoupling1DGTUMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception)
+MEDCouplingUMesh *MEDCoupling1DGTUMesh::buildUnstructured() const
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName().c_str(),getMeshDimension());
ret->setCoords(getCoords());
/*!
* Do nothing for the moment, because there is no policy that allows to split polygons, polyhedrons ... into simplexes
*/
-DataArrayInt *MEDCoupling1DGTUMesh::simplexize(int policy) throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1DGTUMesh::simplexize(int policy)
{
int nbOfCells=getNumberOfCells();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
return ret.retn();
}
-void MEDCoupling1DGTUMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::reprQuickOverview(std::ostream& stream) const
{
stream << "MEDCoupling1DGTUMesh C++ instance at " << this << ". Type=" << _cm->getRepr() << ". Name : \"" << getName() << "\".";
stream << " Mesh dimension : " << getMeshDimension() << ".";
stream << " Space dimension : " << _coords->getNumberOfComponents() << "." << std::endl;
stream << "Number of nodes : " << _coords->getNumberOfTuples() << ".";
bool isOK=true;
- try { checkCoherency(); } catch(INTERP_KERNEL::Exception& e)
+ try { checkCoherency(); } catch(INTERP_KERNEL::Exception& /* e */)
{
stream << std::endl << "Nodal connectivity NOT set properly !\n";
isOK=false;
stream << std::endl << "Number of cells : " << getNumberOfCells() << ".";
}
-void MEDCoupling1DGTUMesh::shallowCopyConnectivityFrom(const MEDCouplingPointSet *other) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::shallowCopyConnectivityFrom(const MEDCouplingPointSet *other)
{
if(!other)
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::shallowCopyConnectivityFrom : input pointer is null !");
return ret.retn();
}
-void MEDCoupling1DGTUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const
{
int sz((int)nodeIdsInUse.size());
int nbCells(getNumberOfCells());
}
}
-void MEDCoupling1DGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const
{
checkFullyDefined();
int nbOfNodes=getNumberOfNodes();
}
}
-void MEDCoupling1DGTUMesh::checkFullyDefined() const throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::checkFullyDefined() const
{
if(!((const DataArrayInt *)_conn) || !((const DataArrayInt *)_conn_indx) || !((const DataArrayDouble *)_coords))
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::checkFullyDefined : part of this is not fully defined.");
* \throw If the nodal connectivity of cells is not defined.
* \throw If the nodal connectivity includes an invalid id.
*/
-DataArrayInt *MEDCoupling1DGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1DGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
{
nbrOfNodesInUse=-1;
int nbOfNodes=getNumberOfNodes();
cellIdsKeptArr=cellIdsKept.retn();
}
-void MEDCoupling1DGTUMesh::allocateCells(int nbOfCells) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::allocateCells(int nbOfCells)
{
if(nbOfCells<0)
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::allocateCells : the input number of cells should be >= 0 !");
* attached to \a this.
* \thow If the nodal connectivity array in \a this is null (call MEDCoupling1SGTUMesh::allocateCells before).
*/
-void MEDCoupling1DGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd)
{
int sz=(int)std::distance(nodalConnOfCellBg,nodalConnOfCellEnd);
DataArrayInt *c(_conn),*c2(_conn_indx);
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::insertNextCell : nodal connectivity array is null ! Call MEDCoupling1DGTUMesh::allocateCells before !");
}
-void MEDCoupling1DGTUMesh::setNodalConnectivity(DataArrayInt *nodalConn, DataArrayInt *nodalConnIndex) throw(INTERP_KERNEL::Exception)
+void MEDCoupling1DGTUMesh::setNodalConnectivity(DataArrayInt *nodalConn, DataArrayInt *nodalConnIndex)
{
if(nodalConn)
nodalConn->incrRef();
/*!
* \return DataArrayInt * - the internal reference to the nodal connectivity. The caller is not reponsible to deallocate it.
*/
-DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivity() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivity() const
{
const DataArrayInt *ret(_conn);
return const_cast<DataArrayInt *>(ret);
/*!
* \return DataArrayInt * - the internal reference to the nodal connectivity index. The caller is not reponsible to deallocate it.
*/
-DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivityIndex() const throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivityIndex() const
{
const DataArrayInt *ret(_conn_indx);
return const_cast<DataArrayInt *>(ret);
*
* \sa MEDCoupling1DGTUMesh::retrievePackedNodalConnectivity, MEDCoupling1DGTUMesh::isPacked
*/
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::copyWithNodalConnectivityPacked(bool& isShallowCpyOfNodalConnn) const throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::copyWithNodalConnectivityPacked(bool& isShallowCpyOfNodalConnn) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName().c_str(),*_cm));
DataArrayInt *nc=0,*nci=0;
*
* \throw if \a this does not pass MEDCoupling1DGTUMesh::checkCoherency test
*/
-bool MEDCoupling1DGTUMesh::retrievePackedNodalConnectivity(DataArrayInt *&nodalConn, DataArrayInt *&nodalConnIndx) const throw(INTERP_KERNEL::Exception)
+bool MEDCoupling1DGTUMesh::retrievePackedNodalConnectivity(DataArrayInt *&nodalConn, DataArrayInt *&nodalConnIndx) const
{
if(isPacked())//performs the checkCoherency
{
*
* \throw if \a this does not pass MEDCoupling1DGTUMesh::checkCoherency test
*/
-bool MEDCoupling1DGTUMesh::isPacked() const throw(INTERP_KERNEL::Exception)
+bool MEDCoupling1DGTUMesh::isPacked() const
{
checkCoherency();
return _conn_indx->front()==0 && _conn_indx->back()==_conn->getNumberOfTuples();
}
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshes(const MEDCoupling1DGTUMesh *mesh1, const MEDCoupling1DGTUMesh *mesh2) throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshes(const MEDCoupling1DGTUMesh *mesh1, const MEDCoupling1DGTUMesh *mesh2)
{
std::vector<const MEDCoupling1DGTUMesh *> tmp(2);
tmp[0]=const_cast<MEDCoupling1DGTUMesh *>(mesh1); tmp[1]=const_cast<MEDCoupling1DGTUMesh *>(mesh2);
return Merge1DGTUMeshes(tmp);
}
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshes(std::vector<const MEDCoupling1DGTUMesh *>& a) throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshes(std::vector<const MEDCoupling1DGTUMesh *>& a)
{
std::size_t sz=a.size();
if(sz==0)
* \throw If presence of a null instance in the input vector \a a.
* \throw If a is empty
*/
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(std::vector<const MEDCoupling1DGTUMesh *>& a) throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(std::vector<const MEDCoupling1DGTUMesh *>& a)
{
if(a.empty())
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords : input array must be NON EMPTY !");
/*!
* Assume that all instances in \a a are non null. If null it leads to a crash. That's why this method is assigned to be low level (LL)
*/
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesLL(std::vector<const MEDCoupling1DGTUMesh *>& a) throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesLL(std::vector<const MEDCoupling1DGTUMesh *>& a)
{
if(a.empty())
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshes : input array must be NON EMPTY !");
return ret.retn();
}
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::buildSetInstanceFromThis(int spaceDim) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName().c_str(),*_cm));
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp1,tmp2;
return ret.retn();
}
-std::vector<int> MEDCoupling1DGTUMesh::BuildAPolygonFromParts(const std::vector< std::vector<int> >& parts) throw(INTERP_KERNEL::Exception)
+/*!
+ * This method aggregate the bbox of each cell and put it into bbox parameter.
+ *
+ * \return DataArrayDouble * - newly created object (to be managed by the caller) \a this number of cells tuples and 2*spacedim components.
+ *
+ * \throw If \a this is not fully set (coordinates and connectivity).
+ * \throw If a cell in \a this has no valid nodeId.
+ */
+DataArrayDouble *MEDCoupling1DGTUMesh::getBoundingBoxForBBTree() const
+{
+ checkFullyDefined();
+ int spaceDim(getSpaceDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
+ double *bbox(ret->getPointer());
+ for(int i=0;i<nbOfCells*spaceDim;i++)
+ {
+ bbox[2*i]=std::numeric_limits<double>::max();
+ bbox[2*i+1]=-std::numeric_limits<double>::max();
+ }
+ const double *coordsPtr(_coords->getConstPointer());
+ const int *conn(_conn->getConstPointer()),*connI(_conn_indx->getConstPointer());
+ for(int i=0;i<nbOfCells;i++)
+ {
+ int offset=connI[i];
+ int nbOfNodesForCell(connI[i+1]-offset),kk(0);
+ for(int j=0;j<nbOfNodesForCell;j++)
+ {
+ int nodeId=conn[offset+j];
+ if(nodeId>=0 && nodeId<nbOfNodes)
+ {
+ for(int k=0;k<spaceDim;k++)
+ {
+ bbox[2*spaceDim*i+2*k]=std::min(bbox[2*spaceDim*i+2*k],coordsPtr[spaceDim*nodeId+k]);
+ bbox[2*spaceDim*i+2*k+1]=std::max(bbox[2*spaceDim*i+2*k+1],coordsPtr[spaceDim*nodeId+k]);
+ }
+ kk++;
+ }
+ }
+ if(kk==0)
+ {
+ std::ostringstream oss; oss << "MEDCoupling1SGTUMesh::getBoundingBoxForBBTree : cell #" << i << " contains no valid nodeId !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ }
+ return ret.retn();
+}
+
+std::vector<int> MEDCoupling1DGTUMesh::BuildAPolygonFromParts(const std::vector< std::vector<int> >& parts)
{
std::vector<int> ret;
if(parts.empty())
* \throw If presence of null pointer in \a nodalConns.
* \throw If presence of not allocated or array with not exactly one component in \a nodalConns.
*/
-DataArrayInt *MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayInt *>& nodalConns, const std::vector<int>& offsetInNodeIdsPerElt) throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayInt *>& nodalConns, const std::vector<int>& offsetInNodeIdsPerElt)
{
std::size_t sz1(nodalConns.size()),sz2(offsetInNodeIdsPerElt.size());
if(sz1!=sz2)
return ret.retn();
}
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception)
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New(const MEDCouplingUMesh *m)
{
if(!m)
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::New : input mesh is null !");