mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-14 01:48:23 +01:00
fix some cmake bugs
This commit is contained in:
parent
9461dad147
commit
57a0e8a1a6
@ -75,7 +75,7 @@ void BTCSDiffusion::simulate(std::vector<double> &c, std::vector<double> &alpha,
|
|||||||
A_line++;
|
A_line++;
|
||||||
tripletList.push_back(T(A_line, size - 1, 1));
|
tripletList.push_back(T(A_line, size - 1, 1));
|
||||||
// b[A_line] = bc[1];
|
// b[A_line] = bc[1];
|
||||||
if (bc[0] == -1)
|
if (bc[1] == -1)
|
||||||
b[A_line] = c[c.size() - 1];
|
b[A_line] = c[c.size() - 1];
|
||||||
else
|
else
|
||||||
b[A_line] = this->bc[1];
|
b[A_line] = this->bc[1];
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#define BTCSDIFFUSION_H_
|
#define BTCSDIFFUSION_H_
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <Eigen/SparseCore>
|
#include <Eigen/Sparse>
|
||||||
|
|
||||||
typedef int BCSide;
|
typedef int BCSide;
|
||||||
typedef Eigen::Triplet<double> T;
|
typedef Eigen::Triplet<double> T;
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
add_library(diffusion OBJECT diffusion.cpp diffusion.hpp)
|
add_library(diffusion OBJECT diffusion.cpp diffusion.hpp)
|
||||||
target_link_libraries(diffusion Eigen3::Eigen)
|
target_link_libraries(diffusion Eigen3::Eigen)
|
||||||
|
|
||||||
add_library(diffusion_class OBJECT BTCSDiffusion.cpp)
|
add_library(diffusion_class OBJECT BTCSDiffusion.cpp BTCSDiffusion.hpp)
|
||||||
target_link_libraries(diffusion_class Eigen3::Eigen)
|
target_link_libraries(diffusion_class Eigen3::Eigen)
|
||||||
|
|
||||||
add_executable(test main.cpp)
|
add_executable(test main.cpp)
|
||||||
target_link_libraries(test PUBLIC diffusion)
|
target_link_libraries(test PUBLIC diffusion)
|
||||||
|
|
||||||
|
add_executable(test_class test_class.cpp)
|
||||||
|
target_link_libraries(test_class PUBLIC diffusion_class)
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
#include "BTCSDiffusion.hpp"
|
#include "BTCSDiffusion.hpp"
|
||||||
#include "diffusion.hpp"
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -15,7 +14,7 @@ int main(int argc, char *argv[]) {
|
|||||||
std::vector<double> bc_left, bc_right;
|
std::vector<double> bc_left, bc_right;
|
||||||
|
|
||||||
bc_left.push_back(5. * std::pow(10, -6));
|
bc_left.push_back(5. * std::pow(10, -6));
|
||||||
bc_right.push_back(1. * std::pow(10, -6));
|
bc_right.push_back(-1);
|
||||||
// input[x + 2] = 5.5556554 * std::pow(10, -6);
|
// input[x + 2] = 5.5556554 * std::pow(10, -6);
|
||||||
// input[x + 3] = 5.234564213 * std::pow(10, -6);
|
// input[x + 3] = 5.234564213 * std::pow(10, -6);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user