36 diff -=
node(0)->point();
37 return arma::norm( diff , 2 );
42 return 0.5*arma::norm( arma::cross(diff0, diff1), 2);
75 normal /=arma::norm(normal,2);
91 elem_normal /= norm( elem_normal, 2);
94 arma::vec3 side_normal = arma::cross(
node(1)->point() -
node(0)->point() , elem_normal );
95 side_normal /= norm( side_normal, 2);
97 if (
dot( side_normal, ele.
centre() -
node(0)->point() ) > 0.0)
108 node(2)->point() -
node(0)->point() );
109 side_normal /= norm( side_normal, 2);
125 for(
unsigned int i=0; i <
n_nodes() ; i++)
126 barycenter +=
node( i )->point();
128 barycenter /= (double)
n_nodes();
145 for (
unsigned int i=0; i<
n_nodes(); i++)
146 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
arma::vec3 normal_point() const
This is necessary by current DofHandler, should change this.
arma::vec::fixed< spacedim > centre() const
Computes the barycenter.
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
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
const Node * node(unsigned int ni) const