changeset 591:089d4cb65146 refactor/toml_operator_format

Move operators into a toml file
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 02 Dec 2020 14:19:37 +0100
parents 4aa7fe13a984
children 4781e759d92f
files Manifest.toml Project.toml src/SbpOperators/operators/d2_2nd.txt src/SbpOperators/operators/d2_4th.txt src/SbpOperators/operators/h_2nd.txt src/SbpOperators/operators/h_4th.txt src/SbpOperators/operators/standard_diagonal.toml
diffstat 7 files changed, 54 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/Manifest.toml	Wed Dec 02 11:18:18 2020 +0100
+++ b/Manifest.toml	Wed Dec 02 14:19:37 2020 +0100
@@ -1,12 +1,29 @@
 # This file is machine-generated - editing it directly is not advised
 
+[[Dates]]
+deps = ["Printf"]
+uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
+
 [[OffsetArrays]]
 git-tree-sha1 = "9011c7c98769c451f83869a4d66461e2f23bc80b"
 uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
 version = "1.2.1"
 
+[[Printf]]
+deps = ["Unicode"]
+uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
+
+[[TOML]]
+deps = ["Dates"]
+git-tree-sha1 = "d0ac7eaad0fb9f6ba023a1d743edca974ae637c4"
+uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
+version = "1.0.0"
+
 [[TiledIteration]]
 deps = ["OffsetArrays"]
 git-tree-sha1 = "98693daea9bb49aba71eaad6b168b152d2310358"
 uuid = "06e1c1a7-607b-532d-9fad-de7d9aa2abac"
 version = "0.2.4"
+
+[[Unicode]]
+uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
--- a/Project.toml	Wed Dec 02 11:18:18 2020 +0100
+++ b/Project.toml	Wed Dec 02 14:19:37 2020 +0100
@@ -4,6 +4,7 @@
 version = "0.1.0"
 
 [deps]
+TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
 TiledIteration = "06e1c1a7-607b-532d-9fad-de7d9aa2abac"
 
 [compat]
--- a/src/SbpOperators/operators/d2_2nd.txt	Wed Dec 02 11:18:18 2020 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-# D2 order 2
-
-boundary_stencils
-1 -2 1
-
-inner_stencil
-1 -2 1
-
-e
-1
-
-d1
--3/2 2 -1/2
--- a/src/SbpOperators/operators/d2_4th.txt	Wed Dec 02 11:18:18 2020 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-# D2 order 4
-
-boundary_stencils
-     2    -5       4      -1     0     0
-     1    -2       1       0     0     0
- -4/43 59/43 -110/43   59/43 -4/43     0
- -1/49     0   59/49 -118/49 64/49 -4/49
-
-inner_stencil
--1/12     4/3  -5/2   4/3 -1/12
-
-e
-1
-
-d1
--11/6 3 -3/2 1/3
\ No newline at end of file
--- a/src/SbpOperators/operators/h_2nd.txt	Wed Dec 02 11:18:18 2020 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-# H order 2
-
-closure
-1/2
-
-inner_stencil
-1
--- a/src/SbpOperators/operators/h_4th.txt	Wed Dec 02 11:18:18 2020 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-# H order 4
-
-closure
-17/48 59/48 43/48 49/48
-
-inner_stencil
-1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/SbpOperators/operators/standard_diagonal.toml	Wed Dec 02 14:19:37 2020 +0100
@@ -0,0 +1,36 @@
+[meta]
+authors = "Ken Mattson"
+descripion = "Standard operators for equidistant grids"
+type = "equidistant"
+
+[order2]
+H.inner = ["1"]
+H.closure = ["1/2"]
+
+D1.inner_stencil = ["-1/2", "0", "1/2"]
+D1.closure_stencils = [
+    ["-1", "1"],
+]
+
+D2.inner_stencil = ["1", "-2", "1"]
+D2.closure_stencils = [
+    ["1", "-2", "1"],
+]
+
+e.closure = ["1"]
+d1.closure = ["-3/2", "2", "-1/2"]
+
+[order4]
+H.inner = ["1"]
+H.closure = ["17/48", "59/48", "43/48", "49/48"]
+
+D2.inner_stencil = ["-1/12","4/3","-5/2","4/3","-1/12"]
+D2.closure_stencils = [
+    [     "2",    "-5",      "4",      "-1",     "0",     "0"],
+    [     "1",    "-2",      "1",       "0",     "0",     "0"],
+    [ "-4/43", "59/43", "-110/43",   "9/43", "-4/43",     "0"],
+    [ "-1/49",     "0",   "59/49", "118/49", "64/49", "-4/49"],
+]
+
+e.closure = ["1"]
+d1.closure = ["-11/6", "3", "-3/2", "1/3"]