Flow123d  master-a7f2151e0
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
MixedMeshIntersections Class Reference

Main class for computation of intersection of meshes of combined dimensions. More...

#include <mixed_mesh_intersections.hh>

Collaboration diagram for MixedMeshIntersections:
Collaboration graph
[legend]

Public Types

typedef std::pair< unsigned int, IntersectionLocalBase * > ILpair
 

Public Member Functions

 MixedMeshIntersections (Mesh *mesh)
 
 ~MixedMeshIntersections ()
 
void compute_intersections (IntersectionType d=IntersectionType::all)
 
unsigned int number_of_components (unsigned int dim)
 
double measure_13 ()
 Computes the size of the intersection in dim dimenstions. More...
 
double measure_23 ()
 
double measure_22 ()
 
void print_mesh_to_file_13 (std::string name)
 Generates a mesh file of the given name, including the intersection. More...
 
void print_mesh_to_file_23 (std::string name)
 

Public Attributes

std::vector< IntersectionLocal< 1, 3 > > intersection_storage13_
 Stores 1D-3D intersections. More...
 
std::vector< IntersectionLocal< 2, 3 > > intersection_storage23_
 Stores 2D-3D intersections. More...
 
std::vector< IntersectionLocal< 2, 2 > > intersection_storage22_
 Stores 2D-2D intersections. More...
 
std::vector< IntersectionLocal< 1, 2 > > intersection_storage12_
 Stores 1D-2D intersections. More...
 
std::vector< std::vector< ILpair > > element_intersections_
 

Private Member Functions

template<uint dim_A, uint dim_B>
void store_intersection (std::vector< IntersectionLocal< dim_A, dim_B >> &storage, IntersectionAux< dim_A, dim_B > &isec_aux)
 
template<uint dim_A, uint dim_B>
void append_to_index (std::vector< IntersectionLocal< dim_A, dim_B >> &storage)
 
template<unsigned int dim>
void compute_intersections (InspectElementsAlgorithm< dim > &iea, std::vector< IntersectionLocal< dim, 3 >> &storage)
 Auxiliary function that calls InspectElementsAlgorithm<dim>. More...
 
void compute_intersections_22 (std::vector< IntersectionLocal< 2, 2 >> &storage)
 
void compute_intersections_12_3 (std::vector< IntersectionLocal< 1, 2 >> &storage)
 
void compute_intersections_12_1 (std::vector< IntersectionLocal< 1, 2 >> &storage)
 
void compute_intersections_12_2 (std::vector< IntersectionLocal< 1, 2 >> &storage)
 

Private Attributes

Meshmesh
 Mesh pointer. More...
 
InspectElementsAlgorithm< 1 > algorithm13_
 
InspectElementsAlgorithm< 2 > algorithm23_
 
InspectElementsAlgorithm22 algorithm22_
 
InspectElementsAlgorithm12 algorithm12_
 

Detailed Description

Main class for computation of intersection of meshes of combined dimensions.

Controls different algorithms for computation of intersection. Computes intersection in the order:

When we are on an element, we use element_intersections_ to get to all its intersections.

Definition at line 64 of file mixed_mesh_intersections.hh.

Member Typedef Documentation

◆ ILpair

typedef std::pair<unsigned int, IntersectionLocalBase *> MixedMeshIntersections::ILpair

For every element, stores list of intersections with this element.

intersection_map_[element index][i].first = other element index intersection_map_[element index][i].second = index pointer to the intersection object

Definition at line 82 of file mixed_mesh_intersections.hh.

Constructor & Destructor Documentation

◆ MixedMeshIntersections()

MixedMeshIntersections::MixedMeshIntersections ( Mesh mesh)

Definition at line 25 of file mixed_mesh_intersections.cc.

◆ ~MixedMeshIntersections()

MixedMeshIntersections::~MixedMeshIntersections ( )

Definition at line 29 of file mixed_mesh_intersections.cc.

Member Function Documentation

◆ append_to_index()

template<uint dim_A, uint dim_B>
void MixedMeshIntersections::append_to_index ( std::vector< IntersectionLocal< dim_A, dim_B >> &  storage)
private

Definition at line 130 of file mixed_mesh_intersections.cc.

Here is the caller graph for this function:

◆ compute_intersections() [1/2]

template<unsigned int dim>
void MixedMeshIntersections::compute_intersections ( InspectElementsAlgorithm< dim > &  iea,
std::vector< IntersectionLocal< dim, 3 >> &  storage 
)
private

Auxiliary function that calls InspectElementsAlgorithm<dim>.

Definition at line 156 of file mixed_mesh_intersections.cc.

◆ compute_intersections() [2/2]

void MixedMeshIntersections::compute_intersections ( IntersectionType  d = IntersectionType::all)

Calls InspectElementsAlgorithm<dim>, computes intersections, move them to storage, create the map and throw away the rest.

Definition at line 323 of file mixed_mesh_intersections.cc.

◆ compute_intersections_12_1()

void MixedMeshIntersections::compute_intersections_12_1 ( std::vector< IntersectionLocal< 1, 2 >> &  storage)
private

Definition at line 303 of file mixed_mesh_intersections.cc.

Here is the caller graph for this function:

◆ compute_intersections_12_2()

void MixedMeshIntersections::compute_intersections_12_2 ( std::vector< IntersectionLocal< 1, 2 >> &  storage)
private

Definition at line 283 of file mixed_mesh_intersections.cc.

Here is the caller graph for this function:

◆ compute_intersections_12_3()

void MixedMeshIntersections::compute_intersections_12_3 ( std::vector< IntersectionLocal< 1, 2 >> &  storage)
private

Definition at line 242 of file mixed_mesh_intersections.cc.

Here is the caller graph for this function:

◆ compute_intersections_22()

void MixedMeshIntersections::compute_intersections_22 ( std::vector< IntersectionLocal< 2, 2 >> &  storage)
private

Definition at line 195 of file mixed_mesh_intersections.cc.

Here is the caller graph for this function:

◆ measure_13()

double MixedMeshIntersections::measure_13 ( )

Computes the size of the intersection in dim dimenstions.

Definition at line 41 of file mixed_mesh_intersections.cc.

◆ measure_22()

double MixedMeshIntersections::measure_22 ( )

Definition at line 78 of file mixed_mesh_intersections.cc.

◆ measure_23()

double MixedMeshIntersections::measure_23 ( )

Definition at line 65 of file mixed_mesh_intersections.cc.

◆ number_of_components()

unsigned int MixedMeshIntersections::number_of_components ( unsigned int  dim)

Definition at line 33 of file mixed_mesh_intersections.cc.

◆ print_mesh_to_file_13()

void MixedMeshIntersections::print_mesh_to_file_13 ( std::string  name)

Generates a mesh file of the given name, including the intersection.

Definition at line 400 of file mixed_mesh_intersections.cc.

◆ print_mesh_to_file_23()

void MixedMeshIntersections::print_mesh_to_file_23 ( std::string  name)

Definition at line 495 of file mixed_mesh_intersections.cc.

◆ store_intersection()

template<uint dim_A, uint dim_B>
void MixedMeshIntersections::store_intersection ( std::vector< IntersectionLocal< dim_A, dim_B >> &  storage,
IntersectionAux< dim_A, dim_B > &  isec_aux 
)
private

Definition at line 106 of file mixed_mesh_intersections.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ algorithm12_

InspectElementsAlgorithm12 MixedMeshIntersections::algorithm12_
private

Definition at line 112 of file mixed_mesh_intersections.hh.

◆ algorithm13_

InspectElementsAlgorithm<1> MixedMeshIntersections::algorithm13_
private

Definition at line 109 of file mixed_mesh_intersections.hh.

◆ algorithm22_

InspectElementsAlgorithm22 MixedMeshIntersections::algorithm22_
private

Definition at line 111 of file mixed_mesh_intersections.hh.

◆ algorithm23_

InspectElementsAlgorithm<2> MixedMeshIntersections::algorithm23_
private

Definition at line 110 of file mixed_mesh_intersections.hh.

◆ element_intersections_

std::vector<std::vector<ILpair> > MixedMeshIntersections::element_intersections_

Definition at line 83 of file mixed_mesh_intersections.hh.

◆ intersection_storage12_

std::vector<IntersectionLocal<1,2> > MixedMeshIntersections::intersection_storage12_

Stores 1D-2D intersections.

Definition at line 74 of file mixed_mesh_intersections.hh.

◆ intersection_storage13_

std::vector<IntersectionLocal<1,3> > MixedMeshIntersections::intersection_storage13_

Stores 1D-3D intersections.

Definition at line 68 of file mixed_mesh_intersections.hh.

◆ intersection_storage22_

std::vector<IntersectionLocal<2,2> > MixedMeshIntersections::intersection_storage22_

Stores 2D-2D intersections.

Definition at line 72 of file mixed_mesh_intersections.hh.

◆ intersection_storage23_

std::vector<IntersectionLocal<2,3> > MixedMeshIntersections::intersection_storage23_

Stores 2D-3D intersections.

Definition at line 70 of file mixed_mesh_intersections.hh.

◆ mesh

Mesh* MixedMeshIntersections::mesh
private

Mesh pointer.

Definition at line 107 of file mixed_mesh_intersections.hh.


The documentation for this class was generated from the following files: