20 #ifndef INTERSECTIONPOINT_H_
21 #define INTERSECTIONPOINT_H_
46 return int(a) < int(b);
57 template<
unsigned int N,
unsigned int M>
102 unsigned int dim_A = N,
unsigned int dim_B = M);
134 void set_coordinates(
const arma::vec::fixed<N+1> &lcA,
const arma::vec::fixed<M+1> &lcB);
159 unsigned int dim_A()
const;
163 unsigned int dim_B()
const;
167 unsigned int idx_A()
const;
171 unsigned int idx_B()
const;
195 template<
unsigned int N,
unsigned int M>
197 { local_bcoords_A_ = lcA;
198 local_bcoords_B_ = lcB; }
200 template<
unsigned int N,
unsigned int M>
208 template<
unsigned int N,
unsigned int M>
212 template<
unsigned int N,
unsigned int M>
216 template<
unsigned int N,
unsigned int M>
220 template<
unsigned int N,
unsigned int M>
222 {
return local_bcoords_A_; }
224 template<
unsigned int N,
unsigned int M>
226 {
return local_bcoords_B_; }
228 template<
unsigned int N,
unsigned int M>
233 template<
unsigned int N,
unsigned int M>
238 template<
unsigned int N,
unsigned int M>
242 template<
unsigned int N,
unsigned int M>
246 template<
unsigned int N,
unsigned int M>
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
unsigned int idx_B() const
Returns the index of Simplex<M>.
bool topology_equal(const IntersectionPointAux< N, M > &other) const
Returns true, if other intersection point has the same topology.
void set_coordinates(const arma::vec::fixed< N+1 > &lcA, const arma::vec::fixed< M+1 > &lcB)
Setter for coordinates.
unsigned int dim_A_
Dimension of the object A of intersection. Equal N, by default.
IntersectionResult result() const
Result: 0 - negative sign, 1 - positive sign, 2 - degenerate (zero for all sides),...
void set_result(IntersectionResult result)
Setter orientation flag.
void set_topology(unsigned int idx_A, unsigned int dim_A, unsigned int idx_B, unsigned int dim_B)
Setter for topology data. See description of idx_A_ and dim_A_.
unsigned int idx_A_
Local indices of element objects that intersects.
unsigned int dim_A() const
Returns dimension of object A.
unsigned int dim_B_
Dimension of the object B of intersection. Equal M, by default.
unsigned int idx_A() const
Returns the index of Simplex<N>.
arma::vec::fixed< N+1 > local_bcoords_A_
Barycentric coordinates of an IP on simplex<N>.
IntersectionPointAux()
Default constructor.
void set_topology_B(unsigned int idx, unsigned int dim_B)
Sets the topology of object B in Simplex<M>.
void set_topology_A(unsigned int idx, unsigned int dim_A)
Sets the topology of object A in Simplex<N>.
unsigned int dim_B() const
Returns dimension of object B.
void clear()
Resets the object to default values.
arma::vec::fixed< M+1 > local_bcoords_B_
Barycentric coordinates of an IP on simplex<M>.
IntersectionResult result_
Intersection result according to Plucker products.
const arma::vec::fixed< N+1 > & local_bcoords_A() const
Returns barycentric coordinates in the Simplex<N>.
const arma::vec::fixed< M+1 > & local_bcoords_B() const
Returns barycentric coordinates in the Simplex<M>.
arma::vec::fixed< 3 > coords(ElementAccessor< 3 > ele) const
Computes real coordinates of IP, given the element ele in which IP lies.
IntersectionPointAux< M, N > switch_objects() const
Switches the object A and B.
static const double geometry_epsilon
bool operator<(IntersectionResult a, IntersectionResult b)
std::ostream & operator<<(std::ostream &os, const IntersectionPointAux< N, M > &IP)