mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-13 09:28:23 +01:00
feat: make OpenMP parallelization optional
This commit is contained in:
parent
587bb5a622
commit
a21023ec9d
@ -10,10 +10,15 @@
|
||||
#include "Schemes.hpp"
|
||||
#include "TugUtils.hpp"
|
||||
|
||||
#include <omp.h>
|
||||
#include <tug/Boundary.hpp>
|
||||
#include <tug/Grid.hpp>
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
#else
|
||||
#define omp_get_thread_num() 0
|
||||
#endif
|
||||
|
||||
// calculates coefficient for left boundary in constant case
|
||||
static std::tuple<double, double>
|
||||
calcLeftBoundaryCoeffConstant(Eigen::MatrixXd &alpha, int rowIndex, double sx) {
|
||||
|
||||
@ -10,9 +10,14 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <iostream>
|
||||
#include <omp.h>
|
||||
#include <tug/Boundary.hpp>
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
#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) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user