Salome HOME
01336e883e90c4e5cf3e8ed360c0a33c697f673e
[tools/medcoupling.git] / doc / developer / doxygen / doxfiles / reference / interpolation / intersec-specifics.dox
1 /*!
2 \page intersec-specifics Specificities of 2D and 3D intersectors
3
4 All the options described here can be set using the 
5 \ref MEDCoupling::MEDCouplingRemapper::setOptionInt "MEDCouplingRemapper::setOptionInt",
6 \ref MEDCoupling::MEDCouplingRemapper::setOptionDouble "MEDCouplingRemapper::setOptionDouble",
7 and \ref MEDCoupling::MEDCouplingRemapper::setOptionString "MEDCouplingRemapper::setOptionString"
8 methods.   
9
10 \section interpolation2D Special features of 2D intersectors
11
12 \subsection InterpKerPlanarIntGenP0P0 P0->P0 : PlanarIntersector.
13
14 All the 2D intersectors inherits from INTERP_KERNEL::PlanarIntersector class.
15
16 The main task offered by this class is to give the
17 evaluation of the interpolation of one cell in source mesh with an another
18 cell in the target mesh.
19
20 \subsection InterpKerPlanarIntFeatureP0P0 P0->P0 intersectors features.
21
22 When remapping two dimensional fields, areas of intersection between polygonal cells are to be computed. Three algorithms are available:
23 - Triangulation: decompose each cells into triangles and computes triangle-triangle intersection by determining segment crossings and node inclusions. This algorithm is the fastest if both meshes are made of triangular cells.
24 - Convex: presume that both meshes are made of convex cells, and performs a direct computation of the intersection nodes between two cells through a sweep line algorithm (see  F. Preparata and M. Shamos, 1985 in \ref references).
25 For the moment, it is only possible to remap two dimensional fields on
26 meshes with mixed triangular and quadrangular elements.
27 - Geometric2D: Any type of 2D cells (linear, quadratic, convex-polygons,
28 non-convex polygons) is supported by this algorithm. Due to its
29 flexibility this algorithm is slower than the other.
30 - \anchor pointlocator PointLocator: This is a \b non \b conservative interpolator. For P0P0, it
31 locates the barycenter of target cell in the source cells. For P1P0, it
32 locates barycenter of target cell and compute \ref barycoords "barycentric coordinates"
33 in source cell (Works only with Triangulation). For P0P1 locate target nodes
34 in source cells. For P1P1 compute for each target node its barycentric coordinates in source cell.
35
36 The following options are available for the 2D intersection computations:
37  * <TABLE BORDER=1 >
38  * <TR><TD>Option</TD><TD>Description</TD><TD> Admitted values</TD><TD>Default</TD></TR>
39  * <TR><TD> Intersection_type</TD><TD>Specifies the algorithm to be
40  * used in the computation of the cell-cell intersections</TD><TD>
41  * Triangulation, Convex, \ref interpkernelGeo2D "Geometric2D", PointLocator</TD><TD> Triangulation </TD></TR>
42  * <TR><TD> Precision </TD><TD>Accuracy of the computations is precision times the characteristic size of the meshes </TD><TD>  positive real numbers</TD><TD> 1.0E-12 </TD></TR>
43  * <TR><TD>PrintLevel </TD><TD>Level of verboseness during the computations </TD><TD> 0, 1, 2, 3 </TD><TD>0 </TD></TR>
44  *</TABLE>
45
46 \section interpolation3Dsurf Special features of 3D surface intersectors
47
48 When remapping a three dimensional surfaces, one should give a meaning to the area of intersection between two three-dimensional non coplanar polygons. A projection phase is thus necessary to have both polygons on the same plane. Care must be taken when defining this projection to avoid non conservative remappings. After the projection step, the source and target cells lie in the same plane and the same algorithms as for 2D remapping can be employed.
49 For the moment, it is only possible to remap fields on  three dimension surface meshes with mixed triangular and quadrangular elements.
50 Similar options as for the 2D remapping are available, plus some additional options specific to 3D surface remapping:
51
52  * <TABLE BORDER=1 >
53  * <TR><TD>Option</TD><TD>Description</TD><TD> Admitted values</TD><TD>Default</TD></TR>
54  * <TR><TD> MedianPlane </TD><TD>Position of the median plane where both cells will be projected</TD><TD> real numbers between 0 and 1 </TD><TD> 0.5 </TD></TR>
55  * <TR><TD> Precision </TD><TD>Accuracy of the computations is
56  * precision times the characteristic size of the meshes </TD><TD>
57  * positive real numbers </TD><TD> 1.E-12 </TD></TR>
58  * <TR><TD> Orientation </TD><TD>Specifies orientation to take into account. If -1 only negative intersection area are taken into account.  If 1 only positive intersection
59  *  area are taken into account. If 0 intersection area are always taken into account. If 2 intersection area are always taken into account (as 0) difference is that absolute value</TD><TD> -1,0,1,2 </TD><TD> 0 </TD></TR>
60  * <TR><TD>DoRotate </TD><TD>Performs a rotation of the coordinate
61  system such that the median plane is the Oxy plane </TD><TD>
62  boolean true or false </TD><TD> true </TD></TR>
63  * <TR><TD>BoundingBoxAdjustment</TD><TD>When detecting an intersection between bounding boxes, the bounding are expanded by a factor (1+BoundingBoxAdjustment). It is particularly useful when detecting intersections for 3D surfaces for which the bounding boxes might not actually intersect. </TD><TD> positive real numbers </TD><TD> 1.e-4 </TD></TR>
64  * <TR><TD>BoundingBoxAdjustmentAbs</TD><TD>When detecting an intersection between bounding boxes, the bounding are expanded uniformly in the 3 dimension of space with the absolute value BoundingBoxAdjustmentAbs. It is particularly useful when detecting intersections for 3D surfaces for which the bounding boxes might not actually intersect. </TD><TD> positive real numbers </TD><TD> 0. </TD></TR>
65  * <TR><TD>MaxDistance3DSurfIntersect</TD><TD>Before attempting an intersection in 3D surf test the distance D between fast barycenter of target cell and medium source plane P. If option < 0. no interpretation of D is done. If option > 0. then if D<option intersection is taken into account and if D>option intersection is equal to 0. . This option exists in order to have an iso behaviour whatever the angle of plane P and OXY OYZ OXZ contrary to BBoxAdjestments options.  </TD><TD> real numbers </TD><TD> -1. </TD></TR>
66  *</TABLE>
67
68 Note that choosing the Triangulation Intersection_type necessarily set the DoRotate option to true.
69
70 \section interpolation3D Special features of 3D volumes intersectors
71
72 \subsection InterpKer3DIntGenP0P0 P0->P0 : TargetIntersector
73
74 Unlike \ref InterpKerPlanarIntGenP0P0 "PlanarIntersector phylosophy"
75 this intersector is slightly different. Here for the moment
76 there is one instance per pair of meshes \b and target element. See INTERP_KERNEL::TargetIntersector for more details.
77
78 \subsection InterpKer3DIntFeatureP0P0 P0->P0 intersectors features.
79
80 When remapping three dimensional fields, volumes of intersection
81 between polyhedral cells are to be computed.
82 Two methods are available :
83 - Triangulation : the method of Jeffrey Grandy, 1999 (see \ref references)
84 to intersect arbitrary polyhedra. The basic algorithm computes the
85 intersection of a tetrahedron with an arbitrary (possibly non convex)
86 polyhedron. Using splitting techniques, it is possible to transform
87 the problem of computing the intersection between two general
88 polyhedra into several tetrahedron-polyhedron intersection
89 calculations. For the moment it is only possible to remap fields on
90 meshes having mixed tetrahedral and hexahedral cells. When using a
91 mesh with hexahedral cells, several splitting techniques may be
92 employed depending mainly on whether the faces are planar or not. The
93 following options are available for the splitting:
94 - PointLocator : \b non \b conservative intersector based on the same
95 principle than described in 2D.
96
97  * <TABLE BORDER=1 >
98  * <TR><TD>Option</TD><TD>Description</TD><TD> Admitted values</TD><TD>Default</TD></TR>
99  * <TR><TD> Intersection_type</TD><TD>Specifies the algorithm to be
100  * used in the computation of the cell-cell intersections</TD><TD>
101  * Triangulation, PointLocator</TD><TD> Triangulation </TD></TR>
102  * <TR><TD> SplittingPolicy </TD><TD> Way in which the hexahedra are
103  * split into tetrahedra (only if Intersection_type==Triangulation) </TD><TD> PLANAR_FACE_5,  PLANAR_FACE_6, GENERAL_24, GENERAL_48</TD><TD> PLANAR_FACE_5 </TD></TR>
104  * <TR><TD>PrintLevel </TD><TD>Level of verboseness during the computations </TD><TD> 1, 2, 3, 4, 5 </TD><TD>0 </TD></TR>
105  * </TABLE>
106
107 Note that a SplittingPolicy values starting with the word "PLANAR" presume that each face is to be considered planar, while the SplittingPolicy values starting with the word GENERAL does not. The integer at the end gives the number of tetrahedra that result from the split.
108  Consider an hexahedron with planar faces and nodes numbered according to the following picture:
109 \verbatim
110
111               7 ------ 6
112              /|       /|
113             / |      / |
114            3 ------ 2  |
115            |  |     |  |
116            |  |     |  |
117            |  4-----|- 5
118            | /      | /
119            0 ------ 1
120 \endverbatim
121 The use of the SPLIT_NODES_5 splitting policy would lead to a 5 tetrahedra decomposition as follows :
122 \verbatim
123   0, 1, 5, 2
124   0, 4, 5, 7
125   0, 3, 7, 2
126   5, 6, 7, 2
127   0, 2, 5, 7
128 \endverbatim
129 The use of the SPLIT_NODES_6 splitting policy would lead to a 6 tetrahedra decomposition as follows :
130 \verbatim
131   0, 1, 5, 6
132   0, 2, 1, 6
133   0, 5, 4, 6
134   0, 4, 7, 6
135   0, 3, 2, 6
136   0, 7, 3, 6
137 \endverbatim
138
139
140 */