20 unsigned int bulk_element_idx)
21 : component_element_idx_(component_element_idx), bulk_element_idx_(bulk_element_idx)
25 template<
unsigned int dimA,
unsigned int dimB>
29 template<
unsigned int dimA,
unsigned int dimB>
34 template<
unsigned int dimA,
unsigned int dimB>
39 for(
unsigned int i = 0; i < iaux.
size(); i++)
46 template<
unsigned int dimA,
unsigned int dimB>
51 template<
unsigned int dimA,
unsigned int dimB>
58 for(
unsigned int i=0; i <
i_points_.size()-1; i++)
71 double subtotal = 0.0;
74 for(
unsigned int j = 2; j <
i_points_.size();j++){
80 return fabs(subtotal/2);
85 template<
unsigned int dimA,
unsigned int dimB>
89 template<
unsigned int dimA,
unsigned int dimB>
93 template<
unsigned int dimA,
unsigned int dimB>
95 : comp_coords_(p.local_bcoords_A().subvec(1,dimA)), bulk_coords_(p.local_bcoords_B().subvec(1,dimB))
98 template<
unsigned int dimA,
unsigned int dimB>
106 template<
unsigned int dimA,
unsigned int dimB>
113 double complement = 1.0;
114 for(
unsigned int i=0; i<dimA; i++)
119 c += complement * (*comp_ele.
node(0));
127 template<
unsigned int dimA,
unsigned int dimB> ostream& operator<<(ostream& os, const IntersectionLocal<dimA,dimB>& il)
129 os <<
"IntersectionLocal<" << dimA <<
"," << dimB <<
">: c " << il.component_element_idx_ <<
", b " <<
130 il.bulk_element_idx_ <<
", size " << il.i_points_.size() << endl;
131 for (
unsigned int i = 0; i < il.i_points_.size(); i++) {
132 os << i <<
": " << il[i] << endl;
137 template<
unsigned int dimA,
unsigned int dimB> ostream& operator<<(ostream& os, const IntersectionPoint<dimA,dimB>& ip)
140 for(
unsigned j= 0; j < dimA-1; j++)
141 os << ip.comp_coords_[j] <<
" ";
142 os << ip.comp_coords_[dimA-1] <<
"]\t[";
144 for(
unsigned j= 0; j < dimB-1; j++)
145 os << ip.bulk_coords_[j] <<
" ";
146 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.
NodeAccessor< 3 > node(unsigned int ni) const
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.