StandardPreconditioners_gpu_serial.hpp
Go to the documentation of this file.
60 using GPUJac = typename gpuistl::GpuJac<M, gpuistl::GpuVector<field_type>, gpuistl::GpuVector<field_type>>;
69 // Note that this dispatching is not needed in the future, since we will have a constructor taking GPU matrices directly.
70 F::addCreator("opmilu0", [](const O& op, [[maybe_unused]] const P& prm, const std::function<V()>&, std::size_t) -> PrecPtr {
73 const auto cpuMatrix = gpuistl::detail::makeCPUMatrix<O, Dune::FieldMatrix<field_type, blockSize, blockSize>>(op);
79 typename gpuistl::OpmGpuILU0<CPUMatrixType, gpuistl::GpuVector<field_type>, gpuistl::GpuVector<field_type>>;
81 return std::make_shared<GPUILU0>(op.getmat(), cpuMatrix, split_matrix, tune_gpu_kernels, mixed_precision_scheme);
85 F::addCreator("dilu", [](const O& op, [[maybe_unused]] const P& prm, const std::function<V()>&, std::size_t) -> PrecPtr {
88 const auto cpuMatrix = gpuistl::detail::makeCPUMatrix<O, Dune::FieldMatrix<field_type, blockSize, blockSize>>(op);
95 typename gpuistl::GpuDILU<CPUMatrixType, gpuistl::GpuVector<field_type>, gpuistl::GpuVector<field_type>>;
96 return std::make_shared<GPUDILU>(op.getmat(), cpuMatrix, split_matrix, tune_gpu_kernels, mixed_precision_scheme, reorder);
112 OPM_THROW(std::logic_error, "AMGX preconditioner only works with scalar matrices (block size 1)");
123 return std::make_shared<Hypre::HyprePreconditioner<M, V, V, Dune::Amg::SequentialInformation>>(op.getmat(), prm, Dune::Amg::SequentialInformation());
125 OPM_THROW(std::logic_error, "Hypre preconditioner only works with scalar matrices (block size 1).");
132 F::addCreator("cpr", [](const O& op, const P& prm, const std::function<V()>& weightsCalculator, std::size_t pressureIndex) {
138 using LevelTransferPolicy = Opm::gpuistl::GpuPressureTransferPolicy<O, Dune::Amg::SequentialInformation, Scalar, false>;
139 return std::make_shared<Dune::OwningTwoLevelPreconditioner<O, GpuVector, LevelTransferPolicy>>(op, prm, weightsCalculator, pressureIndex);
142 F::addCreator("cprt", [](const O& op, const P& prm, const std::function<V()>& weightsCalculator, std::size_t pressureIndex) {
148 using LevelTransferPolicy = Opm::gpuistl::GpuPressureTransferPolicy<O, Dune::Amg::SequentialInformation, Scalar, true>;
149 return std::make_shared<Dune::OwningTwoLevelPreconditioner<O, GpuVector, LevelTransferPolicy>>(op, prm, weightsCalculator, pressureIndex);
Definition: PreconditionerFactory.hpp:64 typename Operator::domain_type Vector Definition: PreconditionerFactory.hpp:68 std::shared_ptr< Dune::PreconditionerWithUpdate< Vector, Vector > > PrecPtr The type of pointer returned by create(). Definition: PreconditionerFactory.hpp:71 typename Operator::matrix_type Matrix Linear algebra types. Definition: PreconditionerFactory.hpp:67 T get(const std::string &key) const Definition: GpuPressureTransferPolicy.hpp:54 Sequential ILU0 preconditioner on the GPU through the CuSparse library. Definition: GpuSeqILU0.hpp:52 Definition: fvbaseprimaryvariables.hh:141 Definition: blackoilbioeffectsmodules.hh:43 static void add() Definition: StandardPreconditioners_gpu_serial.hpp:49 typename F::Matrix M Definition: StandardPreconditioners_gpu_serial.hpp:41 typename V::field_type field_type Definition: StandardPreconditioners_gpu_serial.hpp:46 Dune::Amg::SequentialInformation C Definition: StandardPreconditioners_gpu_serial.hpp:39 Operator O Definition: StandardPreconditioners_gpu_serial.hpp:38 typename F::PrecPtr PrecPtr Definition: StandardPreconditioners_gpu_serial.hpp:44 typename F::Vector V Definition: StandardPreconditioners_gpu_serial.hpp:42 Definition: StandardPreconditioners_mpi.hpp:132 |