diff src/Grids/equidistant_grid.jl @ 1595:611ae2308aa1 feature/boundary_conditions

Add orthogonal_grid
author Vidar Stiernström <vidar.stiernstrom@gmail.com>
date Sun, 26 May 2024 17:35:52 -0700
parents efe1fc4cb6b0
children 3e7438e2a033
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl	Sat May 25 16:07:10 2024 -0700
+++ b/src/Grids/equidistant_grid.jl	Sun May 26 17:35:52 2024 -0700
@@ -47,12 +47,12 @@
 """
 inverse_spacing(g::EquidistantGrid) = 1/step(g.points)
 
-
 boundary_identifiers(::EquidistantGrid) = (Lower(), Upper())
 boundary_grid(g::EquidistantGrid, id::Lower) = ZeroDimGrid(g[begin])
 boundary_grid(g::EquidistantGrid, id::Upper) = ZeroDimGrid(g[end])
 boundary_indices(g::EquidistantGrid, id::Lower) = (1,)
 boundary_indices(g::EquidistantGrid, id::Upper) = (length(g),)
+orthogonal_grid(g::EquidistantGrid, id::Union{Lower,Upper}) = g
 
 """
     refine(g::EquidistantGrid, r::Int)