Salome HOME
6789241ce837008e419d268018a72268f7a0846e
[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 ParaMEDMEM::TypeOfField "ON_NODES" keyword in the 
15 \ref ParaMEDMEM::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field". 
16
17 - the cells (or "elements") of the mesh: built with the 
18 \ref ParaMEDMEM::TypeOfField "ON_CELLS" keyword in the 
19 \ref ParaMEDMEM::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field". 
20 - or more complex items:
21     - Gauss points: built with \ref ParaMEDMEM::TypeOfField "ON_GAUSS_PT"
22     - Gauss points on nodes per element: built with \ref ParaMEDMEM::TypeOfField "ON_GAUSS_NE"
23     - Kriging points:  built with \ref ParaMEDMEM::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 paramter 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 transfered to another cell-based field;
29 - a P1->P0 interpolation means that a field on nodes this time will be transfered to a cell-based field. 
30 - etc ...
31
32 Finally, in the code itself, the class \ref ParaMEDMEM::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 ParaMEDMEM::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field".
40
41 It can be one of:
42 - \ref ParaMEDMEM::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 ParaMEDMEM::MEDCouplingFieldDouble::getValueOn "getValueOn()") 
45 - \ref ParaMEDMEM::TypeOfTimeDiscretization "ONE_TIME", the field data represent a single time step. 
46 - \ref ParaMEDMEM::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 ParaMEDMEM::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 ParaMEDMEM::MEDCouplingTimeDiscretization "MEDCouplingTimeDiscretization"
54 is the concrete representation of this concept.
55
56 */