ASPECT
two_merged_boxes.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2020 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  virtual
145  void
146  adjust_positions_for_periodicity (Point<dim> &position,
147  const ArrayView<Point<dim>> &connected_positions = {}) const;
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:
202  Point<dim> extents;
203 
207  Point<dim> lower_extents;
208 
212  Point<dim> lower_box_origin;
213 
217  Point<dim> upper_extents;
218 
222  Point<dim> upper_box_origin;
223 
228  bool periodic[dim+dim-1];
229 
233  unsigned int lower_repetitions[dim];
234 
238  unsigned int upper_repetitions[dim];
239 
244  double height_lith;
245 
249  virtual
250  void
251  set_boundary_indicators (parallel::distributed::Triangulation<dim> &triangulation) const;
252 
253  };
254  }
255 }
256 
257 
258 #endif
void declare_parameters(ParameterHandler &prm)