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] State quadrature postprocessing plugin with "richardson extrapolation" error estimation postprocessing script #2564

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

Conversation

class4kayaker
Copy link
Contributor

@class4kayaker class4kayaker commented Jul 8, 2018

This PR adds a plugin to export FEM state variable data and quadrature weights at the Gauss-Legendre quadrature points for the highest refinement level, or one more refinement level for a convergence calculation. This is useful for testing convergence behavior for problems where there is not a known solution that can be used for comparison. The data is currently exported using an ASCII data format, but adding an option for the HDF5 format is likely reasonable.

Note that some of the plugin structure is based on better behavior with VOF fields when the plugin is extended to handle them.

The actual error estimation requires a separate post-processing step, which must correctly associate the quadrature point lists. This is the most expensive part of the computation, but in some cases it can be done more quickly by exploiting some aspect of the data set.

The current implementation is functional enough to test on special cases such as the solkz benchmark. The new copy of that benchmark includes a prototype comparison script that makes use of the box geometry to efficiently get a consistent order. The script also does a basic check to ensure that the points being compared are correctly associated.

Improvements likely needed for final inclusion are:

  • Add headers to output files to make some necessary information available. This should probably include some basic geometry data for use by the post-processing script.
  • Identify where best to include the python post-processing script, if it is to be included
  • Improve structure of the post-processing script
  • Improve the post-processing script to be suitable for at least general box geometries
  • Add a cookbook with examples of usage

@egpuckett
Copy link
Contributor

egpuckett commented Jul 10, 2018

I would like to be added to the list of people who can comment on and review this PR. The ideas underlying this algorithm, which were initially implemented by Ying and Harsha, and now Jon who seems to have finally seems to have gotten it to work on a uniform grid, came from me. How do I go about becoming one of the people who can comment on and review this PR?

@jdannberg
Copy link
Contributor

I would like to be added to the list of people who can comment on and review this PR.

You can comment on any pull request and leave a review, the only thing you can not do is merge the pull request. So just go ahead!

@bangerth
Copy link
Contributor

In other words: once you've left one comment, you will get all following comments on a pull request. So you're already on, @egpuckett.

For future cases, somewhere along the top menu or the right menu, there is a button called "Watch" or "Notifications" where you can sign up to follow a pull request. (I can't see this myself because I'm automatically following all PRs in aspect.)

@egpuckett
Copy link
Contributor

Thanks!

For future cases, somewhere along the top menu or the right menu, there is a button called "Watch" or "Notifications" where you can sign up to follow a pull request. (I can't see this myself because I'm automatically following all PRs in aspect.)

I found that part. For some reason yesterday I didn't see the comment box.

@class4kayaker class4kayaker changed the title [WIP] "Richardson extrapolation" Error estimation postprocessing plugin [WIP] State quadrature postprocessing plugin with "richardson extrapolation" error estimation postprocessing script Jul 20, 2018
@class4kayaker
Copy link
Contributor Author

I have currently refactored my "Richardson extrapolation" post-processing python script into a python package.

Would this be the preferable way to include the post-processing script, or would there be another preferred manner in which to include it?

@class4kayaker class4kayaker force-pushed the Richardson_extrapolation_merge branch from 9019b56 to 801575e Compare July 23, 2018 21:17
commit bffa409
Author: Jonathan Robey <[email protected]>
Date:   Wed Sep 12 14:20:55 2018 -0700

    Fix assertion

commit 002f4c1
Author: Jonathan Robey <[email protected]>
Date:   Thu Jul 26 15:01:12 2018 -0700

    Add pyproject.toml

commit 7c00d36
Author: Jonathan Robey <[email protected]>
Date:   Mon Jul 23 14:27:51 2018 -0700

    Fix script issues

commit 801575e
Author: Jonathan Robey <[email protected]>
Date:   Mon Jul 23 14:06:22 2018 -0700

    Refactor python script into package

commit bc6899f
Author: Jonathan Robey <[email protected]>
Date:   Fri Jul 20 11:06:14 2018 -0700

    Add compute_convergence python script in contrib directory

