Skip to content

Commit 6dfd43b

Browse files
committed
Rename uniform to uniform raw
1 parent 7f635d0 commit 6dfd43b

File tree

14 files changed

+92
-91
lines changed

14 files changed

+92
-91
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"files.associations": {
3-
"*.wb": "jsonc"
3+
"*.wb": "jsonc",
4+
"array": "cpp"
45
},
56
"json.validate.enable": true,
67
"json.schemas": [

cookbooks/2d_spherical_subduction_rift/2d_spherical_subduction_rift.wb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@
88
"temperature models":[{"model":"plate model", "max depth":95e3, "bottom temperature":1600, "spreading velocity":0.005, "ridge coordinates":[[[1,-1],[1,1]]]}],
99
"composition models":[{"model":"uniform", "compositions":[0], "max depth":10e3},
1010
{"model":"uniform", "compositions":[1], "min depth":10e3, "max depth":95e3}],
11-
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
11+
"velocity models":[{"model":"uniform raw", "velocity":[1,0,0]}]},
1212

1313
{"model":"continental plate", "name":"continental plate", "coordinates":[[11.5,-1],[21,-1],[21,1],[11.5,1]],
1414
"temperature models":[{"model":"linear", "max depth":95e3, "bottom temperature":1600}],
1515
"composition models":[{"model":"uniform", "compositions":[2], "max depth":30e3},
1616
{"model":"uniform", "compositions":[3], "min depth":30e3, "max depth":65e3}],
17-
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
17+
"velocity models":[{"model":"uniform raw", "velocity":[1,0,0]}]},
1818

1919
{"model":"mantle layer", "name":"upper mantle", "min depth":95e3, "max depth":660e3, "coordinates":[[-1,-1],[21,-1],[21,1],[-1,1]],
2020
"temperature models":[{"model":"linear", "min depth":95e3, "max depth":660e3, "top temperature":1600, "bottom temperature":1820}],
2121
"composition models":[{"model":"uniform", "compositions":[4]}],
22-
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
22+
"velocity models":[{"model":"uniform raw", "velocity":[1,0,0]}]},
2323

2424
{"model":"mantle layer", "name":"lower mantle", "min depth":660e3, "max depth":1160e3, "coordinates":[[-1,-1],[21,-1],[21,1],[-1,1]],
2525
"temperature models":[{"model":"linear", "min depth":660e3, "max depth":1160e3, "top temperature":1820, "bottom temperature":2000}],
2626
"composition models":[{"model":"uniform", "compositions":[5]}],
27-
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
27+
"velocity models":[{"model":"uniform raw", "velocity":[1,0,0]}]},
2828

2929
{"model":"subducting plate", "name":"Subducting plate", "coordinates":[[11.5,-1],[11.5,1]], "dip point":[20,0],
3030
"segments":[{"length":200e3, "thickness":[95e3], "angle":[0,45]}, {"length":200e3, "thickness":[95e3], "angle":[45]},
3131
{"length":200e3, "thickness":[95e3], "angle":[45,0]}, {"length":100e3, "thickness":[95e3], "angle":[0]}],
3232
"temperature models":[{"model":"plate model", "density":3300, "plate velocity":0.01, "adiabatic heating":false}],
3333
"composition models":[{"model":"uniform", "compositions":[0], "max distance slab top":10e3},
3434
{"model":"uniform", "compositions":[1], "min distance slab top":10e3, "max distance slab top":95e3}],
35-
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]}
35+
"velocity models":[{"model":"uniform raw", "velocity":[1,0,0]}]}
3636
]
3737
}

include/world_builder/features/continental_plate_models/velocity/uniform.h renamed to include/world_builder/features/continental_plate_models/velocity/uniform_raw.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
#ifndef WORLD_BUILDER_FEATURES_CONTINENTAL_PLATE_MODELS_VELOCITY_UNIFORM_H
21-
#define WORLD_BUILDER_FEATURES_CONTINENTAL_PLATE_MODELS_VELOCITY_UNIFORM_H
20+
#ifndef WORLD_BUILDER_FEATURES_CONTINENTAL_PLATE_MODELS_VELOCITY_UNIFORM_RAW_H
21+
#define WORLD_BUILDER_FEATURES_CONTINENTAL_PLATE_MODELS_VELOCITY_UNIFORM_RAW_H
2222

