Flow123d  release_2.2.0-914-gf1a3a4f
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ComputeIntersection< Simplex< 1 >, Simplex< 3 > > Class Template Reference

More...

#include <compute_intersection.hh>

Collaboration diagram for ComputeIntersection< Simplex< 1 >, Simplex< 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 (Simplex< 1 > &abscissa, Simplex< 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_data (Simplex< 1 > &abscissa, Simplex< 3 > &tetrahedron)
 Sets the abscissa and tetrahedron. Use mainly when this is not final intersection computation. More...
 
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< Simplex< 1 >, Simplex< 2 > > CI12 [4]
 Compute 1D-2D intersection objects [4x line X tetrahedron face]. More...
 

Detailed Description

template<>
class ComputeIntersection< Simplex< 1 >, Simplex< 3 > >

Class for 1D-3D intersections.

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

Definition at line 336 of file compute_intersection.hh.

Member Typedef Documentation

Definition at line 339 of file compute_intersection.hh.

Constructor & Destructor Documentation

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

Definition at line 689 of file compute_intersection.cc.

ComputeIntersection< Simplex< 1 >, Simplex< 3 > >::ComputeIntersection ( Simplex< 1 > &  abscissa,
Simplex< 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 696 of file compute_intersection.cc.

Definition at line 712 of file compute_intersection.cc.

Member Function Documentation

void ComputeIntersection< Simplex< 1 >, Simplex< 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 730 of file compute_intersection.cc.

unsigned int ComputeIntersection< Simplex< 1 >, Simplex< 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
unsigned int ComputeIntersection< Simplex< 1 >, Simplex< 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 763 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 1 >, Simplex< 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 874 of file compute_intersection.cc.

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

Gets the pointer to Plucker coordinates of the abscissa.

Definition at line 401 of file compute_intersection.hh.

Plucker* ComputeIntersection< Simplex< 1 >, Simplex< 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.

double* ComputeIntersection< Simplex< 1 >, Simplex< 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.

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

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

Definition at line 741 of file compute_intersection.cc.

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

Prints out the Plucker coordinates of abscissa and tetrahedron edges.

Definition at line 917 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 1 >, Simplex< 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 935 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 1 >, Simplex< 3 > >::set_data ( Simplex< 1 > &  abscissa,
Simplex< 3 > &  tetrahedron 
)

Sets the abscissa and tetrahedron. Use mainly when this is not final intersection computation.

Parameters
abscissaintersecting line
tetrahedronintersecting tetrahedron

Definition at line 756 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 1 >, Simplex< 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.

void ComputeIntersection< Simplex< 1 >, Simplex< 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.

void ComputeIntersection< Simplex< 1 >, Simplex< 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

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

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

Definition at line 446 of file compute_intersection.hh.

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

Pointer to plucker coordinates of abscissa.

Definition at line 440 of file compute_intersection.hh.

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

Vector of pointers to plucker coordinates of tetrahedron edges.

Definition at line 442 of file compute_intersection.hh.

std::vector<double *> ComputeIntersection< Simplex< 1 >, Simplex< 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: