Skip to content

Commit

Permalink
enabled the new BC to work with indices bc masker
Browse files Browse the repository at this point in the history
hsalehipour committed Oct 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 96d80f0 commit 0f912d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xlb/operator/boundary_condition/bc_grads_approximation.py
Original file line number Diff line number Diff line change
@@ -71,6 +71,12 @@ def __init__(
# This BC needs implicit distance to the mesh
self.needs_mesh_distance = True

# If this BC is defined using indices, it would need padding in order to find missing directions
# when imposed on a geometry that is in the domain interior
if self.mesh_vertices is None:
assert self.indices is not None
self.needs_padding = True

# Raise error if used for 2d examples:
if self.velocity_set.d == 2:
raise NotImplementedError("This BC is not implemented in 2D!")

0 comments on commit 0f912d4

Please sign in to comment.