ASPECT
box.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2024 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_box_h
23 #define _aspect_geometry_model_box_h
24 
27 
28 
29 namespace aspect
30 {
31  namespace GeometryModel
32  {
37  template <int dim>
38  class Box : public Interface<dim>, public SimulatorAccess<dim>
39  {
40  public:
46  void initialize () override;
47 
51  void topography (typename parallel::distributed::Triangulation<dim> &grid) const;
52 
58  Point<dim> add_topography (const Point<dim> &x_y_z) const;
59 
63  void create_coarse_mesh (parallel::distributed::Triangulation<dim> &coarse_grid) const override;
64 
69  virtual
70  Point<dim> get_extents () const;
71 
76  const std::array<unsigned int, dim> &
77  get_repetitions () const;
78 
83  virtual
84  Point<dim> get_origin () const;
85 
92  double length_scale () const override;
93 
94 
111  double depth(const Point<dim> &position) const override;
112 
117  double height_above_reference_surface(const Point<dim> &position) const override;
118 
122  Point<dim> representative_point(const double depth) const override;
123 
127  double maximal_depth() const override;
128 
138  std::set<types::boundary_id>
139  get_used_boundary_indicators () const override;
140 
153  std::map<std::string,types::boundary_id>
154  get_symbolic_boundary_names_map () const override;
155 
160  std::set<std::pair<std::pair<types::boundary_id, types::boundary_id>, unsigned int>>
161  get_periodic_boundary_pairs () const override;
162 
169  void
170  adjust_positions_for_periodicity (Point<dim> &position,
171  const ArrayView<Point<dim>> &connected_positions = {},
172  const ArrayView<Tensor<1, dim>> &connected_velocities = {}) const override;
173 
179  bool
180  has_curved_elements() const override;
181 
187  bool
188  point_is_in_domain(const Point<dim> &point) const override;
189 
195 
201  std::array<double,dim> cartesian_to_natural_coordinates(const Point<dim> &position) const override;
202 
208  Point<dim> natural_to_cartesian_coordinates(const std::array<double,dim> &position) const override;
209 
213  static
214  void
215  declare_parameters (ParameterHandler &prm);
216 
220  void
221  parse_parameters (ParameterHandler &prm) override;
222 
223  private:
228 
232  Point<dim> extents;
233 
237  Point<dim> box_origin;
238 
242  std::array<bool, dim> periodic;
243 
247  std::array<unsigned int, dim> repetitions;
248  };
249  }
250 }
251 
252 
253 #endif
Point< dim > extents
Definition: box.h:232
std::array< double, dim > cartesian_to_natural_coordinates(const Point< dim > &position) 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 depth(const Point< dim > &position) const override
bool point_is_in_domain(const Point< dim > &point) const override
Point< dim > box_origin
Definition: box.h:237
InitialTopographyModel::Interface< dim > * topo_model
Definition: box.h:227
std::map< std::string, types::boundary_id > get_symbolic_boundary_names_map() const override
std::set< std::pair< std::pair< types::boundary_id, types::boundary_id >, unsigned int > > get_periodic_boundary_pairs() const override
bool has_curved_elements() const override
std::array< unsigned int, dim > repetitions
Definition: box.h:247
Point< dim > add_topography(const Point< dim > &x_y_z) const
double length_scale() const override
aspect::Utilities::Coordinates::CoordinateSystem natural_coordinate_system() const override
static void declare_parameters(ParameterHandler &prm)
std::set< types::boundary_id > get_used_boundary_indicators() const override
double height_above_reference_surface(const Point< dim > &position) const override
const std::array< unsigned int, dim > & get_repetitions() const
Point< dim > representative_point(const double depth) const override
void create_coarse_mesh(parallel::distributed::Triangulation< dim > &coarse_grid) const override
Definition: compat.h:59
Point< dim > natural_to_cartesian_coordinates(const std::array< double, dim > &position) const override
std::array< bool, dim > periodic
Definition: box.h:242
virtual Point< dim > get_origin() const
void parse_parameters(ParameterHandler &prm) override
void initialize() override
virtual Point< dim > get_extents() const
double maximal_depth() const override
void topography(typename parallel::distributed::Triangulation< dim > &grid) const