added test library

This commit is contained in:
Max Lübke 2021-10-26 11:55:08 +02:00
parent 04763406cb
commit 4353cdc133
2 changed files with 24 additions and 1 deletions

View File

@ -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)

20
src/main.cpp Normal file
View File

@ -0,0 +1,20 @@
#include "diffusion.hpp"
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
int x = 10;
int y = 10;
std::vector<double> alpha(x * y, 1.5 * pow(10, -9));
std::vector<double> input(x * y, 0);
input[x + 1] = 5 * std::pow(10, 6);
BTCS2D(x, y, input, alpha, 10.);
return 0;
}