Compare commits
1 Commits
master
...
ml/bump-tu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53c3dc51f5 |
10
src/run.cpp
10
src/run.cpp
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "io.hpp"
|
#include "io.hpp"
|
||||||
#include "tug/Boundary.hpp"
|
#include "tug/Boundary.hpp"
|
||||||
|
#include "tug/Core/Matrix.hpp"
|
||||||
#include "tug/Grid.hpp"
|
#include "tug/Grid.hpp"
|
||||||
|
|
||||||
#include <Eigen/src/Core/Map.h>
|
#include <Eigen/src/Core/Map.h>
|
||||||
@ -22,15 +23,18 @@ double run_bench(const bench_input &input, const std::string &output_file) {
|
|||||||
std::vector<TugType> raw_alpha_x = read_alpha_csv<TugType>(input.csv_alpha_x);
|
std::vector<TugType> raw_alpha_x = read_alpha_csv<TugType>(input.csv_alpha_x);
|
||||||
std::vector<TugType> raw_alpha_y = read_alpha_csv<TugType>(input.csv_alpha_y);
|
std::vector<TugType> raw_alpha_y = read_alpha_csv<TugType>(input.csv_alpha_y);
|
||||||
|
|
||||||
Eigen::Map<RowMajorMat> alpha_x(raw_alpha_x.data(), input.nrows, input.ncols);
|
tug::RowMajMatMap<TugType> alpha_x(raw_alpha_x.data(), input.nrows,
|
||||||
Eigen::Map<RowMajorMat> alpha_y(raw_alpha_y.data(), input.nrows, input.ncols);
|
input.ncols);
|
||||||
|
tug::RowMajMatMap<TugType> alpha_y(raw_alpha_y.data(), input.nrows,
|
||||||
|
input.ncols);
|
||||||
|
|
||||||
const auto start_t = std::chrono::high_resolution_clock::now();
|
const auto start_t = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
// create tug grids and boundary conditions
|
// create tug grids and boundary conditions
|
||||||
for (int i = 0; i < raw_data.size(); i++) {
|
for (int i = 0; i < raw_data.size(); i++) {
|
||||||
|
|
||||||
Eigen::Map<RowMajorMat> mat(raw_data[i].data(), input.nrows, input.ncols);
|
tug::RowMajMatMap<TugType> mat(raw_data[i].data(), input.nrows,
|
||||||
|
input.ncols);
|
||||||
tug::Grid<TugType> grid(input.nrows, input.ncols);
|
tug::Grid<TugType> grid(input.nrows, input.ncols);
|
||||||
|
|
||||||
grid.setConcentrations(mat);
|
grid.setConcentrations(mat);
|
||||||
|
|||||||
@ -6,9 +6,6 @@
|
|||||||
|
|
||||||
using TugType = double;
|
using TugType = double;
|
||||||
|
|
||||||
using RowMajorMat =
|
|
||||||
Eigen::Matrix<TugType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
|
|
||||||
|
|
||||||
double run_bench(const bench_input &input, const std::string &output_file = "");
|
double run_bench(const bench_input &input, const std::string &output_file = "");
|
||||||
|
|
||||||
static inline std::vector<TugType>
|
static inline std::vector<TugType>
|
||||||
|
|||||||
2
tug
2
tug
@ -1 +1 @@
|
|||||||
Subproject commit 4867261f9d902ea2be161889a968d3bff519f15c
|
Subproject commit ac693caea9d2b016ae2303db1f467afaf733f717
|
||||||
Loading…
x
Reference in New Issue
Block a user