Flow123d
3.9.0-139cfa9f4
|
Class implements algorithm for dim-dimensional intersections with 3D elements. More...
#include <inspect_elements_algorithm.hh>
Classes | |
struct | Prolongation |
Auxiliary structure for prolongation process. More... | |
Public Member Functions | |
InspectElementsAlgorithm (Mesh *_mesh) | |
~InspectElementsAlgorithm () | |
Public Member Functions inherited from IntersectionAlgorithmBase< dim, 3 > | |
IntersectionAlgorithmBase (Mesh *mesh) | |
Algorithms | |
unsigned int | n_intersections_ |
Counter for intersection among elements. More... | |
std::queue< Prolongation > | component_queue_ |
Prolongation queue in the component mesh. More... | |
std::queue< Prolongation > | bulk_queue_ |
Prolongation queue in the bulk mesh. More... | |
std::vector< bool > | closed_elements |
std::vector< unsigned int > | last_slave_for_3D_elements |
std::vector< BoundingBox > | elements_bb |
Elements bounding boxes. More... | |
BoundingBox | mesh_3D_bb |
Bounding box of all 3D elements. More... | |
std::vector< std::vector< IntersectionAux< dim, 3 > > > | intersection_list_ |
Resulting vector of intersections. More... | |
class | MixedMeshIntersections |
void | compute_intersections (const BIHTree &bih) |
Uses BIHtree to find the initial candidate of a component and then prolongates the component intersetion. More... | |
void | compute_intersections_BIHtree (const BIHTree &bih) |
Uses only BIHtree to find intersection candidates. (No prolongation). More... | |
void | compute_intersections_BB () |
void | init () |
void | compute_bounding_boxes () |
Computes bounding boxes of all elements. Fills elements_bb and mesh_3D_bb . More... | |
void | assert_same_intersection (unsigned int comp_ele_idx, unsigned int bulk_ele_idx) |
bool | intersection_exists (unsigned int component_ele_idx, unsigned int bulk_ele_idx) |
A hard way to find whether the intersection of two elements has already been computed, or not. More... | |
bool | compute_initial_CI (const ElementAccessor< 3 > &comp_ele, const ElementAccessor< 3 > &bulk_ele) |
Computes the first intersection, from which we then prolongate. More... | |
void | prolongation_decide (const ElementAccessor< 3 > &comp_ele, const ElementAccessor< 3 > &bulk_ele, IntersectionAux< dim, 3 > is) |
void | prolongate (const Prolongation &pr) |
Computes the intersection for a candidate in a queue and calls prolongation_decide again. More... | |
template<unsigned int ele_dim> | |
std::vector< unsigned int > | get_element_neighbors (const ElementAccessor< 3 > &ele, unsigned int ip_dim, unsigned int ip_obj_idx) |
unsigned int | create_prolongation (unsigned int bulk_ele_idx, unsigned int component_ele_idx, std::queue< Prolongation > &queue) |
Additional Inherited Members | |
Protected Attributes inherited from IntersectionAlgorithmBase< dim, 3 > | |
Mesh * | mesh |
Auxiliary function that translates ElementAccessor<3> to Simplex<simplex_dim> . More... | |
const unsigned int | undefined_elm_idx_ |
Class implements algorithm for dim-dimensional intersections with 3D elements.
dim-D
elements that are continuously neighbouring are called component elements. 3D elements are called bulk elements.
Implements the initialization routine, that finds the first candidate for intersection. It uses bounding boxes to fastly resolve intersection candidates. We call elements whose bounding boxes are intersecting 'candidates'.
Finding first candidate:
Implements prolongation algorithm that recursively searches neighbouring elements for next intersection candidates. The candidates – neighbouring component elements and bulk elements – are pushed into separate queues. The bulk elements queue is emptied at first, then the component elements queue is popped.
The recuring prolongation algorithm is as follows: Function prolongation_decide
fills the queues. A candidate pair of elements is popped out of a queue. Function prolongate
computes intersection for a candidate pair and calls prolongation_decide
again. This is done in an infinite cycle, until both queues are empty.
Three algorithms are implemented:
- BIH only: creates BIH, uses BIH to search through all elements to find candidates - BIH search: creates BIH, uses BIH to find only first candidates of components; then uses prolongation - BB search: does not create BIH, uses bounding boxes to search through all elements to find candidates
Due to optimal tracing algorithm for 2d-3d, we consider tetrahedron only with positive Jacobian. This is checked in assert.
TODO: check unit test prolongation 13d, because it has different results for BIH only and BB search
Definition at line 98 of file inspect_elements_algorithm.hh.
InspectElementsAlgorithm< dim >::InspectElementsAlgorithm | ( | Mesh * | _mesh | ) |
Definition at line 45 of file inspect_elements_algorithm.cc.
InspectElementsAlgorithm< dim >::~InspectElementsAlgorithm |
Definition at line 51 of file inspect_elements_algorithm.cc.
|
private |
|
private |
Computes bounding boxes of all elements. Fills elements_bb
and mesh_3D_bb
.
Definition at line 68 of file inspect_elements_algorithm.cc.
|
private |
Computes the first intersection, from which we then prolongate.
Definition at line 93 of file inspect_elements_algorithm.cc.
void InspectElementsAlgorithm< dim >::compute_intersections | ( | const BIHTree & | bih | ) |
Uses BIHtree to find the initial candidate of a component and then prolongates the component intersetion.
Definition at line 142 of file inspect_elements_algorithm.cc.
void InspectElementsAlgorithm< dim >::compute_intersections_BB |
Tests bounding boxes intersectioss to find the initial candidate of a component and then prolongates the component intersetion. (No BIHtree).
Definition at line 321 of file inspect_elements_algorithm.cc.
void InspectElementsAlgorithm< dim >::compute_intersections_BIHtree | ( | const BIHTree & | bih | ) |
Uses only BIHtree to find intersection candidates. (No prolongation).
Definition at line 266 of file inspect_elements_algorithm.cc.
|
private |
Definition at line 505 of file inspect_elements_algorithm.cc.
|
private |
Definition at line 446 of file inspect_elements_algorithm.cc.
|
private |
Initialization. Sets vector sizes and computes bulk bounding box.
Definition at line 57 of file inspect_elements_algorithm.cc.
|
private |
A hard way to find whether the intersection of two elements has already been computed, or not.
Definition at line 120 of file inspect_elements_algorithm.cc.
|
private |
Computes the intersection for a candidate in a queue and calls prolongation_decide
again.
Definition at line 654 of file inspect_elements_algorithm.cc.
|
private |
Finds neighbouring elements that are new candidates for intersection and pushes them into component queue or bulk queue.
Definition at line 531 of file inspect_elements_algorithm.cc.
|
friend |
Definition at line 188 of file inspect_elements_algorithm.hh.
|
private |
Prolongation queue in the bulk mesh.
Definition at line 139 of file inspect_elements_algorithm.hh.
|
private |
Definition at line 142 of file inspect_elements_algorithm.hh.
|
private |
Prolongation queue in the component mesh.
Definition at line 137 of file inspect_elements_algorithm.hh.
|
private |
Elements bounding boxes.
Definition at line 146 of file inspect_elements_algorithm.hh.
|
private |
Resulting vector of intersections.
Definition at line 151 of file inspect_elements_algorithm.hh.
|
private |
Definition at line 143 of file inspect_elements_algorithm.hh.
|
private |
Bounding box of all 3D elements.
Definition at line 148 of file inspect_elements_algorithm.hh.
|
private |
Counter for intersection among elements.
Definition at line 134 of file inspect_elements_algorithm.hh.