mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-13 09:28:23 +01:00
added test library
This commit is contained in:
parent
04763406cb
commit
4353cdc133
@ -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
20
src/main.cpp
Normal 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;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user