From af7081b0256e66ca0f81a4834f0305391320ebf1 Mon Sep 17 00:00:00 2001 From: abn Date: Mon, 19 Oct 2015 11:08:17 +0200 Subject: [PATCH] Following training's feedback: removing finishInsertingCells(), clarifying some points in the tutorial. --- doc/tutorial/atestMEDCouplingCube.rst | 3 --- doc/tutorial/atestMEDCouplingDataArray1.rst | 1 - doc/tutorial/atestMEDCouplingPoly.rst | 1 - doc/tutorial/atestMEDCouplingUMesh1.rst | 1 - doc/tutorial/atestMEDLoaderAdvancedAPI1.rst | 1 - doc/tutorial/atestMEDLoaderBasicAPI1.rst | 1 - doc/tutorial/medcoupling_2Dpolygon.rst | 1 - doc/tutorial/medcoupling_3Dcube.rst | 5 +---- doc/tutorial/medcoupling_dataarray1_en.rst | 3 --- doc/tutorial/medcoupling_dataarray1_fr.rst | 6 ++--- doc/tutorial/medcoupling_umesh1_en.rst | 9 ++++---- doc/tutorial/medcoupling_umesh1_fr.rst | 11 +++++----- doc/tutorial/medcouplingcorba_en.rst | 2 +- doc/tutorial/medloader_SplitAndMerge1_en.rst | 6 +++-- doc/tutorial/medloader_SplitAndMerge1_fr.rst | 4 ++-- doc/tutorial/medloader_advancedAPI1_en.rst | 23 ++++++++++---------- doc/tutorial/medloader_advancedAPI1_fr.rst | 6 +++-- doc/tutorial/medloader_basicAPI1_en.rst | 23 ++++++++++---------- doc/tutorial/medloader_basicAPI1_fr.rst | 1 - 19 files changed, 46 insertions(+), 62 deletions(-) diff --git a/doc/tutorial/atestMEDCouplingCube.rst b/doc/tutorial/atestMEDCouplingCube.rst index a15c0d2fb..61e4bd404 100644 --- a/doc/tutorial/atestMEDCouplingCube.rst +++ b/doc/tutorial/atestMEDCouplingCube.rst @@ -65,7 +65,6 @@ for i in range(nbOfCells): mesh.insertNextCell(NORM_HEXA8,8,connectivity[8*i:8*(i+1)]) pass - mesh.finishInsertingCells() print "5 ********************" # Settings of coordinates and verify if it's OK @@ -169,7 +168,6 @@ for i in range(NbCell2D): m1.insertNextCell(NORM_QUAD4,4,Connectivities[4*i:4*(i+1)]) - m1.finishInsertingCells() m1.changeSpaceDimension(3) # Creation of 1D meshing @@ -181,7 +179,6 @@ m2.insertNextCell(NORM_SEG2,2,conn[0:2]) m2.insertNextCell(NORM_SEG2,2,conn[2:4]) m2.insertNextCell(NORM_SEG2,2,conn[4:6]) - m2.finishInsertingCells() myCoords1D=DataArrayDouble.New() myCoords1D.setValues(coords,4,1) m2.setCoords(myCoords1D) diff --git a/doc/tutorial/atestMEDCouplingDataArray1.rst b/doc/tutorial/atestMEDCouplingDataArray1.rst index f35e47858..e168e44bc 100644 --- a/doc/tutorial/atestMEDCouplingDataArray1.rst +++ b/doc/tutorial/atestMEDCouplingDataArray1.rst @@ -56,7 +56,6 @@ Playing with regular hexagons using DataArrayDouble cell_connec = o2n[6*i:6*(i+1)] m.insertNextCell(mc.NORM_POLYGON, cell_connec.getValues()) pass - m.finishInsertingCells() # Check that everything is coherent (will throw if not) m.checkCoherency() # Write the result into a VTU file that can be read with ParaView diff --git a/doc/tutorial/atestMEDCouplingPoly.rst b/doc/tutorial/atestMEDCouplingPoly.rst index cfbee5d62..949fe3091 100644 --- a/doc/tutorial/atestMEDCouplingPoly.rst +++ b/doc/tutorial/atestMEDCouplingPoly.rst @@ -89,7 +89,6 @@ for i in range(6): mesh.insertNextCell(NORM_POLYGON,6,connectivity[6*i:6*(i+1)]) pass - mesh.finishInsertingCells() print "5 ********************" mesh.checkCoherency() diff --git a/doc/tutorial/atestMEDCouplingUMesh1.rst b/doc/tutorial/atestMEDCouplingUMesh1.rst index 8c57d4fe7..6734be770 100644 --- a/doc/tutorial/atestMEDCouplingUMesh1.rst +++ b/doc/tutorial/atestMEDCouplingUMesh1.rst @@ -29,7 +29,6 @@ Playing with unstructured mesh mesh3D.insertNextCell(mc.NORM_HEXA8,conn[0:8]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[8:51]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[51:59]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[59:67]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[67:110]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[110:118]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[118:126]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[126:169]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[169:177]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[177:185]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[185:228]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[228:236]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[236:244]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[244:287]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[287:295]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[295:303]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[303:346]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[346:354]); - mesh3D.finishInsertingCells(); myCoords = mc.DataArrayDouble(coords,60,3); myCoords.setInfoOnComponents(["X [m]","Y [m]","Z [m]"]) mesh3D.setCoords(myCoords); diff --git a/doc/tutorial/atestMEDLoaderAdvancedAPI1.rst b/doc/tutorial/atestMEDLoaderAdvancedAPI1.rst index bf16bea1a..788093ccc 100644 --- a/doc/tutorial/atestMEDLoaderAdvancedAPI1.rst +++ b/doc/tutorial/atestMEDLoaderAdvancedAPI1.rst @@ -18,7 +18,6 @@ Reading, Writing a MED file using MEDLoader advanced API targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[0:4]) targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[10:14]) targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[14:18]) - targetMesh.finishInsertingCells() myCoords = ml.DataArrayDouble(targetCoords,9,2) myCoords.setInfoOnComponents(["X [km]","YY [mm]"]) targetMesh.setCoords(myCoords) diff --git a/doc/tutorial/atestMEDLoaderBasicAPI1.rst b/doc/tutorial/atestMEDLoaderBasicAPI1.rst index 97cdfaf14..c610ae616 100644 --- a/doc/tutorial/atestMEDLoaderBasicAPI1.rst +++ b/doc/tutorial/atestMEDLoaderBasicAPI1.rst @@ -18,7 +18,6 @@ Reading, Writing a MED file using MEDLoader basic API targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[0:4]) targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[10:14]) targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[14:18]) - targetMesh.finishInsertingCells() myCoords = ml.DataArrayDouble(targetCoords,9,2) myCoords.setInfoOnComponents(["X [km]","YY [mm]"]) targetMesh.setCoords(myCoords) diff --git a/doc/tutorial/medcoupling_2Dpolygon.rst b/doc/tutorial/medcoupling_2Dpolygon.rst index 1cabbb61d..3f0764385 100644 --- a/doc/tutorial/medcoupling_2Dpolygon.rst +++ b/doc/tutorial/medcoupling_2Dpolygon.rst @@ -96,7 +96,6 @@ For each hexagon of the mesh, you have to give its connectivity: the list of the for i in range(6): mesh.insertNextCell(NORM_POLYGON,6,connectivity[6*i:6*(i+1)]) pass - mesh.finishInsertingCells() mesh.checkCoherency() Saving the mesh in a med file diff --git a/doc/tutorial/medcoupling_3Dcube.rst b/doc/tutorial/medcoupling_3Dcube.rst index befe73a4d..2564f7863 100644 --- a/doc/tutorial/medcoupling_3Dcube.rst +++ b/doc/tutorial/medcoupling_3Dcube.rst @@ -94,8 +94,7 @@ For each hexahedron of the mesh, you have to give its connectivity: the list of mesh.insertNextCell(NORM_HEXA8,8,connectivity[8*i:8*(i+1)]) pass - # Finishing insertion - mesh.finishInsertingCells() + # Check mesh consistency: mesh.checkCoherency() Method by extrusion @@ -124,7 +123,6 @@ Definition of 2D mesh for i in range(NbCell2D): m1.insertNextCell(NORM_QUAD4,4,Connectivities[4*i:4*(i+1)]) - m1.finishInsertingCells() m1.changeSpaceDimension(3) Definition of 1D mesh @@ -139,7 +137,6 @@ Definition of 1D mesh m2.insertNextCell(NORM_SEG2,2,conn[0:2]) m2.insertNextCell(NORM_SEG2,2,conn[2:4]) m2.insertNextCell(NORM_SEG2,2,conn[4:6]) - m2.finishInsertingCells() myCoords1D=DataArrayDouble.New() myCoords1D.setValues(coords,4,1) m2.setCoords(myCoords1D) diff --git a/doc/tutorial/medcoupling_dataarray1_en.rst b/doc/tutorial/medcoupling_dataarray1_en.rst index 841627062..eeb8d6d69 100644 --- a/doc/tutorial/medcoupling_dataarray1_en.rst +++ b/doc/tutorial/medcoupling_dataarray1_en.rst @@ -237,12 +237,9 @@ Now allocate the number of cells with an upper bound of the actual number of cel Finally thanks to o2n we know the connectivity of all 7 hexagons using the coordinates stored in d3. -Do not forget to invoke MEDCouplingUMesh.finishInsertingCells() (this last bit should disappear after the release 6.6) :: - for i in xrange(7): m.insertNextCell(NORM_POLYGON,o2n[6*i:6*(i+1)].getValues()) pass - m.finishInsertingCells() Check that m is coherent. :: diff --git a/doc/tutorial/medcoupling_dataarray1_fr.rst b/doc/tutorial/medcoupling_dataarray1_fr.rst index ccd3cec34..5dae2410e 100644 --- a/doc/tutorial/medcoupling_dataarray1_fr.rst +++ b/doc/tutorial/medcoupling_dataarray1_fr.rst @@ -159,7 +159,8 @@ l'agrégation de maillages et de champs respecte exactement le même principe po faciliter l'accès et le repérage des données. C'est par exemple une différence essentielle avec le modèle MED fichier comme on le verra plus tard. -.. note:: La méthode similaire permettant d'agréger par composante (plutôt que par tuples) s'appelle ``Meld()``. +.. note:: La méthode permettant d'agréger par composante (c'est-à-dire de concaténer des tableaux + colonne par colonne, plutôt que par tuples) s'appelle ``Meld()``. Trouver les tuples égaux ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -311,9 +312,6 @@ des 7 hexagones utilisant les coordonnées ``d3``. :: cell_connec = o2n[6*i:6*(i+1)] m.insertNextCell(mc.NORM_POLYGON, cell_connec.getValues()) pass - m.finishInsertingCells() - -.. note:: Après SALOME 6.6, l'appel à ``MEDCouplingUMesh.finishInsertingCells()`` n'est plus nécessaire. Vérifier que ``m`` est correct et ne contient pas d'anomalie. :: diff --git a/doc/tutorial/medcoupling_umesh1_en.rst b/doc/tutorial/medcoupling_umesh1_en.rst index ba42a5710..62d39c88d 100644 --- a/doc/tutorial/medcoupling_umesh1_en.rst +++ b/doc/tutorial/medcoupling_umesh1_en.rst @@ -46,15 +46,14 @@ Copy paste the following lines. :: 22,27,29,28,37,42,44,43, 30,41,31,33,45,56,46,48, 31,32,34,37,43,36,-1,31,46,51,36,-1,36,51,58,43,-1,43,37,52,58,-1,37,34,49,52,-1,34,32,47,49,-1,32,31,46,47,-1,46,51,58,52,49,47, 31,36,35,33,46,51,50,48, 43,40,39,36,58,55,54,51, 41,38,37,34,32,31,-1,41,56,46,31,-1,31,46,47,32,-1,32,47,49,34,-1,34,49,52,37,-1,37,38,53,52,-1,38,41,56,53,-1,56,46,47,49,52,53, 37,42,44,43,52,57,59,58] - mesh3D=MEDCouplingUMesh.New("mesh3D",3); - mesh3D.allocateCells(18); + mesh3D=MEDCouplingUMesh.New("mesh3D",3) + mesh3D.allocateCells(18) mesh3D.insertNextCell(NORM_HEXA8,conn[0:8]); mesh3D.insertNextCell(NORM_POLYHED,conn[8:51]); mesh3D.insertNextCell(NORM_HEXA8,conn[51:59]); mesh3D.insertNextCell(NORM_HEXA8,conn[59:67]); mesh3D.insertNextCell(NORM_POLYHED,conn[67:110]); mesh3D.insertNextCell(NORM_HEXA8,conn[110:118]); mesh3D.insertNextCell(NORM_HEXA8,conn[118:126]); mesh3D.insertNextCell(NORM_POLYHED,conn[126:169]); mesh3D.insertNextCell(NORM_HEXA8,conn[169:177]); mesh3D.insertNextCell(NORM_HEXA8,conn[177:185]); mesh3D.insertNextCell(NORM_POLYHED,conn[185:228]); mesh3D.insertNextCell(NORM_HEXA8,conn[228:236]); mesh3D.insertNextCell(NORM_HEXA8,conn[236:244]); mesh3D.insertNextCell(NORM_POLYHED,conn[244:287]); mesh3D.insertNextCell(NORM_HEXA8,conn[287:295]); mesh3D.insertNextCell(NORM_HEXA8,conn[295:303]); mesh3D.insertNextCell(NORM_POLYHED,conn[303:346]); mesh3D.insertNextCell(NORM_HEXA8,conn[346:354]); - mesh3D.finishInsertingCells(); - myCoords=DataArrayDouble.New(coords,60,3); + myCoords=DataArrayDouble.New(coords,60,3) myCoords.setInfoOnComponents(["X [m]","Y [m]","Z [m]"]) - mesh3D.setCoords(myCoords); + mesh3D.setCoords(myCoords) mesh3D.orientCorrectlyPolyhedrons() mesh3D.sortCellsInMEDFileFrmt() mesh3D.checkCoherency() diff --git a/doc/tutorial/medcoupling_umesh1_fr.rst b/doc/tutorial/medcoupling_umesh1_fr.rst index 2e5fe1aea..74993cdc6 100644 --- a/doc/tutorial/medcoupling_umesh1_fr.rst +++ b/doc/tutorial/medcoupling_umesh1_fr.rst @@ -49,15 +49,14 @@ Faire un bon gros copier-coller des lignes suivantes pour construire la mesh (l' 22,27,29,28,37,42,44,43, 30,41,31,33,45,56,46,48, 31,32,34,37,43,36,-1,31,46,51,36,-1,36,51,58,43,-1,43,37,52,58,-1,37,34,49,52,-1,34,32,47,49,-1,32,31,46,47,-1,46,51,58,52,49,47, 31,36,35,33,46,51,50,48, 43,40,39,36,58,55,54,51, 41,38,37,34,32,31,-1,41,56,46,31,-1,31,46,47,32,-1,32,47,49,34,-1,34,49,52,37,-1,37,38,53,52,-1,38,41,56,53,-1,56,46,47,49,52,53, 37,42,44,43,52,57,59,58] - mesh3D = mc.MEDCouplingUMesh("mesh3D",3); - mesh3D.allocateCells(18); + mesh3D = mc.MEDCouplingUMesh("mesh3D",3) + mesh3D.allocateCells(18) mesh3D.insertNextCell(mc.NORM_HEXA8,conn[0:8]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[8:51]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[51:59]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[59:67]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[67:110]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[110:118]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[118:126]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[126:169]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[169:177]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[177:185]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[185:228]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[228:236]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[236:244]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[244:287]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[287:295]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[295:303]); mesh3D.insertNextCell(mc.NORM_POLYHED,conn[303:346]); mesh3D.insertNextCell(mc.NORM_HEXA8,conn[346:354]); - mesh3D.finishInsertingCells(); - myCoords = mc.DataArrayDouble(coords,60,3); + myCoords = mc.DataArrayDouble(coords,60,3) myCoords.setInfoOnComponents(["X [m]","Y [m]","Z [m]"]) - mesh3D.setCoords(myCoords); + mesh3D.setCoords(myCoords) mesh3D.orientCorrectlyPolyhedrons() mesh3D.sortCellsInMEDFileFrmt() mesh3D.checkCoherency() @@ -251,6 +250,8 @@ Puis aggréger ``mesh3DSlice2`` avec sa copie translatée ``mesh3DSlice2bis``, e .. note:: Pour information pour merger deux (ou plus) maillages non structurés, il faut invoquer ``MEDCouplingUMesh.MergeUMeshes()`` puis ``MEDCouplingUMesh.mergeNodes()`` sur le résultat, et enfin ``MEDCouplingUMesh.zipConnectivity()``. +.. _exo-umesh-desc-connec: + Connectivité descendante ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/tutorial/medcouplingcorba_en.rst b/doc/tutorial/medcouplingcorba_en.rst index 35742e5da..4e3e7472d 100644 --- a/doc/tutorial/medcouplingcorba_en.rst +++ b/doc/tutorial/medcouplingcorba_en.rst @@ -9,7 +9,7 @@ The following use cases can also be mentioned: * YACS, to create visualization nodes * create a Python mock-up script and use the standard Python interpreter whilst benefiting -from the ParaViS graphical interface + from the ParaViS graphical interface Implementation start ~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/tutorial/medloader_SplitAndMerge1_en.rst b/doc/tutorial/medloader_SplitAndMerge1_en.rst index 9f814e297..8a2f4d0b3 100644 --- a/doc/tutorial/medloader_SplitAndMerge1_en.rst +++ b/doc/tutorial/medloader_SplitAndMerge1_en.rst @@ -22,9 +22,11 @@ Each of the even cell of "m0" is "simplexized" (cut in triangles - method MEDCou arr=DataArrayDouble(31,1) ; arr.iota(0.) m0.setCoords(arr,arr) m0=m0.buildUnstructured() - m00=m0[::2] ; m00.simplexize(0) ; m01=m0[1::2] + m00=m0[::2] # Extract even cells + m00.simplexize(0) + m01=m0[1::2] m0=MEDCouplingUMesh.MergeUMeshes([m00,m01]) - m0.getCoords()[:]*=1/15. + m0.getCoords()[:]*=1/15. # Illustrate how to quickly rescale a mesh m0.setName("mesh") .. note:: The call to setName() on "m0" is mandatory. Don't forget that the correct naming of the meshes is paramount in the MED file context. diff --git a/doc/tutorial/medloader_SplitAndMerge1_fr.rst b/doc/tutorial/medloader_SplitAndMerge1_fr.rst index 10e39f5db..181505051 100644 --- a/doc/tutorial/medloader_SplitAndMerge1_fr.rst +++ b/doc/tutorial/medloader_SplitAndMerge1_fr.rst @@ -27,11 +27,11 @@ Chacune des cellules paires du maillage sera *simplexisée* (i.e. coupée en tri arr = ml.DataArrayDouble(31,1) ; arr.iota(0.) m0.setCoords(arr,arr) m0 = m0.buildUnstructured() - m00 = m0[::2] # Extract even cells + m00 = m0[::2] # Extract even cells m00.simplexize(0) m01 = m0[1::2] m0 = ml.MEDCouplingUMesh.MergeUMeshes([m00,m01]) - m0.getCoords()[:] *= 1/15. + m0.getCoords()[:] *= 1/15. # Illustrate how to quickly rescale a mesh m0.setName("mesh") .. note:: Le ``setName()`` sur "m0" est obligatoire. Ne pas oublier que dans le contexte MED fichier diff --git a/doc/tutorial/medloader_advancedAPI1_en.rst b/doc/tutorial/medloader_advancedAPI1_en.rst index d311f870e..5be2a6e8c 100644 --- a/doc/tutorial/medloader_advancedAPI1_en.rst +++ b/doc/tutorial/medloader_advancedAPI1_en.rst @@ -33,18 +33,17 @@ Writing and Reading meshes using MEDLoader's advanced API First of all, creation of a mesh "targetMesh". :: - targetCoords=[-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 ]; - targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4]; - targetMesh=MEDCouplingUMesh.New("MyMesh",2); - targetMesh.allocateCells(5); - targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]); - targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]); - targetMesh.finishInsertingCells(); - myCoords=DataArrayDouble.New(targetCoords,9,2); - targetMesh.setCoords(myCoords); + targetCoords=[-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 ] + targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4] + targetMesh=MEDCouplingUMesh.New("MyMesh",2) + targetMesh.allocateCells(5) + targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]) + targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]) + targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]) + targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]) + targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]) + myCoords=DataArrayDouble.New(targetCoords,9,2) + targetMesh.setCoords(myCoords) .. note:: targetMesh is grouped by geometric type. diff --git a/doc/tutorial/medloader_advancedAPI1_fr.rst b/doc/tutorial/medloader_advancedAPI1_fr.rst index 98caa012d..cad6678a5 100644 --- a/doc/tutorial/medloader_advancedAPI1_fr.rst +++ b/doc/tutorial/medloader_advancedAPI1_fr.rst @@ -47,7 +47,6 @@ Nous créons tout d'abord le même maillage ``targetMesh`` que pour l'API simple targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[0:4]) targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[10:14]) targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[14:18]) - targetMesh.finishInsertingCells() myCoords = ml.DataArrayDouble(targetCoords,9,2) myCoords.setInfoOnComponents(["X [km]","YY [mm]"]) targetMesh.setCoords(myCoords) @@ -55,7 +54,10 @@ Nous créons tout d'abord le même maillage ``targetMesh`` que pour l'API simple .. note:: Le maillage ``targetMesh`` est ordonné par type géométrique. Nous construisons ensuite ``targetMesh1`` représentant les sous-constituants (*faces*) du maillage -``targetMesh`` reduits aux cellules [3,4,7,8]. Cela peut par exemple représenter un ensemble d'intérêt pour un calcul : :: +``targetMesh``, et nous en extrayons seulement les cellules (donc ici des surfaces) [3,4,7,8]. +Pour plus de détails sur la connectivité descendante, +consulter la section :ref:`exo-umesh-desc-connec` du deuxième exercise. +Cet ensemble peut par exemple représenter un ensemble d'intérêt pour un calcul : :: targetMeshConsti, _, _, _, _ = targetMesh.buildDescendingConnectivity() targetMesh1 = targetMeshConsti[[3,4,7,8]] diff --git a/doc/tutorial/medloader_basicAPI1_en.rst b/doc/tutorial/medloader_basicAPI1_en.rst index 3b36f5b93..e20241881 100644 --- a/doc/tutorial/medloader_basicAPI1_en.rst +++ b/doc/tutorial/medloader_basicAPI1_en.rst @@ -28,19 +28,18 @@ Writing/Reading a mesh First of all, creation of a mesh "targetMesh". :: - targetCoords=[-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 ]; - targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4]; - targetMesh=MEDCouplingUMesh.New("MyMesh",2); - targetMesh.allocateCells(5); - targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]); - targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]); - targetMesh.finishInsertingCells(); - myCoords=DataArrayDouble.New(targetCoords,9,2); + targetCoords=[-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 ] + targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4] + targetMesh=MEDCouplingUMesh.New("MyMesh",2) + targetMesh.allocateCells(5) + targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]) + targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]) + targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]) + targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]) + targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]) + myCoords=DataArrayDouble.New(targetCoords,9,2) myCoords.setInfoOnComponents(["X [km]","YY [mm]"]) - targetMesh.setCoords(myCoords); + targetMesh.setCoords(myCoords) .. note:: targetMesh is ordered by geometric type. diff --git a/doc/tutorial/medloader_basicAPI1_fr.rst b/doc/tutorial/medloader_basicAPI1_fr.rst index 0b4fec8d6..d542c0dc3 100644 --- a/doc/tutorial/medloader_basicAPI1_fr.rst +++ b/doc/tutorial/medloader_basicAPI1_fr.rst @@ -44,7 +44,6 @@ Tout d'abord créons un maillage ``targetMesh`` composé de plusieurs types géo targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[0:4]) targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[10:14]) targetMesh.insertNextCell(ml.NORM_QUAD4,4,targetConn[14:18]) - targetMesh.finishInsertingCells() myCoords = ml.DataArrayDouble(targetCoords,9,2) myCoords.setInfoOnComponents(["X [km]","YY [mm]"]) targetMesh.setCoords(myCoords) -- 2.39.2