diff --git a/src/Numos.CoreSim/Solvers/AdvectionSolver.cs b/src/Numos.CoreSim/Solvers/AdvectionSolver.cs index 2ee5003..b687ecd 100644 --- a/src/Numos.CoreSim/Solvers/AdvectionSolver.cs +++ b/src/Numos.CoreSim/Solvers/AdvectionSolver.cs @@ -1072,8 +1072,8 @@ private static bool IsBoundary(AtmosChunk chunk, Int3 position) return position.X == 0 || position.X == chunk.Width - 1 || position.Y == 0 || - position.Y == chunk.Height - 1 || - chunk.Depth > 1 && (position.Z == 0 || position.Z == chunk.Depth - 1); + position.Z == 0 || + position.Z == chunk.Depth - 1; } /// diff --git a/src/Numos.CoreSim/Solvers/BoundaryFlowSolver.cs b/src/Numos.CoreSim/Solvers/BoundaryFlowSolver.cs index 43ecbb6..bb70f46 100644 --- a/src/Numos.CoreSim/Solvers/BoundaryFlowSolver.cs +++ b/src/Numos.CoreSim/Solvers/BoundaryFlowSolver.cs @@ -124,9 +124,6 @@ private static void ProcessBoundaryFlow( TryFlowToNeighbor(context, sourceChunk, sourcePosition, localPosition + Int3.PosX, Int3.PosX, injectionBuffer); TryFlowToNeighbor(context, sourceChunk, sourcePosition, localPosition + Int3.NegY, Int3.NegY, injectionBuffer); TryFlowToNeighbor(context, sourceChunk, sourcePosition, localPosition + Int3.PosY, Int3.PosY, injectionBuffer); - if (sourceChunk.Depth <= 1) - return; - TryFlowToNeighbor(context, sourceChunk, sourcePosition, localPosition + Int3.NegZ, Int3.NegZ, injectionBuffer); TryFlowToNeighbor(context, sourceChunk, sourcePosition, localPosition + Int3.PosZ, Int3.PosZ, injectionBuffer); } diff --git a/src/Numos.CoreSim/Solvers/DefaultAtmosSolvers.cs b/src/Numos.CoreSim/Solvers/DefaultAtmosSolvers.cs index 2ffaec9..219f1b8 100644 --- a/src/Numos.CoreSim/Solvers/DefaultAtmosSolvers.cs +++ b/src/Numos.CoreSim/Solvers/DefaultAtmosSolvers.cs @@ -49,7 +49,7 @@ private static int GetBoundaryVoxelCount(int width, int height, int depth) int voxelCount = checked(width * height * depth); int interiorWidth = Math.Max(0, width - 2); int interiorHeight = Math.Max(0, height - 2); - int interiorDepth = depth > 1 ? Math.Max(0, depth - 2) : 1; + int interiorDepth = Math.Max(0, depth - 2); int interiorVoxelCount = checked(interiorWidth * interiorHeight * interiorDepth); return voxelCount - interiorVoxelCount; }