20 #ifndef INTERSECTIONPOINT_H_ 21 #define INTERSECTIONPOINT_H_ 36 template<
unsigned int N,
unsigned int M> std::ostream& operator<<(std::ostream& os, const IntersectionPointAux<N,M>& IP);
47 return int(a) < int(b);
58 template<
unsigned int N,
unsigned int M>
104 unsigned int dim_A = N,
unsigned int dim_B = M);
142 void set_coordinates(
const arma::vec::fixed<N+1> &lcA,
const arma::vec::fixed<M+1> &lcB);
145 void set_topology(
unsigned int idx_A,
unsigned int dim_A,
146 unsigned int idx_B,
unsigned int dim_B);
148 void set_topology_A(
unsigned int idx,
unsigned int dim_A);
149 void set_topology_B(
unsigned int idx,
unsigned int dim_B);
158 const arma::vec::fixed<N+1> &local_bcoords_A()
const;
161 const arma::vec::fixed<M+1> &local_bcoords_B()
const;
163 unsigned int dim_A()
const;
164 unsigned int dim_B()
const;
165 unsigned int idx_A()
const;
166 unsigned int idx_B()
const;
175 bool is_pathologic()
const;
189 template<
unsigned int N,
unsigned int M>
191 { local_bcoords_A_ = lcA;
192 local_bcoords_B_ = lcB; }
194 template<
unsigned int N,
unsigned int M>
202 template<
unsigned int N,
unsigned int M>
204 { orientation_ = orientation; }
206 template<
unsigned int N,
unsigned int M>
210 template<
unsigned int N,
unsigned int M>
214 template<
unsigned int N,
unsigned int M>
216 {
return local_bcoords_A_; }
218 template<
unsigned int N,
unsigned int M>
220 {
return local_bcoords_B_; }
222 template<
unsigned int N,
unsigned int M>
227 template<
unsigned int N,
unsigned int M>
232 template<
unsigned int N,
unsigned int M>
236 template<
unsigned int N,
unsigned int M>
240 template<
unsigned int N,
unsigned int M>
242 {
return orientation_; }
244 template<
unsigned int N,
unsigned int M>
246 {
return (
unsigned int)(orientation_) > 1; }
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>.
arma::vec::fixed< N+1 > local_bcoords_A_
Barycentric coordinates of an IP on simplex<N>.
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 rounding_epsilon
void set_orientation(IntersectionResult orientation)
Setter orientation flag.
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.
IntersectionResult orientation_
Orientation according to Plucker products.
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>.
IntersectionResult orientation() const
Returns the orientation.
static const double rounding_epsilonX
unsigned int idx_B() const
Returns the index of Simplex<M>.
bool is_pathologic() const
Returns true, if this is a pathologic case.
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_.