mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-25 07:07:42 -05:00
Update cell depth and thickness in serial simulation for CpGrid with LGRs
This commit is contained in:
1 parent
1648de24f8
commit
faea69fdb2
3 files changed
+20
-14
No files matched your search
@@ -129,17 +129,6 @@ public:
|
||||
OPM_END_PARALLEL_TRY_CATCH("Allocating the simulation vanguard failed: ", comm);
|
||||
}
|
||||
|
||||
// Only relevant for CpGrid
|
||||
if (verbose_) {
|
||||
std::cout << "Adding LGRs, if any\n" << std::flush;
|
||||
}
|
||||
|
||||
{
|
||||
OPM_BEGIN_PARALLEL_TRY_CATCH();
|
||||
vanguard_->addLgrs();
|
||||
OPM_END_PARALLEL_TRY_CATCH("Adding LGRs to the simulation vanguard failed: ", comm);
|
||||
}
|
||||
|
||||
if (verbose_) {
|
||||
std::cout << "Distributing the vanguard's data\n" << std::flush;
|
||||
}
|
||||
@@ -150,6 +139,19 @@ public:
|
||||
OPM_END_PARALLEL_TRY_CATCH("Could not distribute the vanguard data: ", comm);
|
||||
}
|
||||
|
||||
// Only relevant for CpGrid
|
||||
if (verbose_) {
|
||||
std::cout << "Adding LGRs, if any, in serial run\n" << std::flush;
|
||||
}
|
||||
|
||||
{
|
||||
if ( comm.size() == 1 ) { // serial run
|
||||
OPM_BEGIN_PARALLEL_TRY_CATCH();
|
||||
vanguard_->addLgrs();
|
||||
OPM_END_PARALLEL_TRY_CATCH("Adding LGRs to the simulation vanguard in serial run failed: ", comm);
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose_) {
|
||||
std::cout << "Allocating the model\n" << std::flush;
|
||||
}
|
||||
|
||||
@@ -258,6 +258,10 @@ public:
|
||||
if (const auto& lgrs = this->eclState().getLgrs(); lgrs.size() > 0) {
|
||||
OpmLog::info("\nAdding LGRs to the grid and updating its leaf grid view");
|
||||
this->addLgrsUpdateLeafView(lgrs, lgrs.size(), *this->grid_);
|
||||
|
||||
this->updateGridView_();
|
||||
this->updateCellDepths_();
|
||||
this->updateCellThickness_();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -362,9 +362,9 @@ protected:
|
||||
cellCenterDepth_[elemIdx] = cellCenterDepth(element);
|
||||
|
||||
if (!num_aqu_cells.empty()) {
|
||||
const unsigned int global_index = cartesianIndex(elemIdx);
|
||||
const auto search = num_aqu_cells.find(global_index);
|
||||
if (search != num_aqu_cells.end()) {
|
||||
const unsigned int global_index = cartesianIndex(elemIdx);
|
||||
const auto search = num_aqu_cells.find(global_index);
|
||||
if (search != num_aqu_cells.end()) {
|
||||
// updating the cell depth using aquifer cell depth
|
||||
cellCenterDepth_[elemIdx] = search->second->depth;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user