Skip to content
Snippets Groups Projects
Commit 340415be authored by Christian Engwer's avatar Christian Engwer
Browse files

[preconditioner] fix ILDL for SIMD types

the weight is a scalar, but the current code defines it a field_type,
which might be a SIMD type or something else, which does not behave as
a scalar. We fix this by using the SimdScalar traits to extract the
scalar type and use this.
parent 978ca904
No related branches found
No related tags found
1 merge request!129[preconditioner] fix ILDL for SIMD types
Pipeline #
......@@ -912,6 +912,8 @@ namespace Dune {
typedef Y range_type;
/** \brief field type of the preconditioner **/
typedef typename X::field_type field_type;
//! \brief scalar type underlying the field_type
typedef SimdScalar<field_type> scalar_field_type;
/**
* \brief constructor
......@@ -921,7 +923,7 @@ namespace Dune {
* \param[in] A matrix to operate on
* \param[in] relax relaxation factor
**/
explicit SeqILDL ( const matrix_type &A, field_type relax = field_type( 1 ) )
explicit SeqILDL ( const matrix_type &A, scalar_field_type relax = scalar_field_type( 1 ) )
: decomposition_( A.N(), A.M(), matrix_type::random ),
relax_( relax )
{
......@@ -985,7 +987,7 @@ namespace Dune {
private:
matrix_type decomposition_;
field_type relax_;
scalar_field_type relax_;
};
/** @} end documentation */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment