Salome HOME
Intersection: renaming some variables and refactor to make the algo easier to read.
[tools/medcoupling.git] / doc / tutorial / medcoupling_3Dcube.rst
index 2564f78639e047905665d00194b834399246dc5c..de10a56b9f5ed5edd3c2452a9a806ff38c632255 100644 (file)
@@ -39,13 +39,13 @@ You must define 3 variables for space dimension, number of nodes on each dimensi
 Classical method
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-First instanciate a meshing object. Therefore, we need to define :
+First instantiate a meshing object. Therefore, we need to define :
 
  * its name
  * its dimension
  * its number of cells
 
-.. note:: All this initialisation are necessary. If one lacks, you will have a segmentation fault!.
+.. note:: All this initialisation is necessary. If one is missing, you'll have a segmentation fault!.
 
 ::
 
@@ -95,7 +95,7 @@ For each hexahedron of the mesh, you have to give its connectivity: the list of
                pass
                
        # Check mesh consistency:
-       mesh.checkCoherency()
+       mesh.checkConsistencyLight()
        
 Method by extrusion
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -248,7 +248,7 @@ First you need to create a CouplingField and initialize some data:
  * its values
 
  
-The field will be a sin function dependant of distance of the barycenter of each cell from origin. So we need to create a barycenter field on the 3D mesh::
+The field will be a sin function dependent of distance of the barycenter of each cell from origin. So we need to create a barycenter field on the 3D mesh::
 
        # Creation of field : with following definition
        # => Definition of the mesh support
@@ -257,12 +257,12 @@ The field will be a sin function dependant of distance of the barycenter of each
        field = MEDCouplingFieldDouble.New(ON_CELLS)
        field.setMesh(mesh)
        field.setName("field")
-       field.setNature(Integral)
+       field.setNature(ExtensiveMaximum)
 
        # Computing and setting field values
        myCoords=DataArrayDouble.New()
        sampleTab=[]
-       bar = mesh.getBarycenterAndOwner()
+       bar = mesh.computeCellCenterOfMass()
        print bar.getNbOfElems()
        for i in range(nbOfCells):
                x = bar.getIJ(...)
@@ -290,7 +290,7 @@ General Case
 Multi mesh Case
 ````````````````
 
-In spite of a MEDCoupling mesh has only one dimension, it's possible to genrate a file with multi dimension.
+In spite of a MEDCoupling mesh has only one dimension, it's possible to generate a file with multi dimension.
 Therefore, you need to create as meshes as necessary dimensions.
 
 You have to give the connectivity of the faces on the bottom face of the 3D cube: the list of the nodes which belong to the face.
@@ -307,7 +307,7 @@ The connectivity must respect following figure:
        mesh2D = mesh.buildFacePartOfMySelfNode(nodes,True)
        #print mesh2D
        mesh2D.setName("3Dcube")
-       mesh2D.checkCoherency()
+       mesh2D.checkConsistencyLight()
        
        medFileName = "MEDCoupling_cube3D.med"
        meshes=[mesh2D,mesh]