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; +}