49 template <
int spacedim>
87 inline unsigned int dim()
const 111 inline unsigned int idx()
const {
125 inline unsigned int proc()
const {
181 ASSERT(
dim() == 3)(
dim()).error(
"Cannot provide Jacobian for dimension other than 3.");
189 arma::vec::fixed<spacedim>
centre()
const;
253 template <
int spacedim>
260 return arma::norm(*(
node(1) ) - *(
node(0) ) , 2);
284 template <
int spacedim>
287 if (
is_regional() )
return arma::vec::fixed<spacedim>();
289 arma::vec::fixed<spacedim>
centre;
300 template <
int spacedim>
305 for(
unsigned int i=0; i<4; i++, ++
side) sum_faces+=( face[i]=side->
measure());
308 for(
unsigned int i=0;i<3;i++)
309 for(
unsigned int j=i+1;j<4;j++) {
312 sum_pairs += face[i]*face[j]*
arma::dot(line, line);
314 double regular = (2.0*sqrt(2.0/3.0)/9.0);
316 * pow( sum_faces/sum_pairs, 3.0/4.0))/ regular;
327 ) / ( sqrt(3.0) / 4.0 );
unsigned int get_proc(unsigned int idx) const
get processor of the given index
const Element * element() const
Bounding box in 3d ambient space.
unsigned int n_nodes() const
vector< Element > element_vec_
LongIdx * get_row_4_el() const
NodeAccessor< 3 > node_accessor(unsigned int ni) const
unsigned int dim_
Dimension of reference element.
bool is_boundary() const
We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular...
RegionIdx region_idx() const
unsigned int mesh_idx() const
Return global idx of element in full element vector.
NodeAccessor< 3 > node_accessor(unsigned int idx) const
Create and return NodeAccessor to node of given idx.
vector< arma::vec3 > vertex_list() const
const Mesh * mesh_
Pointer to the mesh owning the element.
static unsigned int line_between_faces(unsigned int f1, unsigned int f2)
SideIter side(const unsigned int loc_index)
const RegionDB & region_db() const
unsigned int element_idx_
Index into Mesh::element_vec_ array.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
unsigned int proc() const
bool operator==(const ElementAccessor< spacedim > &other)
const SideIter side(const unsigned int loc_index) const
arma::vec::fixed< spacedim > centre() const
Computes the barycenter.
static const unsigned int undefined_dim_
double quality_measure_smooth(SideIter side) const
bool is_elemental() const
int find_elem_id(unsigned int pos) const
Return element id (in GMSH file) of element of given position in element vector.
unsigned int node_idx(unsigned int ni) const
Return index (in Mesh::node_vec) of ni-th node.
unsigned int index() const
Type dot(const Mat< Type, nRows, nCols > &a, const Mat< Type, nRows, nCols > &b)
BoundingBox bounding_box() const
double measure() const
Computes the measure of the element.
bool boundary_
True if the element is boundary.
Distribution * get_el_ds() const
double measure() const
Calculate metrics of the side.
const Element * operator->() const
RegionIdx r_idx_
Region index.
Support classes for parallel programing.
virtual unsigned int n_elements(bool boundary=false) const
Returns count of boundary or bulk elements.
RegionIdx region_idx() const
ElementAccessor(const Mesh *mesh, unsigned int idx)
double tetrahedron_jacobian() const
ElementAccessor(const Mesh *mesh, RegionIdx r_idx)
unsigned int idx() const
Return local idx of element in boundary / bulk part of element vector.
unsigned int bulk_size_
Count of bulk elements.
const Node * node(unsigned int ni) const