-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
124 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .distribute import distribute as distribute | ||
from .distribute import distribute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from xlb.experimental.ooc.out_of_core import OOCmap as OOCmap | ||
from xlb.experimental.ooc.ooc_array import OOCArray as OOCArray | ||
from xlb.experimental.ooc.out_of_core import OOCmap | ||
from xlb.experimental.ooc.ooc_array import OOCArray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from xlb.helper.nse_solver import create_nse_fields as create_nse_fields | ||
from xlb.helper.initializers import initialize_eq as initialize_eq | ||
from xlb.helper.nse_solver import create_nse_fields | ||
from xlb.helper.initializers import initialize_eq | ||
from xlb.helper.check_boundary_overlaps import check_bc_overlaps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import numpy as np | ||
from xlb.compute_backend import ComputeBackend | ||
|
||
|
||
def check_bc_overlaps(bclist, dim, backend): | ||
index_list = [[] for _ in range(dim)] | ||
for bc in bclist: | ||
if bc.indices is None: | ||
continue | ||
# Detect duplicates within bc.indices | ||
index_arr = np.unique(bc.indices, axis=-1) | ||
if index_arr.shape[-1] != len(bc.indices[0]): | ||
if backend == ComputeBackend.WARP: | ||
raise ValueError(f"Boundary condition {bc.__class__.__name__} has duplicate indices!") | ||
print(f"WARNING: there are duplicate indices in {bc.__class__.__name__} and hence the order in bc list matters!") | ||
for d in range(dim): | ||
index_list[d] += bc.indices[d] | ||
|
||
# Detect duplicates within bclist | ||
index_arr = np.unique(index_list, axis=-1) | ||
if index_arr.shape[-1] != len(index_list[0]): | ||
if backend == ComputeBackend.WARP: | ||
raise ValueError("Boundary condition list containes duplicate indices!") | ||
print("WARNING: there are duplicate indices in the boundary condition list and hence the order in this list matters!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from xlb.operator.operator import Operator as Operator | ||
from xlb.operator.parallel_operator import ParallelOperator as ParallelOperator | ||
from xlb.operator.operator import Operator | ||
from xlb.operator.parallel_operator import ParallelOperator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
from xlb.operator.boundary_condition.boundary_condition import BoundaryCondition as BoundaryCondition | ||
from xlb.operator.boundary_condition.boundary_condition_registry import ( | ||
BoundaryConditionRegistry as BoundaryConditionRegistry, | ||
) | ||
from xlb.operator.boundary_condition.bc_equilibrium import EquilibriumBC as EquilibriumBC | ||
from xlb.operator.boundary_condition.bc_do_nothing import DoNothingBC as DoNothingBC | ||
from xlb.operator.boundary_condition.bc_halfway_bounce_back import HalfwayBounceBackBC as HalfwayBounceBackBC | ||
from xlb.operator.boundary_condition.bc_fullway_bounce_back import FullwayBounceBackBC as FullwayBounceBackBC | ||
from xlb.operator.boundary_condition.bc_zouhe import ZouHeBC as ZouHeBC | ||
from xlb.operator.boundary_condition.bc_regularized import RegularizedBC as RegularizedBC | ||
from xlb.operator.boundary_condition.bc_extrapolation_outflow import ExtrapolationOutflowBC as ExtrapolationOutflowBC | ||
from xlb.operator.boundary_condition.bc_grads_approximation import GradsApproximationBC as GradsApproximationBC | ||
from xlb.operator.boundary_condition.boundary_condition import BoundaryCondition | ||
from xlb.operator.boundary_condition.boundary_condition_registry import BoundaryConditionRegistry | ||
from xlb.operator.boundary_condition.bc_equilibrium import EquilibriumBC | ||
from xlb.operator.boundary_condition.bc_do_nothing import DoNothingBC | ||
from xlb.operator.boundary_condition.bc_halfway_bounce_back import HalfwayBounceBackBC | ||
from xlb.operator.boundary_condition.bc_fullway_bounce_back import FullwayBounceBackBC | ||
from xlb.operator.boundary_condition.bc_zouhe import ZouHeBC | ||
from xlb.operator.boundary_condition.bc_regularized import RegularizedBC | ||
from xlb.operator.boundary_condition.bc_extrapolation_outflow import ExtrapolationOutflowBC | ||
from xlb.operator.boundary_condition.bc_grads_approximation import GradsApproximationBC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
from xlb.operator.boundary_masker.indices_boundary_masker import ( | ||
IndicesBoundaryMasker as IndicesBoundaryMasker, | ||
) | ||
from xlb.operator.boundary_masker.mesh_boundary_masker import ( | ||
MeshBoundaryMasker as MeshBoundaryMasker, | ||
) | ||
from xlb.operator.boundary_masker.mesh_distance_boundary_masker import ( | ||
MeshDistanceBoundaryMasker as MeshDistanceBoundaryMasker, | ||
) | ||
from xlb.operator.boundary_masker.indices_boundary_masker import IndicesBoundaryMasker | ||
from xlb.operator.boundary_masker.mesh_boundary_masker import MeshBoundaryMasker | ||
from xlb.operator.boundary_masker.mesh_distance_boundary_masker import MeshDistanceBoundaryMasker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from xlb.operator.collision.collision import Collision as Collision | ||
from xlb.operator.collision.bgk import BGK as BGK | ||
from xlb.operator.collision.kbc import KBC as KBC | ||
from xlb.operator.collision.forced_collision import ForcedCollision as ForcedCollision | ||
from xlb.operator.collision.collision import Collision | ||
from xlb.operator.collision.bgk import BGK | ||
from xlb.operator.collision.kbc import KBC | ||
from xlb.operator.collision.forced_collision import ForcedCollision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
from xlb.operator.equilibrium.quadratic_equilibrium import ( | ||
Equilibrium as Equilibrium, | ||
QuadraticEquilibrium as QuadraticEquilibrium, | ||
) | ||
from xlb.operator.equilibrium.quadratic_equilibrium import Equilibrium, QuadraticEquilibrium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from xlb.operator.force.momentum_transfer import MomentumTransfer as MomentumTransfer | ||
from xlb.operator.force.exact_difference_force import ExactDifference as ExactDifference | ||
from xlb.operator.force.momentum_transfer import MomentumTransfer | ||
from xlb.operator.force.exact_difference_force import ExactDifference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from xlb.operator.precision_caster.precision_caster import PrecisionCaster as PrecisionCaster | ||
from xlb.operator.precision_caster.precision_caster import PrecisionCaster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from xlb.operator.stepper.stepper import Stepper as Stepper | ||
from xlb.operator.stepper.nse_stepper import IncompressibleNavierStokesStepper as IncompressibleNavierStokesStepper | ||
from xlb.operator.stepper.stepper import Stepper | ||
from xlb.operator.stepper.nse_stepper import IncompressibleNavierStokesStepper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from xlb.operator.stream.stream import Stream as Stream | ||
from xlb.operator.stream.stream import Stream |
Oops, something went wrong.