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

[9.5] Refactor grid fixup functions #13820

Merged
merged 4 commits into from Aug 31, 2022

Conversation

drwells
Copy link
Member

@drwells drwells commented May 25, 2022

Followup to #13765 and #13766.

We typically (but not always) call the same three grid fixup functions after loading in data. This PR adds a utility function for calling all of them in the right order under the correct circumstances. As of #13766 we can detect twisted pyramids and wedges, so we can call GridTools::invert_cells_with_negative_measure() for all types of supported meshes.

@drwells
Copy link
Member Author

drwells commented May 26, 2022

On second thought, this might break things in a weird way (it at least substantially changes the behavior of loading mixed meshes) so lets hold off until 9.5. If necessary users can always fix meshes themselves.

@drwells drwells added this to the Release 9.5 milestone May 26, 2022
@drwells drwells changed the title Refactor grid fixup functions [9.5] Refactor grid fixup functions May 26, 2022
@drwells drwells force-pushed the refactor-grid-fixup-functions branch from 4a1136b to 314d713 Compare June 24, 2022 15:58
@marcfehling
Copy link
Member

One test fails:

1315/4553 Test #1319: bits/distorted_cells_02.debug .........................................................***Failed    9.84 sec
make[3]: *** [distorted_cells_02.debug/diff] Error 1
make[2]: *** [CMakeFiles/bits.distorted_cells_02.debug.test.dir/all] Error 2
make[1]: *** [CMakeFiles/bits.distorted_cells_02.debug.test.dir/rule] Error 2
make: *** [bits.distorted_cells_02.debug.test] Error 2
Test bits/distorted_cells_02.debug: DIFF
===============================   OUTPUT BEGIN  ===============================
[  0%] Generating distorted_cells_02.debug/interrupt_guard.cc
Scanning dependencies of target bits.distorted_cells_02.debug
[  0%] Building CXX object CMakeFiles/bits.distorted_cells_02.debug.dir/distorted_cells_02.cc.o
Building CXX object CMakeFiles/bits.distorted_cells_02.debug.dir/distorted_cells_02.debug/interrupt_guard.cc.o
Linking CXX executable distorted_cells_02.debug/distorted_cells_02.debug
Built target bits.distorted_cells_02.debug
Scanning dependencies of target bits.distorted_cells_02.debug.test
Generating distorted_cells_02.debug/output
Generating distorted_cells_02.debug/diff
bits/distorted_cells_02.debug: BUILD successful.
bits/distorted_cells_02.debug: RUN successful.
bits/distorted_cells_02.debug: DIFF failed. ------ Source: /jenkins/workspace/dealii_PR-13820/tests/bits/distorted_cells_02.debug.output
bits/distorted_cells_02.debug: DIFF failed. ------ Result: /home/dealii/build/tests/bits/distorted_cells_02.debug/output
Check /home/dealii/build/tests/bits/distorted_cells_02.debug/output /jenkins/workspace/dealii_PR-13820/tests/bits/distorted_cells_02.debug.output
bits/distorted_cells_02.debug: DIFF failed. ------ Diff:   /home/dealii/build/tests/bits/distorted_cells_02.debug/failing_diff
bits/distorted_cells_02.debug: DIFF failed. ------ First 20 lines of numdiff output:
----------------
##2       #:2   <== ExcGridHasInvalidCell
##2       #:2   ==> ExcInternalError
@                                                     @@
##2       #>3   <== cell_no)
##2             ==>
@ Line 2 in file "output" is shorter than expected!
----------------
##3       #:2   <== ExcGridHasInvalidCell
##3       #:2   ==> ExcInternalError
@                                                     @@
##3       #>3   <== cell_no)
##3             ==>
@ Line 3 in file "output" is shorter than expected!

+++  File "/jenkins/workspace/dealii_PR-13820/tests/bits/distorted_cells_02.debug.output" differs from file "output"
CMakeFiles/bits.distorted_cells_02.debug.test.dir/build.make:64: recipe for target 'distorted_cells_02.debug/diff' failed
CMakeFiles/Makefile2:19075: recipe for target 'CMakeFiles/bits.distorted_cells_02.debug.test.dir/all' failed
CMakeFiles/Makefile2:19082: recipe for target 'CMakeFiles/bits.distorted_cells_02.debug.test.dir/rule' failed
Makefile:7851: recipe for target 'bits.distorted_cells_02.debug.test' failed


bits/distorted_cells_02.debug: ******    DIFF failed    *******

===============================    OUTPUT END   ===============================
Expected stage PASSED - aborting
CMake Error at /home/dealii/build/share/deal.II/scripts/run_test.cmake:144 (MESSAGE):
  *** abort

@drwells
Copy link
Member Author

drwells commented Jun 28, 2022

Hm. We might want to keep throwing that exception - it is a lot more informative than an internal error. I'll see if I can get that to work.

@bangerth
Copy link
Member

@drwells Any news?

@drwells
Copy link
Member Author

drwells commented Jul 20, 2022

Not yet. I've been traveling for most of the last two weeks and I haven't had time to look at this.

@drwells drwells force-pushed the refactor-grid-fixup-functions branch from 314d713 to 4f6085d Compare July 21, 2022 20:59
@drwells
Copy link
Member Author

drwells commented Jul 21, 2022

That was pretty easy to address - all we need to do is switch to the correct exception type here.

@drwells drwells force-pushed the refactor-grid-fixup-functions branch from 4f6085d to 74b3469 Compare July 22, 2022 19:28
@drwells
Copy link
Member Author

drwells commented Jul 25, 2022

/rebuild

@drwells drwells force-pushed the refactor-grid-fixup-functions branch from 74b3469 to 937a516 Compare August 27, 2022 16:13
@drwells
Copy link
Member Author

drwells commented Aug 27, 2022

Can someone take another look?

Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

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

Nice!

include/deal.II/base/exceptions.h Outdated Show resolved Hide resolved
@drwells drwells force-pushed the refactor-grid-fixup-functions branch from 937a516 to f654ef0 Compare August 27, 2022 17:15
@masterleinad masterleinad merged commit bafd99f into dealii:master Aug 31, 2022
mkghadban pushed a commit to OpenFCST/dealii that referenced this pull request Sep 8, 2022
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

5 participants