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
FieldTransfer: enable coarsening #14802
FieldTransfer: enable coarsening #14802
Conversation
I agree that |
const auto &fe = dof_handler.get_fe(fe_index); | ||
Assert(fe.n_dofs_per_cell() > 0, | ||
ExcMessage( | ||
"Cannot coarsen onto a FiniteElement with no DoFs.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that true even if all the children cells use FE_Nothing
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the FE here (returned by the domination logic) should never be FE_Nothing.
tests/hp/field_transfer_05.cc
Outdated
{ | ||
if (cell->is_locally_owned()) | ||
{ | ||
if (cell->center()[0] < 0.5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test where you coarsen FE_Nothing cells
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it but now I get an error (floating point exception in LAPACKFullMatrix::vmult
inside interpolate
) when trying to resolve the hanging node constraints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK it is a weird thing to do anyway. I would be fine merging this PR which improves the current situation, if you open an issue that describes the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #14807
df58baf
to
d42cd5f
Compare
As of now I can only refer to the initial idea I had here #11132 (comment), and here #12759 (comment) (and the follow-up discussion). I cannot work on this topic right now as of immediate deadlines ahead. I will have time in spring to put more thought into it. We should also fix the remaining issues with |
/rebuild |
The new
FieldTransfer
class does not seem to be able to coarsen a non-constant FE field. This PR suggests a way to achieve this, similar toSolutionTransfer
.remark: I am not super happy with the implementation, since this functionality is mostly copied and adapted from
SolutionTransfer
andget_interpolated_dof_values
. OverallFieldTransfer
andSolutionTransfer
share a lot of functionality but differ in certain details. There was some discussion how to best implement the requirements some of us have on transfer of field vectors in #12759. I would be happy to help in future development of these classes. Actually, I also require the averaging functionality ofSolutionTransfer
introduced in #13457.