ASPECT
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
52  void create_coarse_mesh (parallel::distributed::Triangulation<dim> &coarse_grid) const override;
53 
58  Point<dim> get_extents () const;
59 
64  Point<dim> get_origin () const;
65 
72  double length_scale () const override;
73 
87  double depth(const Point<dim> &position) const override;
88 
93  double height_above_reference_surface(const Point<dim> &position) const override;
94 
98  Point<dim> representative_point(const double depth) const override;
99 
103  double maximal_depth() const override;
104 
116  std::set<types::boundary_id>
117  get_used_boundary_indicators () const override;
118 
133  std::map<std::string,types::boundary_id>
134  get_symbolic_boundary_names_map () const override;
135 
140  std::set<std::pair<std::pair<types::boundary_id, types::boundary_id>, unsigned int>>
141  get_periodic_boundary_pairs () const override;
142 
149  void
150  adjust_positions_for_periodicity (Point<dim> &position,
151  const ArrayView<Point<dim>> &connected_positions = {},
152  const ArrayView<Tensor<1, dim>> &connected_velocities = {}) const override;
153 
159  bool
160  has_curved_elements() const override;
161 
167  bool
168  point_is_in_domain(const Point<dim> &point) const override;
169 
175 
181  std::array<double,dim> cartesian_to_natural_coordinates(const Point<dim> &position) const override;
182 
188  Point<dim> natural_to_cartesian_coordinates(const std::array<double,dim> &position) const override;
189 
193  static
194  void
195  declare_parameters (ParameterHandler &prm);
196 
200  void
201  parse_parameters (ParameterHandler &prm) override;
202 
206  double
207  get_topography_at_point (const Point<dim> &position ) const;
208 
209  private:
213  void add_topography_to_mesh (typename parallel::distributed::Triangulation<dim> &grid) const;
214 
220  Point<dim> add_topography_to_point (const Point<dim> &x_y_z) const;
221 
230 
234  Point<dim> extents;
235 
239  Point<dim> lower_extents;
240 
244  Point<dim> lower_box_origin;
245 
249  Point<dim> upper_extents;
250 
254  Point<dim> upper_box_origin;
255 
260  bool periodic[dim+dim-1];
261 
265  std::array<unsigned int, dim> lower_repetitions;
266 
270  std::array<unsigned int, dim> upper_repetitions;
271 
276  double height_lith;
277 
281  void
282  set_boundary_indicators (parallel::distributed::Triangulation<dim> &triangulation) const;
283  };
284  }
285 }
286 
287 
288 #endif
void create_coarse_mesh(parallel::distributed::Triangulation< dim > &coarse_grid) const override
std::set< std::pair< std::pair< types::boundary_id, types::boundary_id >, unsigned int > > get_periodic_boundary_pairs() const override
double maximal_depth() const override
bool has_curved_elements() const override
double depth(const Point< dim > &position) const override
std::array< unsigned int, dim > upper_repetitions
void set_boundary_indicators(parallel::distributed::Triangulation< dim > &triangulation) const
Point< dim > add_topography_to_point(const Point< dim > &x_y_z) const
std::set< types::boundary_id > get_used_boundary_indicators() const override
aspect::Utilities::Coordinates::CoordinateSystem natural_coordinate_system() const override
std::array< unsigned int, dim > lower_repetitions
void add_topography_to_mesh(typename parallel::distributed::Triangulation< dim > &grid) const
double height_above_reference_surface(const Point< dim > &position) const 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 length_scale() const override
bool point_is_in_domain(const Point< dim > &point) const override
void parse_parameters(ParameterHandler &prm) override
double get_topography_at_point(const Point< dim > &position) const
Point< dim > natural_to_cartesian_coordinates(const std::array< double, dim > &position) const override
static void declare_parameters(ParameterHandler &prm)
Point< dim > representative_point(const double depth) const override
std::array< double, dim > cartesian_to_natural_coordinates(const Point< dim > &position) const override