commit c41dce9
Author: Jonathan Robey <[email protected]>
Date:   Fri Jul 20 11:05:58 2018 -0700

    Add additional data to state quadrature headers

commit 5c4d396
Author: Jonathan Robey <[email protected]>
Date:   Thu Jul 19 14:43:59 2018 -0700

    Rename files

commit a35efbf
Author: Jonathan Robey <[email protected]>
Date:   Thu Jul 19 13:01:45 2018 -0700

    Add error file output

commit 78e0cd2
Author: Jonathan Robey <[email protected]>
Date:   Thu Jul 19 00:24:56 2018 -0700

    Rename plugin and add description

commit b580a4b
Author: Jonathan Robey <[email protected]>
Date:   Tue Jul 10 14:58:04 2018 -0700

    Rework for correct behavior with variable dim

    Also abstracts out the header creation into a single function call

commit 40ab422
Author: Jonathan Robey <[email protected]>
Date:   Sun Jul 8 18:31:25 2018 -0700

    Fix format

commit 2cb66df
Author: Jonathan Robey <[email protected]>
Date:   Sun Jul 8 12:14:42 2018 -0700

    Extend to comparison of AMR computations

commit 948d9a5
Author: Jonathan Robey <[email protected]>
Date:   Fri Jul 6 16:47:52 2018 -0700

    Add comparison script to benchmark

commit 26a8509
Author: Jonathan Robey <[email protected]>
Date:   Fri Jul 6 13:27:44 2018 -0700

    Adjust header

commit 8cbc07e
Author: Jonathan Robey <[email protected]>
Date:   Fri Jul 6 13:21:17 2018 -0700

    Fix compile error

commit 070a5ed
Author: Jonathan Robey <[email protected]>
Date:   Mon Jul 2 14:43:50 2018 -0700

    Add weights to output

commit ccaa57b
Author: Jonathan Robey <[email protected]>
Date:   Mon Jul 2 14:25:49 2018 -0700

    Add header lines to output

commit 890ad08
Merge: 94ef3e2 005d22c
Author: Jonathan Robey <[email protected]>
Date:   Mon Jul 2 14:01:20 2018 -0700

    Merge branch 'master' into Richardson_extrapolation_merge

commit 94ef3e2
Author: Jonathan Robey <[email protected]>
Date:   Mon Jul 2 13:50:19 2018 -0700

    Adjust RE to output all data

commit 3851690
Author: Jonathan Robey <[email protected]>
Date:   Sun Jun 24 00:13:41 2018 -0700

    Fix error output format

commit d2e6396
Author: Jonathan Robey <[email protected]>
Date:   Fri Jun 22 07:40:23 2018 -0700

    Add L1 error extrapolation

commit 3d04755
Author: Jonathan Robey <[email protected]>
Date:   Wed Jun 20 07:59:41 2018 -0700

    Adjust output file precision

commit 820287c
Author: Jonathan Robey <[email protected]>
Date:   Tue Jun 19 14:29:10 2018 -0700

    Minor fixes

commit a6aff2c
Author: Jonathan Robey <[email protected]>
Date:   Tue Jun 19 11:36:02 2018 -0700

    Adjust script

commit 404fad8
Author: Jonathan Robey <[email protected]>
Date:   Tue Jun 19 11:22:53 2018 -0700

    Add convergence computing script

commit 84ab6e6
Author: Jonathan Robey <[email protected]>
Date:   Tue Jun 19 10:36:14 2018 -0700

    Do some cleanup

commit e66898f
Author: Jonathan Robey <[email protected]>
Date:   Tue Jun 19 10:22:37 2018 -0700

    Obtain functional setup for richardson extrapolation tests

commit d1be071
Author: Jonathan Robey <[email protected]>
Date:   Tue Jun 19 09:57:40 2018 -0700

    Move and update solkz test

commit 02dd13c
Merge: bea7611 80d5e2e
Author: Jonathan Robey <[email protected]>
Date:   Mon Jun 18 15:26:24 2018 -0700

    Merge branch 'master' into Richardson_extrapolation_merge

commit bea7611
Author: Harsha Lokavarapu <[email protected]>
Date:   Tue Jan 3 18:22:25 2017 -0800

    Writing error output for RE to output directory

