diff src/Grids/multiblockgrids.jl @ 2028:06f4b2ab43e8 feature/grids/multiblock_grids

Implement boundary_grid
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 11 Apr 2025 15:58:17 +0200
parents 1b6f150d95c5
children
line wrap: on
line diff
--- a/src/Grids/multiblockgrids.jl	Fri Apr 11 08:13:21 2025 +0200
+++ b/src/Grids/multiblockgrids.jl	Fri Apr 11 15:58:17 2025 +0200
@@ -1,4 +1,3 @@
-
 struct MultiBlockGrid{T,D,GT, CT} <: Grid{T,D}
     grids::GT
     connections::CT
@@ -15,9 +14,6 @@
 connections(g::MultiBlockGrid) = g.connections
 
 Base.getindex(g::MultiBlockGrid, I...) = g.grids[I...]
-# function boundary_identifiers end # Requires function from manifolds?
-# function boundary_grid end # Should return a MultiBlockGrid with the right connections?
-
 
 min_spacing(g::MultiBlockGrid) = minimum(min_spacing, grids(g))
 
@@ -38,13 +34,6 @@
 end
 
 
-# function boundary_indices end # Need to figure out the grid functions first?
-# function eval_on end # Need to figure out the grid functions first?
-# function Base.map end # Need to figure out the grid functions first? Should only have to implement the iterator interface
-
-# Plotting recipes
-
-
 """
     MultiBlockBoundary{N, BID} <: BoundaryIdentifier
 
@@ -65,6 +54,17 @@
 
 connection(t::Tuple) = connection(t...)
 
+# function boundary_identifiers end # Requires function from manifolds?
+
+function boundary_grid(g::MultiBlockGrid, bId::MultiBlockBoundary)
+    return boundary_grid(grids(g)[grid_id(bId)], boundary_id(bId))
+end
+
+# function boundary_indices end # Need to figure out the grid functions first?
+# function eval_on end # Need to figure out the grid functions first?
+# function Base.map end # Need to figure out the grid functions first? Should only have to implement the iterator interface
+
+# Plotting recipes
 
 
 # Nested indices??