52 template<
unsigned int dim,
unsigned int spacedim>
inline
59 jacobians.resize(size);
62 determinants.resize(size);
66 JxW_values.resize(size);
69 inverse_jacobians.resize(size);
75 shape_values.resize(size);
79 shape_vectors.resize(size);
87 shape_gradients.resize(size);
91 shape_grad_vectors.resize(size);
99 normal_vectors.resize(size);
106 template<
unsigned int dim,
unsigned int spacedim>
inline
108 : mapping(NULL), quadrature(NULL), fe(NULL), mapping_data(NULL), fe_data(NULL)
114 template<
unsigned int dim,
unsigned int spacedim>
inline
116 if (mapping_data)
delete mapping_data;
117 if (fe_data)
delete fe_data;
122 template<
unsigned int dim,
unsigned int spacedim>
130 quadrature = &_quadrature;
134 data.allocate(quadrature->size(), update_each(_flags), fe->is_scalar());
139 template<
unsigned int dim,
unsigned int spacedim>
inline
143 f |= mapping->update_each(f);
147 template<
unsigned int dim,
unsigned int spacedim>
inline
150 return data.shape_values[point_no][function_no];
153 template<
unsigned int dim,
unsigned int spacedim>
inline
156 return trans(data.shape_gradients[point_no].row(function_no));
159 template<
unsigned int dim,
unsigned int spacedim>
inline
162 return data.shape_vectors[point_no][function_no];
165 template<
unsigned int dim,
unsigned int spacedim>
inline
168 return data.shape_grad_vectors[point_no][function_no];
171 template<
unsigned int dim,
unsigned int spacedim>
inline
174 return data.determinants[point_no];
177 template<
unsigned int dim,
unsigned int spacedim>
inline
180 return data.JxW_values[point_no];
183 template<
unsigned int dim,
unsigned int spacedim>
inline
186 return data.points[point_no];
189 template<
unsigned int dim,
unsigned int spacedim>
inline
195 template<
unsigned int dim,
unsigned int spacedim>
inline
198 return data.normal_vectors[point_no];
201 template<
unsigned int dim,
unsigned int spacedim>
inline
204 return quadrature->size();
207 template<
unsigned int dim,
unsigned int spacedim>
inline
213 template<
unsigned int dim,
unsigned int spacedim>
inline
227 template<
unsigned int dim,
unsigned int spacedim>
234 this->
allocate(_mapping, _quadrature, _fe, _flags);
243 template<
unsigned int dim,
unsigned int spacedim>
inline
247 this->data.present_cell = &cell;
250 this->mapping->fill_fe_values(cell,
255 this->fe->fill_fe_values(*this->quadrature,
268 template<
unsigned int dim,
unsigned int spacedim>
inline
277 this->
allocate(_mapping, *q, _fe, _flags);
279 for (
unsigned int sid = 0; sid < RefElement<dim>::n_sides; sid++)
281 for (
unsigned int pid = 0; pid < RefElement<dim>::n_side_permutations; pid++)
293 template<
unsigned int dim,
unsigned int spacedim>
296 for (
unsigned int sid=0; sid<RefElement<dim>::n_sides; sid++)
298 for (
unsigned int pid=0; pid<RefElement<dim>::n_side_permutations; pid++)
300 delete side_mapping_data[sid][pid];
301 delete side_fe_data[sid][pid];
307 delete this->quadrature;
311 template<
unsigned int dim,
unsigned int spacedim>
inline
315 this->data.present_cell = &cell;
317 unsigned int pid = cell->permutation_idx_[sid];
320 this->mapping->fill_fe_side_values(cell,
322 side_quadrature[sid][pid],
323 *side_mapping_data[sid][pid],
327 this->fe->fill_fe_values(side_quadrature[sid][pid],
328 *side_fe_data[sid][pid],
UpdateFlags
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell...
const Quadrature< dim > * get_quadrature() const
Returns the quadrature in use.
Transformed quadrature weight for cell sides.
const arma::vec::fixed< spacedim > point(const unsigned int point_no)
Return coordinates of the quadrature point in the actual cell system.
Determinant of the Jacobian.
MappingInternalData * mapping_data
Precomputed mapping data.
UpdateFlags update_each(UpdateFlags flags)
Determine quantities to be recomputed on each cell.
const double JxW(const unsigned int point_no)
Return the product of Jacobian determinant and the quadrature weight at given quadrature point...
const arma::vec::fixed< spacedim > normal_vector(unsigned int point_no)
Returns the normal vector to a side at given quadrature point.
const double determinant(const unsigned int point_no)
Return the relative volume change of the cell (Jacobian determinant).
FEValuesBase()
Default constructor.
Class FEValues calculates finite element data on the actual cells such as shape function values...
FEValuesData< dim, spacedim > data
Data computed by the mapping and finite element.
FEInternalData * fe_data
Precomputed finite element data.
const arma::vec::fixed< spacedim > shape_grad(const unsigned int function_no, const unsigned int point_no)
Return the gradient of the function_no-th shape function at the point_no-th quadrature point...
Base class for quadrature rules on simplices in arbitrary dimensions.
virtual ~FESideValues()
Destructor.
const unsigned int n_points()
Returns the number of quadrature points.
Transformed quadrature points.
Abstract class for the mapping between reference and actual cell.
#define ASSERT_EQUAL(a, b)
FiniteElement< dim, spacedim > * fe
The used finite element.
Basic definitions of numerical quadrature rules.
const Quadrature< dim-1 > * sub_quadrature
Quadrature for the integration on the element sides.
Shape function gradients.
MappingInternalData * side_mapping_data[RefElement< dim >::n_sides][RefElement< dim >::n_side_permutations]
Quadrature< dim > side_quadrature[RefElement< dim >::n_sides][RefElement< dim >::n_side_permutations]
Quadrature< dim > * quadrature
The quadrature rule used to calculate integrals.
Class Mapping calculates data related to the mapping of the reference cell to the actual cell...
const vector< arma::vec::fixed< spacedim > > & point_list()
Return coordinates of all quadrature points in the actual cell system.
void allocate(unsigned int size, UpdateFlags flags, bool is_scalar=true)
Resize the data arrays.
const arma::vec::fixed< spacedim > shape_vector(const unsigned int function_no, const unsigned int point_no)
Return the value of the function_no-th shape function at the point_no-th quadrature point...
FEInternalData * side_fe_data[RefElement< dim >::n_sides][RefElement< dim >::n_side_permutations]
FEValues(Mapping< dim, spacedim > &_mapping, Quadrature< dim > &_quadrature, FiniteElement< dim, spacedim > &_fe, UpdateFlags _flags)
Constructor.
void reinit(ElementFullIter &cell, unsigned int sid)
Update cell-dependent data (gradients, Jacobians etc.)
const double shape_value(const unsigned int function_no, const unsigned int point_no)
Return the value of the function_no-th shape function at the point_no-th quadrature point...
Mapping< dim, spacedim > * mapping
The mapping from the reference cell to the actual cell.
const unsigned int size() const
Returns number of quadrature points.
void reinit(ElementFullIter &cell)
Update cell-dependent data (gradients, Jacobians etc.)
Calculates finite element data on the actual cell.
Abstract class for description of finite elements.
FESideValues(Mapping< dim, spacedim > &_mapping, Quadrature< dim-1 > &_sub_quadrature, FiniteElement< dim, spacedim > &_fe, UpdateFlags flags)
Constructor.
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
Base class for FEValues and FESideValues.
void allocate(Mapping< dim, spacedim > &_mapping, Quadrature< dim > &_quadrature, FiniteElement< dim, spacedim > &_fe, UpdateFlags flags)
Allocates space for computed data.
const unsigned int n_dofs()
Returns the number of shape functions.
const arma::mat::fixed< spacedim, spacedim > shape_grad_vector(const unsigned int function_no, const unsigned int point_no)
Return the gradient of the function_no-th shape function at the point_no-th quadrature point...
Transformed quadrature weights.
Calculates finite element data on a side.