Skip to content

Commit

Permalink
fix: gbx area and volumes are not all the same, as determined by crea…
Browse files Browse the repository at this point in the history
…tion of gbxmaps
  • Loading branch information
yoctoyotta1024 committed Apr 30, 2024
1 parent 905b898 commit 8a7eb75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
20 changes: 1 addition & 19 deletions libs/cartesiandomain/cartesianmaps.hpp
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
/*
* Copyright (c) 2024 MPI-M, Clara Bayley
*
*
* ----- CLEO -----
* File: cartesianmaps.hpp
* Project: cartesiandomain
* Created Date: Wednesday 1st May 2024
* Author: Clara Bayley (CB)
* Additional Contributors:
* -----
* Last Modified: Wednesday 1st May 2024
* Modified By: CB
* -----
* License: BSD 3-Clause "New" or "Revised" License
* https://opensource.org/licenses/BSD-3-Clause
* -----
* File Description:
*/

/* Copyright (c) 2023 MPI-M, Clara Bayley
*
* ----- CLEO -----
* File: cartesianmaps.hpp
Expand All @@ -27,7 +9,7 @@
* Author: Clara Bayley (CB)
* Additional Contributors:
* -----
* Last Modified: Thursday 9th November 2023
* Last Modified: Wednesday 1st May 2024
* Modified By: CB
* -----
* License: BSD 3-Clause "New" or "Revised" License
Expand Down
12 changes: 8 additions & 4 deletions libs/cartesiandomain/createcartesianmaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Author: Clara Bayley (CB)
* Additional Contributors:
* -----
* Last Modified: Friday 19th April 2024
* Last Modified: Wednesday 1st May 2024
* Modified By: CB
* -----
* License: BSD 3-Clause "New" or "Revised" License
Expand Down Expand Up @@ -135,9 +135,10 @@ void set_maps_ndims(const std::vector<size_t> &i_ndims, CartesianMaps &gbxmaps)
/* sets (finite) dimensionless horizontal area and
volume using area and volume from gfb for gbxidx=0 */
void set_model_areas_vols(const GbxBoundsFromBinary &gfb, CartesianMaps &gbxmaps) {
const auto idx = (unsigned int)0;
gbxmaps.insert_gbxarea(idx, gfb.gbxarea(idx));
gbxmaps.insert_gbxvolume(idx, gfb.gbxvol(idx));
for (auto idx : gfb.gbxidxs) {
gbxmaps.insert_gbxarea(idx, gfb.gbxarea(idx));
gbxmaps.insert_gbxvolume(idx, gfb.gbxvol(idx));
}
}

/* sets value for coordinate bounds for case
Expand All @@ -151,6 +152,9 @@ void set_outofbounds(CartesianMaps &gbxmaps) {
gbxmaps.insert_coord3nghbrs(idx, nullnghbrs(idx));
gbxmaps.insert_coord1nghbrs(idx, nullnghbrs(idx));
gbxmaps.insert_coord2nghbrs(idx, nullnghbrs(idx));

gbxmaps.insert_gbxarea(idx, 0.0);
gbxmaps.insert_gbxvolume(idx, 0.0);
}

/* gives all coord[X]bounds maps to 1 key with null
Expand Down
2 changes: 1 addition & 1 deletion libs/runcleo/creategbxs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Author: Clara Bayley (CB)
* Additional Contributors:
* -----
* Last Modified: Friday 19th April 2024
* Last Modified: Wednesday 1st May 2024
* Modified By: CB
* -----
* License: BSD 3-Clause "New" or "Revised" License
Expand Down

0 comments on commit 8a7eb75

Please sign in to comment.