ASPECT
two_merged_boxes.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2023 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_two_merged_boxes_h
23 #define _aspect_geometry_model_two_merged_boxes_h
24 
27 
28 namespace aspect
29 {
30  namespace GeometryModel
31  {
32  using namespace dealii;
33 
39  template <int dim>
40  class TwoMergedBoxes : public Interface<dim>, public SimulatorAccess<dim>
41  {
42  public:
43 
47  void create_coarse_mesh (parallel::distributed::Triangulation<dim> &coarse_grid) const override;
48 
53  Point<dim> get_extents () const;
54 
59  Point<dim> get_origin () const;
60 
67  double length_scale () const override;
68 
82  double depth(const Point<dim> &position) const override;
83 
88  double height_above_reference_surface(const Point<dim> &position) const override;
89 
93  Point<dim> representative_point(const double depth) const override;
94 
98  double maximal_depth() const override;
99 
111  std::set<types::boundary_id>
112  get_used_boundary_indicators () const override;
113 
128  std::map<std::string,types::boundary_id>
129  get_symbolic_boundary_names_map () const override;
130 
135  std::set<std::pair<std::pair<types::boundary_id, types::boundary_id>, unsigned int>>
136  get_periodic_boundary_pairs () const override;
137 
144  void
145  adjust_positions_for_periodicity (Point<dim> &position,
146  const ArrayView<Point<dim>> &connected_positions = {},
147  const ArrayView<Tensor<1, dim>> &connected_velocities = {}) const override;
148 
154  bool
155  has_curved_elements() const override;
156 
162  bool
163  point_is_in_domain(const Point<dim> &point) const override;
164 
169  aspect::Utilities::Coordinates::CoordinateSystem natural_coordinate_system() const override;
170 
176  std::array<double,dim> cartesian_to_natural_coordinates(const Point<dim> &position) const override;
177 
183  Point<dim> natural_to_cartesian_coordinates(const std::array<double,dim> &position) const override;
184 
188  static
189  void
190  declare_parameters (ParameterHandler &prm);
191 
195  void
196  parse_parameters (ParameterHandler &prm) override;
197 
198  private:
207 
211  Point<dim> extents;
212 
216  Point<dim> lower_extents;
217 
221  Point<dim> lower_box_origin;
222 
226  Point<dim> upper_extents;
227 
231  Point<dim> upper_box_origin;
232 
237  bool periodic[dim+dim-1];
238 
242  std::array<unsigned int, dim> lower_repetitions;
243 
247  std::array<unsigned int, dim> upper_repetitions;
248 
253  double height_lith;
254 
258  void
259  set_boundary_indicators (parallel::distributed::Triangulation<dim> &triangulation) const;
260  };
261  }
262 }
263 
264 
265 #endif
std::array< unsigned int, dim > upper_repetitions
void declare_parameters(ParameterHandler &prm)
std::array< unsigned int, dim > lower_repetitions
Definition: compat.h:59
Definition: compat.h:42