World Builder  1.1.0-pre
A geodynamic initial conditions generator
segment.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_TYPES_SEGMENT_H
21 #define WORLD_BUILDER_TYPES_SEGMENT_H
22 
23 
25 
26 
27 namespace WorldBuilder
28 {
29  class Parameters;
30 
31  namespace Types
32  {
33 
37  class Segment : public Interface
38  {
39  public:
43  Segment(const double default_length,
49  const Types::Interface &grains_plugin_system_,
50  const Types::Interface &gvelocity_plugin_system_);
51 
55  Segment(double default_length,
56  WorldBuilder::Point<2> default_thickness,
57  WorldBuilder::Point<2> default_angle,
58  std::string description);
59 
63  Segment(Segment const &other);
64 
65 
69  ~Segment() override;
70 
74  void write_schema(Parameters &prm,
75  const std::string &name,
76  const std::string &documentation) const override final;
77 
78 
79  double value_length;
86  std::unique_ptr<Types::Interface> temperature_plugin_system;
87  std::unique_ptr<Types::Interface> composition_plugin_system;
88  std::unique_ptr<Types::Interface> grains_plugin_system;
89  std::unique_ptr<Types::Interface> velocity_plugin_system;
90 
91  protected:
92  Segment *clone_impl() const override final
93  {
94  return new Segment(*this);
95  };
96  private:
97 
98  };
99  } // namespace Types
100 } // namespace WorldBuilder
101 
102 #endif
WorldBuilder::Point< 2 > value_angle
Definition: segment.h:84
Segment * clone_impl() const override final
Definition: segment.h:92
WorldBuilder::Point< 2 > value_thickness
Definition: segment.h:81
void write_schema(Parameters &prm, const std::string &name, const std::string &documentation) const override final
Definition: segment.cc:118
std::unique_ptr< Types::Interface > temperature_plugin_system
Definition: segment.h:86
std::unique_ptr< Types::Interface > velocity_plugin_system
Definition: segment.h:89
WorldBuilder::Point< 2 > default_thickness
Definition: segment.h:82
WorldBuilder::Point< 2 > default_top_truncation
Definition: segment.h:83
WorldBuilder::Point< 2 > default_angle
Definition: segment.h:85
std::unique_ptr< Types::Interface > grains_plugin_system
Definition: segment.h:88
std::unique_ptr< Types::Interface > composition_plugin_system
Definition: segment.h:87
Segment(const double default_length, const WorldBuilder::Point< 2 > &default_thickness, const WorldBuilder::Point< 2 > &default_top_truncation, const WorldBuilder::Point< 2 > &default_angle, const Types::Interface &temperature_plugin_system, const Types::Interface &composition_plugin_system, const Types::Interface &grains_plugin_system_, const Types::Interface &gvelocity_plugin_system_)
Definition: segment.cc:69