return Merge1SGTUMeshesLL(aa);
}
+/*!
+ * \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)
{
if(a.empty())
throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords : input array must be NON EMPTY !");
std::vector<const MEDCoupling1SGTUMesh *>::const_iterator it=a.begin();
if(!(*it))
- throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords : presence of null instance !");
+ throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords : null instance in the first element of input vector !");
std::vector<const DataArrayInt *> ncs(a.size());
int nbOfCells=(*it)->getNumberOfCells();
const DataArrayDouble *coords=(*it)->getCoords();
it++;
for(int i=1;it!=a.end();i++,it++)
{
+ if(!(*it))
+ throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords : presence of a null instance in the input vector !");
if(cm!=&((*it)->getCellModel()))
throw INTERP_KERNEL::Exception("Geometric types mismatches, Merge1SGTUMeshes impossible !");
(*it)->getNumberOfCells();//to check that all is OK
return ret.retn();
}
+/*!
+ * 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)
{
if(a.empty())
return Merge1DGTUMeshesLL(aa);
}
+/*!
+ * \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)
{
if(a.empty())
throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords : input array must be NON EMPTY !");
std::vector<const MEDCoupling1DGTUMesh *>::const_iterator it=a.begin();
if(!(*it))
- throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords : presence of null instance !");
+ throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords : null instance in the first element of input vector !");
std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> > objs(a.size());
std::vector<const DataArrayInt *> ncs(a.size()),ncis(a.size());
int nbOfCells=(*it)->getNumberOfCells();
it++;
for(int i=1;it!=a.end();i++,it++)
{
+ if(!(*it))
+ throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords : presence of null instance !");
if(cm!=&((*it)->getCellModel()))
throw INTERP_KERNEL::Exception("Geometric types mismatches, Merge1DGTUMeshes impossible !");
(*it)->getNumberOfCells();//to check that all is OK
return ret.retn();
}
+/*!
+ * 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)
{
- //tony
+ if(a.empty())
+ throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshes : input array must be NON EMPTY !");
+ std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> > objs(a.size());
+ std::vector<const DataArrayInt *> ncs(a.size()),ncis(a.size());
+ std::vector<const MEDCoupling1DGTUMesh *>::const_iterator it=a.begin();
+ std::vector<int> nbNodesPerElt(a.size());
+ int nbOfCells=(*it)->getNumberOfCells();
+ bool tmp;
+ objs[0]=(*it)->copyWithNodalConnectivityPacked(tmp);
+ ncs[0]=objs[0]->getNodalConnectivity(); ncis[0]=objs[0]->getNodalConnectivityIndex();
+ nbNodesPerElt[0]=0;
+ int prevNbOfNodes=(*it)->getNumberOfNodes();
+ const INTERP_KERNEL::CellModel *cm=&((*it)->getCellModel());
+ it++;
+ for(int i=1;it!=a.end();i++,it++)
+ {
+ if(cm!=&((*it)->getCellModel()))
+ throw INTERP_KERNEL::Exception("Geometric types mismatches, Merge1DGTUMeshes impossible !");
+ objs[i]=(*it)->copyWithNodalConnectivityPacked(tmp);
+ ncs[i]=objs[i]->getNodalConnectivity(); ncis[i]=objs[i]->getNodalConnectivityIndex();
+ nbOfCells+=(*it)->getNumberOfCells();
+ nbNodesPerElt[i]=nbNodesPerElt[i-1]+prevNbOfNodes;
+ prevNbOfNodes=(*it)->getNumberOfNodes();
+ }
+ std::vector<const MEDCouplingPointSet *> aps(a.size());
+ std::copy(a.begin(),a.end(),aps.begin());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> pts=MergeNodesArray(aps);
+ MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh("merge",*cm));
+ ret->setCoords(pts);
+ ret->_conn=AggregateNodalConnAndShiftNodeIds(ncs,nbNodesPerElt);
+ ret->_conn_indx=DataArrayInt::AggregateIndexes(ncis);
+ return ret.retn();
}
MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception)
ret->setCoords(_coords);
return ret.retn();
}
+
+/*!
+ * This method performs an aggregation of \a nodalConns (as DataArrayInt::Aggregate does) but in addition of that a shift is applied on the
+ * values contained in \a nodalConns using corresponding offset specified in input \a offsetInNodeIdsPerElt.
+ * But it also manage the values -1, that have a semantic in MEDCoupling1DGTUMesh class (separator for polyhedron).
+ *
+ * \param [in] nodalConns - a list of nodal connectivity arrays same size than \a offsetInNodeIdsPerElt.
+ * \param [in] offsetInNodeIdsPerElt - a list of offsets to apply.
+ * \return DataArrayInt * - A new object (to be managed by the caller) that is the result of the aggregation.
+ * \throw If \a nodalConns or \a offsetInNodeIdsPerElt are empty.
+ * \throw If \a nodalConns and \a offsetInNodeIdsPerElt have not the same size.
+ * \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)
+{
+ std::size_t sz1(nodalConns.size()),sz2(offsetInNodeIdsPerElt.size());
+ if(sz1!=sz2)
+ throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : input vectors do not have the same size !");
+ if(sz1==0)
+ throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : empty vectors in input !");
+ int nbOfTuples=0;
+ for(std::vector<const DataArrayInt *>::const_iterator it=nodalConns.begin();it!=nodalConns.end();it++)
+ {
+ if(!(*it))
+ throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : presence of null pointer in input vector !");
+ if(!(*it)->isAllocated())
+ throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : presence of non allocated array in input vector !");
+ if((*it)->getNumberOfComponents()!=1)
+ throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : presence of array with not exactly one component !");
+ nbOfTuples+=(*it)->getNumberOfTuples();
+ }
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(nbOfTuples,1);
+ int *pt=ret->getPointer();
+ int i=0;
+ for(std::vector<const DataArrayInt *>::const_iterator it=nodalConns.begin();it!=nodalConns.end();it++,i++)
+ {
+ int curNbt=(*it)->getNumberOfTuples();
+ const int *inPt=(*it)->begin();
+ int offset=offsetInNodeIdsPerElt[i];
+ for(int j=0;j<curNbt;j++,pt++)
+ {
+ if(inPt[j]!=-1)
+ *pt=inPt[j]+offset;
+ else
+ *pt=-1;
+ }
+ }
+ return ret.retn();
+}
MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(const MEDCoupling1DGTUMesh *mesh1, const MEDCoupling1DGTUMesh *mesh2) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(std::vector<const MEDCoupling1DGTUMesh *>& a) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshesOnSameCoords(std::vector<const MEDCoupling1DGTUMesh *>& a) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayInt *AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayInt *>& nodalConns, const std::vector<int>& offsetInNodeIdsPerElt) throw(INTERP_KERNEL::Exception);
MEDCoupling1DGTUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
private:
MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm);
std::vector<const DataArrayDouble *> coo(ms.size());
int spaceDim=(*it)->getSpaceDimension();
coo[0]=(*it++)->getCoords();
+ if(!coo[0]->isAllocated())
+ throw INTERP_KERNEL::Exception("MEDCouplingPointSet::MergeNodesArray : first element in coordinates is not allocated !");
for(int i=1;it!=ms.end();it++,i++)
{
const DataArrayDouble *tmp=(*it)->getCoords();
if(tmp)
{
- if((*it)->getSpaceDimension()==spaceDim)
- coo[i]=tmp;
+ if(tmp->isAllocated())
+ {
+ if((*it)->getSpaceDimension()==spaceDim)
+ coo[i]=tmp;
+ else
+ throw INTERP_KERNEL::Exception("MEDCouplingPointSet::MergeNodesArray : Mismatch in SpaceDim !");
+ }
else
- throw INTERP_KERNEL::Exception("Mismatch in SpaceDim during call of MergeNodesArray !");
+ throw INTERP_KERNEL::Exception("MEDCouplingPointSet::MergeNodesArray : Presence of a non allocated array !");
}
else
- throw INTERP_KERNEL::Exception("Empty coords detected during call of MergeNodesArray !");
+ throw INTERP_KERNEL::Exception("MEDCouplingPointSet::MergeNodesArray : Empty coords detected !");
}
return DataArrayDouble::Aggregate(coo);
}
if(_types.size()!=1)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertIntoSingleGeoTypeMesh : current mesh does not contain exactly one geometric type !");
INTERP_KERNEL::NormalizedCellType typ=*_types.begin();
- int typi=(int)typ;
MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> ret=MEDCoupling1GTUMesh::New(getName(),typ);
ret->setCoords(getCoords());
MEDCoupling1SGTUMesh *retC=dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh*)ret);
if(retC)
+ retC->setNodalConnectivity(convertNodalConnectivityToStaticGeoTypeMesh());
+ else
{
- int nbCells=getNumberOfCells();
- int nbNodesPerCell=retC->getNumberOfNodesPerCell();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> connOut=DataArrayInt::New(); connOut->alloc(nbCells*nbNodesPerCell,1);
- int *outPtr=connOut->getPointer();
- const int *conn=_nodal_connec->begin();
- const int *connI=_nodal_connec_index->begin();
- nbNodesPerCell++;
- for(int i=0;i<nbCells;i++,connI++)
- {
- if(conn[connI[0]]==typi && connI[1]-connI[0]==nbNodesPerCell)
- outPtr=std::copy(conn+connI[0]+1,conn+connI[1],outPtr);
+ MEDCoupling1DGTUMesh *retD=dynamic_cast<MEDCoupling1DGTUMesh *>((MEDCoupling1GTUMesh*)ret);
+ if(!retD)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertIntoSingleGeoTypeMesh : Internal error !");
+ DataArrayInt *c=0,*ci=0;
+ convertNodalConnectivityToDynamicGeoTypeMesh(c,ci);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> cs(c),cis(ci);
+ retD->setNodalConnectivity(cs,cis);
+ }
+ return ret.retn();
+}
+
+DataArrayInt *MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh() const throw(INTERP_KERNEL::Exception)
+{
+ checkConnectivityFullyDefined();
+ if(_types.size()!=1)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh : current mesh does not contain exactly one geometric type !");
+ INTERP_KERNEL::NormalizedCellType typ=*_types.begin();
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(typ);
+ if(cm.isDynamic())
+ {
+ std::ostringstream oss; oss << "MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh : this contains a single geo type (" << cm.getRepr() << ") but ";
+ oss << "this type is dynamic ! Only static geometric type is possible for that type ! call convertNodalConnectivityToDynamicGeoTypeMesh instead !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ int nbCells=getNumberOfCells();
+ int typi=(int)typ;
+ int nbNodesPerCell=(int)cm.getNumberOfNodes();
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> connOut=DataArrayInt::New(); connOut->alloc(nbCells*nbNodesPerCell,1);
+ int *outPtr=connOut->getPointer();
+ const int *conn=_nodal_connec->begin();
+ const int *connI=_nodal_connec_index->begin();
+ nbNodesPerCell++;
+ for(int i=0;i<nbCells;i++,connI++)
+ {
+ if(conn[connI[0]]==typi && connI[1]-connI[0]==nbNodesPerCell)
+ outPtr=std::copy(conn+connI[0]+1,conn+connI[1],outPtr);
+ else
+ {
+ std::ostringstream oss; oss << "MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh : there something wrong in cell #" << i << " ! The type of cell is not those expected, or the length of nodal connectivity is not those expected (" << nbNodesPerCell-1 << ") !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ }
+ return connOut.retn();
+}
+
+void MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayInt *&nodalConn, DataArrayInt *&nodalConnIndex) const throw(INTERP_KERNEL::Exception)
+{
+ static const char msg0[]="MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh : nodal connectivity in this are invalid ! Call checkCoherency2 !";
+ checkConnectivityFullyDefined();
+ if(_types.size()!=1)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh : current mesh does not contain exactly one geometric type !");
+ int nbCells=getNumberOfCells(),lgth=_nodal_connec->getNumberOfTuples();
+ if(lgth<nbCells)
+ throw INTERP_KERNEL::Exception(msg0);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> c(DataArrayInt::New()),ci(DataArrayInt::New());
+ c->alloc(lgth-nbCells,1); ci->alloc(nbCells+1,1);
+ int *cp(c->getPointer()),*cip(ci->getPointer());
+ const int *incp(_nodal_connec->begin()),*incip(_nodal_connec_index->begin());
+ for(int i=0;i<nbCells;i++,cip++,incip++)
+ {
+ int strt(incip[0]+1),stop(incip[1]);//+1 to skip geo type
+ int delta(stop-strt);
+ if(delta>=1)
+ {
+ if((strt>=0 && strt<lgth) && (stop>=0 && stop<=lgth))
+ cp=std::copy(incp+strt,incp+stop,cp);
else
- {
- std::ostringstream oss; oss << "MEDCouplingUMesh::convertIntoSingleGeoTypeMesh : there something wrong in cell #" << i << " ! The type of cell is not those expected, or the length of nodal connectivity is not those expected (" << nbNodesPerCell-1 << ") !";
- throw INTERP_KERNEL::Exception(oss.str().c_str());
- }
+ throw INTERP_KERNEL::Exception(msg0);
}
- retC->setNodalConnectivity(connOut);
+ else
+ throw INTERP_KERNEL::Exception(msg0);
+ cip[1]=cip[0]+delta;
}
- else
- throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertIntoSingleGeoTypeMesh : not implemented yet for non static geometric type !");
- return ret.retn();
+ nodalConn=c.retn(); nodalConnIndex=ci.retn();
}
/*!
MEDCOUPLING_EXPORT DataArrayInt *rearrange2ConsecutiveCellTypes();
MEDCOUPLING_EXPORT std::vector<MEDCouplingUMesh *> splitByType() const;
MEDCOUPLING_EXPORT MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT DataArrayInt *convertNodalConnectivityToStaticGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT void convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayInt *&nodalConn, DataArrayInt *&nodalConnIndex) const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT static MEDCouplingUMesh *AggregateSortedByTypeMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& ms,
DataArrayInt *&szOfCellGrpOfSameType,
DataArrayInt *&idInMsOfCellGrpOfSameType) throw(INTERP_KERNEL::Exception);
%template(dvec) std::vector<double>;
%template(svec) std::vector<std::string>;
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingMesh*
{
$result=convertMesh($1,$owner);
}
+%typemap(out) MEDCouplingMesh*
+{
+ $result=convertMesh($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingPointSet*
{
$result=convertMesh($1,$owner);
}
+%typemap(out) MEDCouplingPointSet*
+{
+ $result=convertMesh($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCoupling1GTUMesh*
{
$result=convertMesh($1,$owner);
}
+%typemap(out) MEDCoupling1GTUMesh*
+{
+ $result=convertMesh($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingStructuredMesh*
{
$result=convertMesh($1,$owner);
}
+%typemap(out) MEDCouplingStructuredMesh*
+{
+ $result=convertMesh($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingFieldDiscretization*
{
$result=convertFieldDiscretization($1,$owner);
}
+%typemap(out) MEDCouplingFieldDiscretization*
+{
+ $result=convertFieldDiscretization($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingMultiFields*
{
$result=convertMultiFields($1,$owner);
}
+%typemap(out) MEDCouplingMultiFields*
+{
+ $result=convertMultiFields($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::DataArray*
{
$result=convertDataArray($1,$owner);
}
+%typemap(out) DataArray*
+{
+ $result=convertDataArray($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::DataArrayChar*
{
$result=convertDataArrayChar($1,$owner);
}
+%typemap(out) DataArrayChar*
+{
+ $result=convertDataArrayChar($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
#ifdef WITH_NUMPY
%init %{ import_array(); %}
#endif
%newobject ParaMEDMEM::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells;
%newobject ParaMEDMEM::MEDCouplingUMesh::findAndCorrectBadOriented3DCells;
%newobject ParaMEDMEM::MEDCouplingUMesh::convertIntoSingleGeoTypeMesh;
+%newobject ParaMEDMEM::MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh;
%newobject ParaMEDMEM::MEDCouplingUMesh::findCellIdsOnBoundary;
%newobject ParaMEDMEM::MEDCouplingUMesh::computeSkin;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildSetInstanceFromThis;
DataArrayInt *findAndCorrectBadOriented3DExtrudedCells() throw(INTERP_KERNEL::Exception);
DataArrayInt *findAndCorrectBadOriented3DCells() throw(INTERP_KERNEL::Exception);
ParaMEDMEM::MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
+ DataArrayInt *convertNodalConnectivityToStaticGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da) throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
return ret;
}
+ PyObject *convertNodalConnectivityToDynamicGeoTypeMesh() const throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *ret0=0,*ret1=0;
+ self->convertNodalConnectivityToDynamicGeoTypeMesh(ret0,ret1);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
static PyObject *AggregateSortedByTypeMeshesOnSameCoords(PyObject *ms) throw(INTERP_KERNEL::Exception)
{
std::vector<const ParaMEDMEM::MEDCouplingUMesh *> meshes;
convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCoupling1DGTUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCoupling1DGTUMesh,"MEDCoupling1DGTUMesh",tmp);
return MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(tmp);
}
+
+ static DataArrayInt *AggregateNodalConnAndShiftNodeIds(PyObject *li, const std::vector<int>& offsetInNodeIdsPerElt) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<const ParaMEDMEM::DataArrayInt *> tmp;
+ convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",tmp);
+ return MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(tmp,offsetInNodeIdsPerElt);
+ }
}
};