World Builder  1.1.0-pre
A geodynamic initial conditions generator
segment.cc
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 #include <utility>
20 
22 
23 
24 namespace WorldBuilder
25 {
26 
27  namespace Features
28  {
29  namespace FaultModels
30  {
31  namespace Composition
32  {
33  class Interface;
34  } // namespace Composition
35  namespace Grains
36  {
37  class Interface;
38  } // namespace Grains
39  namespace Temperature
40  {
41  class Interface;
42  } // namespace Temperature
43  namespace Velocity
44  {
45  class Interface;
46  } // namespace Velocity
47  } // namespace FaultModels
48  namespace SubductingPlateModels
49  {
50  namespace Composition
51  {
52  class Interface;
53  } // namespace Composition
54  namespace Grains
55  {
56  class Interface;
57  } // namespace Grains
58  namespace Temperature
59  {
60  class Interface;
61  } // namespace Temperature
62  namespace Velocity
63  {
64  class Interface;
65  } // namespace Velocity
66  } // namespace SubductingPlateModels
67  } // namespace Features
68 
69 
70  namespace Objects
71  {
72  // todo update function
73  template<class A, class B, class C, class D>
74  Segment<A,B,C,D>::Segment(const double default_length_,
75  const WorldBuilder::Point<2> &default_thickness_,
76  const WorldBuilder::Point<2> &default_top_truncation_,
77  const WorldBuilder::Point<2> &default_angle_,
78  const std::vector<std::shared_ptr<A> > temperature_systems_,
79  const std::vector<std::shared_ptr<B> > composition_systems_,
80  const std::vector<std::shared_ptr<C> > grains_systems_,
81  const std::vector<std::shared_ptr<D> > velocity_systems_)
82  :
83  value_length(default_length_),
84  default_length(default_length_),
85  value_thickness(default_thickness_),
86  value_top_truncation(default_top_truncation_),
87  value_angle(default_angle_),
88  temperature_systems(std::move(temperature_systems_)),
89  composition_systems(std::move(composition_systems_)),
90  grains_systems(std::move(grains_systems_)),
91  velocity_systems(std::move(velocity_systems_))
92  {
93  }
94 
95  template<class A, class B, class C, class D>
97  :
102  value_angle(other.value_angle),
107  {
108  }
109 
110  template<class A, class B, class C, class D>
112  = default;
113 
114 
119  template class
121 
126  template class
128 
133  //template class
134  //Segment<char,char>;
135 
136  } // namespace Objects
137 } // namespace WorldBuilder
std::vector< std::shared_ptr< B > > composition_systems
Definition: segment.h:70
std::vector< std::shared_ptr< D > > velocity_systems
Definition: segment.h:72
WorldBuilder::Point< 2 > value_thickness
Definition: segment.h:66
WorldBuilder::Point< 2 > value_top_truncation
Definition: segment.h:67
WorldBuilder::Point< 2 > value_angle
Definition: segment.h:68
std::vector< std::shared_ptr< C > > grains_systems
Definition: segment.h:71
std::vector< std::shared_ptr< A > > temperature_systems
Definition: segment.h:69
Segment(const double default_length, const WorldBuilder::Point< 2 > &default_thickness, const WorldBuilder::Point< 2 > &default_top_truncation, const WorldBuilder::Point< 2 > &default_angle, std::vector< std::shared_ptr< A > > temperature_systems, std::vector< std::shared_ptr< B > > composition_systems, std::vector< std::shared_ptr< C > > grains_systems, std::vector< std::shared_ptr< D > > velocity_systems)
Definition: segment.cc:74