3 \page MEDCouplingFieldsPage Fields in MEDCoupling
7 \section MEDCouplingFields Field concept
9 A field in MEDCoupling point of view, is a structure that allows to
10 store a discretization of a physical value on a defined discretized spatial and
11 possibly temporal support.
13 The spatial support is a \ref MEDCouplingMeshesPage "mesh".
14 A field is lying on an entity that will be specified by the spatial
15 discretization of the field. For example a field on node will lie on
16 all nodes of its mesh.
18 A field on cell will lie on all cells of its mesh.
20 Fields in MEDCoupling follow the two following rules :
22 - A field will lie on \b ALL entities of its spatial support (\ref MEDCouplingMeshesPage "mesh").
23 - A field has \b only \b one spatial support (\ref MEDCouplingMeshesPage "mesh") on its temporal support.
25 The main properties of a field are :
28 - spatial support which is a \ref MEDCouplingMeshesPage "mesh"
29 - a \ref MEDCouplingSpatialDisc "spatial discretization"
30 - a description of intrinsic nature of the values of field (see \ref NatureOfField). This is important for conservative interpolation (see \ref TableNatureOfField).
31 - a temporal discretization that specifies, if it exists, the time interval on which the field is covering, and how.
32 - number of components
34 This definition of field in MEDCoupling allows an instance of field to
35 know at any point inside its spatial-temporal support the value.
37 The class that incarnates the concept described above is : \ref ParaMEDMEM::MEDCouplingFieldDouble.
39 Some of most important implemented methods are :
41 - \ref ParaMEDMEM::MEDCouplingFieldDouble::getNumberOfComponents "getNumberOfComponents"
42 - \ref ParaMEDMEM::MEDCouplingFieldDouble::getValueOn "getValueOn"
43 - \ref ParaMEDMEM::MEDCouplingFieldDouble::applyFunc "applyFunc"
44 - \ref ParaMEDMEM::MEDCouplingFieldDouble::addFields "cross instances operations"
45 \section MEDCouplingSpatialDisc Spatial discretization concept
47 This is the concept that makes the link, independently from temporal
48 discretization, between the field and its spatial support (\ref MEDCouplingMeshesPage "mesh"). This
49 concept allows the field to make a check and interpretation of an
50 array of values given a spatial support (\ref MEDCouplingMeshesPage "mesh").
52 The abstract class that incarnates the concept is : \ref ParaMEDMEM::MEDCouplingFieldDiscretization.
54 The most important pure virtual methods are :
56 - \ref ParaMEDMEM::MEDCouplingFieldDiscretization::getNumberOfTuples "getnumberOfTuples"
57 - \ref ParaMEDMEM::MEDCouplingFieldDiscretization::getValueOn "getValueOn"
58 - \ref ParaMEDMEM::MEDCouplingFieldDiscretization::getMeasureField "getMeasureField"
60 \section MEDCouplingTemporalDisc Temporal discretization concept
62 This information allows, independently from spatial discretization, to
63 associate a time interval, if it exists, on which the field will be
64 defined. This concept is able to give the value at any time of
65 the definition interval (if any).
67 The abstract class \ref ParaMEDMEM::MEDCouplingTimeDiscretization
68 incarnates this described concept.
70 This classes and its subclasses are responsible in storing the arrays
71 of the aggregating field.
73 The most important methods are :
75 - \ref ParaMEDMEM::MEDCouplingTimeDiscretization::setTime "setTime" and \ref ParaMEDMEM::MEDCouplingTimeDiscretization::getTime "getTime"
76 - \ref ParaMEDMEM::MEDCouplingTimeDiscretization::getArray "getArray" and \ref ParaMEDMEM::MEDCouplingTimeDiscretization::setArray "setArray"
77 - \ref ParaMEDMEM::MEDCouplingTimeDiscretization::getArraysForTime "getArraysForTime"
78 - \ref ParaMEDMEM::MEDCouplingTimeDiscretization::getValueForTime "getValueForTime"
80 \section MEDCouplingFirstSteps3 Building a field from scratch
82 Here we will make the assumption that an instance of \c MEDCouplingMesh called \c mesh has been created ( to know more about mesh creation \ref MEDCouplingUMeshStdBuild "click here" ).
84 \subsection MEDCouplingFirstSteps3OnCellsNoTS Create a tensor field with 9 components on cells with no time step
86 \subpage medcouplingcppexamplesFieldDoubleBuild1 "Here the C++ implementation."
88 \subpage medcouplingpyexamplesFieldDoubleBuild1 "Here the Python implementation."
90 \subsection MEDCouplingFirstSteps3OnNodesNoTS Create a scalar field on nodes with no time step
92 \subpage medcouplingcppexamplesFieldDoubleBuild2 "Here the C++ implementation."
94 \subpage medcouplingpyexamplesFieldDoubleBuild2 "Here the Python implementation."
96 \subsection MEDCouplingFirstSteps3OnCellsWTS Create a 2 components-vector field on cells with one time step and no interval
98 \subpage medcouplingcppexamplesFieldDoubleBuild3 "Here the C++ implementation."
100 \subpage medcouplingpyexamplesFieldDoubleBuild3 "Here the Python implementation."
102 \subsection MEDCouplingFirstSteps3OnCellsCTI Create a 3 components-vector field on nodes with a time interval where field remains constant on this time interval
104 \subpage medcouplingcppexamplesFieldDoubleBuild4 "Here the C++ implementation."
106 \subpage medcouplingpyexamplesFieldDoubleBuild4 "Here the Python implementation."
108 \section MEDCouplingSecondStep0 Operations on Fields
110 Here we will make the assumption that an instance of \ref ParaMEDMEM::MEDCouplingMesh "MEDCouplingMesh"
111 called \c mesh has been created with spaceDim==2.
113 \subpage medcouplingcppexamplesFieldDoubleBuild5 "Here a C++ example of more advanced use of MEDCouplingFieldDouble instances".
115 \subpage medcouplingpyexamplesFieldDoubleBuild5 "Here a Python example of more advanced use of MEDCouplingFieldDouble instances".
119 LocalWords: discretization