20 #ifndef INTERSECTIONPOINT_H_ 21 #define INTERSECTIONPOINT_H_ 35 template<
unsigned int N,
unsigned int M> std::ostream& operator<<(std::ostream& os, const IntersectionPointAux<N,M>& IP);
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);
137 void set_topology(
unsigned int idx_A,
unsigned int dim_A,
138 unsigned int idx_B,
unsigned int dim_B);
140 void set_topology_A(
unsigned int idx,
unsigned int dim_A);
141 void set_topology_B(
unsigned int idx,
unsigned int dim_B);
150 const arma::vec::fixed<N+1> &local_bcoords_A()
const;
153 const arma::vec::fixed<M+1> &local_bcoords_B()
const;
155 unsigned int dim_A()
const;
156 unsigned int dim_B()
const;
157 unsigned int idx_A()
const;
158 unsigned int idx_B()
const;
181 template<
unsigned int N,
unsigned int M>
183 { local_bcoords_A_ = lcA;
184 local_bcoords_B_ = lcB; }
186 template<
unsigned int N,
unsigned int M>
194 template<
unsigned int N,
unsigned int M>
198 template<
unsigned int N,
unsigned int M>
202 template<
unsigned int N,
unsigned int M>
206 template<
unsigned int N,
unsigned int M>
208 {
return local_bcoords_A_; }
210 template<
unsigned int N,
unsigned int M>
212 {
return local_bcoords_B_; }
214 template<
unsigned int N,
unsigned int M>
219 template<
unsigned int N,
unsigned int M>
224 template<
unsigned int N,
unsigned int M>
228 template<
unsigned int N,
unsigned int M>
232 template<
unsigned int N,
unsigned int M>
unsigned int dim_A() const
Returns dimension of object A.
void set_topology_B(unsigned int idx, unsigned int dim_B)
Sets the topology of object B in Simplex<M>.
IntersectionResult result() const
Result: 0 - negative sign, 1 - positive sign, 2 - degenerate (zero for all sides), 3 - none.
arma::vec::fixed< N+1 > local_bcoords_A_
Barycentric coordinates of an IP on simplex<N>.
IntersectionResult result_
Intersection result according to Plucker products.
void set_topology_A(unsigned int idx, unsigned int dim_A)
Sets the topology of object A in Simplex<N>.
arma::vec::fixed< M+1 > local_bcoords_B_
Barycentric coordinates of an IP on simplex<M>.
static const double geometry_epsilon
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>.
unsigned int idx_A() const
Returns the index of Simplex<N>.
unsigned int dim_B() const
Returns dimension of object B.
void set_coordinates(const arma::vec::fixed< N+1 > &lcA, const arma::vec::fixed< M+1 > &lcB)
Setter for coordinates.
unsigned int idx_A_
Local indices of element objects that intersects.
unsigned int dim_A_
Dimension of the object A of intersection. Equal N, by default.
unsigned int dim_B_
Dimension of the object B of intersection. Equal M, by default.
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
unsigned int idx_B() const
void set_result(IntersectionResult result)
Setter orientation flag.
bool operator<(IntersectionResult a, IntersectionResult b)
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_.