diff --git a/src/BTCS.cpp b/src/BTCS.cpp index 3d162ed..7ddabb5 100644 --- a/src/BTCS.cpp +++ b/src/BTCS.cpp @@ -10,10 +10,15 @@ #include "Schemes.hpp" #include "TugUtils.hpp" -#include #include #include +#ifdef _OPENMP +#include +#else +#define omp_get_thread_num() 0 +#endif + // calculates coefficient for left boundary in constant case static std::tuple calcLeftBoundaryCoeffConstant(Eigen::MatrixXd &alpha, int rowIndex, double sx) { diff --git a/src/FTCS.cpp b/src/FTCS.cpp index 01eaf8d..0ba10b2 100644 --- a/src/FTCS.cpp +++ b/src/FTCS.cpp @@ -10,9 +10,14 @@ #include #include -#include #include +#ifdef _OPENMP +#include +#else +#define omp_get_thread_num() 0 +#endif + // calculates horizontal change on one cell independent of boundary type static double calcHorizontalChange(Grid &grid, int &row, int &col) {