ASPECT
two_merged_boxes.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2018 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 
26 
27 
28 namespace aspect
29 {
30  namespace GeometryModel
31  {
32  using namespace dealii;
33 
39  template <int dim>
40  class TwoMergedBoxes : public Box<dim>
41  {
42  public:
43 
47  virtual
48  void create_coarse_mesh (parallel::distributed::Triangulation<dim> &coarse_grid) const;
49 
54  Point<dim> get_extents () const;
55 
60  Point<dim> get_origin () const;
61 
68  virtual
69  double length_scale () const;
70 
84  virtual
85  double depth(const Point<dim> &position) const;
86 
87  virtual
88  Point<dim> representative_point(const double depth) const;
89 
90  virtual
91  double maximal_depth() const;
92 
104  virtual
105  std::set<types::boundary_id>
106  get_used_boundary_indicators () const;
107 
122  virtual
123  std::map<std::string,types::boundary_id>
124  get_symbolic_boundary_names_map () const;
125 
130  virtual
131  std::set< std::pair< std::pair<types::boundary_id, types::boundary_id>, unsigned int> >
132  get_periodic_boundary_pairs () const;
133 
139  virtual
140  bool
141  has_curved_elements() const;
142 
148  virtual
149  bool
150  point_is_in_domain(const Point<dim> &point) const;
151 
152  /*
153  * Returns what the natural coordinate system for this geometry model is,
154  * which for two merged boxex is Cartesian.
155  */
156  virtual
157  aspect::Utilities::Coordinates::CoordinateSystem natural_coordinate_system() const;
158 
164  virtual
165  std::array<double,dim> cartesian_to_natural_coordinates(const Point<dim> &position) const;
166 
172  virtual
173  Point<dim> natural_to_cartesian_coordinates(const std::array<double,dim> &position) const;
174 
178  static
179  void
181 
185  virtual
186  void
187  parse_parameters (ParameterHandler &prm);
188 
189  private:
194 
199 
204 
209 
214 
219  bool periodic[dim+dim-1];
220 
224  unsigned int lower_repetitions[dim];
225 
229  unsigned int upper_repetitions[dim];
230 
235  double height_lith;
236 
240  virtual
241  void
242  set_boundary_indicators (parallel::distributed::Triangulation<dim> &triangulation) const;
243 
244  };
245  }
246 }
247 
248 
249 #endif
void declare_parameters(ParameterHandler &prm)
Definition: compat.h:37