20 #ifndef INTERSECTION_LOCAL_H_
21 #define INTERSECTION_LOCAL_H_
60 unsigned int bulk_element_idx);
70 typedef std::pair<unsigned int, IntersectionLocalBase*>
ILpair;
88 template<
unsigned int dimA,
unsigned int dimB>
99 IntersectionLocal(
unsigned int component_element_idx,
unsigned int bulk_element_idx);
116 unsigned int size()
const;
129 template<
unsigned int dimA,
unsigned int dimB>
131 {
return i_points_; }
133 template<
unsigned int dimA,
unsigned int dimB>
135 {
return i_points_; }
137 template<
unsigned int dimA,
unsigned int dimB>
139 {
ASSERT(index < i_points_.size());
140 return i_points_[index]; }
142 template<
unsigned int dimA,
unsigned int dimB>
144 {
return i_points_.size(); }
152 template<
unsigned int dimA,
unsigned int dimB>
195 template<
unsigned int dimA,
unsigned int dimB>
197 {
return comp_coords_; }
199 template<
unsigned int dimA,
unsigned int dimB>
201 {
return bulk_coords_; }
Internal auxiliary class representing intersection object of simplex<dimA> and simplex<dimB>.
Common base for intersection object.
unsigned int component_ele_idx() const
Returns index of component element.
unsigned int component_element_idx_
Index of intersecting element in the component.
unsigned int bulk_element_idx_
Index of intersecting element in the bulk.
unsigned int bulk_ele_idx() const
Returns index of bulk element.
virtual double compute_measure() const =0
Class represents intersection of two elements.
unsigned int size() const
Returns number of intersection points.
std::vector< IntersectionPoint< dimA, dimB > > & points()
Returns intersection points by a reference.
double compute_measure() const override
Computes the relative measure of intersection object.
const IntersectionPoint< dimA, dimB > & operator[](unsigned int index) const
Returns intersection point of given index.
~IntersectionLocal()
Destructor.
IntersectionLocal()
Default constructor.
std::vector< IntersectionPoint< dimA, dimB > > i_points_
Vector of intersection points.
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
Class represents an intersection point of simplex<N> and simplex<M>. It contains barycentric coordina...
~IntersectionPoint()
Destructor.
arma::vec::fixed< dimA > comp_coords_
Local coordinates of an IP on simplex<dimA>.
arma::vec3 coords(ElementAccessor< 3 > comp_ele) const
arma::vec::fixed< dimB > bulk_coords_
Local coordinates of an IP on simplex<dimB>.
const arma::vec::fixed< dimA > & comp_coords() const
Returns local coordinates in the Simplex<N>.
const arma::vec::fixed< dimB > & bulk_coords() const
Returns local coordinates in the Simplex<M>.
IntersectionPoint()
Default constructor.
std::ostream & operator<<(std::ostream &os, const IntersectionLocal< dimA, dimB > &il)
std::pair< unsigned int, IntersectionLocalBase * > ILpair
First = element index, Second = pointer to intersection object.