dh.distribute_dofs(fe);
dealii::FEValues<dim, spacedim> fine(
- StaticMappingQ1<dim, spacedim>::mapping,
+ ReferenceCell::get_default_linear_mapping(tr),
fe,
*q_fine,
update_quadrature_points | update_JxW_values | update_values);
FEValues<dim, spacedim>::FEValues(const FiniteElement<dim, spacedim> &fe,
const Quadrature<dim> & q,
const UpdateFlags update_flags)
- : FEValuesBase<dim, spacedim>(q.size(),
- fe.n_dofs_per_cell(),
- update_default,
- StaticMappingQ1<dim, spacedim>::mapping,
- fe)
+ : FEValuesBase<dim, spacedim>(
+ q.size(),
+ fe.n_dofs_per_cell(),
+ update_default,
+ // TODO: We should query the default mapping for the kind of cell
+ // represented by 'fe' and 'q':
+ ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+ ReferenceCell::get_hypercube(dim)),
+ fe)
, quadrature(q)
{
initialize(update_flags);
const FiniteElement<dim, spacedim> &fe,
const hp::QCollection<dim - 1> & quadrature,
const UpdateFlags update_flags)
- : FEFaceValuesBase<dim, spacedim>(fe.n_dofs_per_cell(),
- update_flags,
- StaticMappingQ1<dim, spacedim>::mapping,
- fe,
- quadrature)
+ : FEFaceValuesBase<dim, spacedim>(
+ fe.n_dofs_per_cell(),
+ update_flags,
+ // TODO: We should query the default mapping for the kind of cell
+ // represented by 'fe' and 'q':
+ ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+ ReferenceCell::get_hypercube(dim)),
+ fe,
+ quadrature)
{
initialize(update_flags);
}
const FiniteElement<dim, spacedim> &fe,
const Quadrature<dim - 1> & quadrature,
const UpdateFlags update_flags)
- : FEFaceValuesBase<dim, spacedim>(fe.n_dofs_per_cell(),
- update_flags,
- StaticMappingQ1<dim, spacedim>::mapping,
- fe,
- quadrature)
+ : FEFaceValuesBase<dim, spacedim>(
+ fe.n_dofs_per_cell(),
+ update_flags,
+ // TODO: We should query the default mapping for the kind of cell
+ // represented by 'fe' and 'q':
+ ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+ ReferenceCell::get_hypercube(dim)),
+ fe,
+ quadrature)
{
initialize(update_flags);
}
try
{
initial_p_unit =
- StaticMappingQ1<dim, spacedim>::mapping.transform_real_to_unit_cell(
- cell, p);
+ ReferenceCell::get_default_linear_mapping(cell->get_triangulation())
+ .transform_real_to_unit_cell(cell, p);
}
catch (const typename Mapping<dim, spacedim>::ExcTransformationFailed &)
{
const double tolerance)
{
return find_active_cell_around_point<dim, MeshType, spacedim>(
- StaticMappingQ1<dim, spacedim>::mapping,
+ ReferenceCell::get_default_linear_mapping(
+ mesh.get_triangulation()),
mesh,
p,
marked_vertices,
{
using MATCH_T =
std::array<unsigned int, GeometryInfo<3>::vertices_per_face>;
+
static inline std::bitset<3>
lookup(const MATCH_T &matching)
{
// one.
const Point<spacedim> new_bound = face->center(true);
// to check it, transform to the unit cell
- // with Q1Mapping
+ // with a linear mapping
const Point<dim> new_unit =
- StaticMappingQ1<dim, spacedim>::mapping
+ ReferenceCell::get_default_linear_mapping<dim,
+ spacedim>(
+ cell->reference_cell_type())
.transform_real_to_unit_cell(cell, new_bound);
// Now, we have to calculate the distance from
{
const TriaRawIterator<CellAccessor<dim, spacedim>> cell_iterator(*this);
return (GeometryInfo<dim>::is_inside_unit_cell(
- StaticMappingQ1<dim, spacedim>::mapping.transform_real_to_unit_cell(
- cell_iterator, p)));
+ ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+ reference_cell_type())
+ .transform_real_to_unit_cell(cell_iterator, p)));
}
catch (const Mapping<dim, spacedim>::ExcTransformationFailed &)
{
const UpdateFlags & update_flags,
const Quadrature<dim - 1> & face_quadrature,
const UpdateFlags & face_update_flags)
- : ScratchData(StaticMappingQ1<dim, spacedim>::mapping,
- fe,
- quadrature,
- update_flags,
- face_quadrature,
- face_update_flags)
+ : ScratchData(
+ // TODO: We should query the default mapping for the kind of cell
+ // represented by 'fe' and 'q':
+ ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+ ReferenceCell::get_hypercube(dim)),
+ fe,
+ quadrature,
+ update_flags,
+ face_quadrature,
+ face_update_flags)
{}
const Quadrature<dim - 1> & face_quadrature,
const UpdateFlags & face_update_flags,
const UpdateFlags & neighbor_face_update_flags)
- : ScratchData(StaticMappingQ1<dim, spacedim>::mapping,
- fe,
- quadrature,
- update_flags,
- neighbor_update_flags,
- face_quadrature,
- face_update_flags,
- neighbor_face_update_flags)
+ : ScratchData(
+ // TODO: We should query the default mapping for the kind of cell
+ // represented by 'fe' and 'q':
+ ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+ ReferenceCell::get_hypercube(dim)),
+ fe,
+ quadrature,
+ update_flags,
+ neighbor_update_flags,
+ face_quadrature,
+ face_update_flags,
+ neighbor_face_update_flags)
{}
#include <deal.II/grid/filtered_iterator.h>
#include <deal.II/grid/grid_tools.h>
+#include <deal.II/grid/reference_cell.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/hp/fe_collection.h>
const unsigned int component)
{
// just call the respective function with Q1 mapping
- approximate_derivative_tensor(StaticMappingQ1<dim, spacedim>::mapping,
- dof,
- solution,
- cell,
- derivative,
- component);
+ approximate_derivative_tensor(
+ ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+ cell->reference_cell_type()),
+ dof,
+ solution,
+ cell,
+ derivative,
+ component);
}