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

[WIP] Aki and Richards test fix #9596

Merged
merged 6 commits into from
Apr 18, 2024
Merged

[WIP] Aki and Richards test fix #9596

merged 6 commits into from
Apr 18, 2024

Conversation

kirstybayliss
Copy link
Contributor

@kirstybayliss kirstybayliss commented Apr 15, 2024

The Aki and Richard's convention test currently compares the upper and lower left and right-hand edges of a complex fault. Though this works well in most cases, there are some instances in which a fault source will fail the check even when it is correctly specified, as shown in the example figure.
image

In the example, the fault surface is created in the mbtk sub function, which also checks that the edges are correctly specified while constructing the fault surface. If we have a lot of curvature in the complex fault surface, taking the corners of the surface for calculating the cross-products gives a sort of averaged normal to the surface which is greater than 90 and therefore fails the check.
As an alternative, we can check that two adjacent edges follow the Aki and Richard's convention instead of checking the entire fault surface. If we want to be really certain, we could check the first two and last two edges, but I think it's unlikely that a fault surface will have flipped half way through.

Related to GEMScienceTools/oq-mbtk#395

@kirstybayliss kirstybayliss marked this pull request as draft April 15, 2024 13:30
@micheles micheles added this to the Engine 3.20.0 milestone Apr 16, 2024
@micheles
Copy link
Contributor

micheles commented Apr 17, 2024

Many tests are broken due to the usage of round, see #9542

@kirstybayliss kirstybayliss marked this pull request as ready for review April 18, 2024 07:34
Copy link
Member

@mmpagani mmpagani left a comment

Choose a reason for hiding this comment

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

I agree! LGTM

@micheles micheles merged commit a0a3384 into master Apr 18, 2024
6 checks passed
@micheles micheles deleted the Aki_Richards_fix branch April 18, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants