}
}
+void MEDFileUMesh::setCoords(DataArrayDouble *coords) throw(INTERP_KERNEL::Exception)
+{
+ coords->checkAllocated();
+ int nbOfTuples=coords->getNumberOfTuples();
+ _coords=coords;
+ coords->incrRef();
+ _fam_coords=DataArrayInt::New();
+ _fam_coords->alloc(nbOfTuples,1);
+ _fam_coords->fillWithZero();
+}
+
+void MEDFileUMesh::addNodeGroup(const std::vector<int>& ids) throw(INTERP_KERNEL::Exception)
+{
+ const DataArrayDouble *coords=_coords;
+ if(!coords)
+ throw INTERP_KERNEL::Exception("addNodeGroup : no coords set !");
+ DataArrayInt *sub=_fam_coords->selectByTupleIdSafe(&ids[0],&ids[0]+ids.size());
+ std::set<int> ssub(sub->getConstPointer(),sub->getConstPointer()+sub->getNumberOfTuples());
+
+}
+
+void MEDFileUMesh::setFamilyNameAttachedOnId(int id, const std::string& newFamName) throw(INTERP_KERNEL::Exception)
+{
+ std::string oldName=getFamilyNameGivenId(id);
+ _families.erase(oldName);
+ _families[newFamName]=id;
+}
+
void MEDFileUMesh::setMeshAtRank(int meshDimRelToMax, MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception)
{
std::vector<int> levSet=getNonEmptyLevels();
MEDCouplingUMesh *getRankM2Mesh(bool renum=true) const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *getRankM3Mesh(bool renum=true) const throw(INTERP_KERNEL::Exception);
//
+ void setFamilyNameAttachedOnId(int id, const std::string& newFamName) throw(INTERP_KERNEL::Exception);
+ void setCoords(DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
+ void addNodeGroup(const std::vector<int>& ids) throw(INTERP_KERNEL::Exception);
void setMeshAtRank(int meshDimRelToMax, MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception);
void setGroupsFromScratch(int meshDimRelToMax, const std::vector<MEDCouplingUMesh *>& ms) throw(INTERP_KERNEL::Exception);
void setGroupsOnSetMesh(int meshDimRelToMax, const std::vector<MEDCouplingUMesh *>& ms) throw(INTERP_KERNEL::Exception);
self.assertEqual([0,2,3,4,5,14,15,16],medmesh.getGroupsArr(0,["mesh2","mesh3","mesh4"],False).getValues());
self.assertEqual(range(60),medmesh.getNodeFamilyArr(famn,False).getValues());
pass
+ def testMEDMesh3(self):
+ mm=MEDFileUMesh.New()
+ mm.setName("MyFirstMEDCouplingMEDmesh")
+ mm.setDescription("IHopeToConvinceLastMEDMEMUsers")
+ c=DataArrayDouble.New()
+ coords=[-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 ];
+ c.setValues(coords,9,2)
+ mm.setCoords(c)
+ pass
pass
unittest.main()