#3634 Regression Test : Use flag to control OpenMP when building geometry

This commit is contained in:
Magne Sjaastad
2018-11-12 07:33:08 +01:00
parent ca07e710c6
commit cfbbcacc23
7 changed files with 91 additions and 45 deletions

View File

@@ -172,8 +172,9 @@ bool CellRangeFilter::hasIncludeRanges() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
StructGridGeometryGenerator::StructGridGeometryGenerator(const StructGridInterface* grid)
: m_grid(grid)
StructGridGeometryGenerator::StructGridGeometryGenerator(const StructGridInterface* grid, bool useOpenMP)
: m_grid(grid),
m_useOpenMP(useOpenMP)
{
CVF_ASSERT(grid);
m_quadMapper = new StructGridQuadToCellFaceMapper;
@@ -373,7 +374,7 @@ void StructGridGeometryGenerator::computeArrays()
cvf::Vec3d offset = m_grid->displayModelOffset();
#pragma omp parallel for schedule(dynamic)
#pragma omp parallel for schedule(dynamic) if (m_useOpenMP)
for (int k = 0; k < static_cast<int>(m_grid->cellCountK()); k++)
{
size_t j;