Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ a71cad2dd6ace5741a754e2ca7daacd4bb094e0e
2c2402ed59c91164eaff46dee0f79386b7347e9e
05b7c571544c3bcb153fce67d12b9ac48947fc2d
c8f38049359170a34c915e209276238ea66b9a1e
8d5cb39e03c2644715a50684f8cd0318b4e82676
ec69e8838be2dde140a915e50506f8e1ce3cb534
f2bc0488a298f136294c523bc5ab4086d090059b
15 changes: 13 additions & 2 deletions src/mesh/impls/bout/boutmesh.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,19 @@ int BoutMesh::load() {
}
ASSERT0(MXG >= 0);

if (Mesh::get(MYG, "MYG") != 0) {
MYG = options["MYG"].doc("Number of guard cells on each side in Y").withDefault(2);
const bool meshHasMyg = Mesh::get(MYG, "MYG") == 0;
if (!meshHasMyg) {
MYG = 2;
}
int meshMyg = MYG;

if (options.isSet("MYG") or (!meshHasMyg)) {
MYG = options["MYG"].doc("Number of guard cells on each side in Y").withDefault(MYG);
}
if (meshHasMyg && MYG != meshMyg) {
output_warn.write(_("Options changed the number of y-guard cells. Grid has {} but "
"option specified {}! Continuing with {}"),
meshMyg, MYG, MYG);
}
ASSERT0(MYG >= 0);

Expand Down
4 changes: 0 additions & 4 deletions tests/integrated/test-boutpp/collect/input/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

MXG = 2
MYG = 2

[mesh]
staggergrids = true
n = 1
Expand Down
4 changes: 0 additions & 4 deletions tests/integrated/test-boutpp/mms-ddz/data/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

MXG = 2
MYG = 2

[mesh]
staggergrids = true
n = 1
Expand Down
Loading