Compare commits
No commits in common. "ml/bump-tug-version" and "master" have entirely different histories.
ml/bump-tu
...
master
10
src/run.cpp
10
src/run.cpp
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#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>
|
||||||
@ -23,18 +22,15 @@ 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);
|
||||||
|
|
||||||
tug::RowMajMatMap<TugType> alpha_x(raw_alpha_x.data(), input.nrows,
|
Eigen::Map<RowMajorMat> alpha_x(raw_alpha_x.data(), input.nrows, input.ncols);
|
||||||
input.ncols);
|
Eigen::Map<RowMajorMat> alpha_y(raw_alpha_y.data(), input.nrows, 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++) {
|
||||||
|
|
||||||
tug::RowMajMatMap<TugType> mat(raw_data[i].data(), input.nrows,
|
Eigen::Map<RowMajorMat> mat(raw_data[i].data(), input.nrows, input.ncols);
|
||||||
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,6 +6,9 @@
|
|||||||
|
|
||||||
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 ac693caea9d2b016ae2303db1f467afaf733f717
|
Subproject commit 4867261f9d902ea2be161889a968d3bff519f15c
|
||||||
Loading…
x
Reference in New Issue
Block a user