Flow123d  release_3.0.0-904-gff06a57
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ComputeIntersection< 1, 3 > Class Template 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, Mesh *mesh)
 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...
 
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 ()
 
Setters and Getters
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...
 

Private Member Functions

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...
 

Private Attributes

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]
 Compute 1D-2D intersection objects [4x line X tetrahedron face]. More...
 

Detailed Description

template<>
class ComputeIntersection< 1, 3 >

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 345 of file compute_intersection.hh.

Member Typedef Documentation

Definition at line 348 of file compute_intersection.hh.

Constructor & Destructor Documentation

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

Definition at line 757 of file compute_intersection.cc.

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

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

Definition at line 764 of file compute_intersection.cc.

Definition at line 783 of file compute_intersection.cc.

Member Function Documentation

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 801 of file compute_intersection.cc.

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.

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.

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 910 of file compute_intersection.cc.

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

Gets the pointer to Plucker coordinates of the abscissa.

Definition at line 403 of file compute_intersection.hh.

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 408 of file compute_intersection.hh.

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 420 of file compute_intersection.hh.

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

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

Definition at line 812 of file compute_intersection.cc.

Here is the caller graph for this function:

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

Prints out the Plucker coordinates of abscissa and tetrahedron edges.

Definition at line 953 of file compute_intersection.cc.

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 971 of file compute_intersection.cc.

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

Sets the pointer to Plucker coordinates of the abscissa.

Definition at line 390 of file compute_intersection.hh.

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 398 of file compute_intersection.hh.

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 416 of file compute_intersection.hh.

Member Data Documentation

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

Compute 1D-2D intersection objects [4x line X tetrahedron face].

Definition at line 448 of file compute_intersection.hh.

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

Pointer to plucker coordinates of abscissa.

Definition at line 442 of file compute_intersection.hh.

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

Vector of pointers to plucker coordinates of tetrahedron edges.

Definition at line 444 of file compute_intersection.hh.

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

Pointers to Plucker products of abscissa and tetrahedron edges.

Definition at line 446 of file compute_intersection.hh.


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