-
Notifications
You must be signed in to change notification settings - Fork 8
Adaptive Multigrid #87
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
base: main
Are you sure you want to change the base?
Conversation
) | ||
|
||
for j, parent in enumerate(f2c): | ||
n = int(num_children[parent].item()) |
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 this just to avoid numpy types? What happens if you do?
n = int(num_children[parent].item()) | |
n = num_children[parent] |
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.
The following loop after this will return that n is an unhashable type: 'numpy.ndarray' , but you are right that there is no need for the int()
There is a demo.py.rst in your project repository. Could it be added to this PR to include it in ngsPETSc? (In particular I would like to comment on the interface.) |
if mesh.topological_dimension() <= 2: | ||
max_children = 4 | ||
else: | ||
max_children = 16 |
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.
Why is this 16 and not 8?
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.
Setting this < 16 leads to bugs in 3D. The coarse-to-fine mappings generated from ngmesh.parentelements.NumPy()
sometimes returns more than 8 children.
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.
Do we get as many as 15?
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.
In some iterations I think we do. I somewhat empirically found this upper bound.
for split_label, _ in source_function_splits.items(): | ||
transfer_op( | ||
source_function_splits[split_label], | ||
target_function_splits[split_label], | ||
) | ||
|
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.
We should have a special case that uses assign
for the unrefined submesh
…on't perform transfer for unsplit submeshes
@AnuragRao1 Why are the ngsolve test importing firedrake now ? :) |
Added
AdaptiveMeshHierarchy
andAdaptiveTransferManager
along with corresponding tests.