}
/*!
- * Creates a new unstructured mesh (MEDCouplingUMesh) from \a this structured one.
+ * Creates a new unstructured mesh (MEDCoupling1SGTUMesh) from \a this structured one.
* \return MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is to
* delete this array using decrRef() as it is no more needed.
* \throw If \a this->getMeshDimension() is not among [1,2,3].
*/
-MEDCouplingUMesh *MEDCouplingStructuredMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception)
+MEDCoupling1SGTUMesh *MEDCouplingStructuredMesh::build1SGTUnstructured() const throw(INTERP_KERNEL::Exception)
{
int meshDim=getMeshDimension();
if(meshDim<0 || meshDim>3)
- throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::buildUnstructured : meshdim must be in [1,2,3] !");
-
+ throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::build1SGTUnstructured : meshdim must be in [1,2,3] !");
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coords(getCoordinatesAndOwner());
int ns[3];
getNodeGridStructure(ns);
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn(Build1GTNodalConnectivity(ns,ns+meshDim));
MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(getName().c_str(),GetGeoTypeGivenMeshDimension(meshDim)));
ret->setNodalConnectivity(conn); ret->setCoords(coords);
- return ret->buildUnstructured();
+ return ret.retn();
+}
+
+/*!
+ * Creates a new unstructured mesh (MEDCouplingUMesh) from \a this structured one.
+ * \return MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is to
+ * delete this array using decrRef() as it is no more needed.
+ * \throw If \a this->getMeshDimension() is not among [1,2,3].
+ */
+MEDCouplingUMesh *MEDCouplingStructuredMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception)
+{
+ return build1SGTUnstructured()->buildUnstructured();
}
/*!
namespace ParaMEDMEM
{
+ class MEDCoupling1SGTUMesh;
+
class MEDCOUPLING_EXPORT MEDCouplingStructuredMesh : public MEDCouplingMesh
{
public:
std::vector<int> getDistributionOfTypes() const throw(INTERP_KERNEL::Exception);
DataArrayInt *checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const throw(INTERP_KERNEL::Exception);
void splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType) const throw(INTERP_KERNEL::Exception);
+ MEDCoupling1SGTUMesh *build1SGTUnstructured() const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildUnstructured() const throw(INTERP_KERNEL::Exception);
MEDCouplingMesh *buildPart(const int *start, const int *end) const;
MEDCouplingMesh *buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const;
%newobject ParaMEDMEM::MEDCouplingExtrudedMesh::New;
%newobject ParaMEDMEM::MEDCouplingExtrudedMesh::build3DUnstructuredMesh;
%newobject ParaMEDMEM::MEDCouplingStructuredMesh::buildStructuredSubPart;
+%newobject ParaMEDMEM::MEDCouplingStructuredMesh::build1SGTUnstructured;
%newobject ParaMEDMEM::MEDCouplingStructuredMesh::BuildExplicitIdsFrom;
%newobject ParaMEDMEM::MEDCouplingStructuredMesh::Build1GTNodalConnectivity;
%newobject ParaMEDMEM::MEDCouplingCMesh::New;
int getNodeIdFromPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception);
virtual std::vector<int> getNodeGridStructure() const throw(INTERP_KERNEL::Exception);
std::vector<int> getCellGridStructure() const throw(INTERP_KERNEL::Exception);
+ MEDCoupling1SGTUMesh *build1SGTUnstructured() const throw(INTERP_KERNEL::Exception);
static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension(int meshDim) throw(INTERP_KERNEL::Exception);
%extend
{