1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) 2015-2020, Geay, Bruneton
3 # This file is distributed under the same license as the MEDCoupling User's
5 # FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
10 "Project-Id-Version: MEDCoupling User's Guide 8.4.0\n"
11 "Report-Msgid-Bugs-To: \n"
12 "POT-Creation-Date: 2018-05-14 14:14+0300\n"
13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15 "Language-Team: LANGUAGE <LL@li.org>\n"
17 "Content-Type: text/plain; charset=utf-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Generated-By: Babel 2.0\n"
21 # ec21659471944b0e9d49afe7c0ef3d3c
22 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:2
23 msgid "Data conversion"
26 # ed2e929565c142b7879b359b50f9189e
27 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:4
29 "medcoupling includes MEDCouplingRemapper object that allows given a "
30 "source field and a target mesh to produce a field lying on target mesh."
33 # 9712a29c4da7401caa4e08467813f8f5
34 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:8
36 "MEDCouplingRemapper goal is to compute a projection by minimizing "
37 "diffusive effects and conserve at most the magnitude of key variables."
40 # c88d0a7d25c4451a85bbfe148faf1b7f
41 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:12
43 "The MEDCouplingRemapper object computes a remap function that allows to "
44 "transform source field into target field."
47 # 75f649f765a740d782aa12f2be1a387d
48 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:15
49 msgid "The function is represented using sparse matrix given:"
52 # a6f66dceae4547cdb5d56e73fb19bb99
53 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:17
57 # bdb022e70a8a475a9b7fc785053e9984
58 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:18
62 # d1ede143dd5b40adb2b037344eaf7835
63 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:19
65 "a source spatial discretization (\"P0\" means ON_CELLS and \"P1\" means "
69 # 94e2aa215a6d491985a0f8549615184e
70 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:20
71 msgid "a target spatial discretization"
74 # 0b5a5f6f0e5c4165a75072f2311e7dd4
75 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:22
76 msgid "Apply a projection is then equivalent to apply matrix vector multiply."
79 # d284de6c2fae4b67bcd54d7448abc1e6
80 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:25
82 "As projection requires mathematically to compute for every cell in target"
83 " mesh, the contribution relative to each of cell in source mesh. So "
84 "projection is computation-intensive task."
87 # e717e6336a49409da6f596c3dac59ab9
88 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:29
90 "To optimize time spent by MEDCouplingRemapper, it implements a fast "
91 "algorithm that select coarsely the pairs of cells that have a chance to "
92 "be in interaction each other. It allows to drop from O(n^2) to O(n) the "
93 "complexity of algorithm. The algorithm is based on rectilinear bounding "
94 "boxes of cells along axis. 2 cells in interaction have their respective "
95 "bounding boxes in interaction."
98 # f58c6a80d4c049cb821a515e102ff93f
99 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:37
101 "Unfortunately it works well mathematically but in the real life "
102 "projections especially when spacedim and meshdim are not the same it can "
106 # 2553d23221a04d0e8eb3c14c4df64c3d
107 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:44
109 "Projection cells/cells with meshes having same mesh dimension/space "
113 # 433ab94995c741a7bea716229f3b05a4
114 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:46
116 "Let us create meshes for sample projection: a source mesh consisting of "
117 "two quadrangles and a target mesh consisting of a triangle:"
120 # 4f5be11efd024c11977ac51631af0683
121 # e6fee0a106d645aab263e5b03d068f90
122 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:51
123 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:115
124 msgid "Two source quadrangles in blue and a target triangle in red"
127 # 1c90fbc8ccb94011a428c94e6a8205f0
128 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:57
129 msgid "Now perform projection:"
132 # 17d1824812b440ff98c3456107b49b68
133 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:63
135 "Here \"P0P0\" specifies spatial discretization of both source and target "
136 "field. \"P0\" is for cell discretization (ON_CELLS). \"P1\" is for node "
137 "discretization (ON_NODES). For example, \"P0P1\" means from a source cell"
138 " field (lying on a source mesh) to a target node field (lying on a target"
142 # 53fbf0ca08de49039d3d01fd7e01538e
143 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:65
145 "Remapper *rem* has just performed intersection of *src* and *tgt* meshes."
146 " Result of intersection is stored in a matrix which is returned by "
147 "getCrudeMatrix method. Each element of the matrix is size of intersection"
148 " of two cells i and j of the source and target meshes correspondingly."
151 # a2a200d8dc3a491493cffae6bed1f8ba
152 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:67
154 "Generally the matrix is sparse. To reduce memory usage, the space matrix "
155 "is represented by an array whose i-th element is a map storing indices "
156 "and intersection sizes of source cells intersecting i-th target cell."
159 # 816b2803bec54c0db5aada90c45e28d8
160 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:69
161 msgid "Here is a sample sparse matrix:"
164 # 4b9459bebb64493f82b0d2a6ca4bafd5
165 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:81
166 msgid "and a corresponding array, which stores only non-zero matrix elements:"
169 # 4aa945440c524c0e97aa8b1c35fa2c45
170 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:87
172 "Now we create a field on all cells of *src* mesh and call "
173 "rem.transferField() to transfer the field to the cells of *tgt* mesh"
176 # 61927b7c70104e97b2ffb36e9ec20b00
177 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:93
179 "The last argument -1 is a default value that will be assigned in *trgF* "
180 "to each entity of *tgt* mesh that is not intercepted by any entity of "
184 # 02bdfa1173af4fb697d93e8937a74eb3
185 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:95
187 "It is crucial to setNature() of the field by which an adequate "
188 "interpolation formula is chosen. The field nature is expressed by one of "
189 "the following values: ExtensiveMaximum, IntensiveMaximum, "
190 "ExtensiveConservation, IntensiveConservation."
193 # 6fb68a3e07534e89a7478d41d6b162f9
194 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:97
196 "The field is represented by a vector with a discrete value on each cell. "
197 "This value can represent either"
200 # 658affd5f2754c2eb1d4aa0d6eb387b3
201 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:99
203 "an average value of the field in the cell (average density, velocity or "
204 "temperature in the cell) in which case the representation is said to be "
208 # 0b33b21dc7fb4f8b9bd0ad9d00fc89d9
209 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:100
211 "an integrated value over the cell (total mass, power of the cell) in "
212 "which case the representation is said to be **extensive**."
215 # 59934de0ad7145f48ce7f8191b2c67f1
216 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:102
218 "In the case where the source and target meshes are not fully overlapping,"
219 " it is important to make a correct choice between Maximum and "
223 # c84b543196a14f79a177991119372992
224 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:104
226 "**Conservation** means that the interpolation algorithm preserves the "
227 "integral of the field over a domain."
230 # a6306bd8f1cd4a269cc41e0721ea0d93
231 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:105
233 "**Maximum** means that the field values resulting from the interpolation "
234 "remain between the upper and lower bounds of the original field."
237 # 946c50ad6d5c41b39646f7319d6d7fc4
238 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:108
240 "Projection cells/nodes nodes/cells nodes/nodes with meshes having same "
241 "mesh dimension/space dimension"
244 # d7046415343a4c9ab79e4b83b5b6ac14
245 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:110
247 "Suppose we have the same source and target meshes as in the "
248 ":ref:`previous chapter <projection_P0P0>`. I.e. the source mesh consists "
249 "of two quadrangles and the target mesh consists of a triangle."
252 # 58ce1c66df2d4d0a93b7a98862c4aa23
253 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:117
255 "The source field is also on cells but the target field is on **nodes** of"
256 " target mesh. In such a case we do the following:"
259 # e58671bc77eb4b56aaf5de47cbbf21a3
260 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:123
262 "Here \"P0P1\" specifies support of the source (P0=ON_CELLS) and the "
263 "target (P1=ON_NODES) fields. The computed martix is::"
266 # 3406399c8f704734a0413ac0d5b05d38
267 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:127
269 "The result matrix contains values for each of the three nodes of the "
270 "target mesh. In order to be able to compute these values by means of "
271 "intersection of cells, an algorithm constructs an auxiliary target mesh. "
272 "This auxiliary mesh is a dual mesh of the actual target mesh, hence it "
273 "includes cells corresponding to each actual target node."
276 # 5321e1a5876e4fd1a5e5ed587042c258
277 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:132
279 "The target mesh used for projection is a dual one of the actual target "
283 # a1c99f08bd1b4500ad461442d4da0e7c
284 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:134
286 "If the case is reverse, i.e. the source field is on nodes and the target "
287 "one should be on cells, we change \"P0P1\" to \"P1P0\":"
290 # 8733c1f80be0426193c6c4c603906dc9
291 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:140
292 msgid "The computed martix is::"
295 # 2190f951252445a09dd3f58aa67245d4
296 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:144
298 "In the same way as in \"P0P1\" case, an auxiliary dual mesh is internally"
299 " constructed for a mesh supporting a field on nodes (the source field in "
300 "our case). But since the source cells are not simplexes, simplexization "
301 "of quadrangles is perfrormed on the fly to be able to construct the dual "
302 "mesh. Cell #0 (0,3,4,1) is split into (0,3,4) and (0,4,1)"
305 # 1db2464216be42b8806857b55695c1cc
306 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:149
308 "The source mesh used for projection is a dual one of simplexized actual "
312 # cda2159f8b074b8e9cf862e76b599722
313 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:155
315 "in present implementation of Remapper, the projection of fields on nodes "
316 "lying on quadratic meshes is not available. If you are in this case you "
317 "have 2 choices :|br| 1) you accept to lose precision by converting your "
318 "mesh (MEDCouplingUMesh.convertLinearCellsToQuadratic) |br| 2) you "
319 "subdivide your mesh."
322 # 6e73dd503f6e4a6685870b6ebb562b19
323 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:160
324 msgid "Projection cell/cell when meshdim != spacedim"
327 # 27f4c2c6fee346aa909952f1164128cd
328 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:162
330 "When meshdim is not equal to spacedim some additional important "
331 "parameters should be considered."
334 # 4ba851aa30a54ebf9b1a6839de105bfe
335 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:164
336 msgid "Consider a simple case with spacedim=3 and meshdim=2 where :"
339 # 9a82b0079f0341278719826874f6c4fa
340 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:166
341 msgid "source mesh contains one triangle cell [0.,0.,0.], [1,0,0], [0,1,0]"
344 # cc5766d4d7834f1aaef59168f5ddc0eb
345 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:167
347 "target mesh also contains one triange cell [0.,0.,0.], [1,0,0], [0,1,0], "
348 "which coincides with the source triangle."
351 # ac2d70338d034f17b0dcc25790e5d315
352 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:169
354 "Only \"P0P0\" projection (ON_CELLS->ON_CELLS) will be considered here but"
355 " all elements presented here are applicable for other spatial "
356 "discretizations projections."
359 # 5f0366eb5c574524bade568306c0ebc3
360 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:175
361 msgid "A remapper returns the following correct matrix::"
364 # dfe61422dfe345fb8dd20a124de466e6
365 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:179
366 msgid "where 0.5 is equal to area of the source (or target) triangle."
369 # d777fb098267490ba77b702aeb8dca86
370 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:181
372 "Let us see what the remapper will return if the meshes are not "
373 "overlapping. To this end we translate the source mesh along its normal "
374 "by a small distance (1e-3):"
377 # c9162ed4c71c457a81f2ae8ad62e8763
378 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:187
380 "The remapper returns the following matrix, which means that it have not "
381 "found any intersection of the meshes::"
384 # f568cb6e2df04afdada3bc9395326b03
385 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:191
387 "This happens because bounding boxes of cells used to detect possibly "
388 "intersecting cells do not intersect. In order to get a correct result of "
389 "intersection we can increase those bounding boxes. The remapper provides "
390 "two ways to do that:"
393 # 003ff0073d9d47cca9444f4f2cf39bd3
394 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:193
396 "rem.setBoundingBoxAdjustmentAbs( *thickness* ) expands a bounding box by "
400 # 878448da6eea484193da5b41895b7b87
401 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:194
403 "rem.setBoundingBoxAdjustment( *factor* ) expands a bounding box by "
404 "thickness computed by multiplying a maximal bounding box size by "
408 # 2ee8d94a11a1486f9340a9a77573a669
409 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:199
411 "If source and target meshes do not overlap we can increase their bounding"
412 " boxes to help remapper to detect intersecting cells"
415 # 0255d7eac2e34e20bd63677fad79745f
416 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:205
417 msgid "With bounding box tuning we obtain the correct result matrix::"
420 # 0d3d2f4c186248c4a33d7de79fab9f72
421 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:209
423 "The bounding box tuning has a disadvantage in the case where a cell has "
424 "large angle with either of planes OXY, OYZ or OXZ. In such a case cells "
425 "that are rather far one from another can be detected as possibly "
426 "intersecting since their bounding boxes are too large. "
427 "setMaxDistance3DSurfIntersect method helps avoiding excess intersections."
428 " If a distance between fast barycenter of target cell and medium source "
429 "plane is more than the value specified via setMaxDistance3DSurfIntersect "
430 "then cell intersection is not performed."
433 # f16cf58b64ea4cdcb3570ea3dd8cf3e2
434 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:214
436 "If the tuned bounding box is too large we can use "
437 "setMaxDistance3DSurfIntersect to exclude unnecessary intersections"
440 # 7f4338f23d1a45ddba3581a51f348acf
441 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:216
443 "Let us rotate the source mesh by pi/4 angle around Y axis. The result "
447 # 11af138e8ebe4fa4b31ef3eb6b4ecaa9
448 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:226
450 "If we use setMaxDistance3DSurfIntersect, the result matrix shows that no "
451 "intersection found:"
454 # 2407d4c239fd4385b703695cbf774dbd
455 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:235
457 "Another function useful to avoid unnecessary intersection is "
458 "setMinDotBtwPlane3DSurfIntersect. It tells the remapper not to intersect "
459 "cells whose normals are too much different. "
460 "setMinDotBtwPlane3DSurfIntersect specifies minimal dot product of unitary"
461 " normal vectors of a source and target cells."
464 # 090de9cdb96e4ac4811be5c2d31aa4d9
465 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:237
467 "Let us switch off setMaxDistance3DSurfIntersect by passing a negative "
468 "value. And use setMinDotBtwPlane3DSurfIntersect to avoid intersecting "
469 "cells that has 45 degrees angle between their normals in our case."
472 # 7347cdbff8ff4adda77b7da33f919e1d
473 #: ../../../../MEDCOUPLING_SRC/doc/user/input/data_conversion.rst:243
474 msgid "Result matrix is::"