16#ifndef dealii_tria_manifold_h
17#define dealii_tria_manifold_h
36template <
int,
typename>
52 template <
typename MeshIteratorType>
53 inline constexpr std::size_t
111 template <
typename MeshIteratorType>
112 std::pair<std::array<Point<MeshIteratorType::AccessorType::space_dimension>,
113 n_default_points_per_cell<MeshIteratorType>()>,
114 std::array<double, n_default_points_per_cell<MeshIteratorType>()>>
116 const bool with_interpolation =
false);
285template <
int dim,
int spacedim = dim>
290 static_assert(dim <= spacedim,
291 "The dimension <dim> of a Manifold must be less than or "
292 "equal to the space dimension <spacedim> in which it lives.");
321 virtual std::unique_ptr<Manifold<dim, spacedim>>
349 const double w)
const;
631template <
int dim,
int spacedim = dim>
668 virtual std::unique_ptr<Manifold<dim, spacedim>>
800 <<
"The component number " << arg1 <<
" of the point [ "
801 << arg2 <<
" ] is not in the interval [ 0, " << arg3
802 <<
"), bailing out.");
898template <
int dim,
int spacedim = dim,
int chartdim = dim>
903 static_assert(dim <= spacedim,
904 "The dimension <dim> of a ChartManifold must be less than or "
905 "equal to the space dimension <spacedim> in which it lives.");
936 const double w)
const override;
1136 template <
typename MeshIteratorType>
1137 std::pair<std::array<Point<MeshIteratorType::AccessorType::space_dimension>,
1138 n_default_points_per_cell<MeshIteratorType>()>,
1139 std::array<double, n_default_points_per_cell<MeshIteratorType>()>>
1141 const bool with_interpolation)
1143 const int dim = MeshIteratorType::AccessorType::structure_dimension;
1144 const int spacedim = MeshIteratorType::AccessorType::space_dimension;
1145 constexpr std::size_t points_per_cell =
1146 n_default_points_per_cell<MeshIteratorType>();
1148 std::pair<std::array<Point<spacedim>, points_per_cell>,
1149 std::array<double, points_per_cell>>
1162 points_weights.first[0] = iterator->vertex(0);
1163 points_weights.second[0] = .5;
1164 points_weights.first[1] = iterator->vertex(1);
1165 points_weights.second[1] = .5;
1171 for (
unsigned int i = 0; i < 4; ++i)
1173 points_weights.first[i] = iterator->vertex(i);
1174 points_weights.first[4 + i] =
1175 (iterator->line(i)->has_children() ?
1176 iterator->line(i)->child(0)->vertex(1) :
1177 iterator->line(i)->get_manifold().get_new_point_on_line(
1178 iterator->line(i)));
1181 if (with_interpolation)
1183 std::fill(points_weights.second.begin(),
1184 points_weights.second.begin() + 4,
1186 std::fill(points_weights.second.begin() + 4,
1187 points_weights.second.end(),
1191 std::fill(points_weights.second.begin(),
1192 points_weights.second.end(),
1204 auto *sp3 =
reinterpret_cast<
1206 *>(&points_weights.first);
1215 if (with_interpolation)
1217 for (
unsigned int i = 0;
1218 i < GeometryInfo<dim>::vertices_per_cell;
1221 (*sp3)[j] = hex->vertex(i);
1222 points_weights.second[j] = 1.0 / 8.0;
1224 for (
unsigned int i = 0; i < GeometryInfo<dim>::lines_per_cell;
1228 (hex->line(i)->has_children() ?
1229 hex->line(i)->child(0)->vertex(1) :
1230 hex->line(i)->get_manifold().get_new_point_on_line(
1232 points_weights.second[j] = -1.0 / 4.0;
1234 for (
unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell;
1238 (hex->quad(i)->has_children() ?
1239 hex->quad(i)->isotropic_child(0)->vertex(3) :
1240 hex->quad(i)->get_manifold().get_new_point_on_quad(
1242 points_weights.second[j] = 1.0 / 2.0;
1248 std::fill(points_weights.second.begin(),
1249 points_weights.second.end(),
1257 return points_weights;
virtual Point< spacedim > push_forward(const Point< chartdim > &chart_point) const =0
const FlatManifold< chartdim, chartdim > sub_manifold
virtual void get_new_points(const ArrayView< const Point< spacedim > > &surrounding_points, const Table< 2, double > &weights, ArrayView< Point< spacedim > > new_points) const override
virtual Point< chartdim > pull_back(const Point< spacedim > &space_point) const =0
virtual Tensor< 1, spacedim > get_tangent_vector(const Point< spacedim > &x1, const Point< spacedim > &x2) const override
virtual DerivativeForm< 1, chartdim, spacedim > push_forward_gradient(const Point< chartdim > &chart_point) const
const Tensor< 1, chartdim > & get_periodicity() const
virtual ~ChartManifold() override=default
virtual Point< spacedim > get_intermediate_point(const Point< spacedim > &p1, const Point< spacedim > &p2, const double w) const override
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights) const override
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const override
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, typename Manifold< dim, spacedim >::FaceVertexNormals &face_vertex_normals) const override
virtual Tensor< 1, spacedim > get_tangent_vector(const Point< spacedim > &x1, const Point< spacedim > &x2) const override
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim > > &points, const Point< spacedim > &candidate) const override
const Tensor< 1, spacedim > & get_periodicity() const
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights) const override
const Tensor< 1, spacedim > periodicity
FlatManifold(const Tensor< 1, spacedim > &periodicity=Tensor< 1, spacedim >(), const double tolerance=1e-10)
virtual void get_new_points(const ArrayView< const Point< spacedim > > &surrounding_points, const Table< 2, double > &weights, ArrayView< Point< spacedim > > new_points) const override
virtual Point< spacedim > get_new_point_on_hex(const typename Triangulation< dim, spacedim >::hex_iterator &hex) const
virtual Point< spacedim > get_new_point_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line) const
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim > > &surrounding_points, const Point< spacedim > &candidate) const
virtual void get_new_points(const ArrayView< const Point< spacedim > > &surrounding_points, const Table< 2, double > &weights, ArrayView< Point< spacedim > > new_points) const
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, FaceVertexNormals &face_vertex_normals) const
virtual ~Manifold() override=default
virtual Tensor< 1, spacedim > get_tangent_vector(const Point< spacedim > &x1, const Point< spacedim > &x2) const
std::array< Tensor< 1, spacedim >, GeometryInfo< dim >::vertices_per_face > FaceVertexNormals
virtual Point< spacedim > get_intermediate_point(const Point< spacedim > &p1, const Point< spacedim > &p2, const double w) const
Point< spacedim > get_new_point_on_face(const typename Triangulation< dim, spacedim >::face_iterator &face) const
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const =0
virtual Point< spacedim > get_new_point_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad) const
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const
Point< spacedim > get_new_point_on_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcPeriodicBox(int arg1, Point< spacedim > arg2, double arg3)
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
#define DeclException3(Exception3, type1, type2, type3, outsequence)
typename IteratorSelector::hex_iterator hex_iterator
typename IteratorSelector::quad_iterator quad_iterator
typename IteratorSelector::line_iterator line_iterator
std::pair< std::array< Point< MeshIteratorType::AccessorType::space_dimension >, n_default_points_per_cell< MeshIteratorType >()>, std::array< double, n_default_points_per_cell< MeshIteratorType >()> > get_default_points_and_weights(const MeshIteratorType &iterator, const bool with_interpolation=false)
constexpr std::size_t n_default_points_per_cell()