World Builder  0.1.0-pre
A geodyanmic initial conditions generator
interface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018 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_interface_h
21 #define _world_builder_coordinate_systems_interface_h
22 
23 #include <boost/property_tree/ptree.hpp>
24 
27 
28 
29 using boost::property_tree::ptree;
30 
31 namespace WorldBuilder
32 {
33  namespace CoordinateSystems
34  {
35 
36  class Interface
37  {
38  public:
42  Interface();
43 
47  virtual
48  ~Interface();
49 
53  virtual
54  void decare_entries(std::string &path) = 0;
55 
59  virtual
61 
69  virtual
70  std::array<double,3> cartesian_to_natural_coordinates(const std::array<double,3> &position) const = 0;
71 
77  virtual
78  std::array<double,3> natural_to_cartesian_coordinates(const std::array<double,3> &position) const = 0;
79 
80  protected:
81 
82  };
83 
84 
88  std::unique_ptr<Interface>
89  create_coordinate_system(const std::string name);
90 
91  }
92 }
93 
94 #endif
virtual CoordinateSystem natural_coordinate_system() const =0
virtual void decare_entries(std::string &path)=0
virtual std::array< double, 3 > cartesian_to_natural_coordinates(const std::array< double, 3 > &position) const =0
std::unique_ptr< Interface > create_coordinate_system(const std::string name)
Definition: interface.cc:38
virtual std::array< double, 3 > natural_to_cartesian_coordinates(const std::array< double, 3 > &position) const =0