diff src/SbpOperators/boundaryops/boundary_operator.jl @ 1162:62aaed9cf76b feature/dissipation_operators

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 29 Nov 2022 22:43:57 +0100
parents 716e721ce3eb
children f1c2a4fa0ee1 1cc45207817e 102ebdaf7c11
line wrap: on
line diff
--- a/src/SbpOperators/boundaryops/boundary_operator.jl	Tue May 10 21:15:55 2022 +0200
+++ b/src/SbpOperators/boundaryops/boundary_operator.jl	Tue Nov 29 22:43:57 2022 +0100
@@ -1,28 +1,3 @@
-"""
-    boundary_operator(grid,closure_stencil,boundary)
-
-Creates a boundary operator on a `Dim`-dimensional grid for the
-specified `boundary`. The action of the operator is determined by `closure_stencil`.
-
-When `Dim=1`, the corresponding `BoundaryOperator` tensor mapping is returned.
-When `Dim>1`, the `BoundaryOperator` `op` is inflated by the outer product
-of `IdentityTensors` in orthogonal coordinate directions, e.g for `Dim=3`,
-the boundary restriction operator in the y-direction direction is `Ix⊗op⊗Iz`.
-"""
-function boundary_operator(grid::EquidistantGrid, closure_stencil, boundary::CartesianBoundary)
-    #TODO:Check that dim(boundary) <= Dim?
-
-    d = dim(boundary)
-    op = BoundaryOperator(restrict(grid, d), closure_stencil, region(boundary))
-
-    # Create 1D IdentityTensors for each coordinate direction
-    one_d_grids = restrict.(Ref(grid), Tuple(1:dimension(grid)))
-    Is = IdentityTensor{eltype(grid)}.(size.(one_d_grids))
-
-    return LazyTensors.inflate(op, size(grid), d)
-end
-# TBD: Should the inflation happen here or should we remove this method and do it at the caller instead?
-
 """
     BoundaryOperator{T,R,N} <: LazyTensor{T,0,1}
 
@@ -37,8 +12,6 @@
     size::Int
 end
 
-BoundaryOperator{R}(stencil::Stencil{T,N}, size::Int) where {T,R,N} = BoundaryOperator{T,R,N}(stencil, size)
-
 """
     BoundaryOperator(grid::EquidistantGrid{1}, closure_stencil, region)
 
@@ -51,6 +24,7 @@
 
 """
     closure_size(::BoundaryOperator)
+
 The size of the closure stencil.
 """
 closure_size(::BoundaryOperator{T,R,N}) where {T,R,N} = N