Salome HOME
fix conflict
[modules/med.git] / medtool / doc / user / doxygen / doxfiles / reference / fields / discretization.dox
index 907890bae49754b4c3593a7111100a88aa171f78..6789241ce837008e419d268018a72268f7a0846e 100644 (file)
@@ -1,21 +1,56 @@
 /*!
 \page discretization Spatial and temporal discretizations
 
-TODO: enhance this page
+When defining a field in MEDCoupling, the notions of spatial and temporal discretizations play 
+a crucial role. 
+
+The spatial discretization details the relationship between the field and its support mesh
+and the temporal discretization gives an indication of the time coverage represented
+by the field.
 
 \section field-space Spatial discretization
 A field can be supported by: 
-- the nodes (vertices) of the mesh: built with the 
-\ref ParaMEDMEM::MEDCouplingFieldDouble::New "ON_NODES" keyword. This is sometimes called a P1 field.
+- the nodes (vertices) of the mesh: this is built with the 
+\ref ParaMEDMEM::TypeOfField "ON_NODES" keyword in the 
+\ref ParaMEDMEM::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field". 
+
 - the cells (or "elements") of the mesh: built with the 
-\ref ParaMEDMEM::MEDCouplingFieldDouble::New "ON_CELLS" keyword. This is sometimes called a P0 field.
-- or more complex items (Gauss points, etc ...)
+\ref ParaMEDMEM::TypeOfField "ON_CELLS" keyword in the 
+\ref ParaMEDMEM::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field". 
+- or more complex items:
+    - Gauss points: built with \ref ParaMEDMEM::TypeOfField "ON_GAUSS_PT"
+    - Gauss points on nodes per element: built with \ref ParaMEDMEM::TypeOfField "ON_GAUSS_NE"
+    - Kriging points:  built with \ref ParaMEDMEM::TypeOfField "ON_NODES_KR"
+
+The spatial discretization is at the center of the \ref interpolation "interpolation" mechanisms,
+since one of the main interpolation paramter is indeed specifying from which source discretization
+to which target discretization one wants to go. For example:
+- a P0->P0 interpolation means that a field on cells will be transfered to another cell-based field;
+- a P1->P0 interpolation means that a field on nodes this time will be transfered to a cell-based field. 
+- etc ...
+
+Finally, in the code itself, the class \ref ParaMEDMEM::MEDCouplingFieldDiscretization "MEDCouplingFieldDiscretization"
+is the concrete representation of this concept.
 
 \section field-time Temporal discretization
 
-A field has a temporal discretization. It can be one of:
-- \ref ParaMEDMEM::MEDCouplingFieldDouble::New "NO_TIME"
-- \ref ParaMEDMEM::MEDCouplingFieldDouble::New "ONE_TIME"
-- \ref ParaMEDMEM::MEDCouplingFieldDouble::New "CONST_ON_TIME_INTERVAL"
+Similarly to the spatial discretization, a field object in MEDCoupling has a time discretization
+representing the time range that is covered by the data. It is also specified in the 
+\ref ParaMEDMEM::MEDCouplingFieldDouble::New(TypeOfField , TypeOfTimeDiscretization) "constructor of a field".
+
+It can be one of:
+- \ref ParaMEDMEM::TypeOfTimeDiscretization "NO_TIME", in this case no time is attached to the field, and no
+time-related operation is permitted (for example unable to call 
+\ref ParaMEDMEM::MEDCouplingFieldDouble::getValueOn "getValueOn()") 
+- \ref ParaMEDMEM::TypeOfTimeDiscretization "ONE_TIME", the field data represent a single time step. 
+- \ref ParaMEDMEM::TypeOfTimeDiscretization "LINEAR_TIME", the field data contains \b two arrays, stamped with two
+different time points. A linear interpolation of the field values between those two time steps is then possible. 
+- \ref ParaMEDMEM::TypeOfTimeDiscretization "CONST_ON_TIME_INTERVAL", the field data contains a single array
+of data, but a start- and end-time can be specified, thus declaring that the field represent a constant
+set of data during this time interval. All time evaluation function then just check that the given time
+fits in the interval.  
+
+Finally, in the code itself, the class \ref ParaMEDMEM::MEDCouplingTimeDiscretization "MEDCouplingTimeDiscretization"
+is the concrete representation of this concept.
 
 */