Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/medcoupling
[tools/medcoupling.git] / doc / user / doxygen / doxfiles / reference / fields / discretization.dox
1 /*!
2 \page discretization Spatial and temporal discretizations
3
4 When defining a field in MEDCoupling, the notions of spatial and temporal discretizations play 
5 a crucial role. 
6
7 The spatial discretization details the relationship between the field and its support mesh
8 and the temporal discretization gives an indication of the time coverage represented
9 by the field.
10
11 \section field-space Spatial discretization
12 A field can be supported by: 
13 - the nodes (vertices) of the mesh: this is built with the 
14 \ref MEDCoupling::TypeOfField "ON_NODES" keyword in the 
15 \ref MEDCoupling::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field". 
16
17 - the cells (or "elements") of the mesh: built with the 
18 \ref MEDCoupling::TypeOfField "ON_CELLS" keyword in the 
19 \ref MEDCoupling::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field". 
20 - or more complex items:
21     - Gauss points: built with \ref MEDCoupling::TypeOfField "ON_GAUSS_PT"
22     - Gauss points on nodes per element: built with \ref MEDCoupling::TypeOfField "ON_GAUSS_NE"
23     - Kriging points:  built with \ref MEDCoupling::TypeOfField "ON_NODES_KR"
24
25 The spatial discretization is at the center of the \ref interpolation "interpolation" mechanisms,
26 since one of the main interpolation parameter is indeed specifying from which source discretization
27 to which target discretization one wants to go. For example:
28 - a P0->P0 interpolation means that a field on cells will be transferred to another cell-based field;
29 - a P1->P0 interpolation means that a field on nodes this time will be transferred to a cell-based field. 
30 - etc ...
31
32 Finally, in the code itself, the class \ref MEDCoupling::MEDCouplingFieldDiscretization "MEDCouplingFieldDiscretization"
33 is the concrete representation of this concept.
34
35 \section field-time Temporal discretization
36
37 Similarly to the spatial discretization, a field object in MEDCoupling has a time discretization
38 representing the time range that is covered by the data. It is also specified in the 
39 \ref MEDCoupling::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field".
40
41 It can be one of:
42 - \ref MEDCoupling::TypeOfTimeDiscretization "NO_TIME", in this case no time is attached to the field, and no
43 time-related operation is permitted (for example unable to call 
44 \ref MEDCoupling::MEDCouplingFieldDouble::getValueOn "getValueOn()") 
45 - \ref MEDCoupling::TypeOfTimeDiscretization "ONE_TIME", the field data represent a single time step. 
46 - \ref MEDCoupling::TypeOfTimeDiscretization "LINEAR_TIME", the field data contains \b two arrays, stamped with two
47 different time points. A linear interpolation of the field values between those two time steps is then possible. 
48 - \ref MEDCoupling::TypeOfTimeDiscretization "CONST_ON_TIME_INTERVAL", the field data contains a single array
49 of data, but a start- and end-time can be specified, thus declaring that the field represent a constant
50 set of data during this time interval. All time evaluation function then just check that the given time
51 fits in the interval.  
52
53 Finally, in the code itself, the class \ref MEDCoupling::MEDCouplingTimeDiscretization "MEDCouplingTimeDiscretization"
54 is the concrete representation of this concept.
55
56 */