int MEDFileCurveLinearMesh::getMeshDimension() const
{
if(!((const MEDCouplingCurveLinearMesh*)_clmesh))
- throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh::getMeshDimension : unable to get meshdimension because no mesh set !");
+ throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh::getMeshDimension : unable to get mesh dimension because no mesh set !");
return _clmesh->getMeshDimension();
}
+int MEDFileCurveLinearMesh::getSpaceDimension() const
+{
+ if(!((const MEDCouplingCurveLinearMesh*)_clmesh))
+ throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh::getMeshDimension : unable to get space dimension because no mesh set !");
+ return _clmesh->getSpaceDimension();
+}
+
std::string MEDFileCurveLinearMesh::simpleRepr() const
{
return MEDFileStructuredMesh::simpleRepr();
MEDLOADER_EXPORT void normalizeFamIdsTrio();
MEDLOADER_EXPORT void normalizeFamIdsMEDFile();
MEDLOADER_EXPORT virtual int getMeshDimension() const = 0;
+ MEDLOADER_EXPORT virtual int getSpaceDimension() const = 0;
MEDLOADER_EXPORT virtual std::string simpleRepr() const;
MEDLOADER_EXPORT virtual std::string advancedRepr() const = 0;
//
private:
static const char SPE_FAM_STR_EXTRUDED_MESH[];
private:
- std::vector< MCAuto<MEDFileUMeshSplitL1> > _ms;
+ std::vector< MCAuto<MEDFileUMeshSplitL1> > _ms; ///< The array of single-dimension constituting meshes, stored in decreasing order (dimRelativeToMax=0,-1,-2, ...)
MCAuto<DataArrayDouble> _coords;
- MCAuto<DataArrayIdType> _fam_coords; ///< Node family indices
+ MCAuto<DataArrayIdType> _fam_coords; ///< Node family indices
MCAuto<DataArrayIdType> _num_coords;
MCAuto<DataArrayIdType> _global_num_coords;
MCAuto<DataArrayAsciiChar> _name_coords;
MEDLOADER_EXPORT MEDFileCurveLinearMesh *shallowCpy() const;
MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
MEDLOADER_EXPORT int getMeshDimension() const;
+ MEDLOADER_EXPORT int getSpaceDimension() const;
MEDLOADER_EXPORT std::string simpleRepr() const;
MEDLOADER_EXPORT std::string advancedRepr() const;
MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
static MEDFileCurveLinearMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
static MEDFileCurveLinearMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
void setMesh(MEDCouplingCurveLinearMesh *m);
+ int getSpaceDimension() const;
+ int getMeshDimension() const;
%extend
{
MEDFileCurveLinearMesh()
a0Exp.setInfoOnComponents(["XX [m]","YYY [km]"])
m.setCoords(a0Exp)
mm=MEDFileCurveLinearMesh() ; mm.setMesh(m)
+ self.assertEqual(mm.getSpaceDimension(), m.getSpaceDimension())
fam=DataArrayInt(8) ; fam.iota(0) ; mm.setFamilyFieldArr(0,fam) ; del fam
num=DataArrayInt(8) ; num.iota(100) ; mm.setRenumFieldArr(0,num) ; del num
#