24 template <
int spacedim>
inline 32 template <
int spacedim>
inline 42 template <
int spacedim>
inline 52 template <
int spacedim>
inline 61 template <
int spacedim>
inline 63 vector<arma::vec3> vertices(
element()->n_nodes());
68 template <
int spacedim>
inline 71 ASSERT(
dim() == 3)(
dim()).error(
"Cannot provide Jacobian for dimension other than 3.");
72 return arma::dot( arma::cross(*(
node(1) ) - *(
node(0) ),
81 template <
int spacedim>
inline 88 return arma::norm(*(
node(1) ) - *(
node(0) ) , 2);
111 template <
int spacedim>
inline 114 if (
is_regional() )
return arma::vec::fixed<spacedim>();
116 arma::vec::fixed<spacedim>
centre;
120 centre += *
node( li );
127 template <
int spacedim>
inline 132 for(
unsigned int i=0; i<4; i++) sum_faces+=( face[i]=
side(i)->
measure());
135 for(
unsigned int i=0;i<3;i++)
136 for(
unsigned int j=i+1;j<4;j++) {
139 sum_pairs += face[i]*face[j]*arma::dot(line, line);
141 double regular = (2.0*sqrt(2.0/3.0)/9.0);
143 * pow( sum_faces/sum_pairs, 3.0/4.0))/ regular;
154 ) / ( sqrt(3.0) / 4.0 );
159 template <
int spacedim>
inline 164 template <
int spacedim>
inline 177 edge_idx_(
Mesh::undef_idx)
204 :
mesh_(NULL), elem_idx_(0), side_idx_(0)
234 ASSERT(
is_valid() ).error(
"Wrong use of uninitialized accessor.\n");
261 : boundary_data_(nullptr)
unsigned int n_sides() const
Returns number of sides aligned with the edge.
const Element * element() const
unsigned int n_nodes() const
vector< Element > element_vec_
unsigned int * boundary_idx_
unsigned int dim_
Dimension of reference element.
Edge edge() const
Returns pointer to the edge connected to the side.
unsigned int edge_idx() const
Returns global index of the edge connected to the side.
RegionIdx region_idx() const
static const unsigned int undef_idx
virtual unsigned int n_elements() const
Returns count of boundary or bulk elements.
const Mesh * mesh_
Pointer to the mesh owning the node.
std::vector< EdgeData > edges
Vector of MH edges, this should not be part of the geometrical mesh.
const Mesh * mesh_
Pointer to the mesh owning the element.
static unsigned int line_between_faces(unsigned int f1, unsigned int f2)
vector< vector< vector< unsigned int > > > side_nodes
SideIter side(const unsigned int loc_index)
double quality_measure_smooth() const
BoundaryData * boundary_data_
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...
Boundary boundary(uint edge_idx) const
ElementAccessor< 3 > element() const
Returns iterator to the element of the side.
Edge()
Default invalid edge accessor constructor.
NodeAccessor< 3 > node(unsigned int ni) const
virtual ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
bool is_external() const
Returns true for all sides either on boundary or connected to vb neigboring.
arma::vec::fixed< spacedim > centre() const
Computes the barycenter.
unsigned int elem_idx_
Index of element in Mesh::element_vec_.
static const unsigned int undefined_dim_
const Mesh * mesh() const
Returns pointer to the mesh.
unsigned int dim() const
Returns dimension of the side, that is dimension of the element minus one.
bool is_boundary() const
Returns true for side on the boundary.
void check_element_size(unsigned int elem_idx) const
Check if given index is in element_vec_.
unsigned int edge_idx(unsigned int edg_idx) const
Return edge_idx of given index.
bool is_valid() const
Returns true if the side has assigned element.
const EdgeData * edge_data() const
Getter for edge data from mesh.
void inc()
Incremental function of the Element iterator.
Side()
Default invalid side accessor constructor.
double measure() const
Computes the measure of the element.
bool boundary_
True if the element is boundary.
NodeAccessor< 3 > node(unsigned int i) const
Returns node for given local index i on the side.
ElementAccessor()
Default invalid accessor.
unsigned int side_idx_
Local # of side in element (to remove it, we heve to remove calc_side_rhs)
RegionIdx r_idx_
Region index.
unsigned int edge_idx_
Index into Mesh::edges vector.
vector< arma::vec3 > vertex_list() const
Return list of element vertices.
unsigned int cond_idx() const
Returns global index of the prescribed boundary condition.
const Mesh * mesh_
Pointer to Mesh to which belonged.
RegionIdx region_idx() const
double tetrahedron_jacobian() const
Edge edge(uint edge_idx) const
unsigned int elem_idx() const
Returns index of element in Mesh::element_vec_.
unsigned int idx() const
Return local idx of element in boundary / bulk part of element vector.
SideIter side(const unsigned int i) const
Gets side iterator of the i -th side.
ElementAccessor< 3 > element_accessor()
#define ASSERT_LT_DBG(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.