Correct number of candidates for prolong/restrict on extruded meshes #3148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
name: "Bug fix or new feature"
description: ''
title: ''
labels: ''
assignees: ''
Description
Prolongation and restriction kernels were incorrectly looping into out of bounds coarse basis functions in the extruded case. The logic added in 86e6ca3 was only correct for the injection kernel. So far the tests only considered cases that terminated the loop before going out of bounds. When the children cells fall out of the parent coarse cell, we access out of bounds memory, which utimately causes a
nan
to be returned on these cases.I also added a test with a deformed mesh hierarchy, although
inject
still breaks without producingnan
for degree > 1 and only on some types of cells (works on interval x interval).Associated Pull Requests:
Fixes Issues:
If issues are fixed by this PR, prepend each of them with the word
"fixes", so they are automatically closed when this PR is merged. For
example "fixes #123, fixes #456".
Checklist for author:
make lint
in thefiredrake
source directory).make linkcheck; make html; make latexpdf
infiredrake/docs
directory)pytest tests
in thefiredrake
source directory) (useful, but not essential if you don't have suitable hardware).Checklist for reviewer:
Feel free to add reviewers if you know there is someone who is already aware of this work.
Please open this PR initially as a draft and mark as ready for review once CI tests are passing.