From 4353cdc133f818395cb8ab96573cd31014551111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Tue, 26 Oct 2021 11:55:08 +0200 Subject: [PATCH] added test library --- src/CMakeLists.txt | 5 ++++- src/main.cpp | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/main.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 07b3c8d..33e2d28 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,2 +1,5 @@ -add_library(diffusion OBJECT diffusion.cpp) +add_library(diffusion OBJECT diffusion.cpp diffusion.hpp) target_link_libraries(diffusion Eigen3::Eigen) + +add_executable(test main.cpp) +target_link_libraries(test PUBLIC diffusion) diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..6c18b6f --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,20 @@ +#include "diffusion.hpp" +#include +#include +#include + +using namespace std; + +int main(int argc, char *argv[]) { + + int x = 10; + int y = 10; + + std::vector alpha(x * y, 1.5 * pow(10, -9)); + std::vector input(x * y, 0); + input[x + 1] = 5 * std::pow(10, 6); + + BTCS2D(x, y, input, alpha, 10.); + + return 0; +}