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  {
37  template <int dim>
38  class TwoMergedBoxes : public Interface<dim>, public SimulatorAccess<dim>
39  {
40  public:
41 
47  void initialize () override;
48 
53 
59 
65  const std::array<unsigned int, dim> &
66  get_repetitions () const;
67 
73 
80  double length_scale () const override;
81 
95  double depth(const Point<dim> &position) const override;
96 
101  double height_above_reference_surface(const Point<dim> &position) const override;
102 
106  Point<dim> representative_point(const double depth) const override;
107 
111  double maximal_depth() const override;
112 
124  std::set<types::boundary_id>
125  get_used_boundary_indicators () const override;
126 
141  std::map<std::string,types::boundary_id>
143 
148  std::set<std::pair<std::pair<types::boundary_id, types::boundary_id>, unsigned int>>
149  get_periodic_boundary_pairs () const override;
150 
157  void
159  const ArrayView<Point<dim>> &connected_positions = {},
160  const ArrayView<Tensor<1, dim>> &connected_velocities = {}) const override;
161 
167  bool
168  has_curved_elements() const override;
169 
175  bool
176  point_is_in_domain(const Point<dim> &point) const override;
177 
183 
189  std::array<double,dim> cartesian_to_natural_coordinates(const Point<dim> &position) const override;
190 
196  Point<dim> natural_to_cartesian_coordinates(const std::array<double,dim> &position) const override;
197 
201  static
202  void
204 
208  void
210 
214  double
215  get_topography_at_point (const Point<dim> &position ) const;
216 
217  private:
222 
229 
240 
247 
252 
259 
264 
269 
277  bool periodic[dim+dim-1];
278 
284  std::array<unsigned int, dim> lower_repetitions;
285 
292  std::array<unsigned int, dim> upper_repetitions;
293 
298  double height_lith;
299 
303  void
305  };
306  }
307 }
308 
309 
310 #endif
std::array< unsigned int, dim > lower_repetitions
std::array< unsigned int, dim > upper_repetitions
void set_boundary_indicators(parallel::distributed::Triangulation< dim > &triangulation) const
double height_above_reference_surface(const Point< dim > &position) const override
Point< dim > add_topography_to_point(const Point< dim > &x_y_z) const
void add_topography_to_mesh(typename parallel::distributed::Triangulation< dim > &grid) const
std::set< std::pair< std::pair< types::boundary_id, types::boundary_id >, unsigned int > > get_periodic_boundary_pairs() const override
double length_scale() const override
Point< dim > natural_to_cartesian_coordinates(const std::array< double, dim > &position) const override
void parse_parameters(ParameterHandler &prm) override
std::map< std::string, types::boundary_id > get_symbolic_boundary_names_map() const override
void adjust_positions_for_periodicity(Point< dim > &position, const ArrayView< Point< dim >> &connected_positions={}, const ArrayView< Tensor< 1, dim >> &connected_velocities={}) const override
double maximal_depth() const override
void create_coarse_mesh(parallel::distributed::Triangulation< dim > &coarse_grid) const override
double depth(const Point< dim > &position) const override
bool has_curved_elements() const override
bool point_is_in_domain(const Point< dim > &point) const override
std::array< double, dim > cartesian_to_natural_coordinates(const Point< dim > &position) const override
static void declare_parameters(ParameterHandler &prm)
std::set< types::boundary_id > get_used_boundary_indicators() const override
const std::array< unsigned int, dim > & get_repetitions() const
aspect::Utilities::Coordinates::CoordinateSystem natural_coordinate_system() const override
double get_topography_at_point(const Point< dim > &position) const
Point< dim > representative_point(const double depth) const override