ASPECT
sphere.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 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 #ifndef _aspect_geometry_model_sphere_h
21 #define _aspect_geometry_model_sphere_h
22 
25 
26 namespace aspect
27 {
28  namespace GeometryModel
29  {
30  template <int dim>
31  class Sphere : public Interface<dim>, public SimulatorAccess<dim>
32  {
33  public:
37  Sphere() = default;
38 
42  void create_coarse_mesh (parallel::distributed::Triangulation<dim> &coarse_grid) const override;
43 
51  double length_scale () const override;
52 
66  double depth(const Point<dim> &position) const override;
67 
72  double height_above_reference_surface(const Point<dim> &position) const override;
73 
77  Point<dim> representative_point(const double depth) const override;
78 
82  double maximal_depth() const override;
83 
91  std::set<types::boundary_id>
92  get_used_boundary_indicators () const override;
93 
99  std::map<std::string,types::boundary_id>
100  get_symbolic_boundary_names_map () const override;
101 
107  bool
108  has_curved_elements() const override;
109 
115 
121  bool
122  point_is_in_domain(const Point<dim> &point) const override;
123 
129  std::array<double,dim> cartesian_to_natural_coordinates(const Point<dim> &position) const override;
130 
136  Point<dim> natural_to_cartesian_coordinates(const std::array<double,dim> &position) const override;
137 
138 
139  static
140  void
141  declare_parameters (ParameterHandler &prm);
142 
143  void
144  parse_parameters (ParameterHandler &prm) override;
145 
149  double
150  radius () const;
151 
152  private:
156  double R;
157  };
158  }
159 }
160 
161 
162 #endif
void parse_parameters(ParameterHandler &prm) override
double height_above_reference_surface(const Point< dim > &position) const override
std::set< types::boundary_id > get_used_boundary_indicators() const override
bool has_curved_elements() const override
double maximal_depth() const override
static void declare_parameters(ParameterHandler &prm)
std::map< std::string, types::boundary_id > get_symbolic_boundary_names_map() const override
double depth(const Point< dim > &position) const override
aspect::Utilities::Coordinates::CoordinateSystem natural_coordinate_system() const override
Point< dim > representative_point(const double depth) const override
double length_scale() const override
Point< dim > natural_to_cartesian_coordinates(const std::array< double, dim > &position) const override
std::array< double, dim > cartesian_to_natural_coordinates(const Point< dim > &position) const override
void create_coarse_mesh(parallel::distributed::Triangulation< dim > &coarse_grid) const override
Definition: compat.h:59
bool point_is_in_domain(const Point< dim > &point) const override