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

AffineConstraints::merge(): allow mixed numbers #15753

Merged
merged 1 commit into from Jul 22, 2023

Conversation

peterrum
Copy link
Member

No description provided.

Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you deal with the situation where other_number is not convertible to number? Say std::complex to double?

@bangerth
Copy link
Member

In other words, I'm curious about the use case. @tamiko introduced the template argument to the class because he wanted to deal with complex-valued problems. I just think that if you wanted to merge double and float constraints, why not just use the same data type right from the start?

@peterrum
Copy link
Member Author

The use case is the same as in the case of

template <typename other_number>
void
copy_from(const AffineConstraints<other_number> &other);

Let's say we have an AffineConstraintd<double> and we want to initialize one AffineConstraintd<float>. In my current case, I have a MGConstrainedDoFs which always returns AffineConstraintd<double> but I would like to initialize a AffineConstraintd<float> for usage within multigrid.

@tamiko tamiko merged commit 74b8db5 into dealii:master Jul 22, 2023
15 checks passed
@bangerth
Copy link
Member

I did still have this question:

How do you deal with the situation where other_number is not convertible to number? Say std::complex to double?

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

4 participants