changeset 1760:aba2ce166546 feature/jet_aqua

Resolve unbound paramater in VolumeOperator
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 13 Sep 2024 14:32:05 +0200
parents d28562d5ca8f
children 0656b46a1a74
files src/RegionIndices/RegionIndices.jl src/SbpOperators/volumeops/volume_operator.jl
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/RegionIndices/RegionIndices.jl	Fri Sep 13 14:01:37 2024 +0200
+++ b/src/RegionIndices/RegionIndices.jl	Fri Sep 13 14:32:05 2024 +0200
@@ -36,7 +36,7 @@
     return Index{getregion(i,boundary_width,dim_size)}(i)
 end
 
-IndexTuple(t::Vararg{Tuple{T, DataType}}) where T<:Integer = Index.(t)
+IndexTuple(t::Vararg{Tuple{Integer, DataType}}) = Index.(t)
 export IndexTuple
 
 # TODO: Use the values of the region structs, e.g. Lower(), for the region parameter instead of the types.
--- a/src/SbpOperators/volumeops/volume_operator.jl	Fri Sep 13 14:01:37 2024 +0200
+++ b/src/SbpOperators/volumeops/volume_operator.jl	Fri Sep 13 14:32:05 2024 +0200
@@ -8,6 +8,11 @@
     closure_stencils::NTuple{M,Stencil{T,K}}
     size::NTuple{1,Int}
     parity::Parity
+
+    function VolumeOperator(inner_stencil::Stencil{T,N}, closure_stencils::Tuple{Stencil{T,K}, Vararg{Stencil{T,K}}}, size::NTuple{1,Int}, parity::Parity) where {T,N,K}
+        M = length(closure_stencils)
+        return new{T,N,M,K}(inner_stencil, closure_stencils, size, parity)
+    end
 end
 
 function VolumeOperator(grid::EquidistantGrid, inner_stencil, closure_stencils, parity)