diff src/Grids/tensor_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 de4e15924d26
children 37b05221beda
line wrap: on
line diff
--- a/src/Grids/tensor_grid.jl	Sat May 25 16:07:10 2024 -0700
+++ b/src/Grids/tensor_grid.jl	Sun May 26 17:35:52 2024 -0700
@@ -95,6 +95,9 @@
     return LazyTensors.concatenate_tuples(b_ind...)
 end
 
+orthogonal_grid(g::TensorGrid, id::BoundaryIdentifier) = g.grids[grid_id(id)]
+
+
 function combined_coordinate_vector_type(coordinate_types...)
     combined_coord_length = mapreduce(_ncomponents, +, coordinate_types)
     combined_coord_type = mapreduce(eltype, promote_type, coordinate_types)
@@ -133,3 +136,4 @@
         return (I, d-cumsum(nds)[I-1])
     end
 end
+