Skip to content
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

Draft: make examples use periodicity and SFC box meshes #1128

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jedbrown
Copy link
Member

@jedbrown jedbrown commented Jan 2, 2023

This depends on https://gitlab.com/petsc/petsc/-/merge_requests/5411 so won't be ready for merging soon/ever, but I wanted to put examples out there for discussion.

@@ -77,6 +77,7 @@ CEED_QFUNCTION(Setup)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedSca
const CeedScalar A33 = J11 * J22 - J12 * J21;
const CeedScalar detJ = J11 * A11 + J21 * A12 + J31 * A13;

if (detJ <= 0) printf("%s: detJ %g\n", __func__, detJ);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremylt Do you have thoughts about how we should report such a thing to the user? This is especially noisy (will generate millions of lines on real problems) so not suitable for merging, but it would be good to have a clear message to the user about inverted elements (usually represents a mesh IO problem or issues like this that I'm pretty sure we've stumbled into).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making a debug macro for qfunction use would be easy enough, but reporting only once would be harder. No obvious solution comes to mind

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make a mesh checking gallery QFunction that uses context to flag if the mesh has inverted elements and only report once

@jrwrigh
Copy link
Collaborator

jrwrigh commented Mar 24, 2024

With #1529, we officially have a zbox simulation in the test suite.

@jedbrown
Copy link
Member Author

Thanks @jrwrigh, it's there anything we should salvage in this branch or just close it as superseded?

@jrwrigh
Copy link
Collaborator

jrwrigh commented Mar 24, 2024

Not that I can think of, unless you were wanting to keep the conversion of gaussianwave to 3D or the inverted element checks.

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

Successfully merging this pull request may close these issues.

None yet

3 participants