Skip to content

Conversation

AnuragRao1
Copy link
Collaborator

Added AdaptiveMeshHierarchy and AdaptiveTransferManager along with corresponding tests.

)

for j, parent in enumerate(f2c):
n = int(num_children[parent].item())
Copy link
Collaborator

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?

Suggested change
n = int(num_children[parent].item())
n = num_children[parent]

Copy link
Collaborator Author

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()

@pefarrell
Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Comment on lines 67 to 72
for split_label, _ in source_function_splits.items():
transfer_op(
source_function_splits[split_label],
target_function_splits[split_label],
)

Copy link
Collaborator

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

@UZerbinati
Copy link
Collaborator

@AnuragRao1 Why are the ngsolve test importing firedrake now ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants