Flow123d  DF_patch_fe_data_tables-9d4017b
Public Types | Public Member Functions | List of all members
ComputeIntersection< 1, 3 > Class Reference

More...

#include <compute_intersection.hh>

Collaboration diagram for ComputeIntersection< 1, 3 >:
Collaboration graph
[legend]

Public Types

typedef IntersectionPointAux< 1, 3 > IPAux
 

Public Member Functions

 ComputeIntersection ()
 Default constructor. Use when this is NOT final intersection object. More...
 
 ComputeIntersection (ElementAccessor< 3 > abscissa, ElementAccessor< 3 > tetrahedron)
 Constructor, sets abscissa and tetrahedron object. Use when this is final intersection object. It allocates memory, computes plucker coordinates and products. More...
 
 ~ComputeIntersection ()
 
void init ()
 Initializes lower dimensional objects. Sets correctly the pointers to Plucker coordinates and products. More...
 
unsigned int compute (std::vector< IPAux > &IP13s)
 Computes intersection points for 1D-3D intersection. Computes lower dimensional CIs abscissa vs tetrahedron face. During cycle determine topology information and set computed flags accordingly. We can have 2 IPs at maximum. If there are 2 IPs: More...
 
unsigned int compute (IntersectionAux< 1, 3 > &intersection)
 Computes final 1D-3D intersection. Computes IPs and check if any of them are pathologic to set the resulting object also pathologic. Calls compute function inside. More...
 

Setters and Getters

Pluckerplucker_coordinates_abscissa_
 Pointer to plucker coordinates of abscissa. More...
 
std::vector< Plucker * > plucker_coordinates_tetrahedron
 Vector of pointers to plucker coordinates of tetrahedron edges. More...
 
std::vector< double * > plucker_products_
 Pointers to Plucker products of abscissa and tetrahedron edges. More...
 
ComputeIntersection< 1, 2 > CI12 [4]
 
void set_pc_abscissa (Plucker *p)
 Sets the pointer to Plucker coordinates of the abscissa. More...
 
void set_pc_tetrahedron (Plucker *p, unsigned int edge_idx)
 Sets the pointer to Plucker coordinates of the tetrahedron edge. More...
 
Pluckerget_pc_abscissa ()
 Gets the pointer to Plucker coordinates of the abscissa. More...
 
Pluckerget_pc_tetrahedron (unsigned int edge_idx)
 Gets the pointer to Plucker coordinates of the tetrahedron edge of given edge_idx. More...
 
void set_plucker_product (double *number, unsigned edge_idx)
 Sets the pointer to Plucker product of abscissa and tetrahedron edge. More...
 
double * get_plucker_product (unsigned edge_idx)
 Gets the pointer to Plucker product of abscissa and tetrahedron edge of given edge_idx. More...
 
void print_plucker_coordinates (std::ostream &os)
 Prints out the Plucker coordinates of abscissa and tetrahedron edges. More...
 
void print_plucker_coordinates_tree (std::ostream &os)
 Prints out the Plucker coordinates of tetrahedron edges in a tree of tetrahedron sides (triangles). More...
 
void clear_all ()
 
void correct_tetrahedron_ip_topology (double t, unsigned int i, std::vector< IPAux > &ip)
 After interpolation, the topology information in tetrahedron must be updated. More...
 

Detailed Description

Class for 1D-3D intersections.

Computes the intersection of an abscissa and a tetrahedron. Uses 4 ComputeIntersection<1,2> for abscissa and tetrahedron sides intersections.

Definition at line 343 of file compute_intersection.hh.

Member Typedef Documentation

◆ IPAux

Definition at line 346 of file compute_intersection.hh.

Constructor & Destructor Documentation

◆ ComputeIntersection() [1/2]

Default constructor. Use when this is NOT final intersection object.

Definition at line 754 of file compute_intersection.cc.

◆ ComputeIntersection() [2/2]

ComputeIntersection< 1, 3 >::ComputeIntersection ( ElementAccessor< 3 >  abscissa,
ElementAccessor< 3 >  tetrahedron 
)

Constructor, sets abscissa and tetrahedron object. Use when this is final intersection object. It allocates memory, computes plucker coordinates and products.

Definition at line 761 of file compute_intersection.cc.

◆ ~ComputeIntersection()

Definition at line 782 of file compute_intersection.cc.

Member Function Documentation

◆ clear_all()

void ComputeIntersection< 1, 3 >::clear_all ( )

Resets Plucker products to 'nullptr'. Use this CAREFULLY as it does not destroy the objects. It is intended to be used only from higher dimensions when before destroying.

Definition at line 800 of file compute_intersection.cc.

◆ compute() [1/2]

unsigned int ComputeIntersection< 1, 3 >::compute ( IntersectionAux< 1, 3 > &  intersection)

Computes final 1D-3D intersection. Computes IPs and check if any of them are pathologic to set the resulting object also pathologic. Calls compute function inside.

Parameters
intersectionfinal 1D-3D intersection object (output)
Returns
number of intersection points found

Definition at line 828 of file compute_intersection.cc.

◆ compute() [2/2]

unsigned int ComputeIntersection< 1, 3 >::compute ( std::vector< IPAux > &  IP13s)

Computes intersection points for 1D-3D intersection. Computes lower dimensional CIs abscissa vs tetrahedron face. During cycle determine topology information and set computed flags accordingly. We can have 2 IPs at maximum. If there are 2 IPs:

  • sort them in direction of abscissa
  • possibly cut (move IPs so they are inside abscissa)
  • after cutting interpolate 3D coordinates
  • check that IPs are not the same, if true, throw one away
    Parameters
    IP13dvector of intersection points (output)
    Returns
    number of intersection points found

Definition at line 833 of file compute_intersection.cc.

Here is the caller graph for this function:

◆ correct_tetrahedron_ip_topology()

void ComputeIntersection< 1, 3 >::correct_tetrahedron_ip_topology ( double  t,
unsigned int  i,
std::vector< IPAux > &  ip 
)
private

After interpolation, the topology information in tetrahedron must be updated.

Parameters
ipintersection point to be corrected

TODO:

  1. Try to avoid setting topology from coords. Try to use just topology information.
  2. If can not be done. Use interact method to setup a map mapping 16 possible zeros positions to appropriate topology, remove topology_idx from RefElement.

Definition at line 913 of file compute_intersection.cc.

◆ get_pc_abscissa()

Plucker* ComputeIntersection< 1, 3 >::get_pc_abscissa ( )
inline

Gets the pointer to Plucker coordinates of the abscissa.

Definition at line 401 of file compute_intersection.hh.

◆ get_pc_tetrahedron()

Plucker* ComputeIntersection< 1, 3 >::get_pc_tetrahedron ( unsigned int  edge_idx)
inline

Gets the pointer to Plucker coordinates of the tetrahedron edge of given edge_idx.

Definition at line 406 of file compute_intersection.hh.

◆ get_plucker_product()

double* ComputeIntersection< 1, 3 >::get_plucker_product ( unsigned  edge_idx)
inline

Gets the pointer to Plucker product of abscissa and tetrahedron edge of given edge_idx.

Definition at line 418 of file compute_intersection.hh.

◆ init()

void ComputeIntersection< 1, 3 >::init ( )

Initializes lower dimensional objects. Sets correctly the pointers to Plucker coordinates and products.

Definition at line 811 of file compute_intersection.cc.

Here is the caller graph for this function:

◆ print_plucker_coordinates()

void ComputeIntersection< 1, 3 >::print_plucker_coordinates ( std::ostream &  os)

Prints out the Plucker coordinates of abscissa and tetrahedron edges.

Definition at line 956 of file compute_intersection.cc.

◆ print_plucker_coordinates_tree()

void ComputeIntersection< 1, 3 >::print_plucker_coordinates_tree ( std::ostream &  os)

Prints out the Plucker coordinates of tetrahedron edges in a tree of tetrahedron sides (triangles).

Definition at line 974 of file compute_intersection.cc.

◆ set_pc_abscissa()

void ComputeIntersection< 1, 3 >::set_pc_abscissa ( Plucker p)
inline

Sets the pointer to Plucker coordinates of the abscissa.

Definition at line 388 of file compute_intersection.hh.

◆ set_pc_tetrahedron()

void ComputeIntersection< 1, 3 >::set_pc_tetrahedron ( Plucker p,
unsigned int  edge_idx 
)
inline

Sets the pointer to Plucker coordinates of the tetrahedron edge.

Parameters
ppointer to Plucker coordinates
edge_idxlocal index of an edge of tetrahedron

Definition at line 396 of file compute_intersection.hh.

◆ set_plucker_product()

void ComputeIntersection< 1, 3 >::set_plucker_product ( double *  number,
unsigned  edge_idx 
)
inline

Sets the pointer to Plucker product of abscissa and tetrahedron edge.

Parameters
numberpointer to value of Plucker product
edge_idxlocal index of an edge of tetrahedron

Definition at line 414 of file compute_intersection.hh.

Member Data Documentation

◆ CI12

ComputeIntersection<1,2> ComputeIntersection< 1, 3 >::CI12[4]
private

Intersection objects for the tetrahedron's faces. Faces follows element node ordering, element inversion not handled at this stage. Element inversin is taken into account in the compute method. TODO: reuse these calculactions for elements with common face.

Definition at line 451 of file compute_intersection.hh.

◆ plucker_coordinates_abscissa_

Plucker* ComputeIntersection< 1, 3 >::plucker_coordinates_abscissa_
private

Pointer to plucker coordinates of abscissa.

Definition at line 440 of file compute_intersection.hh.

◆ plucker_coordinates_tetrahedron

std::vector<Plucker *> ComputeIntersection< 1, 3 >::plucker_coordinates_tetrahedron
private

Vector of pointers to plucker coordinates of tetrahedron edges.

Definition at line 442 of file compute_intersection.hh.

◆ plucker_products_

std::vector<double *> ComputeIntersection< 1, 3 >::plucker_products_
private

Pointers to Plucker products of abscissa and tetrahedron edges.

Definition at line 444 of file compute_intersection.hh.


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