Reference documentation for deal.II version 8.5.1
mapping_cartesian.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2001 - 2016 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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/base/table.h>
22 #include <deal.II/fe/mapping.h>
23 
24 #include <cmath>
25 
26 
27 DEAL_II_NAMESPACE_OPEN
28 
31 
60 template <int dim, int spacedim=dim>
61 class MappingCartesian : public Mapping<dim,spacedim>
62 {
63 public:
64 
65  // for documentation, see the Mapping base class
66  virtual
67  Mapping<dim, spacedim> *clone () const;
68 
73  bool preserves_vertex_locations () const;
74 
80  // for documentation, see the Mapping base class
81  virtual
84  const Point<dim> &p) const;
85 
86  // for documentation, see the Mapping base class
87  virtual
90  const Point<spacedim> &p) const;
91 
101  // for documentation, see the Mapping base class
102  virtual
103  void
104  transform (const ArrayView<const Tensor<1,dim> > &input,
105  const MappingType type,
106  const typename Mapping<dim,spacedim>::InternalDataBase &internal,
107  const ArrayView<Tensor<1,spacedim> > &output) const;
108 
109  // for documentation, see the Mapping base class
110  virtual
111  void
113  const MappingType type,
114  const typename Mapping<dim,spacedim>::InternalDataBase &internal,
115  const ArrayView<Tensor<2,spacedim> > &output) const;
116 
117  // for documentation, see the Mapping base class
118  virtual
119  void
120  transform (const ArrayView<const Tensor<2, dim> > &input,
121  const MappingType type,
122  const typename Mapping<dim,spacedim>::InternalDataBase &internal,
123  const ArrayView<Tensor<2,spacedim> > &output) const;
124 
125  // for documentation, see the Mapping base class
126  virtual
127  void
129  const MappingType type,
130  const typename Mapping<dim,spacedim>::InternalDataBase &internal,
131  const ArrayView<Tensor<3,spacedim> > &output) const;
132 
133  // for documentation, see the Mapping base class
134  virtual
135  void
136  transform (const ArrayView<const Tensor<3, dim> > &input,
137  const MappingType type,
138  const typename Mapping<dim,spacedim>::InternalDataBase &internal,
139  const ArrayView<Tensor<3,spacedim> > &output) const;
140 
146 private:
147 
164  class InternalData : public Mapping<dim, spacedim>::InternalDataBase
165  {
166  public:
170  InternalData (const Quadrature<dim> &quadrature);
171 
175  virtual std::size_t memory_consumption () const;
176 
182 
186  mutable double volume_element;
187 
191  std::vector<Point<dim> > quadrature_points;
192  };
193 
194  // documentation can be found in Mapping::requires_update_flags()
195  virtual
197  requires_update_flags (const UpdateFlags update_flags) const;
198 
199  // documentation can be found in Mapping::get_data()
200  virtual
202  get_data (const UpdateFlags,
203  const Quadrature<dim> &quadrature) const;
204 
205  // documentation can be found in Mapping::get_face_data()
206  virtual
208  get_face_data (const UpdateFlags flags,
209  const Quadrature<dim-1>& quadrature) const;
210 
211  // documentation can be found in Mapping::get_subface_data()
212  virtual
214  get_subface_data (const UpdateFlags flags,
215  const Quadrature<dim-1>& quadrature) const;
216 
217  // documentation can be found in Mapping::fill_fe_values()
218  virtual
220  fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
221  const CellSimilarity::Similarity cell_similarity,
222  const Quadrature<dim> &quadrature,
223  const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
225 
226  // documentation can be found in Mapping::fill_fe_face_values()
227  virtual void
228  fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
229  const unsigned int face_no,
230  const Quadrature<dim-1> &quadrature,
231  const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
233 
234  // documentation can be found in Mapping::fill_fe_subface_values()
235  virtual void
236  fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
237  const unsigned int face_no,
238  const unsigned int subface_no,
239  const Quadrature<dim-1> &quadrature,
240  const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
242 
252  void compute_fill (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
253  const unsigned int face_no,
254  const unsigned int sub_no,
255  const CellSimilarity::Similarity cell_similarity,
256  const InternalData &data,
257  std::vector<Point<dim> > &quadrature_points,
258  std::vector<Tensor<1,dim> > &normal_vectors) const;
259 
264 };
265 
268 DEAL_II_NAMESPACE_CLOSE
269 
270 #endif
static const unsigned int invalid_unsigned_int
Definition: types.h:170
void compute_fill(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const CellSimilarity::Similarity cell_similarity, const InternalData &data, std::vector< Point< dim > > &quadrature_points, std::vector< Tensor< 1, dim > > &normal_vectors) const
MappingType
Definition: mapping.h:50
virtual Mapping< dim, spacedim >::InternalDataBase * get_data(const UpdateFlags, const Quadrature< dim > &quadrature) const
virtual void transform(const ArrayView< const Tensor< 1, dim > > &input, const MappingType type, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 1, spacedim > > &output) const
bool preserves_vertex_locations() const
std::vector< Point< dim > > quadrature_points
virtual Mapping< dim, spacedim >::InternalDataBase * get_subface_data(const UpdateFlags flags, const Quadrature< dim-1 > &quadrature) const
virtual std::size_t memory_consumption() const
virtual Point< spacedim > transform_unit_to_real_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< dim > &p) const
UpdateFlags
Abstract base class for mapping classes.
Definition: dof_tools.h:46
virtual Point< dim > transform_real_to_unit_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p) const
virtual Mapping< dim, spacedim >::InternalDataBase * get_face_data(const UpdateFlags flags, const Quadrature< dim-1 > &quadrature) const
static const unsigned int invalid_face_number
virtual Mapping< dim, spacedim > * clone() const
InternalData(const Quadrature< dim > &quadrature)
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const