Skip to content

Commit

Permalink
#220 more clarity in comments for clearning subinterval fields in ind…
Browse files Browse the repository at this point in the history
…icate errors
  • Loading branch information
acse-ej321 committed Oct 24, 2024
1 parent 276cb3a commit fb5552b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions goalie/go_mesh_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,17 @@ def indicate_errors(
indi.interpolate(abs(indi))
self.indicators[f][i][j].interpolate(ufl.max_value(indi, 1.0e-16))

# discard extra subinterval solution field
self.solutions[f][FWD_OLD].pop()
self.solutions[f][ADJ_NEXT].pop()
enriched_mesh_seq.solutions[f][FWD_OLD].pop()
enriched_mesh_seq.solutions[f][ADJ_NEXT].pop()

# delete extra mesh to reduce the memory footprint
enriched_mesh_seq.meshes.pop()
# discard current subinterval solution field
for f in self.fields:
self.solutions[f][FWD_OLD].pop(-1)
self.solutions[f][ADJ_NEXT].pop(-1)
enriched_mesh_seq.solutions[f][FWD_OLD].pop(-1)
enriched_mesh_seq.solutions[f][ADJ_NEXT].pop(-1)

# delete current subinterval enriched mesh to reduce the memory footprint
enriched_mesh_seq.meshes.pop(-1)
enriched_mesh_seq.time_partition.num_subintervals -= 1
enriched_mesh_seq.time_partition.timesteps.pop()
enriched_mesh_seq.time_partition.timesteps.pop(-1)

return self.solutions, self.indicators

Expand Down

0 comments on commit fb5552b

Please sign in to comment.