diff --git a/include/world_builder/features/continental_plate_models/grains/random_uniform_distribution_deflected.h b/include/world_builder/features/continental_plate_models/grains/random_uniform_distribution_deflected.h index 82e09336a..54c389f25 100644 --- a/include/world_builder/features/continental_plate_models/grains/random_uniform_distribution_deflected.h +++ b/include/world_builder/features/continental_plate_models/grains/random_uniform_distribution_deflected.h @@ -81,8 +81,6 @@ namespace WorldBuilder */ void parse_entries(Parameters &prm, const std::vector> &coordinates) override final; - - /** * Returns a grains based on the given position, composition (e.g. * olivine and/or enstatite)depth in the model, gravity and current grains. diff --git a/include/world_builder/features/plume_models/grains/random_uniform_distribution_deflected.h b/include/world_builder/features/plume_models/grains/random_uniform_distribution_deflected.h index 6cd3273a1..da139e048 100644 --- a/include/world_builder/features/plume_models/grains/random_uniform_distribution_deflected.h +++ b/include/world_builder/features/plume_models/grains/random_uniform_distribution_deflected.h @@ -94,7 +94,6 @@ namespace WorldBuilder const double feature_max_depth) const override final; private: - // uniform grains submodule parameters double min_depth; double max_depth; std::vector grains; diff --git a/source/world_builder/features/continental_plate_models/grains/random_uniform_distribution_deflected.cc b/source/world_builder/features/continental_plate_models/grains/random_uniform_distribution_deflected.cc index f1ecdd64c..d1b077f17 100644 --- a/source/world_builder/features/continental_plate_models/grains/random_uniform_distribution_deflected.cc +++ b/source/world_builder/features/continental_plate_models/grains/random_uniform_distribution_deflected.cc @@ -149,7 +149,6 @@ namespace WorldBuilder << ") and rotation_matrices (" << basis_rotation_matrices.size() << ")."); } - WorldBuilder::grains RandomUniformDistributionDeflected::get_grains(const Point<3> & /*position_in_cartesian_coordinates*/, const Objects::NaturalCoordinate &position_in_natural_coordinates, @@ -245,7 +244,7 @@ namespace WorldBuilder // Then U' = R * U * R^T std::array,3> result1 = Utilities::multiply_3x3_matrices(rotation_matrices, basis_rotation_matrices[i]); - // std::array,3> rotated_rotation_matrix = matrix_multiply(result1, rot_T); + it_rotation_matrices = result1; } diff --git a/source/world_builder/features/fault_models/grains/random_uniform_distribution_deflected.cc b/source/world_builder/features/fault_models/grains/random_uniform_distribution_deflected.cc index 8173e707e..d2d10249d 100644 --- a/source/world_builder/features/fault_models/grains/random_uniform_distribution_deflected.cc +++ b/source/world_builder/features/fault_models/grains/random_uniform_distribution_deflected.cc @@ -147,10 +147,6 @@ namespace WorldBuilder << ") and rotation_matrices (" << basis_rotation_matrices.size() << ")."); } - - - - WorldBuilder::grains RandomUniformDistributionDeflected::get_grains(const Point<3> & /*position_in_cartesian_coordinates*/, const double /*depth*/, @@ -242,7 +238,7 @@ namespace WorldBuilder // Then U' = R * U * R^T std::array,3> result1 = multiply_3x3_matrices(rotation_matrices, basis_rotation_matrices[i]); - // std::array,3> rotated_rotation_matrix = multiply_3x3_matrices(result1, rot_T); + it_rotation_matrices = result1; } diff --git a/source/world_builder/features/mantle_layer_models/grains/random_uniform_distribution_deflected.cc b/source/world_builder/features/mantle_layer_models/grains/random_uniform_distribution_deflected.cc index 178647147..deb0dfa72 100644 --- a/source/world_builder/features/mantle_layer_models/grains/random_uniform_distribution_deflected.cc +++ b/source/world_builder/features/mantle_layer_models/grains/random_uniform_distribution_deflected.cc @@ -149,9 +149,6 @@ namespace WorldBuilder << ") and rotation_matrices (" << basis_rotation_matrices.size() << ")."); } - - - WorldBuilder::grains RandomUniformDistributionDeflected::get_grains(const Point<3> & /*position_in_cartesian_coordinates*/, const Objects::NaturalCoordinate &position_in_natural_coordinates, @@ -247,7 +244,7 @@ namespace WorldBuilder // Then U' = R * U * R^T std::array,3> result1 = multiply_3x3_matrices(rotation_matrices, basis_rotation_matrices[i]); - // std::array,3> rotated_rotation_matrix = multiply_3x3_matrices(result1, rot_T); + it_rotation_matrices = result1; } diff --git a/source/world_builder/features/oceanic_plate_models/grains/random_uniform_distribution_deflected.cc b/source/world_builder/features/oceanic_plate_models/grains/random_uniform_distribution_deflected.cc index 019bfeaaa..e95a4cf56 100644 --- a/source/world_builder/features/oceanic_plate_models/grains/random_uniform_distribution_deflected.cc +++ b/source/world_builder/features/oceanic_plate_models/grains/random_uniform_distribution_deflected.cc @@ -149,9 +149,6 @@ namespace WorldBuilder << ") and rotation_matrices (" << basis_rotation_matrices.size() << ")."); } - - - WorldBuilder::grains RandomUniformDistributionDeflected::get_grains(const Point<3> & /*position_in_cartesian_coordinates*/, const Objects::NaturalCoordinate &position_in_natural_coordinates, @@ -247,7 +244,7 @@ namespace WorldBuilder // Then U' = R * U * R^T std::array,3> result1 = multiply_3x3_matrices(rotation_matrices, basis_rotation_matrices[i]); - // std::array,3> rotated_rotation_matrix = multiply_3x3_matrices(result1, rot_T); + it_rotation_matrices = result1; } diff --git a/source/world_builder/features/plume_models/grains/random_uniform_distribution_deflected.cc b/source/world_builder/features/plume_models/grains/random_uniform_distribution_deflected.cc index 51f82045c..c1b98b6db 100644 --- a/source/world_builder/features/plume_models/grains/random_uniform_distribution_deflected.cc +++ b/source/world_builder/features/plume_models/grains/random_uniform_distribution_deflected.cc @@ -150,9 +150,6 @@ namespace WorldBuilder << ") and rotation_matrices (" << basis_rotation_matrices.size() << ")."); } - - - WorldBuilder::grains RandomUniformDistributionDeflected::get_grains(const Point<3> & /*position_in_cartesian_coordinates*/, const Objects::NaturalCoordinate & /*position_in_natural_coordinates*/, @@ -244,7 +241,7 @@ namespace WorldBuilder // Then U' = R * U * R^T std::array,3> result1 = multiply_3x3_matrices(rotation_matrices, basis_rotation_matrices[i]); - // std::array,3> rotated_rotation_matrix = multiply_3x3_matrices(result1, rot_T); + it_rotation_matrices = result1; } diff --git a/source/world_builder/features/subducting_plate_models/grains/random_uniform_distribution_deflected.cc b/source/world_builder/features/subducting_plate_models/grains/random_uniform_distribution_deflected.cc index 0929621f2..dfbf267af 100644 --- a/source/world_builder/features/subducting_plate_models/grains/random_uniform_distribution_deflected.cc +++ b/source/world_builder/features/subducting_plate_models/grains/random_uniform_distribution_deflected.cc @@ -147,8 +147,6 @@ namespace WorldBuilder << ") and rotation_matrices (" << basis_rotation_matrices.size() << ")."); } - - WorldBuilder::grains RandomUniformDistributionDeflected::get_grains(const Point<3> & /*position_in_cartesian_coordinates*/, const double /*depth*/, @@ -240,7 +238,7 @@ namespace WorldBuilder // Then U' = R * U * R^T std::array,3> result1 = multiply_3x3_matrices(rotation_matrices, basis_rotation_matrices[i]); - // std::array,3> rotated_rotation_matrix = multiply_3x3_matrices(result1, rot_T); + it_rotation_matrices = result1; } diff --git a/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1.wb b/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1.wb index 5c04d4c2c..b03ef750b 100644 --- a/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1.wb +++ b/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1.wb @@ -50,14 +50,8 @@ "eccentricity":[0, 0, 0, 0, 0], "rotation angles":[0, 0, 0, 0, 0], "temperature models":[{"model":"uniform", "min depth": 10, "max depth":20, "temperature":1800}], - "grains models": - [ - { - "model":"uniform", "compositions":[4], // olivine and enstatite - "rotation matrices":[[[1,2,3],[4,5,6],[7,8,9]]], - "grain sizes":[-1] - } - ] + "grains models": [{"model":"random uniform distribution deflected", "compositions":[0], "grain sizes":[-1], + "deflections": [0.5], "normalize grain sizes": [true], "basis Euler angles z-x-z": [[0,90,90]]}] }, { diff --git a/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1/screen-output.log b/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1/screen-output.log index 889475935..9407d74e9 100644 --- a/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1/screen-output.log +++ b/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1/screen-output.log @@ -3,5 +3,5 @@ 1 5 0 5 293 0 1 0 0 0 0 1 -0.999714 -0.013522 0.0197073 0.00110893 -0.84992 -0.52691 0.0238745 -0.526737 0.849693 1 7 5 0 5 293 0 0 1 0 0 0 1 -0.711156 0.702432 -0.0291084 -0.703004 -0.710901 0.0201346 -0.00655007 0.0347822 0.999373 2 5 3 0 0.1 293 0 0 0 1 0 0 1 0.154095 0.671494 0.724811 -0.667252 0.611751 -0.424894 -0.728718 -0.418158 0.542324 3 -4.5 0 0 15 1800 1 0 0 0 0 0 1 -0.999086 0.000126726 -0.0427462 0.000870757 -0.999728 -0.0233156 -0.0427375 -0.0233315 0.998814 4 -5 6 0 0.1 150 0 0 0 0 0 1 1 -0.0621131 0.894644 0.442441 -0.961816 0.0647376 -0.26593 -0.266555 -0.442065 0.856462 5 +4.5 0 0 15 1800 1 0 0 0 0 0 1 -0.688178 -0.665954 0.287952 -0.179993 -0.227769 -0.956934 0.702861 -0.71037 0.0368784 4 +5 6 0 0.1 150 0 0 0 0 0 1 1 -0.0582985 0.900196 0.431565 -0.961726 0.065298 -0.26612 -0.267741 -0.430561 0.861935 5 diff --git a/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1000.wb b/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1000.wb index 9d0d4240c..5c2f2b34e 100644 --- a/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1000.wb +++ b/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1000.wb @@ -50,14 +50,8 @@ "eccentricity":[0, 0, 0, 0, 0], "rotation angles":[0, 0, 0, 0, 0], "temperature models":[{"model":"uniform", "min depth": 10, "max depth":20, "temperature":1800}], - "grains models": - [ - { - "model":"uniform", "compositions":[4], // olivine and enstatite - "rotation matrices":[[[1,2,3],[4,5,6],[7,8,9]]], - "grain sizes":[-1] - } - ] + "grains models": [{"model":"random uniform distribution deflected", "compositions":[0], "grain sizes":[-1], + "deflections": [0.5], "normalize grain sizes": [true], "basis Euler angles z-x-z": [[0,90,90]]}] }, { diff --git a/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1000/screen-output.log b/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1000/screen-output.log index 3b7d5d777..cfdfa8fa0 100644 --- a/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1000/screen-output.log +++ b/tests/gwb-dat/random_uniform_distribution_deflected_asrotation_seed1000/screen-output.log @@ -3,5 +3,5 @@ 1 5 0 5 293 0 1 0 0 0 0 1 -0.999981 -0.00615722 0.000100499 0.00539549 -0.883904 -0.467638 0.00296818 -0.467628 0.88392 1 7 5 0 5 293 0 0 1 0 0 0 1 -0.710221 0.703534 -0.025015 -0.702005 -0.710442 -0.0496173 -0.0526791 -0.0176786 0.998455 2 5 3 0 0.1 293 0 0 0 1 0 0 1 0.133107 0.65896 0.740307 -0.657871 0.617413 -0.431286 -0.741275 -0.429619 0.515693 3 -4.5 0 0 15 1800 1 0 0 0 0 0 1 -0.999949 -0.00528036 0.0086363 0.00530542 -0.999982 0.00288158 0.00862092 0.00292726 0.999959 4 -5 6 0 0.1 150 0 0 0 0 0 1 1 -0.0599735 0.905027 0.421104 -0.969139 0.0482597 -0.241743 -0.239107 -0.422607 0.874203 5 +4.5 0 0 15 1800 1 0 0 0 0 0 1 -0.106531 0.958558 -0.264231 0.994105 0.108069 -0.00875203 0.0201658 -0.263606 -0.96442 4 +5 6 0 0.1 150 0 0 0 0 0 1 1 -0.058564 0.906447 0.418239 -0.964985 0.0559024 -0.256279 -0.255684 -0.418603 0.871434 5