World Builder  1.1.0-pre
A geodynamic initial conditions generator
cartesian.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_CARTESIAN_H
21 #define WORLD_BUILDER_COORDINATE_SYSTEMS_CARTESIAN_H
22 
24 
25 namespace WorldBuilder
26 {
27 
28  namespace CoordinateSystems
29  {
33  //WB_REGISTER_COORDINATE_SYSTEM_HEADER(Cartesian)
34 
35 
41  class Cartesian final : public Interface
42  {
43  public:
48 
52  ~Cartesian() override final;
53 
57  static
58  void declare_entries(Parameters &prm, const std::string &parent_name = "");
59 
63  void parse_entries(Parameters &prm) override final;
64 
65 
69  CoordinateSystem natural_coordinate_system() const override final;
70 
76  DepthMethod depth_method() const override final;
77 
85  std::array<double,3> cartesian_to_natural_coordinates(const std::array<double,3> &position) const override final;
86 
92  std::array<double,3> natural_to_cartesian_coordinates(const std::array<double,3> &position) const override final;
93 
94 
99  double distance_between_points_at_same_depth(const Point<3> &point_1, const Point<3> &point_2) const override final;
100 
105  virtual
106  double max_model_depth() const override final;
107 
108  private:
109 
110  };
111  } // namespace CoordinateSystems
112 } // namespace WorldBuilder
113 
114 #endif
std::array< double, 3 > natural_to_cartesian_coordinates(const std::array< double, 3 > &position) const override final
Definition: cartesian.cc:70
DepthMethod depth_method() const override final
Definition: cartesian.cc:56
static void declare_entries(Parameters &prm, const std::string &parent_name="")
Definition: cartesian.cc:37
void parse_entries(Parameters &prm) override final
Definition: cartesian.cc:44
Cartesian(WorldBuilder::World *world)
Definition: cartesian.cc:28
CoordinateSystem natural_coordinate_system() const override final
Definition: cartesian.cc:49
virtual double max_model_depth() const override final
Definition: cartesian.cc:92
double distance_between_points_at_same_depth(const Point< 3 > &point_1, const Point< 3 > &point_2) const override final
Definition: cartesian.cc:77
std::array< double, 3 > cartesian_to_natural_coordinates(const std::array< double, 3 > &position) const override final
Definition: cartesian.cc:63