21 #ifndef ELEMENT_VALUES_HH_
22 #define ELEMENT_VALUES_HH_
66 template<
unsigned int spacedim = 3>
127 template<
unsigned int spacedim>
208 inline double JxW(
const unsigned int point_no)
const
220 inline double side_JxW(
const unsigned int point_no)
const
231 inline arma::vec::fixed<spacedim>
point(
const unsigned int point_no)
const
234 return data.
points.template vec<spacedim>(point_no);
275 template<
unsigned int dim>
279 template<
unsigned int dim>
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
arma::mat arma_mat(uint i) const
Class ElementData holds the arrays of data computed by Mapping.
UpdateFlags update_flags
Flags that indicate which finite element quantities are to be computed.
Armor::array inverse_jacobians
Inverse Jacobians (dim x spacedim) at the quadrature points.
std::vector< double > determinants
Determinants of Jacobians at quadrature points.
Armor::array jacobians
Jacobians (spacedim x dim) of the mapping at the quadrature points.
ElementAccessor< spacedim > cell
Iterator to last updated cell.
ElementData(unsigned int size, UpdateFlags flags, unsigned int dim)
Resize the data arrays.
void print()
Print calculated data.
std::vector< double > JxW_values
Transformed quadrature weights.
Armor::array normal_vectors
Normal vectors (spacedim) to the element at the quadrature points lying on a side.
Armor::array points
Coordinates (spacedim) of quadrature points in the actual cell coordinate system.
std::vector< double > side_JxW_values
JxW values for sides.
const unsigned int dim_
Dimension of space of reference cell.
Side side
Iterator to last updated cell side.
Class for computation of data on cell and side.
const ElementAccessor< spacedim > & cell() const
Return cell at which the values were reinited.
arma::vec::fixed< spacedim > normal_vector(unsigned int point_no)
Returns the normal vector to a side at given quadrature point.
arma::vec::fixed< spacedim > point(const unsigned int point_no) const
Return coordinates of the quadrature point in the actual cell system.
arma::mat jacobian(const unsigned int point_no) const
Return Jacobian matrix at point point_no.
double determinant(const unsigned int point_no) const
Return the relative volume change of the cell (Jacobian determinant).
double side_JxW(const unsigned int point_no) const
Return the product of side Jacobian determinant and the quadrature weight at given quadrature point.
const unsigned int n_sides_
Number of sides in reference cell.
RefElementData * ref_data
Data on reference element.
const unsigned int n_points_
Number of integration points.
ElementValues(Quadrature &_quadrature, UpdateFlags _flags, unsigned int dim)
Constructor.
const Armor::array & point_list() const
Return coordinates of all quadrature points in the actual cell system.
arma::mat inverse_jacobian(const unsigned int point_no) const
Return inverse Jacobian matrix at point point_no.
const Side & side() const
Return cell side where the values were reinited.
ElementData< spacedim > data
Data computed by the mapping.
RefElementData * init_ref_data(const Quadrature &q)
Precompute data on reference element.
void fill_side_data()
Calculates the mapping data on a side of a cell.
~ElementValues()
Correct deallocation of objects created by 'initialize' methods.
std::vector< RefElementData * > side_ref_data
Data on reference element (for each side ).
void reinit(const ElementAccessor< spacedim > &cell)
Update cell-dependent data (gradients, Jacobians etc.)
UpdateFlags update_each(UpdateFlags flags)
Determine quantities to be recomputed on each cell.
double JxW(const unsigned int point_no) const
Return the product of Jacobian determinant and the quadrature weight at given quadrature point.
void fill_data()
Compute data from reference cell and using MappingP1.
unsigned int n_points()
Returns the number of quadrature points.
const unsigned int dim_
Dimension of space of reference cell.
Base class for quadrature rules on simplices in arbitrary dimensions.
Structure for storing the precomputed element data.
RefElementData(unsigned int np)
Resize vectors to size np.
unsigned int n_points
Number of quadrature points.
std::vector< arma::vec > bar_coords
Barycentric coordinates of quadrature points.
std::vector< double > weights
Quadrature weights.
ArmaMat< double, N, M > mat
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.
UpdateFlags
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.