changeset 54:4300a3fbd818

switch grid to Grid in diffOp
author Ylva Rydin <ylva.rydin@telia.com>
date Mon, 14 Jan 2019 16:30:52 +0100
parents 8c6db1f6d8e0
children c62ea0112d4d
files diffOp.jl plotDerivative.jl plotDerivative2d.jl
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/diffOp.jl	Mon Jan 14 11:30:36 2019 +0100
+++ b/diffOp.jl	Mon Jan 14 16:30:52 2019 +0100
@@ -16,7 +16,7 @@
     error("not implemented")
 end
 
-function interface(Du::DiffOp, Dv::DiffOp, b::grid.BoundaryId; type)
+function interface(Du::DiffOp, Dv::DiffOp, b::Grid.BoundaryId; type)
     error("not implemented")
 end
 
@@ -30,7 +30,7 @@
 
 # u = L*v
 function apply!(L::Laplace1D, u::AbstractVector, v::AbstractVector)
-    h = grid.spacings(L.grid)[1]
+    h = Grid.spacings(L.grid)[1]
     apply!(L.op, u, v, h)
     u .= L.a * u
     return nothing
@@ -47,7 +47,7 @@
 # u = L*v
 function apply!(L::Laplace2D, u::AbstractVector, v::AbstractVector)
     u .= 0*u
-    h = grid.spacings(L.grid)
+    h = Grid.spacings(L.grid)
 
     li = LinearIndices(L.grid.numberOfPointsPerDim)
     n_x, n_y = L.grid.numberOfPointsPerDim
--- a/plotDerivative.jl	Mon Jan 14 11:30:36 2019 +0100
+++ b/plotDerivative.jl	Mon Jan 14 16:30:52 2019 +0100
@@ -1,4 +1,4 @@
-g = sbp.grid.EquidistantGrid(200,(0, 2pi))
+g = sbp.Grid.EquidistantGrid(200,(0, 2pi))
 op =sbp.readOperator("d2_4th.txt","h_4th.txt")
 Laplace = sbp.Laplace1D(g,1,op)
 
@@ -9,4 +9,4 @@
 sbp.apply!(Laplace,u,v)
 
 @show u
-sbp.grid.plotgridfunction(g,u)
+sbp.Grid.plotgridfunction(g,u)
--- a/plotDerivative2d.jl	Mon Jan 14 11:30:36 2019 +0100
+++ b/plotDerivative2d.jl	Mon Jan 14 16:30:52 2019 +0100
@@ -1,9 +1,9 @@
-g = sbp.grid.EquidistantGrid((100,75),((0, 0), (2pi, 3/2*pi)))
+g = sbp.Grid.EquidistantGrid((100,75),((0, 0), (2pi, 3/2*pi)))
 op = sbp.readOperator("d2_4th.txt","h_4th.txt")
 Laplace = sbp.Laplace2D(g,1,op)
 
 init(x,y) = sin(x) + cos(y)
-v = sbp.grid.evalOn(g,init)
+v = sbp.Grid.evalOn(g,init)
 
 u = zeros(length(v))
 
@@ -12,5 +12,5 @@
 @show u
 @show u'*u
 
-sbp.grid.plotgridfunction(g,u)
+sbp.Grid.plotgridfunction(g,u)