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
Enhance documentation for sum_into_values #16382
Conversation
334ba56
to
a4e6afa
Compare
a4e6afa
to
aebac1f
Compare
This behavior existed before I started working on In my opinion, we should make the behavior as similar as possible to With your suggestion, do I still need to zero out before the quadrature loop? The components worked on are written anyway if |
Yes, I think this is the right step. When reviewing step-89 (from where the above example comes), it was quite non-intuitive that you need to add the second time. |
We only have to zero out in one corner case (where nothing has to be done). The rest should be fine by simply skipping the lines. |
Nice, then we can get rid of the complicated check! |
@peterrum I can take a shot once this is marked ready to test, so I know which tests are failing. |
/rebuild |
a3e4a41
to
43a98d5
Compare
Maybe the behavior was motivated because the buffer is typically used for I gave this some more thoughts and am now in favor of keeping everything as it is. Does this also make sense to you @bergbauer @peterrum? If so, I will simply enhance the documentation. |
In my opinion, |
@bergbauer using the buffers from corresponding FEFaceEvaluation objects works already intuitively by zeroing out the whole buffer. |
7bc6e23
to
98646f1
Compare
@bergbauer @peterrum I clarified the documentation. Using separate buffers (e.g. from corresponding |
98646f1
to
dee004c
Compare
Can you give an example code? |
Sure. Below you see a pseudocode using different buffers (here using the buffers from
|
By now,
FEPointEvaluation::integrate(buffer, flags)
zeroed out the whole buffer and possibly wrote to a subset of DoFs. Therefore, the code becomes tedious and error-prone if multipleFEPointEvaluation
objects work on the same buffer. This PR aims to zero out only the values the objects actually work on.While above code works as expected, if we use
FEEvaluation
objects withFEPointEvaluation
currently one would have to writeAdditionally, from the documentation of sum_into_values: "Flag specifying if the integrated values should be summed into the solution values. Defaults to false." I would expect that only those DoFs are changed that the object works on.
Maybe there are reasons why everything is currently zeroed out that I couldn't think of. Can you comment on this after the holidays @bergbauer?
EDIT: As described in #16382 (comment) using separate buffers results in similar code as for
FEFaceEvaluation
. Therefore, I simply enhanced the documentation.