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;
634template <
int dim,
int spacedim = dim>
671 virtual std::unique_ptr<Manifold<dim, spacedim>>
803 <<
"The component number " << arg1 <<
" of the point [ "
804 << arg2 <<
" ] is not in the interval [ 0, " << arg3
805 <<
"), bailing out.");
901template <
int dim,
int spacedim = dim,
int chartdim = dim>
906 static_assert(dim <= spacedim,
907 "The dimension <dim> of a ChartManifold must be less than or "
908 "equal to the space dimension <spacedim> in which it lives.");
939 const double w)
const override;
1139 template <
typename MeshIteratorType>
1140 std::pair<std::array<Point<MeshIteratorType::AccessorType::space_dimension>,
1141 n_default_points_per_cell<MeshIteratorType>()>,
1142 std::array<double, n_default_points_per_cell<MeshIteratorType>()>>
1144 const bool with_interpolation)
1146 const int dim = MeshIteratorType::AccessorType::structure_dimension;
1147 const int spacedim = MeshIteratorType::AccessorType::space_dimension;
1148 constexpr std::size_t points_per_cell =
1149 n_default_points_per_cell<MeshIteratorType>();
1151 std::pair<std::array<Point<spacedim>, points_per_cell>,
1152 std::array<double, points_per_cell>>
1165 points_weights.first[0] = iterator->vertex(0);
1166 points_weights.second[0] = .5;
1167 points_weights.first[1] = iterator->vertex(1);
1168 points_weights.second[1] = .5;
1174 for (
unsigned int i = 0; i < 4; ++i)
1176 points_weights.first[i] = iterator->vertex(i);
1177 points_weights.first[4 + i] =
1178 (iterator->line(i)->has_children() ?
1179 iterator->line(i)->child(0)->vertex(1) :
1180 iterator->line(i)->get_manifold().get_new_point_on_line(
1181 iterator->line(i)));
1184 if (with_interpolation)
1186 std::fill(points_weights.second.begin(),
1187 points_weights.second.begin() + 4,
1189 std::fill(points_weights.second.begin() + 4,
1190 points_weights.second.end(),
1194 std::fill(points_weights.second.begin(),
1195 points_weights.second.end(),
1207 auto *sp3 =
reinterpret_cast<
1209 *>(&points_weights.first);
1218 if (with_interpolation)
1220 for (
unsigned int i = 0;
1221 i < GeometryInfo<dim>::vertices_per_cell;
1224 (*sp3)[j] = hex->vertex(i);
1225 points_weights.second[j] = 1.0 / 8.0;
1227 for (
unsigned int i = 0; i < GeometryInfo<dim>::lines_per_cell;
1231 (hex->line(i)->has_children() ?
1232 hex->line(i)->child(0)->vertex(1) :
1233 hex->line(i)->get_manifold().get_new_point_on_line(
1235 points_weights.second[j] = -1.0 / 4.0;
1237 for (
unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell;
1241 (hex->quad(i)->has_children() ?
1242 hex->quad(i)->isotropic_child(0)->vertex(3) :
1243 hex->quad(i)->get_manifold().get_new_point_on_quad(
1245 points_weights.second[j] = 1.0 / 2.0;
1251 std::fill(points_weights.second.begin(),
1252 points_weights.second.end(),
1260 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()