Salome HOME
MEDMEM suppression
[modules/med.git] / doc / doxygen / extractor.dox
1 /*!
2 \page extractor Extractor
3
4 MEDMEM::Extractor is a tool taking an input field and making a field
5 of lower dimension by cutting the given field by a plane or a
6 line. The following extractions are possible:
7 - 3D -> 2D (3D mesh cut by plane)
8 - 3D -> 1D (3D mesh cut by line)
9 - 2D -> 1D (2D mesh cut by line in 2D space or by plane in 3D space)
10
11 The input field is supposed to comply with following conditions
12 - it is constant by element (i.e. has 1 gauss point),
13 - it's support mesh does not contain poly elements,
14 - volumic elements have planar faces,
15 - surfasic elements have linear edges.
16
17 The result field is a field constant by element on triangles,
18 quadrangles, polygons or edges. It holds ownership of its 
19 support, which in its turn holds ownership of its mesh.
20
21 \section ExtractorAlgo1 Algorithm to cut mesh in 3D space by plane and in 2D by line
22
23 -# Calculate a normal normalized vector to the plane in 3D space
24 or the line in 2D space.
25 -# For each node of input mesh calculate its distance to the
26 plane/line as scalar product of the normal vector and a vector
27 node -> coords (coords is the arg of extractPlane() and
28 extractLine()). The distance has a sign.
29 -# Store the distances of all nodes in a vector<double>.
30 -# Analyse edges of each cell. If extremities of an edge have
31 different sign, we consider the edge to be cut by plane/line. If at
32 least one cut edge of the cell has intersection point not closer than
33 a certain precision from edge extremities, we consider the cell to be
34 cut and we make a new cell in the new mesh. Also we consider a cell to
35 be cut if 3D cell has three intersections at nodes and 2D cell has two
36 intersections at nodes.
37 -# Calculate an intersection points using ratio of node
38 distances. If the intersection point is too close to the edge
39 extremity, we take coordinates of a corresponding node. 
40 -# Make new nodes of intersection points and set them in proper
41 order to make an element. For 2D elements we sort nodes by angle with the
42 first edge of the new element. 
43
44 \section ExtractorAlgo2 Algorithm to cut 3D mesh by the line
45 -# Use descending connectivity to find outer faces. Outer face is
46 bound to only one cell.
47 -# Find any outer face intersecting with the line. 
48 -# Use the reverse descending connectivity or the reverse nodal
49 connectivity to get cells to try next intersection.
50 -# Find another intersected face among faces of the got cells and so on.
51 -# Try to find the next outer face intersecting with the line. This is
52 for the case if the input mesh has several domains. To avoid
53 unnecessary outer face-line intersection searches, we classify outer
54 faces along the line. So we won't try to intersect outer faces that
55 are between the first and the last intersected outer faces we have
56 already found.
57
58 */