commit 021b24c
Author: Harsha Lokavarapu <[email protected]>
Date:   Sun Oct 2 20:54:36 2016 -0700

    Ran astyle

commit 8ff14ca
Author: Harsha Lokavarapu <[email protected]>
Date:   Sat Oct 1 19:11:52 2016 -0700

    Updated method to find closest quadrature point

commit 5e96bed
Merge: b0f3538 e516b9b
Author: Harsha Lokavarapu <[email protected]>
Date:   Sat Oct 1 18:00:49 2016 -0700

    Merge branch 'master' of github.com:geodynamics/aspect into Richardson_extrapolation

commit b0f3538
Author: Harsha Lokavarapu <[email protected]>
Date:   Wed Sep 28 15:01:03 2016 -0700

    Added run time parameter; Less verbose logging

commit 3ca2cec
Author: Harsha Lokavarapu <[email protected]>
Date:   Wed Sep 28 09:07:41 2016 -0700

    Appending computed L2 error to a file for new postprocessor.

commit 3cab10e
Merge: 27fca83 cb6576b
Author: Harsha Lokavarapu <[email protected]>
Date:   Fri Sep 23 12:09:31 2016 -0700

    Merge branch 'master' of github.com:geodynamics/aspect into Richardson_extrapolation

commit 27fca83
Author: Harsha Lokavarapu <[email protected]>
Date:   Wed Sep 21 16:10:43 2016 -0700

    Added support to read variable number of compositional fields

commit 2eec32c
Author: Harsha Lokavarapu <[email protected]>
Date:   Wed Sep 21 12:51:48 2016 -0700

    Now writing out the data for compositional fields as well

commit a850183
Merge: 0fdbbe6 2409217
Author: Harsha Lokavarapu <[email protected]>
Date:   Wed Sep 21 10:03:33 2016 -0700

    Fixed merge conflicts

commit 0fdbbe6
Author: Harsha Lokavarapu <[email protected]>
Date:   Wed Sep 21 09:58:16 2016 -0700

    Added some comments and TODOs

commit 2409217
Merge: a40d925 93646b3
Author: Harsha Lokavarapu <[email protected]>
Date:   Wed Sep 21 09:45:29 2016 -0700

    Merge pull request geodynamics#8 from yinghe616/Richardson_extrapolation

    adding tolerance due to the errors from reading the input data

commit 93646b3
Author: Ying He <[email protected]>
Date:   Tue Sep 20 21:11:48 2016 -0700

    adding tolerance due to the errors from reading the input data

commit a40d925
Author: Harsha Lokavarapu <[email protected]>
Date:   Tue Sep 20 17:15:17 2016 -0700

    Added test case

commit 417bea8
Author: Harsha Lokavarapu <[email protected]>
Date:   Tue Sep 20 16:27:39 2016 -0700

    Bug fixes patch 1

commit c14c401
Author: Harsha Lokavarapu <[email protected]>
Date:   Mon Sep 19 16:35:42 2016 -0700

    Working model to compute the l2 error of velocity between h and h/2

commit c1491e2
Author: Harsha Lokavarapu <[email protected]>
Date:   Fri Sep 16 17:34:50 2016 -0700

    Added logic to compute the support points of a mesh that has twice the number of cells in each dimension

commit 6b9197e
Author: egpuckett <[email protected]>
Date:   Thu Sep 15 16:23:12 2016 -0700

    EGP && HL brainstorming

commit c9fa8b9
Author: Harsha Lokavarapu <[email protected]>
Date:   Thu Sep 15 10:35:17 2016 -0700

    Richardson extrapolation
@class4kayaker class4kayaker force-pushed the Richardson_extrapolation_merge branch from bffa409 to 2a0ee0f Compare April 15, 2019 23:01
@class4kayaker
Copy link
Contributor Author

Added cookbook files, and began writeup on example cookbook.

I would appreciate advice on where the cookbook would work best in the manual, and also the appropriate level of detail as far as getting the postprocessing python script funcitoning and applied. The cookbook for this uses a python script (rather than a bash script) to automate the full convergence computation.

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