return oss.str();
}
+std::string DataArray::GetAxTypeRepr(MEDCouplingAxisType at)
+{
+ switch(at)
+ {
+ case AX_CART:
+ return std::string("AX_CART");
+ case AX_CYL:
+ return std::string("AX_CYL");
+ case AX_SPHER:
+ return std::string("AX_SPHER");
+ default:
+ throw INTERP_KERNEL::Exception("DataArray::GetAxTypeRepr : unrecognized axis type enum !");
+ }
+}
+
/*!
* Returns a new DataArray by concatenating all given arrays, so that (1) the number
* of tuples in the result array is a sum of the number of tuples of given arrays and (2)
MEDCOUPLING_EXPORT static std::string GetVarNameFromInfo(const std::string& info);
MEDCOUPLING_EXPORT static std::string GetUnitFromInfo(const std::string& info);
MEDCOUPLING_EXPORT static std::string BuildInfoFromVarAndUnit(const std::string& var, const std::string& unit);
+ MEDCOUPLING_EXPORT static std::string GetAxTypeRepr(MEDCouplingAxisType at);
MEDCOUPLING_EXPORT static DataArray *Aggregate(const std::vector<const DataArray *>& arrs);
MEDCOUPLING_EXPORT virtual void reprStream(std::ostream& stream) const = 0;
MEDCOUPLING_EXPORT virtual void reprZipStream(std::ostream& stream) const = 0;
static std::string GetVarNameFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception);
static std::string GetUnitFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception);
static std::string BuildInfoFromVarAndUnit(const std::string& var, const std::string& unit) throw(INTERP_KERNEL::Exception);
+ static std::string GetAxTypeRepr(MEDCouplingAxisType at) throw(INTERP_KERNEL::Exception);
void updateTime() const;
%extend
{
std::vector<DataArrayInt *> idsInPflPerType;
std::vector<DataArrayInt *> idsPerType;
std::vector<int> code,code2;
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m=mesh->getGenMeshAtLevel(meshDimRelToMax);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m(mesh->getMeshAtLevel(meshDimRelToMax));
if(type!=ON_NODES)
{
m->splitProfilePerType(profile,code,idsInPflPerType,idsPerType);
*/
MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MEDCouplingAutoRefCountObjectPtr<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m=mesh->getGenMeshAtLevel(meshDimRelToMax,false);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m(mesh->getMeshAtLevel(meshDimRelToMax,false));
const DataArrayInt *d=mesh->getNumberFieldAtLevel(meshDimRelToMax);
const DataArrayInt *e=mesh->getNumberFieldAtLevel(1);
if(meshDimRelToMax==1)
*/
DataArray *MEDFileAnyTypeField1TSWithoutSDA::getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m=mesh->getGenMeshAtLevel(meshDimRelToMax);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m(mesh->getMeshAtLevel(meshDimRelToMax));
int meshId=getMeshIdFromMeshName(mesh->getName().c_str());
MEDCouplingAutoRefCountObjectPtr<DataArray> ret=_field_per_mesh[meshId]->getFieldOnMeshAtLevelWithPfl(type,m,pfl,glob,nasc);
ret->setName(nasc.getName().c_str());
std::vector<int> MEDFileMesh::getDistributionOfTypes(int meshDimRelToMax) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> mLev(getGenMeshAtLevel(meshDimRelToMax));
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> mLev(getMeshAtLevel(meshDimRelToMax));
return mLev->getDistributionOfTypes();
}
_equiv->getRepr(oss);
}
+void MEDFileMesh::checkCartesian() const
+{
+ if(getAxType()!=AX_CART)
+ {
+ std::ostringstream oss; oss << "MEDFileMesh::checkCartesian : request for method that is dedicated to a cartesian convention ! But you are not in cartesian convention (" << DataArray::GetAxTypeRepr(getAxType()) << ").";
+ oss << std::endl << "To perform operation you have two possiblities :" << std::endl;
+ oss << " - call setAxType(AX_CART)" << std::endl;
+ oss << " - call cartesianize()";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+}
+
/*!
* \brief Return number of joints, which is equal to number of adjacent mesh domains
*/
* \return MEDCouplingUMesh * - a pointer to MEDCouplingUMesh that the caller is to
* delete using decrRef() as it is no more needed.
* \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
- * \sa getGenMeshAtLevel()
*/
MEDCouplingUMesh *MEDFileUMesh::getMeshAtLevel(int meshDimRelToMaxExt, bool renum) const
{
return l1->getWholeMesh(renum);
}
-/*!
- * Returns a MEDCouplingUMesh of a given relative dimension.
- * \warning If \a meshDimRelToMaxExt == 1 (which means nodes), the returned mesh **is not
- * valid**. This is a feature, because MEDLoader does not create cells that do not exist!
- * To build a valid MEDCouplingUMesh from the returned one in this case,
- * call MEDCouplingUMesh::Build0DMeshFromCoords().
- * \param [in] meshDimRelToMax - the relative dimension of interest.
- * \param [in] renum - if \c true, the returned mesh is permuted according to the
- * optional numbers of mesh entities.
- * \return MEDCouplingMesh * - a pointer to MEDCouplingUMesh that the caller is to
- * delete using decrRef() as it is no more needed.
- * \throw If there are no mesh entities of \a meshDimRelToMax dimension in \a this mesh.
- * \sa getMeshAtLevel()
- */
-MEDCouplingMesh *MEDFileUMesh::getGenMeshAtLevel(int meshDimRelToMax, bool renum) const
-{
- return getMeshAtLevel(meshDimRelToMax,renum);
-}
-
std::vector<int> MEDFileUMesh::getDistributionOfTypes(int meshDimRelToMax) const
{
const MEDFileUMeshSplitL1 *l1(getMeshAtLevSafe(meshDimRelToMax));
* \return MEDCouplingMesh * - a pointer to MEDCouplingMesh that the caller is to
* delete using decrRef() as it is no more needed.
*/
-MEDCouplingMesh *MEDFileStructuredMesh::getGenMeshAtLevel(int meshDimRelToMax, bool renum) const
+MEDCouplingMesh *MEDFileStructuredMesh::getMeshAtLevel(int meshDimRelToMax, bool renum) const
{
if(renum)
throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh does not support renumbering ! To do it perform request of renum array directly !");
case -1:
{
if(!m)
- throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getGenMeshAtLevel : level -1 requested must be non empty to be able to compute unstructured sub mesh !");
+ throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getMeshAtLevel : level -1 requested must be non empty to be able to compute unstructured sub mesh !");
buildMinusOneImplicitPartIfNeeded();
- MEDCouplingMesh *ret(_faces_if_necessary);
+ MEDCoupling1SGTUMesh *ret(_faces_if_necessary);
if(ret)
ret->incrRef();
return ret;
MEDLOADER_EXPORT virtual void write(const std::string& fileName, int mode) const;
MEDLOADER_EXPORT virtual void write(med_idt fid) const;
MEDLOADER_EXPORT virtual int getSizeAtLevel(int meshDimRelToMaxExt) const = 0;
- MEDLOADER_EXPORT virtual MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const = 0;
+ MEDLOADER_EXPORT virtual MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const = 0;
MEDLOADER_EXPORT virtual std::vector<int> getDistributionOfTypes(int meshDimRelToMax) const;
MEDLOADER_EXPORT virtual void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const = 0;
MEDLOADER_EXPORT virtual MEDFileMesh *cartesianize() const = 0;
void deepCpyEquivalences(const MEDFileMesh& other);
bool areEquivalencesEqual(const MEDFileMesh *other, std::string& what) const;
void getEquivalencesRepr(std::ostream& oss) const;
+ void checkCartesian() const;
protected:
int _order;
int _iteration;
MEDLOADER_EXPORT MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
MEDLOADER_EXPORT MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
MEDLOADER_EXPORT DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMaxExt, bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
+ MEDLOADER_EXPORT MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
MEDLOADER_EXPORT std::vector<int> getDistributionOfTypes(int meshDimRelToMax) const;
MEDLOADER_EXPORT MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const;
MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const;
MEDLOADER_EXPORT std::vector<int> getFamArrNonEmptyLevelsExt() const;
MEDLOADER_EXPORT std::vector<int> getNumArrNonEmptyLevelsExt() const;
MEDLOADER_EXPORT std::vector<int> getNameArrNonEmptyLevelsExt() const;
- MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
+ MEDLOADER_EXPORT MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
MEDLOADER_EXPORT int getSizeAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT int getNumberOfNodes() const;
MEDLOADER_EXPORT int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldCell(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order)
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ff=MEDFileField1TS::New(fileName,fieldName,iteration,order);
- MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> mm=MEDFileMesh::New(fileName,meshName);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m=mm->getGenMeshAtLevel(meshDimRelToMax,false);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ff(MEDFileField1TS::New(fileName,fieldName,iteration,order));
+ MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> mm(MEDFileMesh::New(fileName,meshName));
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m(mm->getMeshAtLevel(meshDimRelToMax,false));
MEDFileMesh *mPtr(mm);
MEDFileUMesh *muPtr=dynamic_cast<MEDFileUMesh *>(mPtr);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=ff->getFieldOnMeshAtLevel(ON_CELLS,m);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret(ff->getFieldOnMeshAtLevel(ON_CELLS,m));
if(muPtr)
{
- const DataArrayInt *num=muPtr->getNumberFieldAtLevel(meshDimRelToMax);
+ const DataArrayInt *num(muPtr->getNumberFieldAtLevel(meshDimRelToMax));
if(num)
ret->renumberCells(num->begin());
}
ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldNode(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order)
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ff=MEDFileField1TS::New(fileName,fieldName,iteration,order);
- MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> mm=MEDFileMesh::New(fileName,meshName);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m=mm->getGenMeshAtLevel(meshDimRelToMax,false);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ff(MEDFileField1TS::New(fileName,fieldName,iteration,order));
+ MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> mm(MEDFileMesh::New(fileName,meshName));
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m(mm->getMeshAtLevel(meshDimRelToMax,false));
MEDFileMesh *mPtr(mm);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=ff->getFieldOnMeshAtLevel(ON_NODES,m);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret(ff->getFieldOnMeshAtLevel(ON_NODES,m));
MEDFileUMesh *muPtr=dynamic_cast<MEDFileUMesh *>(mPtr);
if(ff->getPflsReallyUsed().empty())
{
if(muPtr)
{
- const DataArrayInt *num=muPtr->getNumberFieldAtLevel(meshDimRelToMax);
+ const DataArrayInt *num(muPtr->getNumberFieldAtLevel(meshDimRelToMax));
if(num)
ret->renumberCells(num->begin());
}
else
{
DataArrayInt *pfl=0,*arr2=0;
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=ff->getFieldWithProfile(ON_NODES,meshDimRelToMax,mm,pfl);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr(ff->getFieldWithProfile(ON_NODES,meshDimRelToMax,mm,pfl));
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> pflSafe(pfl);
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> mp=m->getCellIdsFullyIncludedInNodeIds(pfl->begin(),pfl->end());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mzip=static_cast<MEDCouplingUMesh *>(m->buildPartAndReduceNodes(mp->begin(),mp->end(),arr2));
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> mp(m->getCellIdsFullyIncludedInNodeIds(pfl->begin(),pfl->end()));
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mzip(static_cast<MEDCouplingUMesh *>(m->buildPartAndReduceNodes(mp->begin(),mp->end(),arr2)));
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> arr2Safe(arr2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> arr3=arr2->invertArrayO2N2N2O(mzip->getNumberOfNodes());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> arr3(arr2->invertArrayO2N2N2O(mzip->getNumberOfNodes()));
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> pflSorted(pflSafe->deepCpy()); pflSorted->sort(true);
if(!arr3->isEqualWithoutConsideringStr(*pflSorted))
throw INTERP_KERNEL::Exception("MEDLoader::ReadFieldNode : not implemented yet !");
if(!arr3->isEqualWithoutConsideringStr(*pflSafe))
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> o2n2=pflSafe->checkAndPreparePermutation();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> n2o2=o2n2->invertArrayO2N2N2O(o2n2->getNumberOfTuples());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> o2n2(pflSafe->checkAndPreparePermutation());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> n2o2(o2n2->invertArrayO2N2N2O(o2n2->getNumberOfTuples()));
mzip->renumberNodes(n2o2->begin(),n2o2->getNumberOfTuples());
arr->setName("");
ret->setArray(arr);
ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldGauss(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order)
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ff=MEDFileField1TS::New(fileName,fieldName,iteration,order);
- MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> mm=MEDFileMesh::New(fileName,meshName);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m=mm->getGenMeshAtLevel(meshDimRelToMax,false);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ff(MEDFileField1TS::New(fileName,fieldName,iteration,order));
+ MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> mm(MEDFileMesh::New(fileName,meshName));
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m(mm->getMeshAtLevel(meshDimRelToMax,false));
MEDFileMesh *mPtr(mm);
MEDFileUMesh *muPtr=dynamic_cast<MEDFileUMesh *>(mPtr);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=ff->getFieldOnMeshAtLevel(ON_GAUSS_PT,m);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret(ff->getFieldOnMeshAtLevel(ON_GAUSS_PT,m));
if(muPtr)
{
- const DataArrayInt *num=muPtr->getNumberFieldAtLevel(meshDimRelToMax);
+ const DataArrayInt *num(muPtr->getNumberFieldAtLevel(meshDimRelToMax));
if(num)
ret->renumberCells(num->begin());
}
ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldGaussNE(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order)
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ff=MEDFileField1TS::New(fileName,fieldName,iteration,order);
- MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> mm=MEDFileMesh::New(fileName,meshName);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m=mm->getGenMeshAtLevel(meshDimRelToMax,false);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ff(MEDFileField1TS::New(fileName,fieldName,iteration,order));
+ MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> mm(MEDFileMesh::New(fileName,meshName));
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m(mm->getMeshAtLevel(meshDimRelToMax,false));
MEDFileMesh *mPtr(mm);
MEDFileUMesh *muPtr=dynamic_cast<MEDFileUMesh *>(mPtr);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=ff->getFieldOnMeshAtLevel(ON_GAUSS_NE,m);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret(ff->getFieldOnMeshAtLevel(ON_GAUSS_NE,m));
if(muPtr)
{
- const DataArrayInt *num=muPtr->getNumberFieldAtLevel(meshDimRelToMax);
+ const DataArrayInt *num(muPtr->getNumberFieldAtLevel(meshDimRelToMax));
if(num)
ret->renumberCells(num->begin());
}
for ( size_t iDim = 0; iDim < dims.size(); ++iDim )
{
int dimRelExt = dims[ iDim ];
- MEDCouplingAutoRefCountObjectPtr< MEDCouplingMesh > mesh = _fileMesh->getGenMeshAtLevel(dimRelExt);
+ MEDCouplingAutoRefCountObjectPtr< MEDCouplingMesh > mesh = _fileMesh->getMeshAtLevel(dimRelExt);
const DataArrayInt * famIds = _fileMesh->getFamilyFieldAtLevel(dimRelExt);
if ( !famIds ) continue;
const DataArrayInt* profile )
{
MEDCouplingAutoRefCountObjectPtr< MEDCouplingMesh >
- mesh = _fileMesh->getGenMeshAtLevel(sm->_dimRelExt);
+ mesh = _fileMesh->getMeshAtLevel(sm->_dimRelExt);
const MEDCouplingUMesh* uMesh = dynamic_cast< const MEDCouplingUMesh* > ((const MEDCouplingMesh*) mesh );
if ( sm->_dimRelExt == 1 ) type = INTERP_KERNEL::NORM_POINT1;
void SauvWriter::writeFileHead()
{
- MEDCouplingAutoRefCountObjectPtr< MEDCouplingMesh > mesh = _fileMesh->getGenMeshAtLevel(0);
+ MEDCouplingAutoRefCountObjectPtr< MEDCouplingMesh > mesh = _fileMesh->getMeshAtLevel(0);
*_sauvFile
<< " ENREGISTREMENT DE TYPE 4" << endl
{
// write each sub-type as a SAUV sub-mesh
MEDCouplingAutoRefCountObjectPtr< MEDCouplingMesh >
- mesh = _fileMesh->getGenMeshAtLevel( sm._dimRelExt );
+ mesh = _fileMesh->getMeshAtLevel( sm._dimRelExt );
MEDCouplingAutoRefCountObjectPtr< MEDCouplingUMesh>
umesh = mesh->buildUnstructured();
void SauvWriter::writeNodes()
{
- MEDCouplingAutoRefCountObjectPtr< MEDCouplingMesh > mesh = _fileMesh->getGenMeshAtLevel( 1 );
+ MEDCouplingAutoRefCountObjectPtr< MEDCouplingMesh > mesh = _fileMesh->getMeshAtLevel( 1 );
MEDCouplingAutoRefCountObjectPtr< MEDCouplingUMesh > umesh = mesh->buildUnstructured();
// write the index connecting nodes with their coodrinates
%newobject ParaMEDMEM::MEDFileMesh::createNewEmpty;
%newobject ParaMEDMEM::MEDFileMesh::deepCpy;
%newobject ParaMEDMEM::MEDFileMesh::shallowCpy;
-%newobject ParaMEDMEM::MEDFileMesh::getGenMeshAtLevel;
+%newobject ParaMEDMEM::MEDFileMesh::getMeshAtLevel;
%newobject ParaMEDMEM::MEDFileMesh::__getitem__;
%newobject ParaMEDMEM::MEDFileMesh::getGroupArr;
%newobject ParaMEDMEM::MEDFileMesh::getGroupsArr;
%newobject ParaMEDMEM::MEDFileUMesh::getGroups;
%newobject ParaMEDMEM::MEDFileUMesh::getFamily;
%newobject ParaMEDMEM::MEDFileUMesh::getFamilies;
-%newobject ParaMEDMEM::MEDFileUMesh::getMeshAtLevel;
%newobject ParaMEDMEM::MEDFileUMesh::getLevel0Mesh;
%newobject ParaMEDMEM::MEDFileUMesh::getLevelM1Mesh;
%newobject ParaMEDMEM::MEDFileUMesh::getLevelM2Mesh;
virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
virtual std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
//
- virtual MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception);
+ virtual MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception);
virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr) throw(INTERP_KERNEL::Exception);
virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr) throw(INTERP_KERNEL::Exception);
virtual void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr) throw(INTERP_KERNEL::Exception);
MEDCouplingMesh *__getitem__(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
{
- return self->getGenMeshAtLevel(meshDimRelToMaxExt,false);
+ return self->getMeshAtLevel(meshDimRelToMaxExt,false);
}
PyObject *getTime() throw(INTERP_KERNEL::Exception)
MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception);
DataArrayInt *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
- MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMaxExt, bool renum=false) const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
self.assertTrue( "groupe5" in groups )
self.assertTrue( "maa1" in groups )
self.assertEqual(16,m.getSizeAtLevel(0))
- um0 = m.getGenMeshAtLevel(0)
+ um0 = m.getMeshAtLevel(0)
self.assertEqual(12, um0.getNumberOfCellsWithType( NORM_TETRA4 ))
self.assertEqual(2, um0.getNumberOfCellsWithType( NORM_PYRA5 ))
self.assertEqual(2, um0.getNumberOfCellsWithType( NORM_HEXA8 ))
- um1 = m.getGenMeshAtLevel(-1)
+ um1 = m.getMeshAtLevel(-1)
self.assertEqual(2, um1.getNumberOfCellsWithType( NORM_TRI3 ))
- pointeUM0 = pointeMedMesh.getGenMeshAtLevel(0)
+ pointeUM0 = pointeMedMesh.getMeshAtLevel(0)
self.assertTrue(m.getCoords().isEqualWithoutConsideringStr(pointeMedMesh.getCoords(),1e-12))
self.assertEqual( um0.getMeasureField(0).accumulate(0),
pointeUM0.getMeasureField(0).accumulate(0),1e-12)
CPPUNIT_ASSERT( std::find(groups.begin(),groups.end(),"groupe5") != groups.end() );
CPPUNIT_ASSERT( std::find(groups.begin(),groups.end(),"maa1") != groups.end() );
CPPUNIT_ASSERT_EQUAL(16,m->getSizeAtLevel(0));
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> um0 = m->getGenMeshAtLevel(0);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> um0 = m->getMeshAtLevel(0);
CPPUNIT_ASSERT_EQUAL(12, um0->getNumberOfCellsWithType( INTERP_KERNEL::NORM_TETRA4 ));
CPPUNIT_ASSERT_EQUAL(2, um0->getNumberOfCellsWithType( INTERP_KERNEL::NORM_PYRA5 ));
CPPUNIT_ASSERT_EQUAL(2, um0->getNumberOfCellsWithType( INTERP_KERNEL::NORM_HEXA8 ));
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> um1 = m->getGenMeshAtLevel(-1);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> um1 = m->getMeshAtLevel(-1);
CPPUNIT_ASSERT_EQUAL(2, um1->getNumberOfCellsWithType( INTERP_KERNEL::NORM_TRI3 ));
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> pointeUM0 =
- static_cast<MEDCouplingUMesh*>( pointeMedMesh->getGenMeshAtLevel(0));
+ static_cast<MEDCouplingUMesh*>( pointeMedMesh->getMeshAtLevel(0));
DataArrayDouble *coo = m->getCoords();
DataArrayDouble *pointeCoo = pointeMedMesh->getCoords();
CPPUNIT_ASSERT(coo->isEqualWithoutConsideringStr(*pointeCoo,1e-12));
if (field && typeData==6)
{
field->setName(fieldName);
- field->setMesh(mfm->getGenMeshAtLevel(0));
+ field->setMesh(mfm->getMeshAtLevel(0));
ParaMEDMEM::DataArrayDouble *da=data;
//get information for components etc..
std::vector<std::string> r1;