Generally, *variables* should not have 'type' in their name unless they actually denote
*types*. These variables just reference what kind of reference cells we are dealing with.
unsigned int
vertex_index(const unsigned int i) const;
- /*! @copydoc TriaAccessor::reference_cell_type
+ /*! @copydoc TriaAccessor::reference_cell
*/
CellTypeWrapper
- reference_cell_type() const;
+ reference_cell() const;
/*! @copydoc TriaAccessor::n_vertices
*/
CellTypeWrapper
- CellAccessorWrapper::reference_cell_type() const
+ CellAccessorWrapper::reference_cell() const
{
if ((dim == 2) && (spacedim == 2))
- return internal::cell_cast<2, 2>(cell_accessor)->reference_cell_type();
+ return internal::cell_cast<2, 2>(cell_accessor)->reference_cell();
else if ((dim == 2) && (spacedim == 3))
- return internal::cell_cast<2, 3>(cell_accessor)->reference_cell_type();
+ return internal::cell_cast<2, 3>(cell_accessor)->reference_cell();
else
- return internal::cell_cast<3, 3>(cell_accessor)->reference_cell_type();
+ return internal::cell_cast<3, 3>(cell_accessor)->reference_cell();
}
} // namespace python
- const char reference_cell_type_docstring[] =
- " Reference cell type of the current cell). \n";
+ const char reference_cell_docstring[] =
+ " Reference cell of the current cell). \n";
&CellAccessorWrapper::vertex_index,
vertex_index_docstring,
boost::python::args("self", "vertex"))
- .def("reference_cell_type",
- &CellAccessorWrapper::reference_cell_type,
- reference_cell_type_docstring,
+ .def("reference_cell",
+ &CellAccessorWrapper::reference_cell,
+ reference_cell_docstring,
boost::python::args("self"))
.def("n_vertices",
&CellAccessorWrapper::n_vertices,
/**
* Reference-cell type of the underlying cell of this patch.
*/
- ReferenceCell reference_cell_type;
+ ReferenceCell reference_cell;
/**
* Default constructor. Sets #n_subdivisions to one, #points_are_available
/**
* Reference-cell type of the underlying cell of this patch.
*/
- ReferenceCell reference_cell_type;
+ ReferenceCell reference_cell;
/**
* Default constructor. Sets #points_are_available
*/
std::string
get_xdmf_content(const unsigned int indent_level,
- const ReferenceCell &reference_cell_type) const;
+ const ReferenceCell &reference_cell) const;
private:
/**
* doc for this class.
*/
static void
- project_to_face(const ReferenceCell reference_cell_type,
+ project_to_face(const ReferenceCell reference_cell,
const SubQuadrature & quadrature,
const unsigned int face_no,
std::vector<Point<dim>> &q_points);
* the general doc for this class.
*/
static Quadrature<dim>
- project_to_face(const ReferenceCell reference_cell_type,
+ project_to_face(const ReferenceCell reference_cell,
const SubQuadrature &quadrature,
const unsigned int face_no);
* same as those of the original rule.
*/
static void
- project_to_subface(const ReferenceCell reference_cell_type,
+ project_to_subface(const ReferenceCell reference_cell,
const SubQuadrature & quadrature,
const unsigned int face_no,
const unsigned int subface_no,
* version of this function that takes the reference cell type instead.
*/
static Quadrature<dim>
- project_to_subface(const ReferenceCell reference_cell_type,
+ project_to_subface(const ReferenceCell reference_cell,
const SubQuadrature & quadrature,
const unsigned int face_no,
const unsigned int subface_no,
* each face, in order to cope possibly different orientations of the mesh.
*/
static Quadrature<dim>
- project_to_all_faces(const ReferenceCell reference_cell_type,
+ project_to_all_faces(const ReferenceCell reference_cell,
const hp::QCollection<dim - 1> &quadrature);
/**
* formula on all faces.
*/
static Quadrature<dim>
- project_to_all_faces(const ReferenceCell reference_cell_type,
+ project_to_all_faces(const ReferenceCell reference_cell,
const Quadrature<dim - 1> &quadrature);
/**
* in FESubfaceValues.
*/
static Quadrature<dim>
- project_to_all_subfaces(const ReferenceCell reference_cell_type,
+ project_to_all_subfaces(const ReferenceCell reference_cell,
const SubQuadrature &quadrature);
/**
* GeometryInfo<dim>::children_per_cell.
*/
static Quadrature<dim>
- project_to_child(const ReferenceCell reference_cell_type,
+ project_to_child(const ReferenceCell reference_cell,
const Quadrature<dim> &quadrature,
const unsigned int child_no);
* refinement of the cell.
*/
static Quadrature<dim>
- project_to_all_children(const ReferenceCell reference_cell_type,
+ project_to_all_children(const ReferenceCell reference_cell,
const Quadrature<dim> &quadrature);
/**
* connecting the points <tt>p1</tt> and <tt>p2</tt>.
*/
static Quadrature<dim>
- project_to_line(const ReferenceCell reference_cell_type,
+ project_to_line(const ReferenceCell reference_cell,
const Quadrature<1> &quadrature,
const Point<dim> & p1,
const Point<dim> & p2);
* onto the faces) has.
*/
static DataSetDescriptor
- face(const ReferenceCell reference_cell_type,
+ face(const ReferenceCell reference_cell,
const unsigned int face_no,
const bool face_orientation,
const bool face_flip,
* that each face might have different number of quadrature points.
*/
static DataSetDescriptor
- face(const ReferenceCell reference_cell_type,
+ face(const ReferenceCell reference_cell,
const unsigned int face_no,
const bool face_orientation,
const bool face_flip,
* Through the last argument anisotropic refinement can be respected.
*/
static DataSetDescriptor
- subface(const ReferenceCell reference_cell_type,
+ subface(const ReferenceCell reference_cell,
const unsigned int face_no,
const unsigned int subface_no,
const bool face_orientation,
template <int dim>
Quadrature<dim> inline QProjector<dim>::project_to_all_faces(
- const ReferenceCell reference_cell_type,
+ const ReferenceCell reference_cell,
const Quadrature<dim - 1> &quadrature)
{
- return project_to_all_faces(reference_cell_type,
+ return project_to_all_faces(reference_cell,
hp::QCollection<dim - 1>(quadrature));
}
std::vector<Point<1>> &);
template <>
void
-QProjector<1>::project_to_face(const ReferenceCell reference_cell_type,
+QProjector<1>::project_to_face(const ReferenceCell reference_cell,
const Quadrature<0> &,
const unsigned int,
std::vector<Point<1>> &);
std::vector<Point<2>> &q_points);
template <>
void
-QProjector<2>::project_to_face(const ReferenceCell reference_cell_type,
+QProjector<2>::project_to_face(const ReferenceCell reference_cell,
const Quadrature<1> & quadrature,
const unsigned int face_no,
std::vector<Point<2>> &q_points);
std::vector<Point<3>> &q_points);
template <>
void
-QProjector<3>::project_to_face(const ReferenceCell reference_cell_type,
+QProjector<3>::project_to_face(const ReferenceCell reference_cell,
const Quadrature<2> & quadrature,
const unsigned int face_no,
std::vector<Point<3>> &q_points);
template <>
Quadrature<1>
-QProjector<1>::project_to_all_faces(const ReferenceCell reference_cell_type,
+QProjector<1>::project_to_all_faces(const ReferenceCell reference_cell,
const hp::QCollection<0> &quadrature);
const RefinementCase<0> &);
template <>
void
-QProjector<1>::project_to_subface(const ReferenceCell reference_cell_type,
+QProjector<1>::project_to_subface(const ReferenceCell reference_cell,
const Quadrature<0> &,
const unsigned int,
const unsigned int,
const RefinementCase<1> &);
template <>
void
-QProjector<2>::project_to_subface(const ReferenceCell reference_cell_type,
+QProjector<2>::project_to_subface(const ReferenceCell reference_cell,
const Quadrature<1> & quadrature,
const unsigned int face_no,
const unsigned int subface_no,
const RefinementCase<2> &face_ref_case);
template <>
void
-QProjector<3>::project_to_subface(const ReferenceCell reference_cell_type,
+QProjector<3>::project_to_subface(const ReferenceCell reference_cell,
const Quadrature<2> & quadrature,
const unsigned int face_no,
const unsigned int subface_no,
QProjector<1>::project_to_all_subfaces(const Quadrature<0> &quadrature);
template <>
Quadrature<1>
-QProjector<1>::project_to_all_subfaces(const ReferenceCell reference_cell_type,
+QProjector<1>::project_to_all_subfaces(const ReferenceCell reference_cell,
const Quadrature<0> &quadrature);
update_number_cache();
/**
- * @copydoc dealii::Triangulation::update_reference_cell_types()
+ * @copydoc dealii::Triangulation::update_reference_cells()
*/
void
- update_reference_cell_types() override;
+ update_reference_cells() override;
/**
* Reset global active cell indices and global level cell indices.
const auto &fe = this->dof_handler->get_fe(active_fe_index());
Assert(
- this->reference_cell_type() == fe.reference_cell_type(),
+ this->reference_cell() == fe.reference_cell(),
ExcMessage(
"The reference-cell type of the cell does not match the one of the finite element!"));
* triangle, or similar choices in higher dimensions.
*/
ReferenceCell
- reference_cell_type() const;
+ reference_cell() const;
/**
* Number of unique quads. If all quads have the same type, the value is
template <int dim>
inline ReferenceCell
-FiniteElementData<dim>::reference_cell_type() const
+FiniteElementData<dim>::reference_cell() const
{
return cell_type;
}
const UpdateFlags update_flags)
: n_quadrature_points(quadrature.size())
, internal_fe_face_values(
- fe.reference_cell_type()
- .template get_default_linear_mapping<dim, spacedim>(),
+ fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
fe,
quadrature,
update_flags)
, internal_fe_subface_values(
- fe.reference_cell_type()
- .template get_default_linear_mapping<dim, spacedim>(),
+ fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
fe,
quadrature,
update_flags)
, internal_fe_face_values_neighbor(
- fe.reference_cell_type()
- .template get_default_linear_mapping<dim, spacedim>(),
+ fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
fe,
quadrature,
update_flags)
, internal_fe_subface_values_neighbor(
- fe.reference_cell_type()
- .template get_default_linear_mapping<dim, spacedim>(),
+ fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
fe,
quadrature,
update_flags)
// faces are stored contiguously)
const auto offset =
- QProjector<dim>::DataSetDescriptor::face(this->reference_cell_type(),
+ QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
face_no,
cell->face_orientation(face_no),
cell->face_flip(face_no),
// sub-faces are stored contiguously)
const auto offset =
- QProjector<dim>::DataSetDescriptor::subface(this->reference_cell_type(),
+ QProjector<dim>::DataSetDescriptor::subface(this->reference_cell(),
face_no,
sub_no,
cell->face_orientation(face_no),
block_indices.push_back(fes[base]->n_dofs_per_cell());
return FiniteElementData<dim>(dpo,
- fes.front()->reference_cell_type(),
+ fes.front()->reference_cell(),
(do_tensor_product ?
multiplied_n_components :
n_components),
// one, taking into account multiplicities, and other complications
unsigned int total_index = 0;
for (const unsigned int vertex_number :
- dealii::internal::Info::get_cell(fes.front()->reference_cell_type())
+ dealii::internal::Info::get_cell(fes.front()->reference_cell())
.vertex_indices())
{
for (unsigned int base = 0; base < fes.size(); ++base)
// 2. Lines
for (const unsigned int line_number :
- dealii::internal::Info::get_cell(fes.front()->reference_cell_type())
+ dealii::internal::Info::get_cell(fes.front()->reference_cell())
.line_indices())
{
for (unsigned int base = 0; base < fes.size(); ++base)
quad_number < (dim == 2 ?
1 :
(dim == 3 ? dealii::internal::Info::get_cell(
- fes.front()->reference_cell_type())
+ fes.front()->reference_cell())
.n_faces() :
0));
++quad_number)
// base elements, and other complications
unsigned int total_index = 0;
for (const unsigned int vertex_number :
- dealii::internal::Info::get_cell(fes.front()->reference_cell_type())
+ dealii::internal::Info::get_cell(fes.front()->reference_cell())
.vertex_indices())
{
unsigned int comp_start = 0;
// 2. Lines
for (const unsigned int line_number :
- dealii::internal::Info::get_cell(fes.front()->reference_cell_type())
+ dealii::internal::Info::get_cell(fes.front()->reference_cell())
.line_indices())
{
unsigned int comp_start = 0;
quad_number < (dim == 2 ?
1 :
(dim == 3 ? dealii::internal::Info::get_cell(
- fes.front()->reference_cell_type())
+ fes.front()->reference_cell())
.n_faces() :
0));
++quad_number)
// vertex, etc
total_index = 0;
for (const unsigned int vertex_number :
- dealii::internal::Info::get_cell(fe.reference_cell_type())
+ dealii::internal::Info::get_cell(fe.reference_cell())
.vertex_indices())
{
unsigned int comp_start = 0;
// 2. Lines
for (const unsigned int line_number :
- dealii::internal::Info::get_cell(fe.reference_cell_type())
- .line_indices())
+ dealii::internal::Info::get_cell(fe.reference_cell()).line_indices())
{
unsigned int comp_start = 0;
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
// 3. Quads
for (unsigned int quad_number = 0;
- quad_number < (dim == 2 ?
- 1 :
- (dim == 3 ? dealii::internal::Info::get_cell(
- fe.reference_cell_type())
- .n_faces() :
- 0));
+ quad_number <
+ (dim == 2 ?
+ 1 :
+ (dim == 3 ? dealii::internal::Info::get_cell(fe.reference_cell())
+ .n_faces() :
+ 0));
++quad_number)
{
unsigned int comp_start = 0;
unsigned int total_index = 0;
for (unsigned int vertex_number = 0;
vertex_number <
- dealii::internal::Info::get_face(fe.reference_cell_type(), face_no)
+ dealii::internal::Info::get_face(fe.reference_cell(), face_no)
.n_vertices();
++vertex_number)
{
// 2. Lines
for (unsigned int line_number = 0;
line_number <
- dealii::internal::Info::get_face(fe.reference_cell_type(), face_no)
+ dealii::internal::Info::get_face(fe.reference_cell(), face_no)
.n_lines();
++line_number)
{
const unsigned int n1 = fe1.n_dofs_per_cell();
const unsigned int n2 = fe2.n_dofs_per_cell();
- const ReferenceCell reference_cell_type = fe1.reference_cell_type();
+ const ReferenceCell reference_cell = fe1.reference_cell();
- Assert(fe1.reference_cell_type() == fe2.reference_cell_type(),
- ExcNotImplemented());
+ Assert(fe1.reference_cell() == fe2.reference_cell(), ExcNotImplemented());
// First, create a local mass matrix for the unit cell
Triangulation<dim, spacedim> tr;
- GridGenerator::reference_cell(reference_cell_type, tr);
+ GridGenerator::reference_cell(reference_cell, tr);
const auto &mapping =
- reference_cell_type.template get_default_linear_mapping<dim, spacedim>();
+ reference_cell.template get_default_linear_mapping<dim, spacedim>();
// Choose a Gauss quadrature rule that is exact up to degree 2n-1
const unsigned int degree =
std::max(fe1.tensor_degree(), fe2.tensor_degree());
Assert(degree != numbers::invalid_unsigned_int, ExcNotImplemented());
const auto quadrature =
- reference_cell_type.get_gauss_type_quadrature<dim>(degree + 1);
+ reference_cell.get_gauss_type_quadrature<dim>(degree + 1);
// Set up FEValues.
const UpdateFlags flags =
ExcDimensionMismatch(matrices[i].m(), n));
}
- const ReferenceCell reference_cell_type = fe.reference_cell_type();
+ const ReferenceCell reference_cell = fe.reference_cell();
// Set up meshes, one with a single
// reference cell and refine it once
Triangulation<dim, spacedim> tria;
- GridGenerator::reference_cell(reference_cell_type, tria);
+ GridGenerator::reference_cell(reference_cell, tria);
tria.begin_active()->set_refine_flag(RefinementCase<dim>(ref_case));
tria.execute_coarsening_and_refinement();
const unsigned int degree = fe.degree;
const auto &mapping =
- reference_cell_type
- .template get_default_linear_mapping<dim, spacedim>();
+ reference_cell.template get_default_linear_mapping<dim, spacedim>();
const auto &q_fine =
- reference_cell_type.get_gauss_type_quadrature<dim>(degree + 1);
+ reference_cell.get_gauss_type_quadrature<dim>(degree + 1);
const unsigned int nq = q_fine.size();
FEValues<dim, spacedim> fine(mapping,
{
unsigned int face_dof = 0;
for (unsigned int i = 0;
- i <
- dealii::internal::Info::get_face(fe.reference_cell_type(), face_no)
- .n_vertices();
+ i < dealii::internal::Info::get_face(fe.reference_cell(), face_no)
+ .n_vertices();
++i)
{
const unsigned int offset_c =
}
for (unsigned int i = 1;
- i <=
- dealii::internal::Info::get_face(fe.reference_cell_type(), face_no)
- .n_lines();
+ i <= dealii::internal::Info::get_face(fe.reference_cell(), face_no)
+ .n_lines();
++i)
{
const unsigned int offset_c =
// hating the anisotropic implementation
QGauss<dim - 1> q_gauss(degree + 1);
const Quadrature<dim> q_fine =
- QProjector<dim>::project_to_face(fe.reference_cell_type(),
- q_gauss,
- face_fine);
+ QProjector<dim>::project_to_face(fe.reference_cell(), q_gauss, face_fine);
const unsigned int nq = q_fine.size();
FEValues<dim> fine(mapping,
++cell_number)
{
const Quadrature<dim> q_coarse = QProjector<dim>::project_to_subface(
- fe.reference_cell_type(), q_gauss, face_coarse, cell_number);
+ fe.reference_cell(), q_gauss, face_coarse, cell_number);
FEValues<dim> coarse(mapping, fe, q_coarse, update_values);
typename Triangulation<dim, spacedim>::active_cell_iterator fine_cell =
q_points_coarse[q](j) = q_points_fine[q](j);
Quadrature<dim> q_coarse(q_points_coarse, fine.get_JxW_values());
FEValues<dim, spacedim> coarse(
- coarse_cell->reference_cell_type()
+ coarse_cell->reference_cell()
.template get_default_linear_mapping<dim, spacedim>(),
fe,
q_coarse,
// loop over cells and create CRS
for (const auto &cell : cells)
{
- const dealii::ReferenceCell reference_cell_type =
+ const dealii::ReferenceCell reference_cell =
dealii::ReferenceCell::n_vertices_to_type(dim,
cell.vertices.size());
- Assert(reference_cell_type != dealii::ReferenceCell::Invalid,
+ Assert(reference_cell != dealii::ReferenceCell::Invalid,
ExcNotImplemented());
AssertIndexRange(static_cast<types::geometric_entity_type>(
- reference_cell_type),
+ reference_cell),
cell_types_impl.size());
Assert(cell_types_impl[static_cast<types::geometric_entity_type>(
- reference_cell_type)]
+ reference_cell)]
.get() != nullptr,
ExcNotImplemented());
- cell_types_indices.push_back(reference_cell_type);
+ cell_types_indices.push_back(reference_cell);
// create CRS of vertices (to remove template argument dim)
for (const auto &vertex : cell.vertices)
if (cell->face(face)->has_children() &&
!cell->face(face)->at_boundary())
{
- Assert(cell->reference_cell_type() ==
+ Assert(cell->reference_cell() ==
ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
if (cell->face(face)->has_children() &&
!cell->face(face)->at_boundary())
{
- Assert(cell->reference_cell_type() ==
+ Assert(cell->reference_cell() ==
ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
* Return reference-cell type of face @p face_no.
*/
virtual dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const
+ face_reference_cell(const unsigned int face_no) const
{
Assert(false, ExcNotImplemented());
(void)face_no;
struct Vertex : public TensorProductBase<0>
{
dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const override
+ face_reference_cell(const unsigned int face_no) const override
{
(void)face_no;
return dealii::ReferenceCell::Invalid;
struct Line : public TensorProductBase<1>
{
dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const override
+ face_reference_cell(const unsigned int face_no) const override
{
(void)face_no;
return dealii::ReferenceCell::Vertex;
}
dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const override
+ face_reference_cell(const unsigned int face_no) const override
{
(void)face_no;
}
dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const override
+ face_reference_cell(const unsigned int face_no) const override
{
(void)face_no;
return dealii::ReferenceCell::Line;
}
dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const override
+ face_reference_cell(const unsigned int face_no) const override
{
(void)face_no;
}
dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const override
+ face_reference_cell(const unsigned int face_no) const override
{
AssertIndexRange(face_no, n_faces());
}
dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const override
+ face_reference_cell(const unsigned int face_no) const override
{
AssertIndexRange(face_no, n_faces());
}
dealii::ReferenceCell
- face_reference_cell_type(const unsigned int face_no) const override
+ face_reference_cell(const unsigned int face_no) const override
{
(void)face_no;
return dealii::ReferenceCell::Quad;
inline const internal::Info::Base &
get_face(const dealii::ReferenceCell &type, const unsigned int face_no)
{
- return get_cell(get_cell(type).face_reference_cell_type(face_no));
+ return get_cell(get_cell(type).face_reference_cell(face_no));
}
} // namespace Info
* triangulation.
*/
const std::vector<ReferenceCell> &
- get_reference_cell_types() const;
+ get_reference_cells() const;
/**
* Indicate if the triangulation only consists of hypercube-like cells, i.e.,
* lines, quadrilaterals, or hexahedra.
*/
bool
- all_reference_cell_types_are_hyper_cube() const;
+ all_reference_cells_are_hyper_cube() const;
#ifdef DOXYGEN
/**
* Vector caching all reference-cell types of the given triangulation
* (also in the distributed case).
*/
- std::vector<ReferenceCell> reference_cell_types;
+ std::vector<ReferenceCell> reference_cells;
/**
* Write a bool vector to the given stream, writing a pre- and a postfix
update_periodic_face_map();
/**
- * Update the internal reference_cell_types vector.
+ * Update the internal reference_cells vector.
*/
virtual void
- update_reference_cell_types();
+ update_reference_cells();
private:
* Reference cell type of the current object.
*/
ReferenceCell
- reference_cell_type() const;
+ reference_cell() const;
/**
* Number of vertices.
* Reference cell type of the current object.
*/
ReferenceCell
- reference_cell_type() const;
+ reference_cell() const;
/**
* Number of vertices.
GeometryInfo<dim>::vertices_per_cell>
vertices)
{
- const dealii::ReferenceCell reference_cell_type =
+ const dealii::ReferenceCell reference_cell =
dealii::ReferenceCell::n_vertices_to_type(dim, vertices.size());
- if (reference_cell_type == dealii::ReferenceCell::Line)
+ if (reference_cell == dealii::ReferenceCell::Line)
// Return the distance between the two vertices
return (vertices[1] - vertices[0]).norm();
- else if (reference_cell_type == dealii::ReferenceCell::Tri)
+ else if (reference_cell == dealii::ReferenceCell::Tri)
// Return the longest of the three edges
return std::max({(vertices[1] - vertices[0]).norm(),
(vertices[2] - vertices[1]).norm(),
(vertices[2] - vertices[0]).norm()});
- else if (reference_cell_type == dealii::ReferenceCell::Quad)
+ else if (reference_cell == dealii::ReferenceCell::Quad)
// Return the longer one of the two diagonals of the quadrilateral
return std::max({(vertices[3] - vertices[0]).norm(),
(vertices[2] - vertices[1]).norm()});
- else if (reference_cell_type == dealii::ReferenceCell::Tet)
+ else if (reference_cell == dealii::ReferenceCell::Tet)
// Return the longest of the six edges of the tetrahedron
return std::max({(vertices[1] - vertices[0]).norm(),
(vertices[2] - vertices[0]).norm(),
(vertices[3] - vertices[0]).norm(),
(vertices[3] - vertices[1]).norm(),
(vertices[3] - vertices[2]).norm()});
- else if (reference_cell_type == dealii::ReferenceCell::Pyramid)
+ else if (reference_cell == dealii::ReferenceCell::Pyramid)
// Return ...
return std::max({// the longest diagonal of the quadrilateral base
// of the pyramid or ...
(vertices[4] - vertices[1]).norm(),
(vertices[4] - vertices[2]).norm(),
(vertices[4] - vertices[3]).norm()});
- else if (reference_cell_type == dealii::ReferenceCell::Wedge)
+ else if (reference_cell == dealii::ReferenceCell::Wedge)
// Return ...
return std::max({// the longest of the 2*3=6 diagonals of the three
// quadrilateral sides of the wedge or ...
(vertices[4] - vertices[3]).norm(),
(vertices[5] - vertices[4]).norm(),
(vertices[5] - vertices[3]).norm()});
- else if (reference_cell_type == dealii::ReferenceCell::Hex)
+ else if (reference_cell == dealii::ReferenceCell::Hex)
// Return the longest of the four diagonals of the hexahedron
return std::max({(vertices[7] - vertices[0]).norm(),
(vertices[6] - vertices[1]).norm(),
template <int structdim, int dim, int spacedim>
inline ReferenceCell
-TriaAccessor<structdim, dim, spacedim>::reference_cell_type() const
+TriaAccessor<structdim, dim, spacedim>::reference_cell() const
{
if (structdim == 0)
return ReferenceCell::Vertex;
return ReferenceCell::Line;
else if (structdim == dim)
return this->tria->levels[this->present_level]
- ->reference_cell_type[this->present_index];
+ ->reference_cell[this->present_index];
else
- return this->tria->faces->quad_reference_cell_type[this->present_index];
+ return this->tria->faces->quad_reference_cell[this->present_index];
}
else if (structdim == 1)
return internal::Info::get_cell(ReferenceCell::Line);
else
- return internal::Info::get_cell(this->reference_cell_type());
+ return internal::Info::get_cell(this->reference_cell());
}
template <int spacedim>
inline ReferenceCell
-TriaAccessor<0, 1, spacedim>::reference_cell_type() const
+TriaAccessor<0, 1, spacedim>::reference_cell() const
{
return ReferenceCell::Vertex;
}
*
* @note Used only for dim=3.
*/
- std::vector<dealii::ReferenceCell> quad_reference_cell_type;
+ std::vector<dealii::ReferenceCell> quad_reference_cell;
/**
* The TriaObject containing the data of lines.
ar &lines;
if (dim == 3)
- ar &quads &lines &quads_line_orientations &quad_reference_cell_type;
+ ar &quads &lines &quads_line_orientations &quad_reference_cell;
}
} // namespace TriangulationImplementation
} // namespace internal
*
* @note Used only for dim=2 and dim=3.
*/
- std::vector<dealii::ReferenceCell> reference_cell_type;
+ std::vector<dealii::ReferenceCell> reference_cell;
/**
* Determine an estimate for the memory consumption (in bytes) of this
ar &face_orientations;
if (dim == 2 || dim == 3)
- ar &reference_cell_type;
+ ar &reference_cell;
}
} // namespace TriangulationImplementation
reorder_face_derivative_indices(
const unsigned int face_no,
const unsigned int index,
- const dealii::ReferenceCell reference_cell_type =
+ const dealii::ReferenceCell reference_cell =
dealii::ReferenceCell::Invalid)
{
Assert(index < dim, ExcInternalError());
- if ((reference_cell_type == dealii::ReferenceCell::Invalid ||
- reference_cell_type ==
- dealii::ReferenceCell::get_hypercube<dim>()) == false)
+ if ((reference_cell == dealii::ReferenceCell::Invalid ||
+ reference_cell == dealii::ReferenceCell::get_hypercube<dim>()) ==
+ false)
{
#ifdef DEAL_II_WITH_SIMPLEX_SUPPORT
return index;
reorder_face_derivative_indices<dim>(
faces[face].interior_face_no,
e,
- cell_it->reference_cell_type());
+ cell_it->reference_cell());
face_data.general_jac[q][d][e][v] =
inv_jac[d][ee];
}
reorder_face_derivative_indices<dim>(
faces[face].exterior_face_no,
e,
- cell_it->reference_cell_type());
+ cell_it->reference_cell());
face_data.general_jac[n_q_points + q][d][e][v] =
inv_jac[d][ee];
}
fe_no < dof_handlers[no]->get_fe_collection().size();
++fe_no)
shape_info_dummy(c, fe_no).reinit(
- dof_handlers[no]->get_fe(fe_no).reference_cell_type() ==
+ dof_handlers[no]->get_fe(fe_no).reference_cell() ==
ReferenceCell::get_hypercube<dim>() ?
quad :
quad_simplex,
try
{
- const dealii::ReferenceCell reference_cell_type =
+ const dealii::ReferenceCell reference_cell =
dealii::ReferenceCell::get_simplex<dim>();
const auto quad_face = get_face_quadrature(quad);
const unsigned int n_face_orientations = dim == 2 ? 2 : 6;
const unsigned int n_faces =
- dealii::internal::Info::get_cell(reference_cell_type).n_faces();
+ dealii::internal::Info::get_cell(reference_cell).n_faces();
const auto projected_quad_face =
- QProjector<dim>::project_to_all_faces(reference_cell_type,
+ QProjector<dim>::project_to_all_faces(reference_cell,
quad_face);
shape_values_face.reinit(
{
const auto offset =
QProjector<dim>::DataSetDescriptor::face(
- reference_cell_type,
+ reference_cell,
f,
(o ^ 1) & 1, // face_orientation
(o >> 1) & 1, // face_flip
for (const auto &fe : finite_elements)
for (unsigned int i = 0; i < fe->size(); ++i)
{
- const auto reference_cell_type = (*fe)[i].reference_cell_type();
+ const auto reference_cell = (*fe)[i].reference_cell();
- if ((reference_cell_type == dealii::ReferenceCell::Vertex) ||
- (reference_cell_type == dealii::ReferenceCell::Line) ||
- (reference_cell_type == dealii::ReferenceCell::Quad) ||
- (reference_cell_type == dealii::ReferenceCell::Hex))
+ if ((reference_cell == dealii::ReferenceCell::Vertex) ||
+ (reference_cell == dealii::ReferenceCell::Line) ||
+ (reference_cell == dealii::ReferenceCell::Quad) ||
+ (reference_cell == dealii::ReferenceCell::Hex))
needs_hypercube_setup |= true;
- else if ((reference_cell_type == dealii::ReferenceCell::Tri) ||
- (reference_cell_type == dealii::ReferenceCell::Tet))
+ else if ((reference_cell == dealii::ReferenceCell::Tri) ||
+ (reference_cell == dealii::ReferenceCell::Tet))
needs_simplex_setup |= true;
- else if (reference_cell_type == dealii::ReferenceCell::Wedge)
+ else if (reference_cell == dealii::ReferenceCell::Wedge)
needs_wedge_setup |= true;
- else if (reference_cell_type == dealii::ReferenceCell::Pyramid)
+ else if (reference_cell == dealii::ReferenceCell::Pyramid)
needs_pyramid_setup |= true;
else
Assert(false, ExcNotImplemented());
for (unsigned int j = 0; j < finite_elements[i]->size(); ++j)
{
- const auto reference_cell_type =
- (*finite_elements[i])[j].reference_cell_type();
-
- if ((reference_cell_type ==
- dealii::ReferenceCell::Vertex) ||
- (reference_cell_type ==
- dealii::ReferenceCell::Line) ||
- (reference_cell_type ==
- dealii::ReferenceCell::Quad) ||
- (reference_cell_type == dealii::ReferenceCell::Hex))
+ const auto reference_cell =
+ (*finite_elements[i])[j].reference_cell();
+
+ if ((reference_cell == dealii::ReferenceCell::Vertex) ||
+ (reference_cell == dealii::ReferenceCell::Line) ||
+ (reference_cell == dealii::ReferenceCell::Quad) ||
+ (reference_cell == dealii::ReferenceCell::Hex))
quadrature.push_back(*quadrature_hypercube);
- else if ((reference_cell_type ==
- dealii::ReferenceCell::Tri) ||
- (reference_cell_type ==
- dealii::ReferenceCell::Tet))
+ else if ((reference_cell == dealii::ReferenceCell::Tri) ||
+ (reference_cell == dealii::ReferenceCell::Tet))
quadrature.push_back(*quadrature_simplex);
- else if (reference_cell_type ==
- dealii::ReferenceCell::Wedge)
+ else if (reference_cell == dealii::ReferenceCell::Wedge)
quadrature.push_back(*quadrature_wedge);
- else if (reference_cell_type ==
- dealii::ReferenceCell::Pyramid)
+ else if (reference_cell == dealii::ReferenceCell::Pyramid)
quadrature.push_back(*quadrature_pyramid);
else
Assert(false, ExcNotImplemented());
const Quadrature<dim> quad(fe.get_unit_support_points());
const auto map_q =
- fe.reference_cell_type().template get_default_mapping<dim, spacedim>(
+ fe.reference_cell().template get_default_mapping<dim, spacedim>(
fe.degree);
FEValues<dim, spacedim> fe_v(*map_q,
fe,
Quadrature<dim> quadrature_mf;
- if (dof.get_fe(0).reference_cell_type() ==
- ReferenceCell::get_hypercube<dim>())
+ if (dof.get_fe(0).reference_cell() == ReferenceCell::get_hypercube<dim>())
quadrature_mf = QGauss<dim>(dof.get_fe().degree + 2);
else
// TODO: since we have currently only implemented a handful quadrature
(n_data_sets + spacedim) :
n_data_sets,
patch.data.n_rows()));
- Assert(patch.reference_cell_type !=
- ReferenceCell::get_hypercube<dim>() ||
+ Assert(patch.reference_cell != ReferenceCell::get_hypercube<dim>() ||
(n_data_sets == 0) ||
(patch.data.n_cols() ==
Utilities::fixed_power<dim>(n_subdivisions + 1)),
if (write_higher_order_cells)
{
- if (patch.reference_cell_type == ReferenceCell::get_hypercube<dim>())
+ if (patch.reference_cell == ReferenceCell::get_hypercube<dim>())
{
const std::array<unsigned int, 4> cell_type_by_dim{
{VTK_VERTEX,
vtk_cell_id[0] = cell_type_by_dim[dim];
vtk_cell_id[1] = 1;
}
- else if (patch.reference_cell_type == ReferenceCell::Tri)
+ else if (patch.reference_cell == ReferenceCell::Tri)
{
vtk_cell_id[0] = VTK_LAGRANGE_TRIANGLE;
vtk_cell_id[1] = 1;
Assert(false, ExcNotImplemented());
}
}
- else if (patch.reference_cell_type == ReferenceCell::Tri &&
+ else if (patch.reference_cell == ReferenceCell::Tri &&
patch.data.n_cols() == 3)
{
vtk_cell_id[0] = VTK_TRIANGLE;
vtk_cell_id[1] = 1;
}
- else if (patch.reference_cell_type == ReferenceCell::Tri &&
+ else if (patch.reference_cell == ReferenceCell::Tri &&
patch.data.n_cols() == 6)
{
vtk_cell_id[0] = VTK_QUADRATIC_TRIANGLE;
vtk_cell_id[1] = 1;
}
- else if (patch.reference_cell_type == ReferenceCell::Tet &&
+ else if (patch.reference_cell == ReferenceCell::Tet &&
patch.data.n_cols() == 4)
{
vtk_cell_id[0] = VTK_TETRA;
vtk_cell_id[1] = 1;
}
- else if (patch.reference_cell_type == ReferenceCell::Tet &&
+ else if (patch.reference_cell == ReferenceCell::Tet &&
patch.data.n_cols() == 10)
{
vtk_cell_id[0] = VTK_QUADRATIC_TETRA;
vtk_cell_id[1] = 1;
}
- else if (patch.reference_cell_type == ReferenceCell::Wedge &&
+ else if (patch.reference_cell == ReferenceCell::Wedge &&
patch.data.n_cols() == 6)
{
vtk_cell_id[0] = VTK_WEDGE;
vtk_cell_id[1] = 1;
}
- else if (patch.reference_cell_type == ReferenceCell::Pyramid &&
+ else if (patch.reference_cell == ReferenceCell::Pyramid &&
patch.data.n_cols() == 5)
{
vtk_cell_id[0] = VTK_PYRAMID;
vtk_cell_id[1] = 1;
}
- else if (patch.reference_cell_type == ReferenceCell::get_hypercube<dim>())
+ else if (patch.reference_cell == ReferenceCell::get_hypercube<dim>())
{
const std::array<unsigned int, 4> cell_type_by_dim{
{VTK_VERTEX, VTK_LINE, VTK_QUAD, VTK_HEXAHEDRON}};
Assert(false, ExcNotImplemented());
}
- if (patch.reference_cell_type != ReferenceCell::get_hypercube<dim>() ||
+ if (patch.reference_cell != ReferenceCell::get_hypercube<dim>() ||
write_higher_order_cells)
vtk_cell_id[2] = patch.data.n_cols();
else
for (const auto &patch : patches)
{
// The following formula doesn't hold for non-tensor products.
- if (patch.reference_cell_type == ReferenceCell::get_hypercube<dim>())
+ if (patch.reference_cell == ReferenceCell::get_hypercube<dim>())
{
n_nodes += Utilities::fixed_power<dim>(patch.n_subdivisions + 1);
n_cells += Utilities::fixed_power<dim>(patch.n_subdivisions);
else
{
Assert(patch.n_subdivisions == 1, ExcNotImplemented());
- const auto &info =
- internal::Info::get_cell(patch.reference_cell_type);
+ const auto &info = internal::Info::get_cell(patch.reference_cell);
n_nodes += info.n_vertices();
n_cells += 1;
}
for (const auto &patch : patches)
{
// The following formulas don't hold for non-tensor products.
- if (patch.reference_cell_type == ReferenceCell::get_hypercube<dim>())
+ if (patch.reference_cell == ReferenceCell::get_hypercube<dim>())
{
n_nodes += Utilities::fixed_power<dim>(patch.n_subdivisions + 1);
: patch_index(no_neighbor)
, n_subdivisions(1)
, points_are_available(false)
- , reference_cell_type(ReferenceCell::get_hypercube<dim>())
+ , reference_cell(ReferenceCell::get_hypercube<dim>())
// all the other data has a constructor of its own, except for the "neighbors"
// field, which we set to invalid values.
{
std::swap(n_subdivisions, other_patch.n_subdivisions);
data.swap(other_patch.data);
std::swap(points_are_available, other_patch.points_are_available);
- std::swap(reference_cell_type, other_patch.reference_cell_type);
+ std::swap(reference_cell, other_patch.reference_cell);
}
Patch<0, spacedim>::Patch()
: patch_index(no_neighbor)
, points_are_available(false)
- , reference_cell_type(ReferenceCell::get_hypercube<0>())
+ , reference_cell(ReferenceCell::get_hypercube<0>())
{
Assert(spacedim <= 3, ExcNotImplemented());
}
// special treatment of simplices since they are not subdivided, such
// that no new nodes have to be created, but the precomputed ones can be
// used
- if (patch.reference_cell_type != ReferenceCell::get_hypercube<dim>())
+ if (patch.reference_cell != ReferenceCell::get_hypercube<dim>())
{
Point<spacedim> node;
for (const auto &patch : patches)
{
// special treatment of simplices since they are not subdivided
- if (patch.reference_cell_type != ReferenceCell::get_hypercube<dim>())
+ if (patch.reference_cell != ReferenceCell::get_hypercube<dim>())
{
out.write_cell_single(count++,
first_vertex_of_patch,
for (const auto &patch : patches)
{
- if (patch.reference_cell_type != ReferenceCell::get_hypercube<dim>())
+ if (patch.reference_cell != ReferenceCell::get_hypercube<dim>())
{
connectivity.resize(patch.data.n_cols());
for (it = entries.begin(); it != entries.end(); ++it)
{
- xdmf_file << it->get_xdmf_content(3, patches[0].reference_cell_type);
+ xdmf_file << it->get_xdmf_content(3, patches[0].reference_cell);
}
xdmf_file << " </Grid>\n";
// patches
Assert(patches.size() > 0, ExcNoPatches());
- const auto &cell_info =
- internal::Info::get_cell(patches[0].reference_cell_type);
+ const auto &cell_info = internal::Info::get_cell(patches[0].reference_cell);
hid_t h5_mesh_file_id = -1, h5_solution_file_id, file_plist_id, plist_id;
hid_t node_dataspace, node_dataset, node_file_dataspace,
std::string
XDMFEntry::get_xdmf_content(const unsigned int indent_level,
- const ReferenceCell &reference_cell_type) const
+ const ReferenceCell &reference_cell) const
{
if (!valid)
return "";
<< "\" NodesPerElement=\"2\">\n";
else if (dimension == 2)
{
- Assert(reference_cell_type == ReferenceCell::Quad ||
- reference_cell_type == ReferenceCell::Tri,
+ Assert(reference_cell == ReferenceCell::Quad ||
+ reference_cell == ReferenceCell::Tri,
ExcNotImplemented());
ss << indent(indent_level + 1) << "<Topology TopologyType=\"";
- if (reference_cell_type == ReferenceCell::Quad)
+ if (reference_cell == ReferenceCell::Quad)
{
ss << "Quadrilateral"
<< "\" NumberOfElements=\"" << num_cells << "\">\n"
<< indent(indent_level + 2) << "<DataItem Dimensions=\""
<< num_cells << " " << (1 << dimension);
}
- else // if (reference_cell_type == ReferenceCell::Tri)
+ else // if (reference_cell == ReferenceCell::Tri)
{
ss << "Triangle"
<< "\" NumberOfElements=\"" << num_cells << "\">\n"
}
else if (dimension == 3)
{
- Assert(reference_cell_type == ReferenceCell::Hex ||
- reference_cell_type == ReferenceCell::Tet,
+ Assert(reference_cell == ReferenceCell::Hex ||
+ reference_cell == ReferenceCell::Tet,
ExcNotImplemented());
ss << indent(indent_level + 1) << "<Topology TopologyType=\"";
- if (reference_cell_type == ReferenceCell::Hex)
+ if (reference_cell == ReferenceCell::Hex)
{
ss << "Hexahedron"
<< "\" NumberOfElements=\"" << num_cells << "\">\n"
<< indent(indent_level + 2) << "<DataItem Dimensions=\""
<< num_cells << " " << (1 << dimension);
}
- else // if (reference_cell_type == ReferenceCell::Tet)
+ else // if (reference_cell == ReferenceCell::Tet)
{
ss << "Tetrahedron"
<< "\" NumberOfElements=\"" << num_cells << "\">\n"
template <>
void
-QProjector<1>::project_to_face(const ReferenceCell reference_cell_type,
+QProjector<1>::project_to_face(const ReferenceCell reference_cell,
const Quadrature<0> &,
const unsigned int face_no,
std::vector<Point<1>> &q_points)
{
- Assert(reference_cell_type == ReferenceCell::Line, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Line, ExcNotImplemented());
+ (void)reference_cell;
const unsigned int dim = 1;
AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
template <>
void
-QProjector<2>::project_to_face(const ReferenceCell reference_cell_type,
+QProjector<2>::project_to_face(const ReferenceCell reference_cell,
const Quadrature<1> & quadrature,
const unsigned int face_no,
std::vector<Point<2>> &q_points)
Assert(q_points.size() == quadrature.size(),
ExcDimensionMismatch(q_points.size(), quadrature.size()));
- if (reference_cell_type == ReferenceCell::Tri)
+ if (reference_cell == ReferenceCell::Tri)
{
// use linear polynomial to map the reference quadrature points correctly
// on faces, i.e., Simplex::ScalarPolynomial<1>(1)
Assert(false, ExcInternalError());
}
}
- else if (reference_cell_type == ReferenceCell::Quad)
+ else if (reference_cell == ReferenceCell::Quad)
{
for (unsigned int p = 0; p < quadrature.size(); ++p)
switch (face_no)
template <>
void
-QProjector<3>::project_to_face(const ReferenceCell reference_cell_type,
+QProjector<3>::project_to_face(const ReferenceCell reference_cell,
const Quadrature<2> & quadrature,
const unsigned int face_no,
std::vector<Point<3>> &q_points)
{
- Assert(reference_cell_type == ReferenceCell::Hex, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Hex, ExcNotImplemented());
+ (void)reference_cell;
const unsigned int dim = 3;
AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
template <>
void
-QProjector<1>::project_to_subface(const ReferenceCell reference_cell_type,
+QProjector<1>::project_to_subface(const ReferenceCell reference_cell,
const Quadrature<0> &,
const unsigned int face_no,
const unsigned int,
std::vector<Point<1>> &q_points,
const RefinementCase<0> &)
{
- Assert(reference_cell_type == ReferenceCell::Line, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Line, ExcNotImplemented());
+ (void)reference_cell;
const unsigned int dim = 1;
AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
template <>
void
-QProjector<2>::project_to_subface(const ReferenceCell reference_cell_type,
+QProjector<2>::project_to_subface(const ReferenceCell reference_cell,
const Quadrature<1> & quadrature,
const unsigned int face_no,
const unsigned int subface_no,
Assert(q_points.size() == quadrature.size(),
ExcDimensionMismatch(q_points.size(), quadrature.size()));
- if (reference_cell_type == ReferenceCell::Tri)
+ if (reference_cell == ReferenceCell::Tri)
{
// use linear polynomial to map the reference quadrature points correctly
// on faces, i.e., Simplex::ScalarPolynomial<1>(1)
Assert(false, ExcInternalError());
}
}
- else if (reference_cell_type == ReferenceCell::Quad)
+ else if (reference_cell == ReferenceCell::Quad)
{
for (unsigned int p = 0; p < quadrature.size(); ++p)
switch (face_no)
template <>
void
-QProjector<3>::project_to_subface(const ReferenceCell reference_cell_type,
+QProjector<3>::project_to_subface(const ReferenceCell reference_cell,
const Quadrature<2> & quadrature,
const unsigned int face_no,
const unsigned int subface_no,
std::vector<Point<3>> & q_points,
const RefinementCase<2> &ref_case)
{
- Assert(reference_cell_type == ReferenceCell::Hex, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Hex, ExcNotImplemented());
+ (void)reference_cell;
const unsigned int dim = 3;
AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
template <>
Quadrature<1>
-QProjector<1>::project_to_all_faces(const ReferenceCell reference_cell_type,
+QProjector<1>::project_to_all_faces(const ReferenceCell reference_cell,
const hp::QCollection<0> &quadrature)
{
AssertDimension(quadrature.size(), 1);
- Assert(reference_cell_type == ReferenceCell::Line, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Line, ExcNotImplemented());
+ (void)reference_cell;
const unsigned int dim = 1;
template <>
Quadrature<2>
-QProjector<2>::project_to_all_faces(const ReferenceCell reference_cell_type,
+QProjector<2>::project_to_all_faces(const ReferenceCell reference_cell,
const hp::QCollection<1> &quadrature)
{
- if (reference_cell_type == ReferenceCell::Tri)
+ if (reference_cell == ReferenceCell::Tri)
{
const auto support_points_line =
[](const auto &face, const auto &orientation) -> std::vector<Point<2>> {
return {points, weights};
}
- Assert(reference_cell_type == ReferenceCell::Quad, ExcNotImplemented());
+ Assert(reference_cell == ReferenceCell::Quad, ExcNotImplemented());
const unsigned int dim = 2;
template <>
Quadrature<3>
-QProjector<3>::project_to_all_faces(const ReferenceCell reference_cell_type,
+QProjector<3>::project_to_all_faces(const ReferenceCell reference_cell,
const hp::QCollection<2> &quadrature)
{
const auto support_points_tri =
return Quadrature<3>(points, weights);
};
- if (reference_cell_type == ReferenceCell::Tet)
+ if (reference_cell == ReferenceCell::Tet)
{
// reference faces (defined by its support points and its area)
// note: the area is later not used as a scaling factor but recomputed
return process(faces);
}
- else if (reference_cell_type == ReferenceCell::Wedge)
+ else if (reference_cell == ReferenceCell::Wedge)
{
const std::vector<std::pair<std::vector<Point<3>>, double>> faces = {
{{{{Point<3>(1.0, 0.0, 0.0),
return process(faces);
}
- else if (reference_cell_type == ReferenceCell::Pyramid)
+ else if (reference_cell == ReferenceCell::Pyramid)
{
const std::vector<std::pair<std::vector<Point<3>>, double>> faces = {
{{{{Point<3>(-1.0, -1.0, 0.0),
}
- Assert(reference_cell_type == ReferenceCell::Hex, ExcNotImplemented());
+ Assert(reference_cell == ReferenceCell::Hex, ExcNotImplemented());
const unsigned int dim = 3;
template <>
Quadrature<1>
-QProjector<1>::project_to_all_subfaces(const ReferenceCell reference_cell_type,
+QProjector<1>::project_to_all_subfaces(const ReferenceCell reference_cell,
const Quadrature<0> &quadrature)
{
- Assert(reference_cell_type == ReferenceCell::Line, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Line, ExcNotImplemented());
+ (void)reference_cell;
const unsigned int dim = 1;
template <>
Quadrature<2>
-QProjector<2>::project_to_all_subfaces(const ReferenceCell reference_cell_type,
+QProjector<2>::project_to_all_subfaces(const ReferenceCell reference_cell,
const SubQuadrature &quadrature)
{
- if (reference_cell_type == ReferenceCell::Tri ||
- reference_cell_type == ReferenceCell::Tet)
+ if (reference_cell == ReferenceCell::Tri ||
+ reference_cell == ReferenceCell::Tet)
return Quadrature<2>(); // nothing to do
- Assert(reference_cell_type == ReferenceCell::Quad, ExcNotImplemented());
+ Assert(reference_cell == ReferenceCell::Quad, ExcNotImplemented());
const unsigned int dim = 2;
template <>
Quadrature<3>
-QProjector<3>::project_to_all_subfaces(const ReferenceCell reference_cell_type,
+QProjector<3>::project_to_all_subfaces(const ReferenceCell reference_cell,
const SubQuadrature &quadrature)
{
- if (reference_cell_type == ReferenceCell::Tri ||
- reference_cell_type == ReferenceCell::Tet)
+ if (reference_cell == ReferenceCell::Tri ||
+ reference_cell == ReferenceCell::Tet)
return Quadrature<3>(); // nothing to do
- Assert(reference_cell_type == ReferenceCell::Hex, ExcNotImplemented());
+ Assert(reference_cell == ReferenceCell::Hex, ExcNotImplemented());
const unsigned int dim = 3;
SubQuadrature q_reflected = internal::QProjector::reflect(quadrature);
template <int dim>
Quadrature<dim>
-QProjector<dim>::project_to_child(const ReferenceCell reference_cell_type,
+QProjector<dim>::project_to_child(const ReferenceCell reference_cell,
const Quadrature<dim> &quadrature,
const unsigned int child_no)
{
- Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+ Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
- (void)reference_cell_type;
+ (void)reference_cell;
AssertIndexRange(child_no, GeometryInfo<dim>::max_children_per_cell);
template <int dim>
Quadrature<dim>
-QProjector<dim>::project_to_all_children(
- const ReferenceCell reference_cell_type,
- const Quadrature<dim> &quadrature)
+QProjector<dim>::project_to_all_children(const ReferenceCell reference_cell,
+ const Quadrature<dim> &quadrature)
{
- Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+ Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
- (void)reference_cell_type;
+ (void)reference_cell;
const unsigned int n_points = quadrature.size(),
n_children = GeometryInfo<dim>::max_children_per_cell;
template <int dim>
Quadrature<dim>
-QProjector<dim>::project_to_line(const ReferenceCell reference_cell_type,
+QProjector<dim>::project_to_line(const ReferenceCell reference_cell,
const Quadrature<1> &quadrature,
const Point<dim> & p1,
const Point<dim> & p2)
{
- Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+ Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
- (void)reference_cell_type;
+ (void)reference_cell;
const unsigned int n = quadrature.size();
std::vector<Point<dim>> points(n);
template <int dim>
typename QProjector<dim>::DataSetDescriptor
-QProjector<dim>::DataSetDescriptor::face(
- const ReferenceCell reference_cell_type,
- const unsigned int face_no,
- const bool face_orientation,
- const bool face_flip,
- const bool face_rotation,
- const unsigned int n_quadrature_points)
+QProjector<dim>::DataSetDescriptor::face(const ReferenceCell reference_cell,
+ const unsigned int face_no,
+ const bool face_orientation,
+ const bool face_flip,
+ const bool face_rotation,
+ const unsigned int n_quadrature_points)
{
- if (reference_cell_type == ReferenceCell::Tri ||
- reference_cell_type == ReferenceCell::Tet)
+ if (reference_cell == ReferenceCell::Tri ||
+ reference_cell == ReferenceCell::Tet)
{
if (dim == 2)
return {(2 * face_no + face_orientation) * n_quadrature_points};
}
}
- Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+ Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
Assert(face_no < GeometryInfo<dim>::faces_per_cell, ExcInternalError());
template <int dim>
typename QProjector<dim>::DataSetDescriptor
QProjector<dim>::DataSetDescriptor::face(
- const ReferenceCell reference_cell_type,
+ const ReferenceCell reference_cell,
const unsigned int face_no,
const bool face_orientation,
const bool face_flip,
const bool face_rotation,
const hp::QCollection<dim - 1> &quadrature)
{
- if (reference_cell_type == ReferenceCell::Tri ||
- reference_cell_type == ReferenceCell::Tet ||
- reference_cell_type == ReferenceCell::Wedge ||
- reference_cell_type == ReferenceCell::Pyramid)
+ if (reference_cell == ReferenceCell::Tri ||
+ reference_cell == ReferenceCell::Tet ||
+ reference_cell == ReferenceCell::Wedge ||
+ reference_cell == ReferenceCell::Pyramid)
{
unsigned int offset = 0;
{8, 6, 6, 6, 6}};
const auto &scale =
- (reference_cell_type == ReferenceCell::Tri) ?
+ (reference_cell == ReferenceCell::Tri) ?
scale_tri :
- ((reference_cell_type == ReferenceCell::Tet) ?
+ ((reference_cell == ReferenceCell::Tet) ?
scale_tet :
- ((reference_cell_type == ReferenceCell::Wedge) ? scale_wedge :
- scale_pyramid));
+ ((reference_cell == ReferenceCell::Wedge) ? scale_wedge :
+ scale_pyramid));
if (quadrature.size() == 1)
offset = scale[0] * quadrature[0].size() * face_no;
}
}
- Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+ Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
Assert(face_no < GeometryInfo<dim>::faces_per_cell, ExcInternalError());
template <>
QProjector<1>::DataSetDescriptor
QProjector<1>::DataSetDescriptor::subface(
- const ReferenceCell reference_cell_type,
+ const ReferenceCell reference_cell,
const unsigned int face_no,
const unsigned int subface_no,
const bool,
const unsigned int n_quadrature_points,
const internal::SubfaceCase<1>)
{
- Assert(reference_cell_type == ReferenceCell::Line, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Line, ExcNotImplemented());
+ (void)reference_cell;
Assert(face_no < GeometryInfo<1>::faces_per_cell, ExcInternalError());
Assert(subface_no < GeometryInfo<1>::max_children_per_face,
template <>
QProjector<2>::DataSetDescriptor
QProjector<2>::DataSetDescriptor::subface(
- const ReferenceCell reference_cell_type,
+ const ReferenceCell reference_cell,
const unsigned int face_no,
const unsigned int subface_no,
const bool,
const unsigned int n_quadrature_points,
const internal::SubfaceCase<2>)
{
- Assert(reference_cell_type == ReferenceCell::Quad, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Quad, ExcNotImplemented());
+ (void)reference_cell;
Assert(face_no < GeometryInfo<2>::faces_per_cell, ExcInternalError());
Assert(subface_no < GeometryInfo<2>::max_children_per_face,
template <>
QProjector<3>::DataSetDescriptor
QProjector<3>::DataSetDescriptor::subface(
- const ReferenceCell reference_cell_type,
+ const ReferenceCell reference_cell,
const unsigned int face_no,
const unsigned int subface_no,
const bool face_orientation,
{
const unsigned int dim = 3;
- Assert(reference_cell_type == ReferenceCell::Hex, ExcNotImplemented());
- (void)reference_cell_type;
+ Assert(reference_cell == ReferenceCell::Hex, ExcNotImplemented());
+ (void)reference_cell;
Assert(face_no < GeometryInfo<dim>::faces_per_cell, ExcInternalError());
Assert(subface_no < GeometryInfo<dim>::max_children_per_face,
template <int dim>
Quadrature<dim>
-QProjector<dim>::project_to_face(const ReferenceCell reference_cell_type,
+QProjector<dim>::project_to_face(const ReferenceCell reference_cell,
const SubQuadrature &quadrature,
const unsigned int face_no)
{
- Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+ Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
- (void)reference_cell_type;
+ (void)reference_cell;
std::vector<Point<dim>> points(quadrature.size());
project_to_face(quadrature, face_no, points);
template <int dim>
Quadrature<dim>
-QProjector<dim>::project_to_subface(const ReferenceCell reference_cell_type,
+QProjector<dim>::project_to_subface(const ReferenceCell reference_cell,
const SubQuadrature &quadrature,
const unsigned int face_no,
const unsigned int subface_no,
const RefinementCase<dim - 1> &ref_case)
{
- Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+ Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
- (void)reference_cell_type;
+ (void)reference_cell;
std::vector<Point<dim>> points(quadrature.size());
project_to_subface(quadrature, face_no, subface_no, points, ref_case);
}
Assert(
- this->all_reference_cell_types_are_hyper_cube(),
+ this->all_reference_cells_are_hyper_cube(),
ExcMessage(
"The class parallel::distributed::Triangulation only supports meshes "
"consisting only of hypercube-like cells."));
template <int dim, int spacedim>
void
- TriangulationBase<dim, spacedim>::update_reference_cell_types()
+ TriangulationBase<dim, spacedim>::update_reference_cells()
{
// run algorithm for locally-owned cells
- dealii::Triangulation<dim, spacedim>::update_reference_cell_types();
+ dealii::Triangulation<dim, spacedim>::update_reference_cells();
// translate ReferenceCell to unsigned int (needed by
// Utilities::MPI::compute_set_union)
- std::vector<unsigned int> reference_cell_types_ui;
+ std::vector<unsigned int> reference_cells_ui;
- for (const auto &i : this->reference_cell_types)
- reference_cell_types_ui.push_back(static_cast<unsigned int>(i));
+ for (const auto &i : this->reference_cells)
+ reference_cells_ui.push_back(static_cast<unsigned int>(i));
// create union
- reference_cell_types_ui =
- Utilities::MPI::compute_set_union(reference_cell_types_ui,
+ reference_cells_ui =
+ Utilities::MPI::compute_set_union(reference_cells_ui,
this->mpi_communicator);
// transform back and store result
- this->reference_cell_types.clear();
- for (const auto &i : reference_cell_types_ui)
- this->reference_cell_types.emplace_back(
+ this->reference_cells.clear();
+ for (const auto &i : reference_cells_ui)
+ this->reference_cells.emplace_back(
dealii::internal::ReferenceCell::make_reference_cell_from_int(i));
}
dof_handler.get_fe(other_fe_index),
quad_dof_identities
[most_dominating_fe_index][other_fe_index]
- [cell->quad(q)->reference_cell_type() ==
+ [cell->quad(q)->reference_cell() ==
dealii::ReferenceCell::Quad],
most_dominating_fe_index_face_no);
dof_handler.get_fe(other_fe_index),
quad_dof_identities
[most_dominating_fe_index][other_fe_index]
- [cell->quad(q)->reference_cell_type() ==
+ [cell->quad(q)->reference_cell() ==
dealii::ReferenceCell::Quad],
most_dominating_fe_index_face_no);
{
const FiniteElement<dim, spacedim> &fe = cell->get_fe();
- const auto reference_cell_type = cell->reference_cell_type();
+ const auto reference_cell = cell->reference_cell();
const auto &cell_rc =
- dealii::internal::Info::get_cell(reference_cell_type);
+ dealii::internal::Info::get_cell(reference_cell);
const auto &face_rc =
- dealii::internal::Info::get_face(reference_cell_type, face);
+ dealii::internal::Info::get_face(reference_cell, face);
const unsigned int n_vertices_per_cell = cell_rc.n_vertices();
const unsigned int n_lines_per_cell = cell_rc.n_lines();
{
adjust_quad_dof_index_for_face_orientation_table[f] =
Table<2, int>(this->n_dofs_per_quad(f),
- internal::Info::get_cell(this->reference_cell_type())
- .face_reference_cell_type(f) ==
- ReferenceCell::Quad ?
+ internal::Info::get_cell(this->reference_cell())
+ .face_reference_cell(f) == ReferenceCell::Quad ?
8 :
6);
adjust_quad_dof_index_for_face_orientation_table[f].fill(0);
const bool face_flip,
const bool face_rotation) const
{
- const auto &refence_cell =
- internal::Info::get_cell(this->reference_cell_type());
+ const auto &refence_cell = internal::Info::get_cell(this->reference_cell());
AssertIndexRange(face_index, this->n_dofs_per_face(face));
AssertIndexRange(face, refence_cell.n_faces());
Assert(adjust_quad_dof_index_for_face_orientation_table
[this->n_unique_quads() == 1 ? 0 : face]
.n_elements() ==
- (internal::Info::get_cell(this->reference_cell_type())
- .face_reference_cell_type(face) == ReferenceCell::Quad ?
+ (internal::Info::get_cell(this->reference_cell())
+ .face_reference_cell(face) == ReferenceCell::Quad ?
8 :
6) *
this->n_dofs_per_quad(face),
{
return get_data(flags,
mapping,
- QProjector<dim>::project_to_all_faces(
- this->reference_cell_type(), quadrature),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
+ quadrature),
output_data);
}
{
return get_data(flags,
mapping,
- QProjector<dim>::project_to_all_faces(
- this->reference_cell_type(), quadrature),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
+ quadrature),
output_data);
}
return get_data(flags,
mapping,
QProjector<dim>::project_to_all_subfaces(
- this->reference_cell_type(), quadrature),
+ this->reference_cell(), quadrature),
output_data);
}
}
Quadrature<dim> faces =
- QProjector<dim>::project_to_all_faces(this->reference_cell_type(),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
face_points);
for (; current < GeometryInfo<dim>::faces_per_cell * n_face_points;
++current)
// in the quadrature points
// of a full face.
Quadrature<dim> q_face =
- QProjector<dim>::project_to_face(this->reference_cell_type(),
- q_base,
- face);
+ QProjector<dim>::project_to_face(this->reference_cell(), q_base, face);
// Store shape values, since the
// evaluation suffers if not
// ordered by point
// evaluated on the subface
// only.
Quadrature<dim> q_sub = QProjector<dim>::project_to_subface(
- this->reference_cell_type(), q_base, face, sub);
+ this->reference_cell(), q_base, face, sub);
const unsigned int child = GeometryInfo<dim>::child_cell_on_face(
RefinementCase<dim>::isotropic_refinement, face, sub);
++child)
{
Quadrature<dim> q_sub =
- QProjector<dim>::project_to_child(this->reference_cell_type(),
+ QProjector<dim>::project_to_child(this->reference_cell(),
q_cell,
child);
// TODO: Check what the face_orientation, face_flip and face_rotation
// have to be in 3D
unsigned int k = QProjector<dim>::DataSetDescriptor::face(
- this->reference_cell_type(),
- face,
- false,
- false,
- false,
- n_face_points);
+ this->reference_cell(), face, false, false, false, n_face_points);
for (unsigned int i = 0; i < boundary_weights_abf.size(1); ++i)
nodal_values[start_abf_dofs + i] +=
n_orient * boundary_weights_abf(k + fp, i) *
this->generalized_support_points.resize(npoints);
Quadrature<dim> faces =
- QProjector<dim>::project_to_all_faces(this->reference_cell_type(),
- face_points);
+ QProjector<dim>::project_to_all_faces(this->reference_cell(), face_points);
for (unsigned int k = 0;
k < face_points.size() * GeometryInfo<dim>::faces_per_cell;
++k)
this->generalized_support_points[k] = faces.point(
k +
- QProjector<dim>::DataSetDescriptor::face(this->reference_cell_type(),
+ QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
0,
true,
false,
// be done for the face orientation flag in 3D.
const Quadrature<dim> subface_quadrature =
subface == numbers::invalid_unsigned_int ?
- QProjector<dim>::project_to_face(this->reference_cell_type(),
+ QProjector<dim>::project_to_face(this->reference_cell(),
quad_face_support,
0) :
- QProjector<dim>::project_to_subface(this->reference_cell_type(),
+ QProjector<dim>::project_to_subface(this->reference_cell(),
quad_face_support,
0,
subface);
const unsigned int n_boundary_points =
GeometryInfo<dim>::lines_per_cell * n_edge_points;
const Quadrature<dim> edge_quadrature =
- QProjector<dim>::project_to_all_faces(this->reference_cell_type(),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
reference_edge_quadrature);
this->generalized_face_support_points[face_no].resize(n_edge_points);
for (unsigned int line = 0; line < GeometryInfo<dim>::lines_per_cell;
++line)
this->generalized_support_points[line * n_edge_points + q_point] =
- edge_quadrature.point(QProjector<dim>::DataSetDescriptor::face(
- this->reference_cell_type(),
- line,
- true,
- false,
- false,
- n_edge_points) +
- q_point);
+ edge_quadrature.point(
+ QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
+ line,
+ true,
+ false,
+ false,
+ n_edge_points) +
+ q_point);
for (unsigned int i = 0; i < order; ++i)
boundary_weights(q_point, i) =
++line)
for (unsigned int q_point = 0; q_point < n_edge_points; ++q_point)
this->generalized_support_points[line * n_edge_points + q_point] =
- edge_quadrature.point(QProjector<dim>::DataSetDescriptor::face(
- this->reference_cell_type(),
- line,
- true,
- false,
- false,
- n_edge_points) +
- q_point);
+ edge_quadrature.point(
+ QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
+ line,
+ true,
+ false,
+ false,
+ n_edge_points) +
+ q_point);
}
}
}
const Quadrature<dim> &face_quadrature =
- QProjector<dim>::project_to_all_faces(this->reference_cell_type(),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
reference_face_quadrature);
for (const unsigned int face : GeometryInfo<dim>::face_indices())
this->generalized_support_points[face * n_face_points + q_point +
GeometryInfo<dim>::lines_per_cell *
n_edge_points] =
- face_quadrature.point(QProjector<dim>::DataSetDescriptor::face(
- this->reference_cell_type(),
- face,
- true,
- false,
- false,
- n_face_points) +
- q_point);
+ face_quadrature.point(
+ QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
+ face,
+ true,
+ false,
+ false,
+ n_face_points) +
+ q_point);
}
// Create support points in the interior.
// This will fill in the missing items in the InternalData
// (fe_internal/fe_data) which was not filled in by get_data.
fill_edge_values(cell,
- QProjector<dim>::project_to_all_faces(
- this->reference_cell_type(), quadrature[0]),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
+ quadrature[0]),
fe_data);
if (dim == 3 && this->degree > 1)
{
fill_face_values(cell,
QProjector<dim>::project_to_all_faces(
- this->reference_cell_type(), quadrature[0]),
+ this->reference_cell(), quadrature[0]),
fe_data);
}
const UpdateFlags flags(fe_data.update_each);
const unsigned int n_q_points = quadrature[0].size();
const auto offset =
- QProjector<dim>::DataSetDescriptor::face(this->reference_cell_type(),
+ QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
face_no,
cell->face_orientation(face_no),
cell->face_flip(face_no),
namebuf << "FE_Nothing<" << Utilities::dim_string(dim, spacedim) << ">(";
std::vector<std::string> name_components;
- if (this->reference_cell_type() != ReferenceCell::get_hypercube<dim>())
- name_components.push_back(this->reference_cell_type().to_string());
+ if (this->reference_cell() != ReferenceCell::get_hypercube<dim>())
+ name_components.push_back(this->reference_cell().to_string());
if (this->n_components() > 1)
name_components.push_back(std::to_string(this->n_components()));
if (dominate)
// compute on the face
const Quadrature<2> quadrature_on_face =
- QProjector<2>::project_to_face(this->reference_cell_type(),
+ QProjector<2>::project_to_face(this->reference_cell(),
quadrature[0],
face_no);
// compute on the subface
const Quadrature<2> quadrature_on_subface = QProjector<2>::project_to_subface(
- this->reference_cell_type(), quadrature, face_no, sub_no);
+ this->reference_cell(), quadrature, face_no, sub_no);
if (flags & update_values)
for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
// faces are stored contiguously)
const auto offset =
- QProjector<dim>::DataSetDescriptor::face(this->reference_cell_type(),
+ QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
face_no,
cell->face_orientation(face_no),
cell->face_flip(face_no),
// to take (all data sets for all
// sub-faces are stored contiguously)
const auto offset =
- QProjector<dim>::DataSetDescriptor::subface(this->reference_cell_type(),
+ QProjector<dim>::DataSetDescriptor::subface(this->reference_cell(),
face_no,
sub_no,
cell->face_orientation(face_no),
// be done for the face orientation flag in 3D.
const Quadrature<dim> subface_quadrature =
subface == numbers::invalid_unsigned_int ?
- QProjector<dim>::project_to_face(this->reference_cell_type(),
+ QProjector<dim>::project_to_face(this->reference_cell(),
quad_face_support,
0) :
- QProjector<dim>::project_to_subface(this->reference_cell_type(),
+ QProjector<dim>::project_to_subface(this->reference_cell(),
quad_face_support,
0,
subface);
}
Quadrature<dim> faces =
- QProjector<dim>::project_to_all_faces(this->reference_cell_type(),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
face_points);
for (; current < GeometryInfo<dim>::faces_per_cell * n_face_points;
++current)
{
// Enter the support point
// into the vector
- this->generalized_support_points[current] =
- faces.point(current + QProjector<dim>::DataSetDescriptor::face(
- this->reference_cell_type(),
- 0,
- true,
- false,
- false,
- n_face_points));
+ this->generalized_support_points[current] = faces.point(
+ current +
+ QProjector<dim>::DataSetDescriptor::face(
+ this->reference_cell(), 0, true, false, false, n_face_points));
}
}
// in the quadrature points
// of a full face.
Quadrature<dim> q_face =
- QProjector<dim>::project_to_face(this->reference_cell_type(),
- q_base,
- face);
+ QProjector<dim>::project_to_face(this->reference_cell(), q_base, face);
// Store shape values, since the
// evaluation suffers if not
// ordered by point
// evaluated on the subface
// only.
Quadrature<dim> q_sub = QProjector<dim>::project_to_subface(
- this->reference_cell_type(), q_base, face, sub);
+ this->reference_cell(), q_base, face, sub);
const unsigned int child = GeometryInfo<dim>::child_cell_on_face(
RefinementCase<dim>::isotropic_refinement, face, sub);
++child)
{
Quadrature<dim> q_sub =
- QProjector<dim>::project_to_child(this->reference_cell_type(),
+ QProjector<dim>::project_to_child(this->reference_cell(),
q_cell,
child);
this->generalized_face_support_points[face_no][k] =
face_points.point(k);
Quadrature<dim> faces =
- QProjector<dim>::project_to_all_faces(this->reference_cell_type(),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
face_points);
for (unsigned int k = 0; k < this->n_dofs_per_face(face_no) *
GeometryInfo<dim>::faces_per_cell;
++k)
- this->generalized_support_points[k] =
- faces.point(k + QProjector<dim>::DataSetDescriptor::face(
- this->reference_cell_type(),
- 0,
- true,
- false,
- false,
- this->n_dofs_per_face(face_no)));
+ this->generalized_support_points[k] = faces.point(
+ k + QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
+ 0,
+ true,
+ false,
+ false,
+ this->n_dofs_per_face(
+ face_no)));
current =
this->n_dofs_per_face(face_no) * GeometryInfo<dim>::faces_per_cell;
// matrix by simply taking the
// value at the support points.
const Quadrature<dim> face_projection =
- QProjector<dim>::project_to_face(this->reference_cell_type(),
+ QProjector<dim>::project_to_face(this->reference_cell(),
quad_face_support,
0);
// value at the support points.
const Quadrature<dim> subface_projection =
- QProjector<dim>::project_to_subface(this->reference_cell_type(),
+ QProjector<dim>::project_to_subface(this->reference_cell(),
quad_face_support,
0,
subface);
this->generalized_face_support_points[face_no][k] =
face_points.point(k);
Quadrature<dim> faces =
- QProjector<dim>::project_to_all_faces(this->reference_cell_type(),
+ QProjector<dim>::project_to_all_faces(this->reference_cell(),
face_points);
for (unsigned int k = 0; k < this->n_dofs_per_face(face_no) *
GeometryInfo<dim>::faces_per_cell;
++k)
- this->generalized_support_points[k] =
- faces.point(k + QProjector<dim>::DataSetDescriptor::face(
- this->reference_cell_type(),
- 0,
- true,
- false,
- false,
- this->n_dofs_per_face(face_no)));
+ this->generalized_support_points[k] = faces.point(
+ k + QProjector<dim>::DataSetDescriptor::face(this->reference_cell(),
+ 0,
+ true,
+ false,
+ false,
+ this->n_dofs_per_face(
+ face_no)));
current =
this->n_dofs_per_face(face_no) * GeometryInfo<dim>::faces_per_cell;
q.size(),
fe.n_dofs_per_cell(),
update_default,
- fe.reference_cell_type()
- .template get_default_linear_mapping<dim, spacedim>(),
+ fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
fe)
, quadrature(q)
{
const typename Triangulation<dim, spacedim>::cell_iterator &cell)
{
// Check that mapping and reference cell type are compatible:
- Assert(this->get_mapping().is_compatible_with(cell->reference_cell_type()),
+ Assert(this->get_mapping().is_compatible_with(cell->reference_cell()),
ExcMessage(
"You are trying to call FEValues::reinit() with a cell of type " +
- cell->reference_cell_type().to_string() +
+ cell->reference_cell().to_string() +
" with a Mapping that is not compatible with it."));
// no FE in this cell, so no assertion
(typename FEValuesBase<dim, spacedim>::ExcFEDontMatch()));
// Check that mapping and reference cell type are compatible:
- Assert(this->get_mapping().is_compatible_with(cell->reference_cell_type()),
+ Assert(this->get_mapping().is_compatible_with(cell->reference_cell()),
ExcMessage(
"You are trying to call FEValues::reinit() with a cell of type " +
- cell->reference_cell_type().to_string() +
+ cell->reference_cell().to_string() +
" with a Mapping that is not compatible with it."));
this->maybe_invalidate_previous_present_cell(cell);
{
Assert(quadrature.size() == 1 ||
quadrature.size() ==
- internal::Info::get_cell(fe.reference_cell_type()).n_faces(),
+ internal::Info::get_cell(fe.reference_cell()).n_faces(),
ExcInternalError());
}
: FEFaceValuesBase<dim, spacedim>(
fe.n_dofs_per_cell(),
update_flags,
- fe.reference_cell_type()
- .template get_default_linear_mapping<dim, spacedim>(),
+ fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
fe,
quadrature)
{
: FEFaceValuesBase<dim, spacedim>(
fe.n_dofs_per_cell(),
update_flags,
- fe.reference_cell_type()
- .template get_default_linear_mapping<dim, spacedim>(),
+ fe.reference_cell().template get_default_linear_mapping<dim, spacedim>(),
fe,
quadrature)
{
std::vector<Tensor<1, spacedim>>(n_original_q_points));
// Compute tangentials to the unit cell.
- const auto reference_cell_type = this->fe.reference_cell_type();
- const auto n_faces =
- internal::Info::get_cell(reference_cell_type).n_faces();
+ const auto reference_cell = this->fe.reference_cell();
+ const auto n_faces = internal::Info::get_cell(reference_cell).n_faces();
for (unsigned int i = 0; i < n_faces; ++i)
{
unit_tangentials[i].resize(n_original_q_points);
- std::fill(
- unit_tangentials[i].begin(),
- unit_tangentials[i].end(),
- reference_cell_type.template unit_tangential_vectors<dim>(i, 0));
+ std::fill(unit_tangentials[i].begin(),
+ unit_tangentials[i].end(),
+ reference_cell.template unit_tangential_vectors<dim>(i, 0));
if (dim > 2)
{
unit_tangentials[n_faces + i].resize(n_original_q_points);
- std::fill(unit_tangentials[n_faces + i].begin(),
- unit_tangentials[n_faces + i].end(),
- reference_cell_type
- .template unit_tangential_vectors<dim>(i, 1));
+ std::fill(
+ unit_tangentials[n_faces + i].begin(),
+ unit_tangentials[n_faces + i].end(),
+ reference_cell.template unit_tangential_vectors<dim>(i, 1));
}
}
}
const auto &mapping_support_points = fe.get_unit_support_points();
- const auto reference_cell_type = fe.reference_cell_type();
+ const auto reference_cell = fe.reference_cell();
const unsigned int n_points = mapping_support_points.size();
const unsigned int n_shape_functions =
- internal::Info::get_cell(reference_cell_type).n_vertices();
+ internal::Info::get_cell(reference_cell).n_vertices();
this->mapping_support_point_weights =
Table<2, double>(n_points, n_shape_functions);
for (unsigned int point = 0; point < n_points; ++point)
for (unsigned int i = 0; i < n_shape_functions; ++i)
mapping_support_point_weights(point, i) =
- reference_cell_type.d_linear_shape_function(
- mapping_support_points[point], i);
+ reference_cell.d_linear_shape_function(mapping_support_points[point],
+ i);
}
auto &data = dynamic_cast<InternalData &>(*data_ptr);
data.initialize_face(this->requires_update_flags(update_flags),
QProjector<dim>::project_to_all_faces(
- this->fe->reference_cell_type(), quadrature),
+ this->fe->reference_cell(), quadrature),
quadrature.max_n_quadrature_points());
return data_ptr;
auto &data = dynamic_cast<InternalData &>(*data_ptr);
data.initialize_face(this->requires_update_flags(update_flags),
QProjector<dim>::project_to_all_subfaces(
- this->fe->reference_cell_type(), quadrature),
+ this->fe->reference_cell(), quadrature),
quadrature.size());
return data_ptr;
cell,
face_no,
numbers::invalid_unsigned_int,
- QProjector<dim>::DataSetDescriptor::face(this->fe->reference_cell_type(),
+ QProjector<dim>::DataSetDescriptor::face(this->fe->reference_cell(),
face_no,
cell->face_orientation(face_no),
cell->face_flip(face_no),
cell,
face_no,
subface_no,
- QProjector<dim>::DataSetDescriptor::subface(this->fe->reference_cell_type(),
+ QProjector<dim>::DataSetDescriptor::subface(this->fe->reference_cell(),
face_no,
subface_no,
cell->face_orientation(face_no),
Utilities::to_string(cell_type.get_dimension()) +
" ) do not agree."));
- return fe->reference_cell_type() == cell_type;
+ return fe->reference_cell() == cell_type;
}
, fe_to_real(fe_mask.size(), numbers::invalid_unsigned_int)
, fe_values(this->euler_dof_handler->get_fe(),
this->euler_dof_handler->get_fe()
- .reference_cell_type()
+ .reference_cell()
.template get_nodal_type_quadrature<dim>(),
update_values)
{
, fe_to_real(fe_mask.size(), numbers::invalid_unsigned_int)
, fe_values(this->euler_dof_handler->get_fe(),
this->euler_dof_handler->get_fe()
- .reference_cell_type()
+ .reference_cell()
.template get_nodal_type_quadrature<dim>(),
update_values)
{
, fe_to_real(fe_mask.size(), numbers::invalid_unsigned_int)
, fe_values(this->euler_dof_handler->get_fe(),
this->euler_dof_handler->get_fe()
- .reference_cell_type()
+ .reference_cell()
.template get_nodal_type_quadrature<dim>(),
update_values)
{
, fe_to_real(mapping.fe_to_real)
, fe_values(mapping.euler_dof_handler->get_fe(),
this->euler_dof_handler->get_fe()
- .reference_cell_type()
+ .reference_cell()
.template get_nodal_type_quadrature<dim>(),
update_values)
{}
Utilities::to_string(cell_type.get_dimension()) +
" ) do not agree."));
- return euler_dof_handler->get_fe().reference_cell_type() == cell_type;
+ return euler_dof_handler->get_fe().reference_cell() == cell_type;
}
// TODO: only a single reference cell type possible...
- const auto reference_cell_type =
- this->euler_dof_handler->get_fe().reference_cell_type();
+ const auto reference_cell =
+ this->euler_dof_handler->get_fe().reference_cell();
const auto n_faces =
- internal::Info::get_cell(reference_cell_type).n_faces();
+ internal::Info::get_cell(reference_cell).n_faces();
// Compute tangentials to the unit cell.
for (unsigned int i = 0; i < n_faces; ++i)
{
data.unit_tangentials[i].resize(n_original_q_points);
- std::fill(data.unit_tangentials[i].begin(),
- data.unit_tangentials[i].end(),
- reference_cell_type
- .template unit_tangential_vectors<dim>(i, 0));
+ std::fill(
+ data.unit_tangentials[i].begin(),
+ data.unit_tangentials[i].end(),
+ reference_cell.template unit_tangential_vectors<dim>(i, 0));
if (dim > 2)
{
data.unit_tangentials[n_faces + i].resize(
n_original_q_points);
- std::fill(data.unit_tangentials[n_faces + i].begin(),
- data.unit_tangentials[n_faces + i].end(),
- reference_cell_type
- .template unit_tangential_vectors<dim>(i, 1));
+ std::fill(
+ data.unit_tangentials[n_faces + i].begin(),
+ data.unit_tangentials[n_faces + i].end(),
+ reference_cell.template unit_tangential_vectors<dim>(i, 1));
}
}
}
std::size_t element_id = 1;
const auto add_element = [&](const auto &element, const int &entity_tag) {
- const auto type = element->reference_cell_type();
+ const auto type = element->reference_cell();
Assert(entity_tag > 0, ExcInternalError());
// Add all vertex ids. Make sure we renumber to gmsh, and we add 1 to the
for (; cell != end; ++cell)
{
DataOutBase::Patch<dim, spacedim> patch;
- patch.reference_cell_type = cell->reference_cell_type();
- patch.n_subdivisions = 1;
+ patch.reference_cell = cell->reference_cell();
+ patch.n_subdivisions = 1;
patch.data.reinit(5, cell->n_vertices());
for (const unsigned int v : cell->vertex_indices())
for (const unsigned int i : cell->vertex_indices())
{
out << ' ';
- const auto reference_cell_type = cell->reference_cell_type();
+ const auto reference_cell = cell->reference_cell();
- if ((reference_cell_type == ReferenceCell::Vertex) ||
- (reference_cell_type == ReferenceCell::Line) ||
- (reference_cell_type == ReferenceCell::Quad) ||
- (reference_cell_type == ReferenceCell::Hex))
+ if ((reference_cell == ReferenceCell::Vertex) ||
+ (reference_cell == ReferenceCell::Line) ||
+ (reference_cell == ReferenceCell::Quad) ||
+ (reference_cell == ReferenceCell::Hex))
out << cell->vertex_index(GeometryInfo<dim>::ucd_to_deal[i]);
- else if ((reference_cell_type == ReferenceCell::Tri) ||
- (reference_cell_type == ReferenceCell::Tet) ||
- (reference_cell_type == ReferenceCell::Wedge))
+ else if ((reference_cell == ReferenceCell::Tri) ||
+ (reference_cell == ReferenceCell::Tet) ||
+ (reference_cell == ReferenceCell::Wedge))
out << cell->vertex_index(i);
- else if (reference_cell_type == ReferenceCell::Pyramid)
+ else if (reference_cell == ReferenceCell::Pyramid)
{
static const std::array<unsigned int, 5> permutation_table{
{0, 1, 3, 2, 4}};
if (vtk_flags.output_cells)
{
for (const auto &cell : tria.active_cell_iterators())
- out << table[static_cast<int>(cell->reference_cell_type())] << ' ';
+ out << table[static_cast<int>(cell->reference_cell())] << ' ';
out << '\n';
}
if (vtk_flags.output_faces)
{
for (const auto &face : faces)
- out << table[static_cast<int>(face->reference_cell_type())] << ' ';
+ out << table[static_cast<int>(face->reference_cell())] << ' ';
out << '\n';
}
if (vtk_flags.output_edges)
{
for (const auto &edge : edges)
- out << table[static_cast<int>(edge->reference_cell_type())] << ' ';
+ out << table[static_cast<int>(edge->reference_cell())] << ' ';
}
out << "\n\nCELL_DATA " << n_cells << '\n'
<< "SCALARS MaterialID int 1\n"
// then we need to also add this neighbor
if (dim >= 2)
for (const auto face :
- cell->reference_cell_type().faces_for_given_vertex(v))
+ cell->reference_cell().faces_for_given_vertex(v))
if (!cell->at_boundary(face) &&
cell->neighbor(face)->is_active())
{
// then we need to also add this neighbor
if (dim >= 2)
for (const auto face :
- cell->reference_cell_type().faces_for_given_vertex(v))
+ cell->reference_cell().faces_for_given_vertex(v))
if (!cell->at_boundary(face) &&
cell->neighbor(face)->is_active())
{
Point<facedim> xi;
- const auto face_reference_cell_type = face->reference_cell_type();
+ const auto face_reference_cell = face->reference_cell();
- if (face_reference_cell_type == ReferenceCell::get_hypercube<facedim>())
+ if (face_reference_cell == ReferenceCell::get_hypercube<facedim>())
{
for (unsigned int i = 0; i < facedim; ++i)
xi[i] = 1. / 2;
{
Point<spacedim> F;
for (const unsigned int v : face->vertex_indices())
- F += face->vertex(v) *
- face_reference_cell_type.d_linear_shape_function(xi, v);
+ F +=
+ face->vertex(v) * face_reference_cell.d_linear_shape_function(xi, v);
for (unsigned int i = 0; i < facedim; ++i)
{
for (const unsigned int v : face->vertex_indices())
grad_F[i] +=
face->vertex(v) *
- face_reference_cell_type.d_linear_shape_function_gradient(xi,
- v)[i];
+ face_reference_cell.d_linear_shape_function_gradient(xi, v)[i];
}
Tensor<1, facedim> J;
const Mapping<dim, spacedim> &
get_default_linear_mapping(const Triangulation<dim, spacedim> &triangulation)
{
- const auto &reference_cell_types = triangulation.get_reference_cell_types();
- Assert(reference_cell_types.size() == 1,
+ const auto &reference_cells = triangulation.get_reference_cells();
+ Assert(reference_cells.size() == 1,
ExcMessage(
"This function can only work for triangulations that "
"use only a single cell type -- for example, only triangles "
"cells of the triangulation. The triangulation you are "
"passing to this function uses multiple cell types."));
- return reference_cell_types.front()
+ return reference_cells.front()
.template get_default_linear_mapping<dim, spacedim>();
}
tria_faces.quads_line_orientations.size(),
true);
- tria_faces.quad_reference_cell_type.reserve(new_size);
- tria_faces.quad_reference_cell_type.insert(
- tria_faces.quad_reference_cell_type.end(),
- new_size - tria_faces.quad_reference_cell_type.size(),
+ tria_faces.quad_reference_cell.reserve(new_size);
+ tria_faces.quad_reference_cell.insert(
+ tria_faces.quad_reference_cell.end(),
+ new_size - tria_faces.quad_reference_cell.size(),
dealii::ReferenceCell::Quad);
}
}
if (tria_level.dim == 2 || tria_level.dim == 3)
{
- tria_level.reference_cell_type.reserve(total_cells);
- tria_level.reference_cell_type.insert(
- tria_level.reference_cell_type.end(),
- total_cells - tria_level.reference_cell_type.size(),
+ tria_level.reference_cell.reserve(total_cells);
+ tria_level.reference_cell.insert(
+ tria_level.reference_cell.end(),
+ total_cells - tria_level.reference_cell.size(),
tria_level.dim == 2 ? dealii::ReferenceCell::Quad :
dealii::ReferenceCell::Hex);
}
for (unsigned int q = 0, k = 0; q < n_quads; ++q)
{
// set entity type of quads
- faces.quad_reference_cell_type[q] =
- connectivity.entity_types(2)[q];
+ faces.quad_reference_cell[q] = connectivity.entity_types(2)[q];
// loop over all its lines
for (unsigned int i = crs.ptr[q], j = 0; i < crs.ptr[q + 1];
cells_0.manifold_id[cell] = cells[cell].manifold_id;
// set entity types
- level.reference_cell_type[cell] =
- connectivity.entity_types(dim)[cell];
+ level.reference_cell[cell] = connectivity.entity_types(dim)[cell];
// loop over faces
for (unsigned int i = crs.ptr[cell], j = 0; i < crs.ptr[cell + 1];
if (dim == 3 && structdim == 2)
{
// quad entity types
- faces.quad_reference_cell_type.assign(
- size, dealii::ReferenceCell::Invalid);
+ faces.quad_reference_cell.assign(size,
+ dealii::ReferenceCell::Invalid);
// quad line orientations
faces.quads_line_orientations.assign(size * faces_per_cell, -1);
level.neighbors.assign(size * faces_per_cell, {-1, -1});
- level.reference_cell_type.assign(size, dealii::ReferenceCell::Invalid);
+ level.reference_cell.assign(size, dealii::ReferenceCell::Invalid);
if (orientation_needed)
level.face_orientations.assign(size * faces_per_cell, -1);
triangulation.active_cell_iterators_on_level(level))
if (cell->refine_flag_set())
{
- if (cell->reference_cell_type() == dealii::ReferenceCell::Tri)
+ if (cell->reference_cell() == dealii::ReferenceCell::Tri)
{
needed_cells += 4;
needed_vertices += 0;
n_single_lines += 3;
}
- else if (cell->reference_cell_type() ==
+ else if (cell->reference_cell() ==
dealii::ReferenceCell::Quad)
{
needed_cells += 4;
unsigned int n_new_vertices = 0;
- if (cell->reference_cell_type() == dealii::ReferenceCell::Tri)
+ if (cell->reference_cell() == dealii::ReferenceCell::Tri)
n_new_vertices = 6;
- else if (cell->reference_cell_type() == dealii::ReferenceCell::Quad)
+ else if (cell->reference_cell() == dealii::ReferenceCell::Quad)
n_new_vertices = 9;
else
AssertThrow(false, ExcNotImplemented());
new_vertices[cell->n_vertices() + line_no] =
cell->line(line_no)->child(0)->vertex_index(1);
- if (cell->reference_cell_type() == dealii::ReferenceCell::Quad)
+ if (cell->reference_cell() == dealii::ReferenceCell::Quad)
{
while (triangulation.vertices_used[next_unused_vertex] == true)
++next_unused_vertex;
unsigned int lmin = 0;
unsigned int lmax = 0;
- if (cell->reference_cell_type() == dealii::ReferenceCell::Tri)
+ if (cell->reference_cell() == dealii::ReferenceCell::Tri)
{
lmin = 6;
lmax = 9;
}
- else if (cell->reference_cell_type() == dealii::ReferenceCell::Quad)
+ else if (cell->reference_cell() == dealii::ReferenceCell::Quad)
{
lmin = 8;
lmax = 12;
if (true)
{
- if (cell->reference_cell_type() == dealii::ReferenceCell::Tri)
+ if (cell->reference_cell() == dealii::ReferenceCell::Tri)
{
// add lines in the right order [TODO: clean up]
const auto ref = [&](const unsigned int face_no,
new_lines[8]->set_bounding_object_indices(
{new_vertices[5], new_vertices[3]});
}
- else if (cell->reference_cell_type() ==
- dealii::ReferenceCell::Quad)
+ else if (cell->reference_cell() == dealii::ReferenceCell::Quad)
{
unsigned int l = 0;
for (const unsigned int face_no : cell->face_indices())
unsigned int n_children = 0;
- if (cell->reference_cell_type() == dealii::ReferenceCell::Tri)
+ if (cell->reference_cell() == dealii::ReferenceCell::Tri)
n_children = 4;
- else if (cell->reference_cell_type() == dealii::ReferenceCell::Quad)
+ else if (cell->reference_cell() == dealii::ReferenceCell::Quad)
n_children = 4;
else
AssertThrow(false, ExcNotImplemented());
}
if ((dim == 2) &&
- (cell->reference_cell_type() == dealii::ReferenceCell::Tri))
+ (cell->reference_cell() == dealii::ReferenceCell::Tri))
{
subcells[0]->set_bounding_object_indices({new_lines[0]->index(),
new_lines[8]->index(),
// * GeometryInfo<2>::faces_per_cell + 0] = 0;
}
else if ((dim == 2) &&
- (cell->reference_cell_type() == dealii::ReferenceCell::Quad))
+ (cell->reference_cell() == dealii::ReferenceCell::Quad))
{
subcells[0]->set_bounding_object_indices(
{new_lines[0]->index(),
// TODO: here we assume that all children have the same reference
// cell type as the parent! This is justified for 2D.
triangulation.levels[subcells[i]->level()]
- ->reference_cell_type[subcells[i]->index()] =
- cell->reference_cell_type();
+ ->reference_cell[subcells[i]->index()] = cell->reference_cell();
if (i % 2 == 0)
subcells[i]->set_parent(cell->index());
next_unused_cell,
cell);
- if (cell->reference_cell_type() ==
- dealii::ReferenceCell::Quad &&
+ if (cell->reference_cell() == dealii::ReferenceCell::Quad &&
check_for_distorted_cells &&
has_distorted_children<dim, spacedim>(cell))
cells_with_distorted_children.distorted_cells.push_back(
// to check it, transform to the unit cell
// with a linear mapping
const Point<dim> new_unit =
- cell->reference_cell_type()
+ cell->reference_cell()
.template get_default_linear_mapping<dim,
spacedim>()
.transform_real_to_unit_cell(cell, new_bound);
Triangulation<dim, spacedim> &&tria) noexcept
: Subscriptor(std::move(tria))
, smooth_grid(tria.smooth_grid)
- , reference_cell_types(std::move(tria.reference_cell_types))
+ , reference_cells(std::move(tria.reference_cells))
, periodic_face_pairs_level_0(std::move(tria.periodic_face_pairs_level_0))
, periodic_face_map(std::move(tria.periodic_face_map))
, levels(std::move(tria.levels))
Subscriptor::operator=(std::move(tria));
smooth_grid = tria.smooth_grid;
- reference_cell_types = std::move(tria.reference_cell_types);
+ reference_cells = std::move(tria.reference_cells);
periodic_face_pairs_level_0 = std::move(tria.periodic_face_pairs_level_0);
periodic_face_map = std::move(tria.periodic_face_map);
levels = std::move(tria.levels);
clear_despite_subscriptions();
periodic_face_pairs_level_0.clear();
periodic_face_map.clear();
- reference_cell_types.clear();
+ reference_cells.clear();
}
vertices_used = other_tria.vertices_used;
anisotropic_refinement = other_tria.anisotropic_refinement;
smooth_grid = other_tria.smooth_grid;
- reference_cell_types = other_tria.reference_cell_types;
+ reference_cells = other_tria.reference_cells;
if (dim > 1)
faces = std::make_unique<internal::TriangulationImplementation::TriaFaces>(
internal::TriangulationImplementation::Implementation::
create_triangulation(v, cells, subcelldata, *this);
- this->update_reference_cell_types();
+ this->update_reference_cells();
}
catch (...)
{
throw;
}
- if (this->all_reference_cell_types_are_hyper_cube())
+ if (this->all_reference_cells_are_hyper_cube())
{
this->policy =
std::make_unique<internal::TriangulationImplementation::PolicyWrapper<
template <int dim, int spacedim>
void
-Triangulation<dim, spacedim>::update_reference_cell_types()
+Triangulation<dim, spacedim>::update_reference_cells()
{
- std::set<ReferenceCell> reference_cell_types_set;
+ std::set<ReferenceCell> reference_cells_set;
for (auto cell : active_cell_iterators())
if (cell->is_locally_owned())
- reference_cell_types_set.insert(cell->reference_cell_type());
+ reference_cells_set.insert(cell->reference_cell());
- std::vector<ReferenceCell> reference_cell_types(
- reference_cell_types_set.begin(), reference_cell_types_set.end());
+ std::vector<ReferenceCell> reference_cells(reference_cells_set.begin(),
+ reference_cells_set.end());
- this->reference_cell_types = reference_cell_types;
+ this->reference_cells = reference_cells;
}
template <int dim, int spacedim>
const std::vector<ReferenceCell> &
-Triangulation<dim, spacedim>::get_reference_cell_types() const
+Triangulation<dim, spacedim>::get_reference_cells() const
{
- return this->reference_cell_types;
+ return this->reference_cells;
}
template <int dim, int spacedim>
bool
-Triangulation<dim, spacedim>::all_reference_cell_types_are_hyper_cube() const
+Triangulation<dim, spacedim>::all_reference_cells_are_hyper_cube() const
{
- return (this->reference_cell_types.size() == 0) ||
- (this->reference_cell_types.size() == 1 &&
- this->reference_cell_types[0] == ReferenceCell::get_hypercube<dim>());
+ return (this->reference_cells.size() == 0) ||
+ (this->reference_cells.size() == 1 &&
+ this->reference_cells[0] == ReferenceCell::get_hypercube<dim>());
}
{
const TriaRawIterator<CellAccessor<dim, spacedim>> cell_iterator(*this);
return (GeometryInfo<dim>::is_inside_unit_cell(
- reference_cell_type()
+ reference_cell()
.template get_default_linear_mapping<dim, spacedim>()
.transform_real_to_unit_cell(cell_iterator, p)));
}
{
case 2:
{
- if (this->reference_cell_type() == ReferenceCell::Tri)
+ if (this->reference_cell() == ReferenceCell::Tri)
{
const auto neighbor_cell = this->neighbor(face);
return sub_neighbor;
}
- else if (this->reference_cell_type() == ReferenceCell::Quad)
+ else if (this->reference_cell() == ReferenceCell::Quad)
{
const unsigned int neighbor_neighbor =
this->neighbor_of_neighbor(face);
case 3:
{
- if (this->reference_cell_type() == ReferenceCell::Hex)
+ if (this->reference_cell() == ReferenceCell::Hex)
{
// this function returns the neighbor's
// child on a given face and
const UpdateFlags & update_flags,
const Quadrature<dim - 1> & face_quadrature,
const UpdateFlags & face_update_flags)
- : ScratchData(fe.reference_cell_type()
+ : ScratchData(fe.reference_cell()
.template get_default_linear_mapping<dim, spacedim>(),
fe,
quadrature,
const Quadrature<dim - 1> & face_quadrature,
const UpdateFlags & face_update_flags,
const UpdateFlags & neighbor_face_update_flags)
- : ScratchData(fe.reference_cell_type()
+ : ScratchData(fe.reference_cell()
.template get_default_linear_mapping<dim, spacedim>(),
fe,
quadrature,
// TODO: This assumes that the dofs per face on all faces coincide!
const unsigned int face_no = 0;
- Assert(fe.reference_cell_type() == ReferenceCell::get_hypercube<dim>(),
+ Assert(fe.reference_cell() == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
unsigned int increment =
// TODO: This assumes that the dofs per face on all faces coincide!
const unsigned int face_no = 0;
- Assert(fe.reference_cell_type() == ReferenceCell::get_hypercube<dim>(),
+ Assert(fe.reference_cell() == ReferenceCell::get_hypercube<dim>(),
ExcNotImplemented());
Assert(couplings.n_rows() == fe.n_components(),
::dealii::DataOutBase::Patch<DoFHandlerType::dimension,
DoFHandlerType::space_dimension>
patch;
- patch.n_subdivisions = n_subdivisions;
- patch.reference_cell_type = cell_and_index->first->reference_cell_type();
+ patch.n_subdivisions = n_subdivisions;
+ patch.reference_cell = cell_and_index->first->reference_cell();
// initialize FEValues
scratch_data.reinit_all_fe_values(this->dof_data, cell_and_index->first);
(curved_cell_region == curved_boundary &&
(cell_and_index->first->at_boundary() ||
(DoFHandlerType::dimension != DoFHandlerType::space_dimension))) ||
- (cell_and_index->first->reference_cell_type() !=
+ (cell_and_index->first->reference_cell() !=
ReferenceCell::get_hypercube<dim>()))
{
Assert(patch.space_dim == DoFHandlerType::space_dimension,
{
// just call the respective function with Q1 mapping
approximate_derivative_tensor(
- cell->reference_cell_type()
+ cell->reference_cell()
.template get_default_linear_mapping<dim, spacedim>(),
dof,
solution,
std::vector<Point<dim>> face_quadrature_points(
quad_face_support.size());
- QProjector<dim>::project_to_face(this->reference_cell_type(),
+ QProjector<dim>::project_to_face(this->reference_cell(),
quad_face_support,
face_no,
face_quadrature_points);
std::vector<Point<dim>> subface_quadrature_points(
quad_face_support.size());
- QProjector<dim>::project_to_subface(this->reference_cell_type(),
+ QProjector<dim>::project_to_subface(this->reference_cell(),
quad_face_support,
face_no,
subface,
// ---------------------------------------------------------------------
-// Test TriaAccessor::reference_cell_type() on a 1D/2D/3D HEX mesh.
+// Test TriaAccessor::reference_cell() on a 1D/2D/3D HEX mesh.
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria.h>
GridGenerator::subdivided_hyper_cube(tria, 3);
for (const auto &cell : tria.active_cell_iterators())
- deallog << static_cast<int>(cell->reference_cell_type()) << " ";
+ deallog << static_cast<int>(cell->reference_cell()) << " ";
deallog << std::endl;
if (dim != 1)
for (const auto &face : tria.active_face_iterators())
- deallog << static_cast<int>(face->reference_cell_type()) << " ";
+ deallog << static_cast<int>(face->reference_cell()) << " ";
deallog << std::endl;
for (const auto &cell : tria.active_cell_iterators())
for (const auto &face : cell->face_iterators())
- deallog << static_cast<int>(face->reference_cell_type()) << " ";
+ deallog << static_cast<int>(face->reference_cell()) << " ";
deallog << std::endl;
}
std::shared_ptr<MappingFE<dim>> mapping;
- const auto reference_cell_types = tria.get_reference_cell_types();
+ const auto reference_cells = tria.get_reference_cells();
- AssertDimension(reference_cell_types.size(), 1);
+ AssertDimension(reference_cells.size(), 1);
- if (reference_cell_types[0] == ReferenceCell::get_simplex<dim>())
+ if (reference_cells[0] == ReferenceCell::get_simplex<dim>())
mapping = std::make_shared<MappingFE<dim>>(Simplex::FE_P<dim>(1));
- else if (reference_cell_types[0] == ReferenceCell::Wedge)
+ else if (reference_cells[0] == ReferenceCell::Wedge)
mapping = std::make_shared<MappingFE<dim>>(Simplex::FE_WedgeP<dim>(1));
else
AssertThrow(false, ExcNotImplemented());
if (cell->is_locally_owned() == false)
continue;
- if (cell->reference_cell_type() == ReferenceCell::Tri)
+ if (cell->reference_cell() == ReferenceCell::Tri)
cell->set_active_fe_index(0);
- else if (cell->reference_cell_type() == ReferenceCell::Quad)
+ else if (cell->reference_cell() == ReferenceCell::Quad)
cell->set_active_fe_index(1);
else
Assert(false, ExcNotImplemented());
{
deallog << fe.get_name() << ": " << std::endl;
- const auto &reference_cell =
- internal::Info::get_cell(fe.reference_cell_type());
+ const auto &reference_cell = internal::Info::get_cell(fe.reference_cell());
deallog << " n_dofs_per_vertex(): " << fe.n_dofs_per_vertex() << std::endl;
deallog << " n_dofs_per_line(): " << fe.n_dofs_per_line() << std::endl;
Assert(fe.n_blocks() == 1, ExcNotImplemented());
Assert(fe.n_components() == 1, ExcNotImplemented());
- const ReferenceCell type = fe.reference_cell_type();
+ const ReferenceCell type = fe.reference_cell();
const Quadrature<dim> q_gauss =
type.get_gauss_type_quadrature<dim>(fe.tensor_degree() + 1);
Simplex::FE_P_Bubbles<dim, spacedim> fe(degree);
- const ReferenceCell type = fe.reference_cell_type();
+ const ReferenceCell type = fe.reference_cell();
DoFHandler<dim, spacedim> dh(tria);
dh.distribute_dofs(fe);
deallog << "number of dofs = " << dh.n_dofs() << std::endl;
Simplex::FE_P_Bubbles<dim, spacedim> fe(degree);
- const ReferenceCell type = fe.reference_cell_type();
+ const ReferenceCell type = fe.reference_cell();
DoFHandler<dim, spacedim> dh(tria);
dh.distribute_dofs(fe);
deallog << "number of dofs = " << dh.n_dofs() << std::endl;
DoFHandler<dim> dof_handler(tria);
for (const auto &cell : dof_handler.active_cell_iterators())
- if (cell->reference_cell_type() == ReferenceCell::Tri ||
- cell->reference_cell_type() == ReferenceCell::Tet)
+ if (cell->reference_cell() == ReferenceCell::Tri ||
+ cell->reference_cell() == ReferenceCell::Tet)
cell->set_active_fe_index(0);
else
cell->set_active_fe_index(1);
DoFHandler<dim> dof_handler(tria);
for (const auto &cell : dof_handler.active_cell_iterators())
- if (cell->reference_cell_type() == ReferenceCell::Tri ||
- cell->reference_cell_type() == ReferenceCell::Tet)
+ if (cell->reference_cell() == ReferenceCell::Tri ||
+ cell->reference_cell() == ReferenceCell::Tet)
cell->set_active_fe_index(0);
else
cell->set_active_fe_index(1);