Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently declare size_type in preconditioners derived from PreconditionRelaxation. #12749

Merged
merged 1 commit into from Sep 8, 2021

Conversation

bangerth
Copy link
Member

@bangerth bangerth commented Sep 8, 2021

The base class declares a 'size_type' typedef, but only some of the derived classes
import it. Do so consistently, and do it by inheriting the type instead of
re-inventing the wheel.

Prompted by running into this static_assert

template <typename MatrixType>
template <class VectorType>
inline void
PreconditionJacobi<MatrixType>::vmult(VectorType &      dst,
                                      const VectorType &src) const
{
  static_assert(
    std::is_same<typename PreconditionJacobi<MatrixType>::size_type,
                 typename VectorType::size_type>::value,
    "PreconditionJacobi and VectorType must have the same size_type.");

...and having to figure out whether that type actually exists.

@juleoc02 -- FYI.

/rebuild

…ditionRelaxation.

The base class declares a 'size_type' typedef, but only some of the derived classes
import it. Do so consistently, and do it by inheriting the type instead of
re-inventing the wheel.
@drwells
Copy link
Member

drwells commented Sep 8, 2021

The intel check is having some trouble (not just here but in other PRs). I'm going to go ahead and merge since its probably fine.

@drwells drwells merged commit 8abf4cb into dealii:master Sep 8, 2021
@bangerth bangerth deleted the size_type branch September 8, 2021 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants