Skip to content
Snippets Groups Projects
Commit 4fcea1a3 authored by Boman Romain's avatar Boman Romain
Browse files

add msvc compatibility

parent cf110c27
No related branches found
No related tags found
2 merge requests!7Coupling,!5Optimization du code FEM
#ifdef _MSC_VER
#include <gmsh.h_cwrap> // gmsh main header
#else
#include <gmsh.h> // gmsh main header
#endif
#include <iostream> // for std::cout
#include <map>
#include <sstream> // for std::stringstream
......@@ -181,7 +186,13 @@ void Loop_K_F(const Eigen::Matrix<double, 3, 3> H_matrix, const double rho, cons
double test1 = omp_get_wtime();
//Eigen::setNbThreads(1);
#pragma omp parallel for
#ifdef _MSC_VER
// https://github.com/tesseract-ocr/tesseract/issues/3285
// OpenMP 2.0 standard is enforced - we may use /openmp:llvm and keep size_t
for (int el = 0; el < elementTags[i].size(); el++){
#else
for (std::size_t el = 0; el < elementTags[i].size(); el++){
#endif
// elemental K matrix and f vector initialization
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> K_matrix(2*numNodes,2*numNodes);
std::vector<double> f_vector(2*numNodes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment