Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f4b25ea
Add SubDomain class, aspinPartition() function and matrix utilities.
atgeirr Jan 5, 2023
fc93324
Add new parameters for aspin usage.
atgeirr Jan 5, 2023
497b9cf
Store solver class instead of recreating.
atgeirr Jan 5, 2023
2e733ca
HACK: ensure we rebuild UMFPACK solver always.
atgeirr Jan 6, 2023
34d36aa
Changes to well classes.
atgeirr Jan 6, 2023
3083eec
Cleanup file and add LinearSolverPrintJsonDefinition.
atgeirr Jan 9, 2023
9b6d6ad
Add two new functions to ISTLSolverEbos.
atgeirr Jan 9, 2023
90cb66a
Main implementation parts for aspin.
atgeirr Jan 6, 2023
ccc7526
Use a single partition, to verify against base runs.
atgeirr Jan 11, 2023
7a06bc7
Bugfix: avoid static variable, fixing case with multiple linear solvers.
atgeirr Jan 13, 2023
27e5509
[WIP] Use 25 partitions, i.e. for the layer 10 test.
atgeirr Jan 16, 2023
9e3ac67
Avoid clearing derivatives when pressure diff is 0.
atgeirr Jan 16, 2023
1806ee5
Use simplified interface for domain-specific linearizer methods.
atgeirr Jan 18, 2023
3ddfc2c
HACK to do init and restart, but incorrect with drsdt etc.
atgeirr Jan 18, 2023
789b459
[WIP] Use Newton-first, and partition from file.
atgeirr Jan 24, 2023
1066f8a
Follow API update of init() call for linear solver params.
atgeirr Feb 6, 2023
9a5338d
Move LinearSolver parameter and fix duplication.
atgeirr Feb 6, 2023
9ed89a9
Account for renaming SubGridView -> SubGridPart.
atgeirr May 5, 2023
96ee599
No longer necessary to call resetSystem() explicitly.
atgeirr May 11, 2023
935f4cb
Enable Zoltan-Based In-Process Subdomain Partitioning
bska Mar 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ list (APPEND MAIN_SOURCE_FILES
opm/simulators/flow/NonlinearSolverEbos.cpp
opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.cpp
opm/simulators/flow/ValidationFunctions.cpp
opm/simulators/flow/aspinPartition.cpp
opm/simulators/linalg/bda/WellContributions.cpp
opm/simulators/linalg/bda/MultisegmentWellContribution.cpp
opm/simulators/linalg/ExtractParallelGridInformationToISTL.cpp
Expand Down Expand Up @@ -226,6 +227,7 @@ endif()
# find tests -name '*.cpp' -a ! -wholename '*/not-unit/*' -printf '\t%p\n' | sort
list (APPEND TEST_SOURCE_FILES
tests/test_ALQState.cpp
tests/test_aspinPartition.cpp
tests/test_blackoil_amg.cpp
tests/test_convergenceoutputconfiguration.cpp
tests/test_convergencereport.cpp
Expand Down Expand Up @@ -343,6 +345,7 @@ list (APPEND TEST_DATA_FILES
tests/include/summary.inc
tests/include/test1_20x30x10.grdecl
tests/include/well_vfp.ecl
tests/partition.txt
)


Expand All @@ -362,6 +365,8 @@ list (APPEND PUBLIC_HEADER_FILES
opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp
opm/simulators/flow/KeywordValidation.hpp
opm/simulators/flow/ValidationFunctions.hpp
opm/simulators/flow/aspinPartition.hpp
opm/simulators/flow/SubDomain.hpp
opm/core/props/BlackoilPhases.hpp
opm/core/props/phaseUsageFromDeck.hpp
opm/core/props/satfunc/RelpermDiagnostics.hpp
Expand Down Expand Up @@ -421,6 +426,7 @@ list (APPEND PUBLIC_HEADER_FILES
opm/simulators/linalg/SmallDenseMatrixUtils.hpp
opm/simulators/linalg/WellOperators.hpp
opm/simulators/linalg/WriteSystemMatrixHelper.hpp
opm/simulators/linalg/extractMatrix.hpp
opm/simulators/linalg/findOverlapRowsAndColumns.hpp
opm/simulators/linalg/getQuasiImpesWeights.hpp
opm/simulators/linalg/setupPropertyTree.hpp
Expand Down
18 changes: 10 additions & 8 deletions ebos/eclfluxmodule.hh
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,16 @@ public:
// of threshold pressure is a quite big hack that only makes sense for ECL
// datasets. (and even there, its physical justification is quite
// questionable IMO.)
if (std::abs(Toolbox::value(pressureDifference)) > thpres) {
if (pressureDifference < 0.0)
pressureDifference += thpres;
else
pressureDifference -= thpres;
}
else {
pressureDifference = 0.0;
if (thpres > 0.0) {
if (std::abs(Toolbox::value(pressureDifference)) > thpres) {
if (pressureDifference < 0.0)
pressureDifference += thpres;
else
pressureDifference -= thpres;
}
else {
pressureDifference = 0.0;
}
}
}

Expand Down
16 changes: 15 additions & 1 deletion ebos/eclgenericcpgridvanguard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
#include <ebos/femcpgridcompat.hh>
#endif //HAVE_DUNE_FEM
#endif // HAVE_DUNE_FEM

#include <cassert>
#include <numeric>
Expand Down Expand Up @@ -84,6 +84,20 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::releaseEquilGrid()
}

#if HAVE_MPI

template <class ElementMapper, class GridView, class Scalar>
std::vector<int>
EclGenericCpGridVanguard<ElementMapper, GridView, Scalar>::
partitionCells(const int numDomains,
const double imbalanceTolerance,
const std::vector<Dune::cpgrid::OpmWellType>& wells) const
{
const auto* faceTrans = static_cast<const double*>(nullptr);

return this->grid_->
zoltanPartitionWithoutScatter(&wells, faceTrans, numDomains, imbalanceTolerance);
}

template<class ElementMapper, class GridView, class Scalar>
void EclGenericCpGridVanguard<ElementMapper, GridView, Scalar>::
doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
Expand Down
10 changes: 10 additions & 0 deletions ebos/eclgenericcpgridvanguard.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
#define EWOMS_ECL_CP_GRID_GENERIC_VANGUARD_HH

#include <ebos/eclgenericvanguard.hh>

#include <opm/grid/CpGrid.hpp>
#include <opm/grid/utility/OpmWellType.hpp>

#include <functional>
#include <memory>
#include <optional>
#include <vector>

Expand Down Expand Up @@ -115,6 +118,13 @@ public:
return this->cell_part_;
}

#if HAVE_MPI
std::vector<int>
partitionCells(const int numDomains,
const double imbalanceTolerance,
const std::vector<Dune::cpgrid::OpmWellType>& wells) const;
#endif

protected:
/*!
* \brief Distribute the simulation grid over multiple processes
Expand Down
3 changes: 3 additions & 0 deletions ebos/eclproblem.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,9 @@ public:
*/
bool recycleFirstIterationStorage() const
{
if (this->simulator().timeStepIndex() == 0)
return true;

int episodeIdx = this->episodeIndex();
return !this->drsdtActive_(episodeIdx) &&
!this->drvdtActive_(episodeIdx) &&
Expand Down
Loading