Skip to content

Commit

Permalink
add conditional when there is no free_surf
Browse files Browse the repository at this point in the history
  • Loading branch information
kulakovri committed Feb 13, 2024
1 parent 0ed0246 commit 9e8e048
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions MDLIB/Setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,10 @@ void SetBCs(SetBCs_ff setBCs, MdoodzInput *instance, grid *mesh, markers *topo_c
double VxWestSum = 0.0;
double VxEastSum = 0.0;

instance->topoHeight.west = topo_chain->z[0];
instance->topoHeight.east = topo_chain->z[topo_chain->Nb_part-1];
if (topo_chain->Nb_part) {
instance->topoHeight.west = topo_chain->z[0];
instance->topoHeight.east = topo_chain->z[topo_chain->Nb_part-1];
}

for (int l = 0; l < mesh->Nz + 1; l++) {
for (int k = 0; k < mesh->Nx; k++) {
Expand Down

0 comments on commit 9e8e048

Please sign in to comment.