From 3f8d2064990f312a71571e8bbed5d292e28adb62 Mon Sep 17 00:00:00 2001
From: absingh <absingh@mpi-cbg.de>
Date: Fri, 8 May 2020 15:53:11 +0200
Subject: [PATCH] Adding derivative y

---
 mpi_include                          | 2 +-
 mpi_libs                             | 2 +-
 src/FiniteDifference/FD_op.hpp       | 2 ++
 src/FiniteDifference/FD_op_Tests.cpp | 8 +++++---
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/mpi_include b/mpi_include
index 4439b1ca..16981421 100644
--- a/mpi_include
+++ b/mpi_include
@@ -1 +1 @@
--I/home/i-bird/MPI/include
\ No newline at end of file
+-I
\ No newline at end of file
diff --git a/mpi_libs b/mpi_libs
index 3a37a5cd..0519ecba 100644
--- a/mpi_libs
+++ b/mpi_libs
@@ -1 +1 @@
--Wl,-rpath -Wl,/home/i-bird/MPI/lib -Wl,--enable-new-dtags -pthread /home/i-bird/MPI/lib/libmpi.so
\ No newline at end of file
+ 
\ No newline at end of file
diff --git a/src/FiniteDifference/FD_op.hpp b/src/FiniteDifference/FD_op.hpp
index ac0a365b..eed9cf1e 100644
--- a/src/FiniteDifference/FD_op.hpp
+++ b/src/FiniteDifference/FD_op.hpp
@@ -241,6 +241,8 @@ namespace FD
 	};
 
 	typedef Derivative<0,2,CENTRAL> Derivative_x;
+    typedef Derivative<1,2,CENTRAL> Derivative_y;
+
 };
 
 
diff --git a/src/FiniteDifference/FD_op_Tests.cpp b/src/FiniteDifference/FD_op_Tests.cpp
index fa79083f..fa92b6bc 100644
--- a/src/FiniteDifference/FD_op_Tests.cpp
+++ b/src/FiniteDifference/FD_op_Tests.cpp
@@ -48,7 +48,7 @@ struct no_equation
 BOOST_AUTO_TEST_SUITE(fd_op_suite_tests)
 
     BOOST_AUTO_TEST_CASE(fd_op_tests) {
-        size_t edgeSemiSize = 40;
+        size_t edgeSemiSize = 80;
         const size_t sz[2] = {2 * edgeSemiSize+1, 2 * edgeSemiSize+1};
         Box<2, double> box({0, 0}, {2 * M_PI, 2 * M_PI});
         periodicity<2> bc({NON_PERIODIC, NON_PERIODIC});
@@ -73,19 +73,21 @@ BOOST_AUTO_TEST_SUITE(fd_op_suite_tests)
             double y = j * spacing[1];
             // Here fill the function value P
             domain.template getProp<0>(key_l) = sin(x) + sin(y);
+            domain.template getProp<1>(key_l) = 0;
             // Here fill the validation value for Df/Dx in property 3
-            domain.template getProp<2>(key_l) = cos(x);
+            domain.template getProp<2>(key_l) = cos(y);
             ++it;
         }
 
         domain.ghost_get<0>();
 
         FD::Derivative_x Dx;
+        FD::Derivative_y Dy;
 
         auto v = FD::getV<1>(domain);
         auto P = FD::getV<0>(domain);
 
-        v = Dx(P);
+        v = Dx(P)+Dy(P) ;
         auto it2 = domain.getDomainIterator();
 
         double worst = 0.0;
-- 
GitLab