21 unsigned int bulk_element_idx)
22 : component_element_idx_(component_element_idx), bulk_element_idx_(bulk_element_idx)
26 template<
unsigned int dimA,
unsigned int dimB>
30 template<
unsigned int dimA,
unsigned int dimB>
35 template<
unsigned int dimA,
unsigned int dimB>
40 for(
unsigned int i = 0; i < iaux.
size(); i++)
47 template<
unsigned int dimA,
unsigned int dimB>
52 template<
unsigned int dimA,
unsigned int dimB>
59 for(
unsigned int i=0; i <
i_points_.size()-1; i++)
72 double subtotal = 0.0;
75 for(
unsigned int j = 2; j <
i_points_.size();j++){
81 return fabs(subtotal/2);
86 template<
unsigned int dimA,
unsigned int dimB>
90 template<
unsigned int dimA,
unsigned int dimB>
94 template<
unsigned int dimA,
unsigned int dimB>
96 : comp_coords_(p.local_bcoords_A().subvec(1,dimA)), bulk_coords_(p.local_bcoords_B().subvec(1,dimB))
99 template<
unsigned int dimA,
unsigned int dimB>
107 template<
unsigned int dimA,
unsigned int dimB>
114 double complement = 1.0;
115 for(
unsigned int i=0; i<dimA; i++)
120 c += complement * comp_ele.
node(0)->
point();
128 template<
unsigned int dimA,
unsigned int dimB> ostream& operator<<(ostream& os, const IntersectionLocal<dimA,dimB>& il)
130 os <<
"IntersectionLocal<" << dimA <<
"," << dimB <<
">: c " << il.component_element_idx_ <<
", b " <<
131 il.bulk_element_idx_ <<
", size " << il.i_points_.size() << endl;
132 for (
unsigned int i = 0; i < il.i_points_.size(); i++) {
133 os << i <<
": " << il[i] << endl;
138 template<
unsigned int dimA,
unsigned int dimB> ostream& operator<<(ostream& os, const IntersectionPoint<dimA,dimB>& ip)
141 for(
unsigned j= 0; j < dimA-1; j++)
142 os << ip.comp_coords_[j] <<
" ";
143 os << ip.comp_coords_[dimA-1] <<
"]\t[";
145 for(
unsigned j= 0; j < dimB-1; j++)
146 os << ip.bulk_coords_[j] <<
" ";
147 os << ip.bulk_coords_[dimB-1] <<
"]";
template ostream & operator<< < 2, 3 >(ostream &os, const IntersectionPoint< 2, 3 > &s)
Classes with algorithms for computation of intersections of meshes.
template ostream & operator<< < 1, 2 >(ostream &os, const IntersectionPoint< 1, 2 > &s)
Common base for intersection object.
~IntersectionPoint()
Destructor.
double compute_measure() const override
Computes the relative measure of intersection object.
arma::vec::fixed< dimB > bulk_coords_
Local coordinates of an IP on simplex<dimB>.
IntersectionPoint()
Default constructor.
Class represents an intersection point of simplex<N> and simplex<M>. It contains barycentric coordina...
unsigned int size() const
Returns number of intersection points.
unsigned int bulk_ele_idx() const
Returns index of bulk element.
unsigned int component_ele_idx() const
Returns index of component element.
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>.
arma::vec::fixed< dimA > comp_coords_
Local coordinates of an IP on simplex<dimA>.
arma::vec3 coords(ElementAccessor< 3 > comp_ele) const
IntersectionLocal()
Default constructor.
std::vector< IntersectionPoint< dimA, dimB > > i_points_
Vector of intersection points.
template ostream & operator<< < 1, 3 >(ostream &os, const IntersectionPoint< 1, 3 > &s)
~IntersectionLocal()
Destructor.
Internal auxiliary class representing intersection object of simplex<dimA> and simplex<dimB>.
template ostream & operator<< < 2, 2 >(ostream &os, const IntersectionPoint< 2, 2 > &s)
Internal class representing intersection point.
Internal class representing intersection object.
#define ASSERT_LT_DBG(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
const Node * node(unsigned int ni) const