Opm::cuistl::PreconditionerConvertFieldTypeAdapter< CudaPreconditionerType, M, X, Y, l > Class Template Reference Converts the field type (eg. double to float) to benchmark single precision preconditioners. More...
Inheritance diagram for Opm::cuistl::PreconditionerConvertFieldTypeAdapter< CudaPreconditionerType, M, X, Y, l >:
Detailed Descriptiontemplate<class CudaPreconditionerType, class M, class X, class Y, int l = 1> class Opm::cuistl::PreconditionerConvertFieldTypeAdapter< CudaPreconditionerType, M, X, Y, l > Converts the field type (eg. double to float) to benchmark single precision preconditioners.
To use this, use something like the following code: using XDouble = Dune::BlockVector<Dune::FieldVector<double, 2>>;
using MDouble = Dune::FieldMatrix<double, 2, 2>;
using SpMatrixDouble = Dune::BCRSMatrix<MDouble>;
using XFloat = Dune::BlockVector<Dune::FieldVector<float, 2>>;
using MFloat = Dune::FieldMatrix<float, 2, 2>;
using SpMatrixFloat = Dune::BCRSMatrix<MFloat>;
template<class ParallelInfo>
void applyILU0AsFloat(const MDouble& matrix, const XDouble& x, XDouble& y) {
using DoubleToFloatConverter = typename Opm::cuistl::PreconditionerConvertFieldTypeAdapter<FloatILU0, MDouble,
XDouble, XDouble>;
// Note that we do not need to make a new instance for every invocation, this
// is just done for this example
auto doubleToFloatConverter = DoubleToFloatConverter(matrix);
const auto& convertedMatrix = doubleToFloatConverter.getConvertedMatrix();
auto floatILU0 = std::make_shared<FloatILU0>(convertedMatrix, 0, 1.0, 0);
doubleToFloatConverter.setUnderlyingPreconditioner(floatILU0);
// This will convert x and y to float, then call floatILU0.apply on the converted arguments
doubleToFloatConverter.apply(x, y);
}
A two-step version of an overlapping Schwarz preconditioner using one step ILU0 as. Definition: ParallelOverlappingILU0.hpp:131 Converts the field type (eg. double to float) to benchmark single precision preconditioners. Definition: PreconditionerConvertFieldTypeAdapter.hpp:86 Member Typedef Documentation◆ block_type
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
◆ domain_type
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
The domain type of the preconditioner. ◆ domain_type_to
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
◆ field_type
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
The field type of the preconditioner. ◆ field_type_to
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
The field type of the preconditioner. ◆ matrix_type
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
The matrix type the preconditioner is for. ◆ matrix_type_to
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
◆ range_type
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
The range type of the preconditioner. ◆ range_type_to
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
The range type of the preconditioner. ◆ XTo
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
◆ YTo
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
Constructor & Destructor Documentation◆ PreconditionerConvertFieldTypeAdapter()
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
Constructor.
Member Function Documentation◆ apply()
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
Apply the preconditoner. ◆ category()
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
Category of the preconditioner (see SolverCategory::Category) ◆ getConvertedMatrix()
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
◆ post()
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
Not used at the moment. ◆ pre()
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
Not used at the moment. ◆ setUnderlyingPreconditioner()
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
◆ update()
template<class CudaPreconditionerType , class M , class X , class Y , int l = 1>
Implements Dune::PreconditionerWithUpdate< X, Y >. The documentation for this class was generated from the following file: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||