ASPECT
box.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2024 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  const std::array<unsigned int, dim> &
79  get_repetitions () const;
80 
85  virtual
86  Point<dim> get_origin () const;
87 
94  double length_scale () const override;
95 
96 
113  double depth(const Point<dim> &position) const override;
114 
119  double height_above_reference_surface(const Point<dim> &position) const override;
120 
124  Point<dim> representative_point(const double depth) const override;
125 
129  double maximal_depth() const override;
130 
140  std::set<types::boundary_id>
141  get_used_boundary_indicators () const override;
142 
155  std::map<std::string,types::boundary_id>
156  get_symbolic_boundary_names_map () const override;
157 
162  std::set<std::pair<std::pair<types::boundary_id, types::boundary_id>, unsigned int>>
163  get_periodic_boundary_pairs () const override;
164 
171  void
172  adjust_positions_for_periodicity (Point<dim> &position,
173  const ArrayView<Point<dim>> &connected_positions = {},
174  const ArrayView<Tensor<1, dim>> &connected_velocities = {}) const override;
175 
181  bool
182  has_curved_elements() const override;
183 
189  bool
190  point_is_in_domain(const Point<dim> &point) const override;
191 
196  aspect::Utilities::Coordinates::CoordinateSystem natural_coordinate_system() const override;
197 
203  std::array<double,dim> cartesian_to_natural_coordinates(const Point<dim> &position) const override;
204 
210  Point<dim> natural_to_cartesian_coordinates(const std::array<double,dim> &position) const override;
211 
215  static
216  void
217  declare_parameters (ParameterHandler &prm);
218 
222  void
223  parse_parameters (ParameterHandler &prm) override;
224 
225  private:
230 
234  Point<dim> extents;
235 
239  Point<dim> box_origin;
240 
244  std::array<bool, dim> periodic;
245 
249  std::array<unsigned int, dim> repetitions;
250  };
251  }
252 }
253 
254 
255 #endif
Point< dim > extents
Definition: box.h:234
Point< dim > box_origin
Definition: box.h:239
InitialTopographyModel::Interface< dim > * topo_model
Definition: box.h:229
std::array< unsigned int, dim > repetitions
Definition: box.h:249
void declare_parameters(ParameterHandler &prm)
Definition: compat.h:59
std::array< bool, dim > periodic
Definition: box.h:244
Definition: compat.h:42