Skip to content

Commit

Permalink
Bug fix in the dense data
Browse files Browse the repository at this point in the history
  • Loading branch information
daavid00 committed Feb 9, 2024
1 parent a75f6f9 commit 566ff3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pyopmspe11/visualization/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def handle_inactive_mapping(dig, dil):
"""Set to inf the inactive grid centers in the reporting grid"""
var_array = np.empty(dig["noxz"]) * np.nan
var_array[dig["actind"]] = 0.0
for i in range(dig["nocellst"]):
for i in range(dig["nocellsr"]):
inds = i == dil["cell_ind"]
if np.isnan(np.sum(var_array[inds])):
dil["refxgrid"][i] = np.inf
Expand Down Expand Up @@ -815,7 +815,7 @@ def static_map_to_report_grid_performance_spatial(dig, dil):
np.array(dig["init"].iget_kw("DZ")[0]),
np.array(dig["init"].iget_kw("DX")[0]),
)
for i in range(dig["nocellst"]):
for i in range(dig["nocellsr"]):
inds = i == dil["cell_ind"]
p_v = np.sum(dig["porv"][inds])
if p_v > 0:
Expand Down Expand Up @@ -855,7 +855,7 @@ def map_to_report_grid_performance_spatial(dig, dil, names, d_t):
"""Map the simulation grid to the reporting grid"""
for name in names:
dil[f"{name}_refg"] = np.empty(dig["nocellsr"]) * np.nan
for i in range(dig["nocellst"]):
for i in range(dig["nocellsr"]):
inds = i == dil["cell_ind"]
p_v = np.sum(dig["porv"][inds])
if p_v > 0:
Expand Down Expand Up @@ -980,7 +980,7 @@ def compute_xh20(dig, dil, h2o_v, co2_g):

def map_to_report_grid(dig, dil, names):
"""Map the simulation grid to the reporting grid"""
for i in range(dig["nocellst"]):
for i in range(dig["nocellsr"]):
inds = i == dil["cell_ind"]
p_v = np.sum(dig["porv"][inds])
if p_v > 0:
Expand Down

0 comments on commit 566ff3e

Please sign in to comment.