|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_tria_manifold_h
17 #define dealii_tria_manifold_h
36 template <
int,
typename>
52 template <
typename MeshIteratorType>
53 inline constexpr std::size_t
111 template <
typename MeshIteratorType>
114 const bool with_interpolation =
false);
158 template <
typename MeshIteratorType>
159 std::pair<std::array<Point<MeshIteratorType::AccessorType::space_dimension>,
160 n_default_points_per_cell<MeshIteratorType>()>,
161 std::array<double, n_default_points_per_cell<MeshIteratorType>()>>
163 const bool with_interpolation =
false);
333 template <
int dim,
int spacedim = dim>
338 static_assert(dim <= spacedim,
339 "The dimension <dim> of a Manifold must be less than or "
340 "equal to the space dimension <spacedim> in which it lives.");
369 virtual std::unique_ptr<Manifold<dim, spacedim>>
397 const double w)
const;
681 template <
int dim,
int spacedim = dim>
718 virtual std::unique_ptr<Manifold<dim, spacedim>>
719 clone()
const override;
850 <<
"The component number " << arg1 <<
" of the point [ "
851 << arg2 <<
" ] is not in the interval [ 0, " << arg3
852 <<
"), bailing out.");
950 template <
int dim,
int spacedim = dim,
int chartdim = dim>
955 static_assert(dim <= spacedim,
956 "The dimension <dim> of a ChartManifold must be less than or "
957 "equal to the space dimension <spacedim> in which it lives.");
988 const double w)
const override;
1188 template <
typename MeshIteratorType>
1191 const bool with_interpolation)
1193 const auto points_and_weights =
1195 static const int spacedim = MeshIteratorType::AccessorType::space_dimension;
1198 points_and_weights.first.end()),
1199 std::vector<double>(points_and_weights.second.begin(),
1200 points_and_weights.second.end()));
1205 template <
typename MeshIteratorType>
1206 std::pair<std::array<Point<MeshIteratorType::AccessorType::space_dimension>,
1207 n_default_points_per_cell<MeshIteratorType>()>,
1208 std::array<double, n_default_points_per_cell<MeshIteratorType>()>>
1210 const bool with_interpolation)
1212 const int dim = MeshIteratorType::AccessorType::structure_dimension;
1213 const int spacedim = MeshIteratorType::AccessorType::space_dimension;
1214 constexpr std::size_t points_per_cell =
1215 n_default_points_per_cell<MeshIteratorType>();
1217 std::pair<std::array<Point<spacedim>, points_per_cell>,
1218 std::array<double, points_per_cell>>
1231 points_weights.first[0] = iterator->vertex(0);
1232 points_weights.second[0] = .5;
1233 points_weights.first[1] = iterator->vertex(1);
1234 points_weights.second[1] = .5;
1240 for (
unsigned int i = 0; i < 4; ++i)
1242 points_weights.first[i] = iterator->vertex(i);
1243 points_weights.first[4 + i] =
1244 (iterator->line(i)->has_children() ?
1245 iterator->line(i)->child(0)->vertex(1) :
1246 iterator->line(i)->get_manifold().get_new_point_on_line(
1247 iterator->line(i)));
1250 if (with_interpolation)
1252 std::fill(points_weights.second.begin(),
1253 points_weights.second.begin() + 4,
1255 std::fill(points_weights.second.begin() + 4,
1256 points_weights.second.end(),
1260 std::fill(points_weights.second.begin(),
1261 points_weights.second.end(),
1273 auto *sp3 =
reinterpret_cast<
1275 *>(&points_weights.first);
1284 if (with_interpolation)
1286 for (
unsigned int i = 0;
1287 i < GeometryInfo<dim>::vertices_per_cell;
1290 (*sp3)[j] = hex->vertex(i);
1291 points_weights.second[j] = 1.0 / 8.0;
1293 for (
unsigned int i = 0; i < GeometryInfo<dim>::lines_per_cell;
1297 (hex->line(i)->has_children() ?
1298 hex->line(i)->child(0)->vertex(1) :
1299 hex->line(i)->get_manifold().get_new_point_on_line(
1301 points_weights.second[j] = -1.0 / 4.0;
1303 for (
unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell;
1307 (hex->quad(i)->has_children() ?
1308 hex->quad(i)->isotropic_child(0)->vertex(3) :
1309 hex->quad(i)->get_manifold().get_new_point_on_quad(
1311 points_weights.second[j] = 1.0 / 2.0;
1317 std::fill(points_weights.second.begin(),
1318 points_weights.second.end(),
1326 return points_weights;
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 ~ChartManifold() override=default
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
Point< spacedim > get_new_point_on_face(const typename Triangulation< dim, spacedim >::face_iterator &face) const
static ::ExceptionBase & ExcPeriodicBox(int arg1, Point< spacedim > arg2, double arg3)
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, FaceVertexNormals &face_vertex_normals) const
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim >> &surrounding_points, const Point< spacedim > &candidate) const
virtual Point< chartdim > pull_back(const Point< spacedim > &space_point) const =0
virtual Point< spacedim > get_intermediate_point(const Point< spacedim > &p1, const Point< spacedim > &p2, const double w) const override
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim >> &points, const Point< spacedim > &candidate) const override
const FlatManifold< chartdim, chartdim > sub_manifold
virtual Point< spacedim > push_forward(const Point< chartdim > &chart_point) const =0
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim >> &surrounding_points, const ArrayView< const double > &weights) const override
virtual Tensor< 1, spacedim > get_tangent_vector(const Point< spacedim > &x1, const Point< spacedim > &x2) const override
virtual Point< spacedim > get_new_point_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad) const
typename IteratorSelector::hex_iterator hex_iterator
virtual Tensor< 1, spacedim > get_tangent_vector(const Point< spacedim > &x1, const Point< spacedim > &x2) const override
const Tensor< 1, spacedim > periodicity
Tensor< 2, dim, Number > w(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
virtual ~Manifold() override=default
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const override
ChartManifold(const Tensor< 1, chartdim > &periodicity=Tensor< 1, chartdim >())
typename IteratorSelector::quad_iterator quad_iterator
constexpr std::size_t n_default_points_per_cell()
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim >> &surrounding_points, const ArrayView< const double > &weights) const override
#define DEAL_II_NAMESPACE_OPEN
const Tensor< 1, spacedim > & get_periodicity() const
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const =0
#define DeclException3(Exception3, type1, type2, type3, outsequence)
std::array< Tensor< 1, spacedim >, GeometryInfo< dim >::vertices_per_face > FaceVertexNormals
#define DEAL_II_DEPRECATED
Quadrature< MeshIteratorType::AccessorType::space_dimension > get_default_quadrature(const MeshIteratorType &iterator, const bool with_interpolation=false)
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim >> &surrounding_points, const ArrayView< const double > &weights) const
static ::ExceptionBase & ExcInternalError()
#define Assert(cond, exc)
virtual Tensor< 1, spacedim > get_tangent_vector(const Point< spacedim > &x1, const Point< spacedim > &x2) const
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)
const Tensor< 1, chartdim > & get_periodicity() const
virtual Point< spacedim > get_intermediate_point(const Point< spacedim > &p1, const Point< spacedim > &p2, const double w) 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 Point< spacedim > get_new_point_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line) const
#define DEAL_II_NAMESPACE_CLOSE
virtual DerivativeForm< 1, chartdim, spacedim > push_forward_gradient(const Point< chartdim > &chart_point) const
Point< spacedim > get_new_point_on_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
typename IteratorSelector::line_iterator line_iterator
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