Fixups for compiling with 3D metrics - #586
Merged
Merged
Conversation
Comparing three implementations, selected by constexpr setting for now - Original method, interpolating all factors to cell edge - SOLPS-inspired method, interpolating (KJ) to cell edges - Harmonic average rather than geometric mean Once tested, all except one method should be removed
Changes to boundary regions require changes to fake_mesh in the unit tests.
Smooth slope limiters for a happier solver (hopefully).
Dataset.hermes.extract_[12]_tokamak_geometry() calls now result in an
error:
```
Traceback (most recent call last):
File "/home/runner/work/hermes-3/hermes-3/build/tests/integrated/2D-recycling/runtest", line 144, in <module>
ds = ds.hermes.extract_2d_tokamak_geometry()
File "/home/runner/.local/lib/python3.10/site-packages/xhermes/accessors.py", line 172, in extract_2d_tokamak_geometry
raise Exception(
Exception: extract_2d_tokamak_geometry was called twice! Note: this is now done automatically upon loading
```
Still fails, now with difference in solution
Parallel heat conduction discretisation method used in `Div_par_K_Grad_par_mod` - `Original`: Separately average `K`, `J`, `g_22` and `dy` at cell edge then multiply. Seems to be the worst option. - `ProductJK`: Average the product `J * K` but otherwise the same as `Original` - `Harmonic`: Use harmonic average of `K * J / (g_22 * dy)`. This is the most correct in representing the conductivity of two half-cells. The default is still `Original` to allow time for testing.
Adds descriptions of the slope limiter and conduction method choices.
Fix tests in master
This function changed behavior in BOUT++ PR 3308 (boutproject/BOUT-dev#3308 , New Y-Boundaries for unified sheath code).
Region selections changed with latest xhermes version.
Numerical method choices
Attempt to fix dangling reference warnings
Makes the script also executable from outside CI
abs is for integers (from C) std::abs is for anything (from C++)
Do not convert to int
Contains: - Fix for uninitialised dt in SNES - PETSc preconditioner for CVODE - BinaryExpr performance improvements
…encies Update Python test dependency SHAs
Fix tests again
…encies Update Python test dependency SHAs
* Remove enable_c.patch * Fix formatting error
Add Github PR template
actions/checkout defaulted to this repository, so it failed to find the PR's head branch when the PR was opened from a fork (e.g. #232). Explicitly checkout the PR's head repository.
Fix format test for PRs from forks
After switching the format-command checkout to the PR head repo (which may be a fork), `origin/<base>` no longer resolves reliably, so prek fell back to scanning every file in the repo. Fetch the base repo's branch explicitly and diff against the merge-base so prek only checks files changed by the PR.
CI: scope clang-format check to PR files for fork PRs
… compile-3dmetric-clean
…ile-3dmetric-clean
Collaborator
Author
|
This is based on #577 and also includes #585 to allow working with the latest BOUT++ branch. Note that this uses BOUT++ from boutproject/BOUT-dev#3335 to have the ported fv operators. |
The interpolation method for the cell faces was modified, resulting in slightly different results.
Collaborator
Author
|
@bendudson if you do not object within the next days, I am going to merge this into your branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.