World Builder  1.1.0-pre
A geodynamic initial conditions generator
spherical.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018-2024 by the authors of the World Builder code.
3 
4  This file is part of the World Builder.
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program 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 Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef WORLD_BUILDER_COORDINATE_SYSTEMS_SPHERICAL_H
21 #define WORLD_BUILDER_COORDINATE_SYSTEMS_SPHERICAL_H
22 
24 
25 #include <string>
26 
27 namespace WorldBuilder
28 {
29 
30  namespace CoordinateSystems
31  {
35  //WB_REGISTER_COORDINATE_SYSTEM_HEADER(Spherical)
36 
42  class Spherical final : public Interface
43  {
44  public:
49 
53  ~Spherical() override final;
54 
58  static
59  void declare_entries(Parameters &prm, const std::string &parent_name = "");
60 
64  void parse_entries(Parameters &prm) override final;
65 
66 
70  CoordinateSystem natural_coordinate_system() const override final;
71 
77  DepthMethod depth_method() const override final;
78 
86  std::array<double,3> cartesian_to_natural_coordinates(const std::array<double,3> &position) const override final;
87 
93  std::array<double,3> natural_to_cartesian_coordinates(const std::array<double,3> &position) const override final;
94 
95 
106  double distance_between_points_at_same_depth(const Point<3> &point_1, const Point<3> &point_2) const override final;
107 
112  virtual
113  double max_model_depth() const override final;
114 
119 
120  private:
126  };
127  } // namespace CoordinateSystems
128 } // namespace WorldBuilder
129 
130 #endif
void parse_entries(Parameters &prm) override final
Definition: spherical.cc:65
Spherical(WorldBuilder::World *world)
Definition: spherical.cc:31
std::array< double, 3 > natural_to_cartesian_coordinates(const std::array< double, 3 > &position) const override final
Definition: spherical.cc:111
virtual double max_model_depth() const override final
Definition: spherical.cc:135
static void declare_entries(Parameters &prm, const std::string &parent_name="")
Definition: spherical.cc:40
CoordinateSystem natural_coordinate_system() const override final
Definition: spherical.cc:90
DepthMethod depth_method() const override final
Definition: spherical.cc:97
double distance_between_points_at_same_depth(const Point< 3 > &point_1, const Point< 3 > &point_2) const override final
Definition: spherical.cc:117
std::array< double, 3 > cartesian_to_natural_coordinates(const std::array< double, 3 > &position) const override final
Definition: spherical.cc:104