Reference documentation for deal.II version 9.5.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\}}\)
Loading...
Searching...
No Matches
mapping_cartesian.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2001 - 2022 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_mapping_cartesian_h
17#define dealii_mapping_cartesian_h
18
19
20#include <deal.II/base/config.h>
21
23
24#include <deal.II/fe/mapping.h>
25
26#include <cmath>
27
28
30
78template <int dim, int spacedim = dim>
79class MappingCartesian : public Mapping<dim, spacedim>
80{
81public:
82 // for documentation, see the Mapping base class
83 virtual std::unique_ptr<Mapping<dim, spacedim>>
84 clone() const override;
85
90 virtual bool
91 preserves_vertex_locations() const override;
92
93 virtual bool
94 is_compatible_with(const ReferenceCell &reference_cell) const override;
95
101 // for documentation, see the Mapping base class
102 virtual Point<spacedim>
105 const Point<dim> &p) const override;
106
107 // for documentation, see the Mapping base class
108 virtual Point<dim>
111 const Point<spacedim> &p) const override;
112
122 // for documentation, see the Mapping base class
123 virtual void
124 transform(const ArrayView<const Tensor<1, dim>> & input,
125 const MappingKind kind,
127 const ArrayView<Tensor<1, spacedim>> &output) const override;
128
129 // for documentation, see the Mapping base class
130 virtual void
132 const MappingKind kind,
134 const ArrayView<Tensor<2, spacedim>> &output) const override;
135
136 // for documentation, see the Mapping base class
137 virtual void
138 transform(const ArrayView<const Tensor<2, dim>> & input,
139 const MappingKind kind,
141 const ArrayView<Tensor<2, spacedim>> &output) const override;
142
143 // for documentation, see the Mapping base class
144 virtual void
146 const MappingKind kind,
148 const ArrayView<Tensor<3, spacedim>> &output) const override;
149
150 // for documentation, see the Mapping base class
151 virtual void
152 transform(const ArrayView<const Tensor<3, dim>> & input,
153 const MappingKind kind,
155 const ArrayView<Tensor<3, spacedim>> &output) const override;
156
178 void
181 const ArrayView<const Point<dim>> & unit_points,
182 const UpdateFlags update_flags,
184 &output_data) const;
185
202 class InternalData : public Mapping<dim, spacedim>::InternalDataBase
203 {
204 public:
208 InternalData() = default;
209
213 InternalData(const Quadrature<dim> &quadrature);
214
218 virtual std::size_t
219 memory_consumption() const override;
220
226
230 mutable double volume_element;
231
235 std::vector<Point<dim>> quadrature_points;
236 };
237
238private:
239 // documentation can be found in Mapping::requires_update_flags()
240 virtual UpdateFlags
241 requires_update_flags(const UpdateFlags update_flags) const override;
242
243 // documentation can be found in Mapping::get_data()
244 virtual std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
245 get_data(const UpdateFlags, const Quadrature<dim> &quadrature) const override;
246
247 using Mapping<dim, spacedim>::get_face_data;
248
249 // documentation can be found in Mapping::get_face_data()
250 virtual std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
251 get_face_data(const UpdateFlags flags,
252 const hp::QCollection<dim - 1> &quadrature) const override;
253
254 // documentation can be found in Mapping::get_subface_data()
255 virtual std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
256 get_subface_data(const UpdateFlags flags,
257 const Quadrature<dim - 1> &quadrature) const override;
258
259 // documentation can be found in Mapping::fill_fe_values()
263 const CellSimilarity::Similarity cell_similarity,
264 const Quadrature<dim> & quadrature,
265 const typename Mapping<dim, spacedim>::InternalDataBase & internal_data,
267 &output_data) const override;
268
269 using Mapping<dim, spacedim>::fill_fe_face_values;
270
271 // documentation can be found in Mapping::fill_fe_face_values()
272 virtual void
275 const unsigned int face_no,
276 const hp::QCollection<dim - 1> & quadrature,
277 const typename Mapping<dim, spacedim>::InternalDataBase & internal_data,
279 &output_data) const override;
280
281 // documentation can be found in Mapping::fill_fe_subface_values()
282 virtual void
285 const unsigned int face_no,
286 const unsigned int subface_no,
287 const Quadrature<dim - 1> & quadrature,
288 const typename Mapping<dim, spacedim>::InternalDataBase & internal_data,
290 &output_data) const override;
291
292 // documentation can be found in Mapping::fill_fe_immersed_surface_values()
293 virtual void
297 const typename Mapping<dim, spacedim>::InternalDataBase & internal_data,
299 &output_data) const override;
300
309 void
312 const CellSimilarity::Similarity cell_similarity,
313 const InternalData & data) const;
314
321 void
324 const InternalData & data,
325 std::vector<Point<dim>> &quadrature_points) const;
326
333 void
336 const unsigned int face_no,
337 const InternalData & data,
338 std::vector<Point<dim>> &quadrature_points) const;
339
346 void
349 const unsigned int face_no,
350 const unsigned int sub_no,
351 const InternalData & data,
352 std::vector<Point<dim>> &quadrature_points) const;
353
360 void
363 const InternalData & data,
364 const typename QProjector<dim>::DataSetDescriptor & offset,
365 std::vector<Point<dim>> &quadrature_points) const;
366
371 void
373 const unsigned int face_no,
374 const InternalData & data,
375 std::vector<Tensor<1, dim>> &normal_vectors) const;
376
382 void
384 const InternalData & data,
385 const CellSimilarity::Similarity cell_similarity,
387 &output_data) const;
388
389
394 void
396
401 void
403 const InternalData & data,
404 const CellSimilarity::Similarity cell_similarity,
406 &output_data) const;
407
412 void
414 const InternalData & data,
415 const CellSimilarity::Similarity cell_similarity,
417 &output_data) const;
418};
419
423
424#endif
std::vector< Point< dim > > quadrature_points
virtual std::size_t memory_consumption() const override
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
void maybe_update_volume_elements(const InternalData &data) const
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags flags, const hp::QCollection< dim - 1 > &quadrature) const override
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_subface_data(const UpdateFlags flags, const Quadrature< dim - 1 > &quadrature) const override
void update_cell_extents(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const InternalData &data) const
virtual void fill_fe_immersed_surface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const NonMatching::ImmersedSurfaceQuadrature< dim > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
void maybe_update_jacobians(const InternalData &data, const CellSimilarity::Similarity cell_similarity, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const
void maybe_update_subface_quadrature_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const InternalData &data, std::vector< Point< dim > > &quadrature_points) const
virtual CellSimilarity::Similarity fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
void maybe_update_face_quadrature_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const InternalData &data, std::vector< Point< dim > > &quadrature_points) const
virtual bool is_compatible_with(const ReferenceCell &reference_cell) const override
void maybe_update_cell_quadrature_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const InternalData &data, std::vector< Point< dim > > &quadrature_points) const
virtual bool preserves_vertex_locations() const override
virtual Point< spacedim > transform_unit_to_real_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< dim > &p) const override
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
virtual Point< dim > transform_real_to_unit_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p) const override
void fill_mapping_data_for_generic_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const ArrayView< const Point< dim > > &unit_points, const UpdateFlags update_flags, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const
void transform_quadrature_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const InternalData &data, const typename QProjector< dim >::DataSetDescriptor &offset, std::vector< Point< dim > > &quadrature_points) const
void maybe_update_jacobian_derivatives(const InternalData &data, const CellSimilarity::Similarity cell_similarity, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const
virtual void transform(const ArrayView< const Tensor< 1, dim > > &input, const MappingKind kind, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 1, spacedim > > &output) const override
void maybe_update_normal_vectors(const unsigned int face_no, const InternalData &data, std::vector< Tensor< 1, dim > > &normal_vectors) const
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags, const Quadrature< dim > &quadrature) const override
void maybe_update_inverse_jacobians(const InternalData &data, const CellSimilarity::Similarity cell_similarity, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const Quadrature< dim - 1 > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
Abstract base class for mapping classes.
Definition mapping.h:317
Definition point.h:112
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
UpdateFlags
MappingKind
Definition mapping.h:78