42 permutation_idx_(NULL),
55 init(dim, mesh_in, reg);
95 return arma::norm(*(
node[ 1 ]) - *(
node[ 0 ]) , 2);
117 OLD_ASSERT(
dim_ == 3,
"Cannot provide Jacobian for dimension other than 3.");
118 return arma::dot( arma::cross(*
node[1] - *
node[0],
148 if (side_dim ==
dim())
return 1;
151 for (
unsigned int i=0; i<
n_sides(); i++)
152 if (
side(i)->
dim() == side_dim) n++;
177 for(
unsigned int i=0;i<4;i++) sum_faces+=( face[i]=
side(i)->
measure());
180 for(
unsigned int i=0;i<3;i++)
181 for(
unsigned int j=i+1;j<4;j++) {
184 sum_pairs += face[i]*face[j]*arma::dot(line, line);
186 double regular = (2.0*sqrt(2.0/3.0)/9.0);
188 * pow( sum_faces/sum_pairs, 3.0/4.0))/ regular;
199 ) / ( sqrt(3.0) / 4.0 );
209 for (
unsigned int i=1; i<
n_nodes(); i++)
210 bounding_box.
expand( this->node[i]->point() );
Bounding box in 3d ambient space.
double measure() const
Computes the measure of the element.
unsigned int n_nodes() const
#define FOR_ELEMENT_NODES(i, j)
unsigned int * boundary_idx_
int get_id(const T *it) const
unsigned int * permutation_idx_
static const unsigned int undef_idx
#define ASSERT_GT(a, b)
Definition of comparative assert macro (Greater Than)
void expand(const Point &point)
double tetrahedron_jacobian() const
#define FOR_ELEMENT_SIDES(i, j)
static unsigned int line_between_faces(unsigned int f1, unsigned int f2)
const RegionDB & region_db() const
ElementAccessor< 3 > element_accessor(unsigned int idx, bool boundary=false)
BoundingBox & get_bounding_box_fast(BoundingBox &bounding_box) const
Return precomputed bounding box.
unsigned int n_sides() const
static const IdxVector< (InDim >OutDim?InDim+1:dim-InDim) > interact(TInteraction< OutDim, InDim > interaction)
unsigned int index(const T *pointer) const
void get_bounding_box(BoundingBox &bounding_box) const
SideIter side(const unsigned int loc_index)
void init(unsigned int dim, Mesh *mesh_in, RegionIdx reg)
arma::vec3 centre() const
Computes the barycenter.
double quality_measure_smooth()
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc...
ElementAccessor< 3 > element_accessor() const
Gets ElementAccessor of this element.
unsigned int n_sides_by_dim(unsigned int side_dim)
ElementVector element
Vector of elements of the mesh.
std::vector< BoundingBox > element_box_
Auxiliary vector of mesh elements bounding boxes.
BoundingBox bounding_box()