Skip to content
Snippets Groups Projects
Commit 3f8d2064 authored by Abhinav Singh's avatar Abhinav Singh
Browse files

Adding derivative y

parent 87b3f7f9
No related branches found
No related tags found
No related merge requests found
-I/home/i-bird/MPI/include
\ No newline at end of file
-I
\ No newline at end of file
-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
......@@ -241,6 +241,8 @@ namespace FD
};
typedef Derivative<0,2,CENTRAL> Derivative_x;
typedef Derivative<1,2,CENTRAL> Derivative_y;
};
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment