ASPECT
box.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2022 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _aspect_geometry_model_box_h
23 #define _aspect_geometry_model_box_h
24 
27 
28 
29 namespace aspect
30 {
31  namespace GeometryModel
32  {
33  using namespace dealii;
34 
39  template <int dim>
40  class Box : public Interface<dim>, public SimulatorAccess<dim>
41  {
42  public:
48  void initialize () override;
49 
53  void topography (typename parallel::distributed::Triangulation<dim> &grid) const;
54 
60  Point<dim> add_topography (const Point<dim> &x_y_z) const;
61 
65  void create_coarse_mesh (parallel::distributed::Triangulation<dim> &coarse_grid) const override;
66 
71  virtual
72  Point<dim> get_extents () const;
73 
78  virtual
79  Point<dim> get_origin () const;
80 
87  double length_scale () const override;
88 
89 
106  double depth(const Point<dim> &position) const override;
107 
112  double height_above_reference_surface(const Point<dim> &position) const override;
113 
117  Point<dim> representative_point(const double depth) const override;
118 
122  double maximal_depth() const override;
123 
133  std::set<types::boundary_id>
134  get_used_boundary_indicators () const override;
135 
148  std::map<std::string,types::boundary_id>
149  get_symbolic_boundary_names_map () const override;
150 
155  std::set<std::pair<std::pair<types::boundary_id, types::boundary_id>, unsigned int>>
156  get_periodic_boundary_pairs () const override;
157 
164  void
165  adjust_positions_for_periodicity (Point<dim> &position,
166  const ArrayView<Point<dim>> &connected_positions = {}) const override;
167 
173  bool
174  has_curved_elements() const override;
175 
181  bool
182  point_is_in_domain(const Point<dim> &point) const override;
183 
188  aspect::Utilities::Coordinates::CoordinateSystem natural_coordinate_system() const override;
189 
195  std::array<double,dim> cartesian_to_natural_coordinates(const Point<dim> &position) const override;
196 
202  Point<dim> natural_to_cartesian_coordinates(const std::array<double,dim> &position) const override;
203 
207  static
208  void
209  declare_parameters (ParameterHandler &prm);
210 
214  void
215  parse_parameters (ParameterHandler &prm) override;
216 
217  private:
221  Point<dim> extents;
222 
226  Point<dim> box_origin;
227 
231  bool periodic[dim];
232 
236  unsigned int repetitions[dim];
237 
242  };
243  }
244 }
245 
246 
247 #endif
Point< dim > extents
Definition: box.h:221
Point< dim > box_origin
Definition: box.h:226
InitialTopographyModel::Interface< dim > * topo_model
Definition: box.h:241
void declare_parameters(ParameterHandler &prm)
Definition: compat.h:88