mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-07-29 18:47:55 -05:00
Merge pull request #5150 from akva2/istlsolver_drop_ebos
ISTLSolverEbos: rename to ISTLSolver
This commit is contained in:
@@ -62,7 +62,7 @@ list (APPEND MAIN_SOURCE_FILES
|
|||||||
opm/simulators/linalg/FlexibleSolver4.cpp
|
opm/simulators/linalg/FlexibleSolver4.cpp
|
||||||
opm/simulators/linalg/FlexibleSolver5.cpp
|
opm/simulators/linalg/FlexibleSolver5.cpp
|
||||||
opm/simulators/linalg/FlexibleSolver6.cpp
|
opm/simulators/linalg/FlexibleSolver6.cpp
|
||||||
opm/simulators/linalg/ISTLSolverEbos.cpp
|
opm/simulators/linalg/ISTLSolver.cpp
|
||||||
opm/simulators/linalg/MILU.cpp
|
opm/simulators/linalg/MILU.cpp
|
||||||
opm/simulators/linalg/ParallelIstlInformation.cpp
|
opm/simulators/linalg/ParallelIstlInformation.cpp
|
||||||
opm/simulators/linalg/ParallelOverlappingILU0.cpp
|
opm/simulators/linalg/ParallelOverlappingILU0.cpp
|
||||||
@@ -205,7 +205,7 @@ if(USE_BDA_BRIDGE)
|
|||||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BdaBridge.cpp
|
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BdaBridge.cpp
|
||||||
opm/simulators/linalg/bda/WellContributions.cpp
|
opm/simulators/linalg/bda/WellContributions.cpp
|
||||||
opm/simulators/linalg/bda/MultisegmentWellContribution.cpp
|
opm/simulators/linalg/bda/MultisegmentWellContribution.cpp
|
||||||
opm/simulators/linalg/ISTLSolverEbosBda.cpp)
|
opm/simulators/linalg/ISTLSolverBda.cpp)
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BlockedMatrix.cpp)
|
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BlockedMatrix.cpp)
|
||||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/BILU0.cpp)
|
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/BILU0.cpp)
|
||||||
@@ -508,8 +508,8 @@ list (APPEND PUBLIC_HEADER_FILES
|
|||||||
opm/simulators/linalg/FlexibleSolver_impl.hpp
|
opm/simulators/linalg/FlexibleSolver_impl.hpp
|
||||||
opm/simulators/linalg/FlowLinearSolverParameters.hpp
|
opm/simulators/linalg/FlowLinearSolverParameters.hpp
|
||||||
opm/simulators/linalg/GraphColoring.hpp
|
opm/simulators/linalg/GraphColoring.hpp
|
||||||
opm/simulators/linalg/ISTLSolverEbos.hpp
|
opm/simulators/linalg/ISTLSolver.hpp
|
||||||
opm/simulators/linalg/ISTLSolverEbosBda.hpp
|
opm/simulators/linalg/ISTLSolverBda.hpp
|
||||||
opm/simulators/linalg/MatrixMarketSpecializations.hpp
|
opm/simulators/linalg/MatrixMarketSpecializations.hpp
|
||||||
opm/simulators/linalg/OwningBlockPreconditioner.hpp
|
opm/simulators/linalg/OwningBlockPreconditioner.hpp
|
||||||
opm/simulators/linalg/OwningTwoLevelPreconditioner.hpp
|
opm/simulators/linalg/OwningTwoLevelPreconditioner.hpp
|
||||||
|
|||||||
+2
-2
@@ -34,7 +34,7 @@
|
|||||||
#include <opm/models/utils/start.hh>
|
#include <opm/models/utils/start.hh>
|
||||||
|
|
||||||
#include <opm/simulators/aquifers/BlackoilAquiferModel.hpp>
|
#include <opm/simulators/aquifers/BlackoilAquiferModel.hpp>
|
||||||
#include <opm/simulators/linalg/ISTLSolverEbos.hpp>
|
#include <opm/simulators/linalg/ISTLSolver.hpp>
|
||||||
#include <opm/simulators/wells/BlackoilWellModel.hpp>
|
#include <opm/simulators/wells/BlackoilWellModel.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
@@ -115,7 +115,7 @@ struct LinearSolverSplice<TypeTag, TTag::EbosTypeTag> {
|
|||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct LinearSolverBackend<TTag::EbosTypeTag, TTag::FlowIstlSolverParams> {
|
struct LinearSolverBackend<TTag::EbosTypeTag, TTag::FlowIstlSolverParams> {
|
||||||
using type = ISTLSolverEbos<TTag::EbosTypeTag>;
|
using type = ISTLSolver<TTag::EbosTypeTag>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// the default for the allowed volumetric error for oil per second
|
// the default for the allowed volumetric error for oil per second
|
||||||
|
|||||||
@@ -38,9 +38,9 @@
|
|||||||
#include <opm/simulators/linalg/extractMatrix.hpp>
|
#include <opm/simulators/linalg/extractMatrix.hpp>
|
||||||
|
|
||||||
#if COMPILE_BDA_BRIDGE
|
#if COMPILE_BDA_BRIDGE
|
||||||
#include <opm/simulators/linalg/ISTLSolverEbosBda.hpp>
|
#include <opm/simulators/linalg/ISTLSolverBda.hpp>
|
||||||
#else
|
#else
|
||||||
#include <opm/simulators/linalg/ISTLSolverEbos.hpp>
|
#include <opm/simulators/linalg/ISTLSolver.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
||||||
@@ -87,7 +87,7 @@ public:
|
|||||||
|
|
||||||
using BVector = typename BlackoilModel<TypeTag>::BVector;
|
using BVector = typename BlackoilModel<TypeTag>::BVector;
|
||||||
using Domain = SubDomain<Grid>;
|
using Domain = SubDomain<Grid>;
|
||||||
using ISTLSolverType = ISTLSolverEbos<TypeTag>;
|
using ISTLSolverType = ISTLSolver<TypeTag>;
|
||||||
using Mat = typename BlackoilModel<TypeTag>::Mat;
|
using Mat = typename BlackoilModel<TypeTag>::Mat;
|
||||||
|
|
||||||
static constexpr int numEq = Indices::numEq;
|
static constexpr int numEq = Indices::numEq;
|
||||||
@@ -154,7 +154,7 @@ public:
|
|||||||
|
|
||||||
// Set up container for the local linear solvers.
|
// Set up container for the local linear solvers.
|
||||||
for (int index = 0; index < num_domains; ++index) {
|
for (int index = 0; index < num_domains; ++index) {
|
||||||
// TODO: The ISTLSolverEbos constructor will make
|
// TODO: The ISTLSolver constructor will make
|
||||||
// parallel structures appropriate for the full grid
|
// parallel structures appropriate for the full grid
|
||||||
// only. This must be addressed before going parallel.
|
// only. This must be addressed before going parallel.
|
||||||
const auto& eclState = model_.ebosSimulator().vanguard().eclState();
|
const auto& eclState = model_.ebosSimulator().vanguard().eclState();
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
class ISTLSolverEbosBda;
|
class ISTLSolverBda;
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
class ISTLSolverEbos;
|
class ISTLSolver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -221,9 +221,9 @@ struct OpenclIluParallel<TypeTag, TTag::FlowIstlSolverParams> {
|
|||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct LinearSolverBackend<TypeTag, TTag::FlowIstlSolverParams> {
|
struct LinearSolverBackend<TypeTag, TTag::FlowIstlSolverParams> {
|
||||||
#if COMPILE_BDA_BRIDGE
|
#if COMPILE_BDA_BRIDGE
|
||||||
using type = ISTLSolverEbosBda<TypeTag>;
|
using type = ISTLSolverBda<TypeTag>;
|
||||||
#else
|
#else
|
||||||
using type = ISTLSolverEbos<TypeTag>;
|
using type = ISTLSolver<TypeTag>;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/common/TimingMacros.hpp>
|
#include <opm/common/TimingMacros.hpp>
|
||||||
#include <opm/simulators/linalg/ISTLSolverEbos.hpp>
|
#include <opm/simulators/linalg/ISTLSolver.hpp>
|
||||||
|
|
||||||
#include <dune/istl/schwarz.hh>
|
#include <dune/istl/schwarz.hh>
|
||||||
|
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OPM_ISTLSOLVER_EBOS_HEADER_INCLUDED
|
#ifndef OPM_ISTLSOLVER_HEADER_INCLUDED
|
||||||
#define OPM_ISTLSOLVER_EBOS_HEADER_INCLUDED
|
#define OPM_ISTLSOLVER_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <dune/istl/owneroverlapcopy.hh>
|
#include <dune/istl/owneroverlapcopy.hh>
|
||||||
#include <dune/istl/solver.hh>
|
#include <dune/istl/solver.hh>
|
||||||
@@ -140,7 +140,7 @@ std::unique_ptr<Matrix> blockJacobiAdjacency(const Grid& grid,
|
|||||||
/// as a block-structured matrix (one block for all cell variables) for a fixed
|
/// as a block-structured matrix (one block for all cell variables) for a fixed
|
||||||
/// number of cell variables np .
|
/// number of cell variables np .
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
class ISTLSolverEbos
|
class ISTLSolver
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||||
@@ -181,7 +181,9 @@ std::unique_ptr<Matrix> blockJacobiAdjacency(const Grid& grid,
|
|||||||
/// \param[in] forceSerial If true, will set up a serial linear solver only,
|
/// \param[in] forceSerial If true, will set up a serial linear solver only,
|
||||||
/// local to the current rank, instead of creating a
|
/// local to the current rank, instead of creating a
|
||||||
/// parallel (MPI distributed) linear solver.
|
/// parallel (MPI distributed) linear solver.
|
||||||
ISTLSolverEbos(const Simulator& simulator, const FlowLinearSolverParameters& parameters, bool forceSerial = false)
|
ISTLSolver(const Simulator& simulator,
|
||||||
|
const FlowLinearSolverParameters& parameters,
|
||||||
|
bool forceSerial = false)
|
||||||
: simulator_(simulator),
|
: simulator_(simulator),
|
||||||
iterations_( 0 ),
|
iterations_( 0 ),
|
||||||
converged_(false),
|
converged_(false),
|
||||||
@@ -194,7 +196,7 @@ std::unique_ptr<Matrix> blockJacobiAdjacency(const Grid& grid,
|
|||||||
|
|
||||||
/// Construct a system solver.
|
/// Construct a system solver.
|
||||||
/// \param[in] simulator The opm-models simulator object
|
/// \param[in] simulator The opm-models simulator object
|
||||||
explicit ISTLSolverEbos(const Simulator& simulator)
|
explicit ISTLSolver(const Simulator& simulator)
|
||||||
: simulator_(simulator),
|
: simulator_(simulator),
|
||||||
iterations_( 0 ),
|
iterations_( 0 ),
|
||||||
solveCount_(0),
|
solveCount_(0),
|
||||||
@@ -627,4 +629,5 @@ std::unique_ptr<Matrix> blockJacobiAdjacency(const Grid& grid,
|
|||||||
}; // end ISTLSolver
|
}; // end ISTLSolver
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
#endif
|
|
||||||
|
#endif // OPM_ISTLSOLVER_HEADER_INCLUDED
|
||||||
+1
-1
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/common/TimingMacros.hpp>
|
#include <opm/common/TimingMacros.hpp>
|
||||||
#include <opm/simulators/linalg/ISTLSolverEbosBda.hpp>
|
#include <opm/simulators/linalg/ISTLSolverBda.hpp>
|
||||||
|
|
||||||
#include <dune/istl/schwarz.hh>
|
#include <dune/istl/schwarz.hh>
|
||||||
|
|
||||||
+10
-10
@@ -19,10 +19,10 @@
|
|||||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OPM_ISTLSOLVER_EBOS_WITH_BDA_INCLUDED
|
#ifndef OPM_ISTLSOLVER_WITH_BDA_HEADER_INCLUDED
|
||||||
#define OPM_ISTLSOLVER_EBOS_WITH_BDA_INCLUDED
|
#define OPM_ISTLSOLVER_WITH_BDA_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/simulators/linalg/ISTLSolverEbos.hpp>
|
#include <opm/simulators/linalg/ISTLSolver.hpp>
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -98,10 +98,10 @@ private:
|
|||||||
/// as a block-structured matrix (one block for all cell variables) for a fixed
|
/// as a block-structured matrix (one block for all cell variables) for a fixed
|
||||||
/// number of cell variables np .
|
/// number of cell variables np .
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
class ISTLSolverEbosBda : public ISTLSolverEbos<TypeTag>
|
class ISTLSolverBda : public ISTLSolver<TypeTag>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
using ParentType = ISTLSolverEbos<TypeTag>;
|
using ParentType = ISTLSolver<TypeTag>;
|
||||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||||
using SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter>;
|
using SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter>;
|
||||||
@@ -132,7 +132,7 @@ public:
|
|||||||
/// \param[in] simulator The opm-models simulator object
|
/// \param[in] simulator The opm-models simulator object
|
||||||
/// \param[in] parameters Explicit parameters for solver setup, do not
|
/// \param[in] parameters Explicit parameters for solver setup, do not
|
||||||
/// read them from command line parameters.
|
/// read them from command line parameters.
|
||||||
ISTLSolverEbosBda(const Simulator& simulator, const FlowLinearSolverParameters& parameters)
|
ISTLSolverBda(const Simulator& simulator, const FlowLinearSolverParameters& parameters)
|
||||||
: ParentType(simulator, parameters)
|
: ParentType(simulator, parameters)
|
||||||
{
|
{
|
||||||
initializeBda();
|
initializeBda();
|
||||||
@@ -140,8 +140,8 @@ public:
|
|||||||
|
|
||||||
/// Construct a system solver.
|
/// Construct a system solver.
|
||||||
/// \param[in] simulator The opm-models simulator object
|
/// \param[in] simulator The opm-models simulator object
|
||||||
explicit ISTLSolverEbosBda(const Simulator& simulator)
|
explicit ISTLSolverBda(const Simulator& simulator)
|
||||||
: ParentType(simulator)
|
: ParentType(simulator)
|
||||||
{
|
{
|
||||||
initializeBda();
|
initializeBda();
|
||||||
}
|
}
|
||||||
@@ -234,7 +234,7 @@ public:
|
|||||||
return ParentType::solve(x);
|
return ParentType::solve(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
OPM_TIMEBLOCK(istlSolverEbosBdaSolve);
|
OPM_TIMEBLOCK(istlSolverBdaSolve);
|
||||||
this->solveCount_ += 1;
|
this->solveCount_ += 1;
|
||||||
// Write linear system if asked for.
|
// Write linear system if asked for.
|
||||||
const int verbosity = this->prm_[this->activeSolverNum_].template get<int>("verbosity", 0);
|
const int verbosity = this->prm_[this->activeSolverNum_].template get<int>("verbosity", 0);
|
||||||
@@ -279,4 +279,4 @@ protected:
|
|||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
#endif // OPM_ISTLSOLVER_EBOS_BDA_HEADER_INCLUDED
|
#endif // OPM_ISTLSOLVER_WITH_BDA_HEADER_INCLUDED
|
||||||
@@ -66,7 +66,7 @@ namespace Opm::Properties {
|
|||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct LinearSolverBackend<TTag::TestRestartTypeTag, TTag::FlowIstlSolverParams> {
|
struct LinearSolverBackend<TTag::TestRestartTypeTag, TTag::FlowIstlSolverParams> {
|
||||||
using type = ISTLSolverEbos<TTag::TestRestartTypeTag>;
|
using type = ISTLSolver<TTag::TestRestartTypeTag>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user