|
StandardPreconditioners_gpu_serial.hpp
Go to the documentation of this file.
64 using GPUJac = typename gpuistl::GpuJac<M, gpuistl::GpuVector<field_type>, gpuistl::GpuVector<field_type>>;
73 // Note that this dispatching is not needed in the future, since we will have a constructor taking GPU matrices directly.
74 F::addCreator("opmilu0", [](const O& op, [[maybe_unused]] const P& prm, const std::function<V()>&, std::size_t) -> PrecPtr {
77 const auto cpuMatrix = gpuistl::detail::makeCPUMatrix<O, Dune::FieldMatrix<field_type, blockSize, blockSize>>(op);
83 typename gpuistl::OpmGpuILU0<CPUMatrixType, gpuistl::GpuVector<field_type>, gpuistl::GpuVector<field_type>>;
85 return std::make_shared<GPUILU0>(op.getmat(), cpuMatrix, split_matrix, tune_gpu_kernels, mixed_precision_scheme);
89 F::addCreator("dilu", [](const O& op, [[maybe_unused]] const P& prm, const std::function<V()>&, std::size_t) -> PrecPtr {
92 const auto cpuMatrix = gpuistl::detail::makeCPUMatrix<O, Dune::FieldMatrix<field_type, blockSize, blockSize>>(op);
99 typename gpuistl::GpuDILU<CPUMatrixType, gpuistl::GpuVector<field_type>, gpuistl::GpuVector<field_type>>;
100 return std::make_shared<GPUDILU>(op.getmat(), cpuMatrix, split_matrix, tune_gpu_kernels, mixed_precision_scheme, reorder);
116 OPM_THROW(std::logic_error, "AMGX preconditioner only works with scalar matrices (block size 1)");
127 return std::make_shared<linalg::HyprePreconditioner<M, V, V, Dune::Amg::SequentialInformation>>(op.getmat(), prm, Dune::Amg::SequentialInformation());
129 OPM_THROW(std::logic_error, "Hypre preconditioner only works with scalar matrices (block size 1).");
136 F::addCreator("cpr", [](const O& op, const P& prm, const std::function<V()>& weightsCalculator, std::size_t pressureIndex) {
142 using LevelTransferPolicy = Opm::gpuistl::GpuPressureTransferPolicy<O, Dune::Amg::SequentialInformation, Scalar, false>;
143 return std::make_shared<Dune::OwningTwoLevelPreconditioner<O, GpuVector, LevelTransferPolicy>>(op, prm, weightsCalculator, pressureIndex);
146 F::addCreator("cprt", [](const O& op, const P& prm, const std::function<V()>& weightsCalculator, std::size_t pressureIndex) {
152 using LevelTransferPolicy = Opm::gpuistl::GpuPressureTransferPolicy<O, Dune::Amg::SequentialInformation, Scalar, true>;
153 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:161 Definition: blackoilbioeffectsmodules.hh:45 static void add() Definition: StandardPreconditioners_gpu_serial.hpp:53 typename F::Matrix M Definition: StandardPreconditioners_gpu_serial.hpp:45 typename V::field_type field_type Definition: StandardPreconditioners_gpu_serial.hpp:50 Dune::Amg::SequentialInformation C Definition: StandardPreconditioners_gpu_serial.hpp:43 Operator O Definition: StandardPreconditioners_gpu_serial.hpp:42 typename F::PrecPtr PrecPtr Definition: StandardPreconditioners_gpu_serial.hpp:48 typename F::Vector V Definition: StandardPreconditioners_gpu_serial.hpp:46 Definition: StandardPreconditioners_mpi.hpp:135 |