Salome HOME
*** empty log message ***
[modules/multipr.git] / src / MULTIPR / MULTIPR_Obj.cxx
index 99e69f805f108c87293ae5431cee2f30209caf1a..f167cc408a2ee0ae10789f17b761fcc5e1bb748b 100644 (file)
@@ -233,6 +233,19 @@ string Obj::getPartInfo(const char* pPartName) const
 }
 
 
+void Obj::removeParts(const char* pPrefixPartName)
+{
+       // removePart() is only available for distributed MED file (not sequential MED file)
+       if ((mState != MULTIPR_OBJ_STATE_DIS) &&
+           (mState != MULTIPR_OBJ_STATE_DIS_MEM)) throw IllegalStateException("expected a distributed MED file", __FILE__, __LINE__);
+               
+       if (mMeshDis == NULL) throw IllegalStateException("distributed MED file should not be NULL", __FILE__, __LINE__);
+       
+       mMeshDis->removeParts(pPrefixPartName);
+       mState = MULTIPR_OBJ_STATE_DIS_MEM;
+}
+
+
 vector<string> Obj::partitionneDomaine()
 {
        if (mState == MULTIPR_OBJ_STATE_SEQ_INIT) throw IllegalStateException("use setMesh() before", __FILE__, __LINE__);