diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1cbf17b8..9636ec6c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,7 +65,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest','macos-latest','macos-11'] + os: ['ubuntu-latest','macos-12','macos-11'] build_type: ['Release', 'Debug'] runs-on: ${{ matrix.os }} @@ -214,7 +214,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest','macos-latest'] + os: ['ubuntu-latest','macos-12'] build_type: ['Release'] runs-on: ${{ matrix.os }} diff --git a/cookbooks/index.md b/cookbooks/index.md index 598348bb3..18514230c 100644 --- a/cookbooks/index.md +++ b/cookbooks/index.md @@ -12,5 +12,4 @@ This section contains self-contained cookbooks on how to design different geodyn 3d_cartesian_transform_fault/doc/README simple_subduction_2d_cartesian/doc/README simple_subduction_2d_chunk/doc/README - ``` diff --git a/doc/sphinx/user_manual/basic_starter_tutorial/17_plume.md b/doc/sphinx/user_manual/basic_starter_tutorial/17_plume.md index fd2220eab..bb27725cf 100644 --- a/doc/sphinx/user_manual/basic_starter_tutorial/17_plume.md +++ b/doc/sphinx/user_manual/basic_starter_tutorial/17_plume.md @@ -2,7 +2,7 @@ Adding a mantle plume =============================== -The last feature we will be adding in this tutorial is the `plume`. The plume is defined by a set of coordinates which represent where the plume is at different depths. The depth are set through the `cross section depths` parameter, hich requires as many depths as there are coordinates. Each cross-section is an ellipse, for which the parameters can be set individually. Please see [the plume feature description](part:user_manual:chap:parameter_documentation:sec:features:subsec:plume) for more information on what each of the parameters do. In this case we will increase the eccentricity of the plume at the top. +The last feature we will be adding in this tutorial is the `plume`. The plume is defined by a set of coordinates which represent where the plume is at different depths. The depth are set through the `cross section depths` parameter, which requires as many depths as there are coordinates. Each cross-section is an ellipse, for which the parameters can be set individually. Please see [the plume feature description](part:user_manual:chap:parameter_documentation:sec:features:subsec:plume) for more information on what each of the parameters do. In this case we will increase the eccentricity of the plume at the top. With the definition of the area the feature plume contains completed, we can now add a temperature and compositional structure. A gaussian is a good first order approximation of the temperature, so we will add that as the temperature model. This temperature model allows you to set change the gaussian distribution parameters for each depth segment. Note that in this case we are not replacing the temperature, but adding to the temperature which was already there. diff --git a/include/doctest/doctest.h b/include/doctest/doctest.h index f9185343f..db9417efa 100644 --- a/include/doctest/doctest.h +++ b/include/doctest/doctest.h @@ -4151,7 +4151,7 @@ namespace doctest #define DOCTEST_TO_STRING_OVERLOAD(type, fmt) \ String toString(type in) { \ char buf[64]; \ - std::sprintf(buf, fmt, in); \ + std::snprintf(buf, sizeof( buf ), fmt, in); \ return buf; \ } diff --git a/source/world_builder/features/continental_plate_models/temperature/linear.cc b/source/world_builder/features/continental_plate_models/temperature/linear.cc index 8fead61f0..03d173390 100644 --- a/source/world_builder/features/continental_plate_models/temperature/linear.cc +++ b/source/world_builder/features/continental_plate_models/temperature/linear.cc @@ -128,9 +128,9 @@ namespace WorldBuilder this->world->specific_heat) * max_depth_local_local); } - const double new_temperature = top_temperature_local + - (depth - min_depth_local) * - ((bottom_temperature_local - top_temperature_local) / (max_depth_local_local - min_depth_local_local)); + const double new_temperature = top_temperature_local + (max_depth_local_local - min_depth_local_local < 10.0*std::numeric_limits::epsilon() ? 0.0 : + (depth - min_depth_local) * + ((bottom_temperature_local - top_temperature_local) / (max_depth_local_local - min_depth_local_local))); WBAssert(!std::isnan(new_temperature), "Temperature is not a number: " << new_temperature << ", based on a temperature model with the name " << this->name); diff --git a/source/world_builder/features/mantle_layer_models/temperature/linear.cc b/source/world_builder/features/mantle_layer_models/temperature/linear.cc index c7307d528..b8e64d70e 100644 --- a/source/world_builder/features/mantle_layer_models/temperature/linear.cc +++ b/source/world_builder/features/mantle_layer_models/temperature/linear.cc @@ -127,9 +127,9 @@ namespace WorldBuilder } - const double new_temperature = top_temperature_local + - (depth - min_depth_local_local) * - ((bottom_temperature_local - top_temperature_local) / (max_depth_local_local - min_depth_local_local)); + const double new_temperature = top_temperature_local + (max_depth_local_local - min_depth_local_local < 10.0*std::numeric_limits::epsilon() ? 0.0 : + (depth - min_depth_local_local) * + ((bottom_temperature_local - top_temperature_local) / (max_depth_local_local - min_depth_local_local))); return apply_operation(operation,temperature_,new_temperature); } diff --git a/source/world_builder/features/oceanic_plate_models/temperature/linear.cc b/source/world_builder/features/oceanic_plate_models/temperature/linear.cc index c5a0e6602..c76478656 100644 --- a/source/world_builder/features/oceanic_plate_models/temperature/linear.cc +++ b/source/world_builder/features/oceanic_plate_models/temperature/linear.cc @@ -125,9 +125,9 @@ namespace WorldBuilder this->world->specific_heat) * max_depth_local_local); } - const double new_temperature = top_temperature_local + - (depth - min_depth_local_local) * - ((bottom_temperature_local - top_temperature_local) / (max_depth_local_local - min_depth_local_local)); + const double new_temperature = top_temperature_local + (max_depth_local_local - min_depth_local_local < 10.0*std::numeric_limits::epsilon() ? 0.0 : + (depth - min_depth_local_local) * + ((bottom_temperature_local - top_temperature_local) / (max_depth_local_local - min_depth_local_local))); return apply_operation(operation,temperature_,new_temperature); } diff --git a/source/world_builder/features/subducting_plate.cc b/source/world_builder/features/subducting_plate.cc index 025e7ac48..679f912cc 100644 --- a/source/world_builder/features/subducting_plate.cc +++ b/source/world_builder/features/subducting_plate.cc @@ -685,7 +685,7 @@ namespace WorldBuilder grains.sizes[i] = grains_current_section.sizes[i] + section_fraction * (grains_next_section.sizes[i] - grains_current_section.sizes[i]); } - // average two rotations matrices throu quaternions. + // average two rotations matrices through quaternions. for (size_t i = 0; i < grains_current_section.rotation_matrices.size(); i++) { const glm::quaternion::quat quat_current = glm::quaternion::quat_cast(grains_current_section.rotation_matrices[i]); diff --git a/source/world_builder/features/subducting_plate_models/temperature/plate_model.cc b/source/world_builder/features/subducting_plate_models/temperature/plate_model.cc index 368adcdc0..2b3a942cf 100644 --- a/source/world_builder/features/subducting_plate_models/temperature/plate_model.cc +++ b/source/world_builder/features/subducting_plate_models/temperature/plate_model.cc @@ -170,7 +170,7 @@ namespace WorldBuilder distance_along_plane/thickness_local); // the paper uses `(x_scaled * sin(average_angle) - z_scaled * cos(average_angle))` to compute the - // depth (execpt that you do not use average angles since they only have on angle). On recomputing + // depth (except that you do not use average angles since they only have on angle). On recomputing // their result it seems to me (Menno) that it should have been `(1-z_scaled)` instead of `z_scaled`. // To avoid this whole problem we just use the depth directly since we have that. // todo: get the local thickniss out of H, that prevents an other division.