changeset 810:a4d7ca5de3c6 refactor/sbp_operators_method_signatures

Review: Suggested changes to volume_operator.jl
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 20 Sep 2021 20:36:20 +0200
parents 1fc6c4daec44
children ae28f1d7ef5e
files src/SbpOperators/volumeops/volume_operator.jl
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/volume_operator.jl	Sat Sep 18 23:30:49 2021 +0200
+++ b/src/SbpOperators/volumeops/volume_operator.jl	Mon Sep 20 20:36:20 2021 +0200
@@ -9,6 +9,13 @@
 operators and `IdentityMapping`s, e.g for `Dim=3` the volume operator in the
 y-direction is `I⊗op⊗I`.
 """
+# Review: The type parameters Dim, T in the signature can be removed,
+# by the following changes:
+#   one_d_grids = restrict.(Ref(grid), Tuple(1:Dim)) -->
+#   one_d_grids = restrict.(Ref(grid), Tuple(1:dimension(grid)))
+# and
+#   Is = IdentityMapping{T}.(size.(one_d_grids)) -->
+#   Is = IdentityMapping{eltype(grid)}.(size.(one_d_grids))
 function volume_operator(grid::EquidistantGrid{Dim,T}, inner_stencil, closure_stencils, parity, direction) where {Dim,T}
     #TODO: Check that direction <= Dim?