mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
rename ISTLSolverEbosWithGpu to ISTLSolverEbosBda
BDA also includes CPU (amgcl) solvers
This commit is contained in:
parent
896cb8484d
commit
0883d46d50
@ -195,7 +195,7 @@ if(USE_BDA_BRIDGE)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BdaBridge.cpp
|
||||
opm/simulators/linalg/bda/WellContributions.cpp
|
||||
opm/simulators/linalg/bda/MultisegmentWellContribution.cpp
|
||||
opm/simulators/linalg/ISTLSolverEbosWithGPU.cpp)
|
||||
opm/simulators/linalg/ISTLSolverEbosBda.cpp)
|
||||
if(OPENCL_FOUND)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BlockedMatrix.cpp)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/BILU0.cpp)
|
||||
@ -472,7 +472,7 @@ list (APPEND PUBLIC_HEADER_FILES
|
||||
opm/simulators/linalg/FlowLinearSolverParameters.hpp
|
||||
opm/simulators/linalg/GraphColoring.hpp
|
||||
opm/simulators/linalg/ISTLSolverEbos.hpp
|
||||
opm/simulators/linalg/ISTLSolverEbosWithGPU.hpp
|
||||
opm/simulators/linalg/ISTLSolverEbosBda.hpp
|
||||
opm/simulators/linalg/MatrixMarketSpecializations.hpp
|
||||
opm/simulators/linalg/OwningBlockPreconditioner.hpp
|
||||
opm/simulators/linalg/OwningTwoLevelPreconditioner.hpp
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <opm/simulators/linalg/extractMatrix.hpp>
|
||||
|
||||
#if COMPILE_BDA_BRIDGE
|
||||
#include <opm/simulators/linalg/ISTLSolverEbosWithGPU.hpp>
|
||||
#include <opm/simulators/linalg/ISTLSolverEbosBda.hpp>
|
||||
#else
|
||||
#include <opm/simulators/linalg/ISTLSolverEbos.hpp>
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
namespace Opm {
|
||||
template <class TypeTag>
|
||||
class ISTLSolverEbosWithGPU;
|
||||
class ISTLSolverEbosBda;
|
||||
template <class TypeTag>
|
||||
class ISTLSolverEbos;
|
||||
}
|
||||
@ -221,7 +221,7 @@ struct OpenclIluParallel<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
template<class TypeTag>
|
||||
struct LinearSolverBackend<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
#if COMPLE_BDA_BRIDGE
|
||||
using type = ISTLSolverEbosWithGPU<TypeTag>;
|
||||
using type = ISTLSolverEbosBda<TypeTag>;
|
||||
#else
|
||||
using type = ISTLSolverEbos<TypeTag>;
|
||||
#endif
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <opm/common/TimingMacros.hpp>
|
||||
#include <opm/simulators/linalg/ISTLSolverEbosWithGPU.hpp>
|
||||
#include <opm/simulators/linalg/ISTLSolverEbosBda.hpp>
|
||||
|
||||
#include <dune/istl/schwarz.hh>
|
||||
|
||||
@ -33,10 +33,8 @@
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#if COMPILE_BDA_BRIDGE
|
||||
#include <opm/simulators/linalg/bda/BdaBridge.hpp>
|
||||
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
||||
#endif
|
||||
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
#include <dune/alugrid/grid.hh>
|
||||
@ -48,7 +46,6 @@
|
||||
namespace Opm {
|
||||
namespace detail {
|
||||
|
||||
#if COMPILE_BDA_BRIDGE
|
||||
template<class Matrix, class Vector>
|
||||
BdaSolverInfo<Matrix,Vector>::
|
||||
BdaSolverInfo(const std::string& accelerator_mode,
|
||||
@ -209,7 +206,6 @@ copyMatToBlockJac(const Matrix& mat, Matrix& blockJac)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // COMPILE_BDA_BRIDGE
|
||||
|
||||
template<int Dim>
|
||||
using BM = Dune::BCRSMatrix<MatrixBlock<double,Dim,Dim>>;
|
||||
@ -217,8 +213,6 @@ template<int Dim>
|
||||
using BV = Dune::BlockVector<Dune::FieldVector<double,Dim>>;
|
||||
|
||||
|
||||
#if COMPILE_BDA_BRIDGE
|
||||
|
||||
#define INSTANCE_GRID(Dim, Grid) \
|
||||
template void BdaSolverInfo<BM<Dim>,BV<Dim>>:: \
|
||||
prepare(const Grid&, \
|
||||
@ -250,6 +244,6 @@ INSTANCE(3)
|
||||
INSTANCE(4)
|
||||
INSTANCE(5)
|
||||
INSTANCE(6)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace Opm
|
@ -19,13 +19,15 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_ISTLSOLVER_EBOS_WITH_GPU_HEADER_INCLUDED
|
||||
#define OPM_ISTLSOLVER_EBOS_WITH_GPU_HEADER_INCLUDED
|
||||
#ifndef OPM_ISTLSOLVER_EBOS_WITH_BDA_INCLUDED
|
||||
#define OPM_ISTLSOLVER_EBOS_WITH_BDA_INCLUDED
|
||||
|
||||
#include <opm/simulators/linalg/ISTLSolverEbos.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Well;
|
||||
|
||||
template<class Matrix, class Vector, int block_size> class BdaBridge;
|
||||
class WellContributions;
|
||||
namespace detail {
|
||||
@ -90,7 +92,7 @@ private:
|
||||
/// as a block-structured matrix (one block for all cell variables) for a fixed
|
||||
/// number of cell variables np .
|
||||
template <class TypeTag>
|
||||
class ISTLSolverEbosWithGPU : public ISTLSolverEbos<TypeTag>
|
||||
class ISTLSolverEbosBda : public ISTLSolverEbos<TypeTag>
|
||||
{
|
||||
protected:
|
||||
using ParentType = ISTLSolverEbos<TypeTag>;
|
||||
@ -124,8 +126,8 @@ public:
|
||||
/// \param[in] simulator The opm-models simulator object
|
||||
/// \param[in] parameters Explicit parameters for solver setup, do not
|
||||
/// read them from command line parameters.
|
||||
ISTLSolverEbosWithGPU(const Simulator& simulator, const FlowLinearSolverParameters& parameters)
|
||||
: ParentType(simulator)
|
||||
ISTLSolverEbosBda(const Simulator& simulator, const FlowLinearSolverParameters& parameters)
|
||||
: ParentType(simulator, parameters)
|
||||
{
|
||||
bool have_gpu = true;
|
||||
this->initialize(have_gpu);
|
||||
@ -133,7 +135,7 @@ public:
|
||||
|
||||
/// Construct a system solver.
|
||||
/// \param[in] simulator The opm-models simulator object
|
||||
explicit ISTLSolverEbosWithGPU(const Simulator& simulator)
|
||||
explicit ISTLSolverEbosBda(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
}
|
||||
@ -147,7 +149,7 @@ public:
|
||||
std::string accelerator_mode = EWOMS_GET_PARAM(TypeTag, std::string, AcceleratorMode);
|
||||
if ((this->simulator_.vanguard().grid().comm().size() > 1) && (accelerator_mode != "none")) {
|
||||
if (on_io_rank) {
|
||||
OpmLog::warning("Cannot use GPU with MPI, GPU are disabled");
|
||||
OpmLog::warning("Cannot use GPU with MPI, GPU is disabled");
|
||||
}
|
||||
accelerator_mode = "none";
|
||||
}
|
||||
@ -260,4 +262,4 @@ protected:
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#endif // OPM_ISTLSOLVER_EBOS_WITH_GPU_HEADER_INCLUDED
|
||||
#endif // OPM_ISTLSOLVER_EBOS_BDA_HEADER_INCLUDED
|
Loading…
Reference in New Issue
Block a user