AmgxPreconditioner.hpp
Go to the documentation of this file.
142 if constexpr (std::is_same_v<matrix_field_type, double> && std::is_same_v<vector_field_type, double>) {
144 } else if constexpr (std::is_same_v<matrix_field_type, float> && std::is_same_v<vector_field_type, double>) {
146 } else if constexpr (std::is_same_v<matrix_field_type, float> && std::is_same_v<vector_field_type, float>) {
149 OPM_THROW(std::runtime_error, "Unsupported combination of matrix and vector types in AmgxPreconditioner");
165 AMGX_SAFE_CALL(AMGX_pin_memory(const_cast<matrix_field_type*>(values), sizeof(matrix_field_type) * nnz_ * block_size * block_size));
285 // The AMG hierarchy of the Amgx preconditioner can depend on the values of the matrix, so it must be recreated
286 // when the matrix values change, at given frequency. Since this is handled internally, we return true.
Wrapper for AMGX's AMG preconditioner. Definition: AmgxPreconditioner.hpp:102 bool hasPerfectUpdate() const override Checks if the preconditioner has a perfect update. Definition: AmgxPreconditioner.hpp:283 Y range_type The range type of the preconditioner. Definition: AmgxPreconditioner.hpp:111 void update() override Updates the preconditioner with the current matrix values. Definition: AmgxPreconditioner.hpp:252 void apply(X &v, const Y &d) override Applies the preconditioner to a vector. Definition: AmgxPreconditioner.hpp:222 typename M::field_type matrix_field_type The field type of the matrix. Definition: AmgxPreconditioner.hpp:107 static constexpr int block_size Definition: AmgxPreconditioner.hpp:115 AmgxPreconditioner(const M &A, const Opm::PropertyTree prm) Constructor for the AmgxPreconditioner class. Definition: AmgxPreconditioner.hpp:125 Dune::SolverCategory::Category category() const override Returns the solver category. Definition: AmgxPreconditioner.hpp:273 void pre(X &, Y &) override Pre-processing step before applying the preconditioner. Definition: AmgxPreconditioner.hpp:210 X domain_type The domain type of the preconditioner. Definition: AmgxPreconditioner.hpp:109 M matrix_type The matrix type the preconditioner is for. Definition: AmgxPreconditioner.hpp:105 typename X::field_type vector_field_type The field type of the vectors. Definition: AmgxPreconditioner.hpp:113 ~AmgxPreconditioner() Destructor for the AmgxPreconditioner class. Definition: AmgxPreconditioner.hpp:177 void post(X &) override Post-processing step after applying the preconditioner. Definition: AmgxPreconditioner.hpp:244 Interface class adding the update() method to the preconditioner interface. Definition: PreconditionerWithUpdate.hpp:32 T get(const std::string &key) const Definition: AmgxPreconditioner.hpp:36 std::string to_string(const ConvergenceReport::ReservoirFailure::Type t) AmgxConfig(const Opm::PropertyTree &prm) Definition: AmgxPreconditioner.hpp:57 |