33 diff -=
node(0)->point();
34 return arma::norm( diff , 2 );
39 return 0.5*arma::norm( arma::cross(diff0, diff1), 2);
72 normal /=arma::norm(normal,2);
88 elem_normal /= norm( elem_normal, 2);
91 arma::vec3 side_normal = arma::cross(
node(1)->point() -
node(0)->point() , elem_normal );
92 side_normal /= norm( side_normal, 2);
94 if (
dot( side_normal, ele.
centre() -
node(0)->point() ) > 0.0)
105 node(2)->point() -
node(0)->point() );
106 side_normal /= norm( side_normal, 2);
122 for(
unsigned int i=0; i <
n_nodes() ; i++)
123 barycenter +=
node( i )->point();
125 barycenter /= (double)
n_nodes();
142 for (
unsigned int i=0; i<
n_nodes(); i++)
143 for (
unsigned int j=i+1; j<
n_nodes(); j++)
NodeAccessor< 3 > node_accessor(unsigned int ni) const
arma::vec3 normal_line() const
arma::vec3 centre() const
Centre of side.
ElementAccessor< 3 > element() const
Returns iterator to the element of the side.
arma::vec3 normal_point() const
This is necessary by current DofHandler, should change this.
arma::vec::fixed< spacedim > centre() const
Computes the barycenter.
unsigned int dim() const
Returns dimension of the side, that is dimension of the element minus one.
arma::vec3 normal_triangle() const
Type dot(const Mat< Type, nRows, nCols > &a, const Mat< Type, nRows, nCols > &b)
NodeAccessor< 3 > node(unsigned int i) const
Returns node for given local index i on the side.
double measure() const
Calculate metrics of the side.
double diameter() const
Calculate the side diameter.
arma::vec3 normal() const
Vector of (generalized) normal.
unsigned int n_nodes() const
Returns number of nodes of the side.
const Node * node(unsigned int ni) const