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

Fix surfaces lying in x-y-plane #1318

Merged
merged 13 commits into from Jul 27, 2016
Merged

Conversation

chleh
Copy link
Collaborator

@chleh chleh commented Jul 18, 2016

In our shape matrix computation routines there was some code detecting the special case when a 2D element lies in the x-y plane. This code led to Neumann BCs being added sign-flipped if the surface at which it was applied was in the x-y-plane with surface normal (0, 0, -1).

This PR fixes the special cases in the code. A small end-to-end test example has been added. Cf. image: Groundwaterflow process; upper row before the PR, lower row after the PR; one surface is kept at Dirichlet 1, the other has Neumann 1, i.e., the point at which the Neumann BC is applied must be the maximum over the entire z-axis; that did not always hold before this PR (upper right case).

fixed-surface-orientation

Furthermore the det J > 0 check has been made strict in this PR. I.e., elements with zero volume or wrong orientation are disallowed now.

@ogsbot
Copy link
Member

ogsbot commented Jul 18, 2016

Jenkins: OGS-6/Gui/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Mac-PRs/2215/

rot_mat(2,1) = 0.0;
rot_mat(2,2) = -1.0;
return;
}
Copy link
Member

@TomFischer TomFischer Jul 18, 2016

Choose a reason for hiding this comment

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

Why not modify the first and third diagonal entries via: rot_mat(i,i) = n[2]>0 ? 1.0 : -1.0; (i = 0,2) and not duplicate the setting of the other matrix entries? ✅

@norihiro-w
Copy link
Collaborator

👍

@@ -1 +1 @@
Subproject commit 3087421f7ad138c72be7ee85f6872925da48ba7b
Subproject commit 28d74b31d74aa5f03a418cc5a11f33cd1e2d7662
Copy link
Member

@endJunction endJunction Jul 18, 2016

Choose a reason for hiding this comment

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

In the Tests/Data could the Elliptic/cube_1x1x1_NeumannBC/ could you please cleanup the vtu files? There are unnecessary data arrays in the input vtu and output vtus. (Alternatively one could refer to the original input vtu (without copy) which is one level up, and also to the gml).) ✅

Copy link
Member

Choose a reason for hiding this comment

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

Looks good. Later when merging the Tests/Data branch into Tests/Data/master please squash the changes, because the data will take space otherwise.

@ogsbot
Copy link
Member

ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Mac-PRs/2238/

@ogsbot
Copy link
Member

ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Mac-PRs/2239/

@ogsbot
Copy link
Member

ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Gui/Gui-Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Gui-Linux-PRs/2320/

@ogsbot
Copy link
Member

ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Gui/Gui-Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Gui-Linux-PRs/2321/

@ogsbot
Copy link
Member

ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2373/

@ogsbot
Copy link
Member

ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/597/

@ogsbot
Copy link
Member

ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2374/

@ogsbot
Copy link
Member

ogsbot commented Jul 19, 2016

Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/598/

@chleh
Copy link
Collaborator Author

chleh commented Jul 19, 2016

Jenkins, test this please.

1 similar comment
@chleh
Copy link
Collaborator Author

chleh commented Jul 20, 2016

Jenkins, test this please.

WRAPPER time
TESTER vtkdiff
ABSTOL 1e-16 RELTOL 1e-16
DIFF_DATA cube_1e3_top_neumann_pcs_0_ts_1_t_1.000000.vtu pressure pressure
Copy link
Member

Choose a reason for hiding this comment

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

Is it already fixed as in PR "Fix AddTest"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After the fix AddTest PR cmake will complain about this change. So there will be no silent failure.

@endJunction
Copy link
Member

After the test is named GroundWaterFlow/neumann... ⏩

@chleh chleh merged commit 766ea5c into ufz:master Jul 27, 2016
@ogsbot
Copy link
Member

ogsbot commented Jul 27, 2016

Jenkins: OGS-6/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Mac-PRs/2285/

@chleh chleh deleted the fix-surface-in-x-y-plane branch July 27, 2016 10:58
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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