2323

2424
#include "world_builder/features/continental_plate_models/velocity/interface.h"
@@ -42,18 +42,18 @@ namespace WorldBuilder
4242
* the returned velocity or composition of the velocity and composition
4343
* functions of this class will be.
4444
*/
45-
class Uniform final: public Interface
45+
class UniformRaw final: public Interface
4646
{
4747
public:
4848
/**
4949
* constructor
5050
*/
51-
Uniform(WorldBuilder::World *world);
51+
UniformRaw(WorldBuilder::World *world);
5252

5353
/**
5454
* Destructor
5555
*/
56-
~Uniform() override final;
56+
~UniformRaw() override final;
5757

5858
/**
5959
* declare and read in the world builder file into the parameters class
@@ -81,7 +81,7 @@ namespace WorldBuilder
8181

8282

8383
private:
84-
// uniform velocity submodule parameters
84+
// uniform raw velocity submodule parameters
8585
double min_depth;
8686
Objects::Surface min_depth_surface;
8787
double max_depth;

include/world_builder/features/fault_models/velocity/uniform.h renamed to include/world_builder/features/fault_models/velocity/uniform_raw.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
#ifndef WORLD_BUILDER_FEATURES_FAULT_MODELS_VELOCITY_UNIFORM_H
21-
#define WORLD_BUILDER_FEATURES_FAULT_MODELS_VELOCITY_UNIFORM_H
20+
#ifndef WORLD_BUILDER_FEATURES_FAULT_MODELS_VELOCITY_UNIFORM_RAW_H
21+
#define WORLD_BUILDER_FEATURES_FAULT_MODELS_VELOCITY_UNIFORM_RAW_H
2222

2323

2424
#include "world_builder/features/fault_models/velocity/interface.h"
@@ -40,18 +40,18 @@ namespace WorldBuilder
4040
* the returned velocity or composition of the velocity and composition
4141
* functions of this class will be.
4242
*/
43-
class Uniform final: public Interface
43+
class UniformRaw final: public Interface
4444
{
4545
public:
4646
/**
4747
* constructor
4848
*/
49-
Uniform(WorldBuilder::World *world);
49+
UniformRaw(WorldBuilder::World *world);
5050

5151
/**
5252
* Destructor
5353
*/
54-
~Uniform() override final;
54+
~UniformRaw() override final;
5555

5656
/**
5757
* declare and read in the world builder file into the parameters class
@@ -80,7 +80,7 @@ namespace WorldBuilder
8080

8181

8282
private:
83-
// uniform velocity submodule parameters
83+
// uniform raw velocity submodule parameters
8484
double min_depth;
8585
double max_depth;
8686
std::array<double,3> velocity;

include/world_builder/features/mantle_layer_models/velocity/uniform.h renamed to include/world_builder/features/mantle_layer_models/velocity/uniform_raw.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
#ifndef WORLD_BUILDER_FEATURES_MANTLE_LAYER_MODELS_VELOCITY_UNIFORM_H
21-
#define WORLD_BUILDER_FEATURES_MANTLE_LAYER_MODELS_VELOCITY_UNIFORM_H
20+
#ifndef WORLD_BUILDER_FEATURES_MANTLE_LAYER_MODELS_VELOCITY_UNIFORM_RAW_H
21+
#define WORLD_BUILDER_FEATURES_MANTLE_LAYER_MODELS_VELOCITY_UNIFORM_RAW_H
2222

2323

2424
#include "world_builder/features/mantle_layer_models/velocity/interface.h"
@@ -41,18 +41,18 @@ namespace WorldBuilder
4141
* the returned velocity or composition of the velocity and composition
4242
* functions of this class will be.
4343
*/
44-
class Uniform final: public Interface
44+
class UniformRaw final: public Interface
4545
{
4646
public:
4747
/**
4848
* constructor
4949
*/
50-
Uniform(WorldBuilder::World *world);
50+
UniformRaw(WorldBuilder::World *world);
5151

5252
/**
5353
* Destructor
5454
*/
55-
~Uniform() override final;
55+
~UniformRaw() override final;
5656

5757
/**
5858
* declare and read in the world builder file into the parameters class
@@ -80,7 +80,7 @@ namespace WorldBuilder
8080

8181

8282
private:
83-
// uniform velocity submodule parameters
83+
// uniform raw velocity submodule parameters
8484
double min_depth;
8585
Objects::Surface min_depth_surface;
8686
double max_depth;

include/world_builder/features/oceanic_plate_models/velocity/uniform.h renamed to include/world_builder/features/oceanic_plate_models/velocity/uniform_raw.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
#ifndef WORLD_BUILDER_FEATURES_OCEANIC_PLATE_MODELS_VELOCITY_UNIFORM_H
21-
#define WORLD_BUILDER_FEATURES_OCEANIC_PLATE_MODELS_VELOCITY_UNIFORM_H
20+
#ifndef WORLD_BUILDER_FEATURES_OCEANIC_PLATE_MODELS_VELOCITY_UNIFORM_RAW_H
21+
#define WORLD_BUILDER_FEATURES_OCEANIC_PLATE_MODELS_VELOCITY_UNIFORM_RAW_H
2222

2323

2424
#include "world_builder/features/oceanic_plate_models/velocity/interface.h"
@@ -41,18 +41,18 @@ namespace WorldBuilder
4141
* the returned velocity or composition of the velocity and composition
4242
* functions of this class will be.
4343
*/
44-
class Uniform final: public Interface
44+
class UniformRaw final: public Interface
4545
{
4646
public:
4747
/**
4848
* constructor
4949
*/
50-
Uniform(WorldBuilder::World *world);
50+
UniformRaw(WorldBuilder::World *world);
5151

5252
/**
5353
* Destructor
5454
*/
55-
~Uniform() override final;
55+
~UniformRaw() override final;
5656

5757
/**
5858
* declare and read in the world builder file into the parameters class
@@ -80,7 +80,7 @@ namespace WorldBuilder
8080

8181

8282
private:
83-
// uniform velocity submodule parameters
83+
// uniform raw velocity submodule parameters
8484
double min_depth;
8585
Objects::Surface min_depth_surface;
8686
double max_depth;

include/world_builder/features/plume_models/velocity/uniform.h renamed to include/world_builder/features/plume_models/velocity/uniform_raw.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
#ifndef WORLD_BUILDER_FEATURES_PLUME_MODELS_VELOCITY_UNIFORM_H
21-
#define WORLD_BUILDER_FEATURES_PLUME_MODELS_VELOCITY_UNIFORM_H
20+
#ifndef WORLD_BUILDER_FEATURES_PLUME_MODELS_VELOCITY_UNIFORM_RAW_H
21+
#define WORLD_BUILDER_FEATURES_PLUME_MODELS_VELOCITY_UNIFORM_RAW_H
2222

2323

2424
#include "world_builder/features/plume_models/velocity/interface.h"
@@ -41,20 +41,20 @@ namespace WorldBuilder
4141
* for velocity and composition. These submodules determine what
4242
* the returned velocity or composition of the velocity and composition
4343
* functions of this class will be.
44-
* In this class, the velocity within the plume is uniform.
44+
* In this class, the velocity within the plume is uniformraw.
4545
*/
46-
class Uniform final: public Interface
46+
class UniformRaw final: public Interface
4747
{
4848
public:
4949
/**
5050
* constructor
5151
*/
52-
Uniform(WorldBuilder::World *world);
52+
UniformRaw(WorldBuilder::World *world);
5353

5454
/**
5555
* Destructor
5656
*/
57-
~Uniform() override final;
57+
~UniformRaw() override final;
5858

5959
/**
6060
* declare and read in the world builder file into the parameters class
@@ -83,7 +83,7 @@ namespace WorldBuilder
8383

8484

8585
private:
86-
// uniform velocity submodule parameters
86+
// uniform raw velocity submodule parameters
8787
double min_depth;
8888
double max_depth;
8989
std::array<double,3> velocity;

include/world_builder/features/subducting_plate_models/velocity/uniform.h renamed to include/world_builder/features/subducting_plate_models/velocity/uniform_raw.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
#ifndef WORLD_BUILDER_FEATURES_SUBDUCTING_PLATE_MODELS_VELOCITY_UNIFORM_H
21-
#define WORLD_BUILDER_FEATURES_SUBDUCTING_PLATE_MODELS_VELOCITY_UNIFORM_H
20+
#ifndef WORLD_BUILDER_FEATURES_SUBDUCTING_PLATE_MODELS_VELOCITY_UNIFORM_RAW_H
21+
#define WORLD_BUILDER_FEATURES_SUBDUCTING_PLATE_MODELS_VELOCITY_UNIFORM_RAW_H
2222

2323

2424
#include "world_builder/features/subducting_plate_models/velocity/interface.h"
@@ -40,18 +40,18 @@ namespace WorldBuilder
4040
* the returned velocity or composition of the velocity and composition
4141
* functions of this class will be.
4242
*/
43-
class Uniform final: public Interface
43+
class UniformRaw final: public Interface
4444
{
4545
public:
4646
/**
4747
* constructor
4848
*/
49-
Uniform(WorldBuilder::World *world);
49+
UniformRaw(WorldBuilder::World *world);
5050

5151
/**
5252
* Destructor
5353
*/
54-
~Uniform() override final;
54+
~UniformRaw() override final;
5555

5656
/**
5757
* declare and read in the world builder file into the parameters class
@@ -80,7 +80,7 @@ namespace WorldBuilder
8080

8181

8282
private:
83-
// uniform velocity submodule parameters
83+
// uniform raw velocity submodule parameters
8484
double min_depth;
8585
double max_depth;
8686
std::array<double,3> velocity;

source/world_builder/features/continental_plate_models/velocity/uniform.cc renamed to source/world_builder/features/continental_plate_models/velocity/uniform_raw.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
#include "world_builder/features/continental_plate_models/velocity/uniform.h"
20+
#include "world_builder/features/continental_plate_models/velocity/uniform_raw.h"
2121

2222

2323
#include "world_builder/nan.h"
@@ -39,22 +39,22 @@ namespace WorldBuilder
3939
{
4040
namespace Velocity
4141
{
42-
Uniform::Uniform(WorldBuilder::World *world_)
42+
UniformRaw::UniformRaw(WorldBuilder::World *world_)
4343
:
4444
min_depth(NaN::DSNAN),
4545
max_depth(NaN::DSNAN),
4646
velocity({{NaN::DSNAN,NaN::DSNAN,NaN::DSNAN}}),
4747
operation(Operations::REPLACE)
4848
{
4949
this->world = world_;
50-
this->name = "uniform";
50+
this->name = "uniform raw";
5151
}
5252

53-
Uniform::~Uniform()
53+
UniformRaw::~UniformRaw()
5454
= default;
5555

5656
void
57-
Uniform::declare_entries(Parameters &prm, const std::string & /*unused*/)
57+
UniformRaw::declare_entries(Parameters &prm, const std::string & /*unused*/)
5858
{
5959
// Document plugin and require entries if needed.
6060
// Add `velocity` to the required parameters.
@@ -74,7 +74,7 @@ namespace WorldBuilder
7474
}
7575

7676
void
77-
Uniform::parse_entries(Parameters &prm, const std::vector<Point<2>> &coordinates)
77+
UniformRaw::parse_entries(Parameters &prm, const std::vector<Point<2>> &coordinates)
7878
{
7979

8080
min_depth_surface = Objects::Surface(prm.get("min depth",coordinates));
@@ -90,7 +90,7 @@ namespace WorldBuilder
9090

9191

9292
std::array<double,3>
93-
Uniform::get_velocity(const Point<3> & /*position_in_cartesian_coordinates*/,
93+
UniformRaw::get_velocity(const Point<3> & /*position_in_cartesian_coordinates*/,
9494
const Objects::NaturalCoordinate &position_in_natural_coordinates,
9595
const double depth,
9696
const double /*gravity*/,
@@ -116,7 +116,7 @@ namespace WorldBuilder
116116
return velocity_;
117117
}
118118

119-
WB_REGISTER_FEATURE_CONTINENTAL_PLATE_VELOCITY_MODEL(Uniform, uniform)
119+
WB_REGISTER_FEATURE_CONTINENTAL_PLATE_VELOCITY_MODEL(UniformRaw, uniform raw)
120120
} // namespace Velocity
121121
} // namespace ContinentalPlateModels
122122
} // namespace Features

0 commit comments

Comments
 (0)