Salome HOME
medcoupling documentation modification
[tools/medcoupling.git] / doc / developer / doxygen / doxfiles / reference / meshes / MEDCouplingUMesh.dox
1
2 /*!
3   \page MEDCouplingUMeshPage Unstructured mesh
4
5 An unstructured mesh in \ref medcoupling MEDCoupling is defined by :
6
7   - a point cloud where the explicit coordinates of each point must be specified (inherited from \ref MEDCouplingPointSetPage "MEDCouplingPointSet class").
8   - nodal connectivity that specifies for each cell, the points in the previous point cloud that constitutes the cell.
9
10 As unstructured mesh is dynamically defined enough, this class is also used by MEDCoupling to instantiate degenerated meshes as :
11
12 - point cloud only meshes. This type of mesh will have mesh dimension 0.
13 - abstract meshes containing only one cell that covers a potentially
14   infinite space. This abstract mesh is used as support of fields
15   containing only one integrated value. This is typically used to
16   represent fields used by system code. This type of mesh will have
17   mesh dimension equal to -1.
18
19 The norm used for cells connectivity of different types, is the same as specified in MED file except
20 that connectivities are represented in \b C \b format and \b not \b in \b FORTRAN \b format !
21
22 The class that incarnates the described concept is : MEDCoupling::MEDCouplingUMesh.
23 \n This class inherits from MEDCoupling::MEDCouplingPointSet abstract class.
24 \n So \ref MEDCouplingUMeshPage "MEDCouplingUMesh" inherits from all \ref MEDCouplingPointSetPage "point set features".
25
26 \section MEDCouplingUMeshStdBuild Standard building of an unstructured mesh  from scratch
27
28 The described method here is called standard, because no special knowledge of underneath nodal connectivity is needed here.
29 This method of building unstructured mesh is easiest but not the most CPU/memory efficient one.
30
31 All of examples given here make the assumption that the \ref ParaMEDMEM "ParaMEDMEM namespace" is visible ( by calling for example \c using \c namespace \c ParaMEDMEM; ).
32
33 Here we will create a mesh with spacedim==3 and meshdim==2. \b mesh contains 5 cells (with geometric type INTERP_KERNEL::NORM_TRI3, INTERP_KERNEL::NORM_QUAD4)
34 and 9 nodes.
35
36 You can notice that it is possible to mix cell types as long as the dimension of the cell is exactly 
37 equal to meshDim to respect \ref MEDCouplingMeshes "this rule".
38
39 \ref medcouplingcppexamplesUmeshStdBuild1 "Here is the C++ implementation."
40
41 \ref medcouplingpyexamplesUmeshStdBuild1 "Here is the Python implementation."
42
43 \section MEDCouplingUMeshNodalConnectivity How MEDCouplingUMesh stores its nodal connectivity
44
45 \ref MEDCoupling::MEDCouplingUMesh "MEDCouplingUMesh class" stores its nodal connectivity into 2 arrays.
46
47 - The first one, the biggest is MEDCoupling::MEDCouplingUMesh::_nodal_connectivity.
48 - The second one, the less big is MEDCoupling::MEDCouplingUMesh::_nodal_connectivity_index.
49
50 \image html MEDCouplingUMeshConn.png "Nodal connectivity storage into MEDCouplingUMesh class"
51 \image latex MEDCouplingUMeshConn.eps "Nodal connectivity storage into MEDCouplingUMesh class"
52
53 \note The last value of the nodal connectivity index points to an invalid memory place. It is not an error, simply as for standard C++, all ranges
54 are given in format [\b begin,\b end) where \b begin is included and \b end excluded.
55
56 \section MEDCouplingUMeshAdvBuild Advanced building of an unstructured mesh  from scratch
57
58 Here we are going to build the mesh in a more advanced manner. This method expects that the user knows the storage format underlying MEDCoupling::MEDCouplingUMesh.
59
60 The same mesh than \ref MEDCouplingUMeshStdBuild "in the standard section above" is going to be implemented using advanced method.
61
62 \ref medcouplingcppexamplesUmeshAdvBuild1 "Here the C++ implementation."
63
64 \ref medcouplingpyexamplesUmeshAdvBuild1 "Here the Python implementation."
65
66 */