Skip to content

Commit

Permalink
BUG: Previous idea was wrong - boundary faces are 0 anyhow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Aug 27, 2024
1 parent 4ea2b34 commit dcd3000
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/darsia/utils/fv.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,9 @@ def __init__(
# After all, this is identical to the arithmetic avg of cell volumes
# connected to the face. This requires careful handling of the boundary faces.
# NOTE: This assumes equidistant grid spacing.
# NOTE: Fluxes on boundary are 0 and excluded.
volume_scaling = np.ones(grid.num_faces, dtype=float)
volume_scaling[grid.exterior_faces] = 0.5
mass_matrix = sps.diags(
np.prod(grid.voxel_size)
* volume_scaling
* np.ones(grid.num_faces, dtype=float)
)
mass_matrix = sps.diags(np.prod(grid.voxel_size) * volume_scaling)
else:
raise NotImplementedError

Expand Down

0 comments on commit dcd3000

Please sign in to comment.