mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
tried to get openmp work
This commit is contained in:
parent
df32014109
commit
08c0848e0d
@ -133,8 +133,8 @@ public:
|
||||
void update(const Problem& problem,const PrimaryVariables& primaryVars,unsigned globalSpaceIdx, unsigned timeIdx)
|
||||
{
|
||||
//ParentType::update(elemCtx, dofIdx, timeIdx);//only used for extrusion factor
|
||||
//const auto& materialParams = problem.materialLawParams(globalSpaceIdx);
|
||||
const auto& materialParams = problem.materialLawParams(0);
|
||||
const auto& materialParams = problem.materialLawParams(globalSpaceIdx);
|
||||
//const auto& materialParams = problem.materialLawParams(0);//NB improve speed
|
||||
Scalar RvMax;
|
||||
if (FluidSystem::enableVaporizedOil()) {
|
||||
RvMax = problem.maxOilVaporizationFactor(timeIdx, globalSpaceIdx);
|
||||
|
@ -801,11 +801,15 @@ public:
|
||||
{
|
||||
//invalidateIntensiveQuantitiesCache(timeIdx);
|
||||
size_t numGridDof = primaryVars.size();
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
for (unsigned dofIdx = 0; dofIdx < numGridDof; ++dofIdx) {
|
||||
const auto& primaryVar = primaryVars[dofIdx];
|
||||
auto& intquant = intensiveQuantityCache_[timeIdx][dofIdx];
|
||||
intquant.update(problem, primaryVar, dofIdx, timeIdx);
|
||||
}
|
||||
|
||||
std::fill(intensiveQuantityCacheUpToDate_[timeIdx].begin(),
|
||||
intensiveQuantityCacheUpToDate_[timeIdx].end(),
|
||||
/*value=*/true);
|
||||
|
@ -453,6 +453,9 @@ private:
|
||||
const bool well_local = false;
|
||||
resetSystem_();
|
||||
unsigned numCells = model_().numTotalDof();
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
for(unsigned globI = 0; globI < numCells; globI++){
|
||||
const auto& neighbours = neighbours_[globI];// this is a set but should maybe be changed
|
||||
// accumulation term
|
||||
@ -507,7 +510,6 @@ private:
|
||||
setResAndJacobi(res, bMat, adres);
|
||||
residual_[globI] += res;
|
||||
jacobian_->addToBlock(globI, globI, bMat);
|
||||
//residual_[globJ] += res;
|
||||
bMat *= -1.0;
|
||||
jacobian_->addToBlock(globJ, globI, bMat);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user