Skip to content

Default GVEC chartmap Bcov to Boozer average#387

Draft
krystophny wants to merge 1 commit into
mainfrom
gvec-boozer-bcov-default
Draft

Default GVEC chartmap Bcov to Boozer average#387
krystophny wants to merge 1 commit into
mainfrom
gvec-boozer-bcov-default

Conversation

@krystophny

@krystophny krystophny commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Change the GVEC chartmap converter default --Bcov mode from avg to boozer-avg.
  • Add a dependency-free static test so the default stays covered even when gvec is not installed.
  • Update stale profile-test wording from bit-for-bit equality to roundoff-level equality.

GVEC's Boozer evaluation computes B_theta_B and B_zeta_B on the requested Boozer grid. Using those quantities by default keeps the exported Boozer chartmap aligned with the coordinate transform used for the rest of the sampled field.

@Rykath please test this with the GVEC setup, especially the optional test_boozer_chartmap_gvec_qa path and a representative converter run.

Verification

Failing before, on origin/main:

$ python3 -c 'import ast, subprocess, sys; src=subprocess.check_output(["git","show","origin/main:tools/gvec_to_boozer_chartmap.py"], text=True); tree=ast.parse(src); default=None
for n in ast.walk(tree):
    if isinstance(n, ast.Call) and isinstance(n.func, ast.Attribute) and n.func.attr == "add_argument" and n.args and isinstance(n.args[0], ast.Constant) and n.args[0].value == "--Bcov":
        for kw in n.keywords:
            if kw.arg == "default" and isinstance(kw.value, ast.Constant): default=kw.value.value
print(f"origin/main --Bcov default: {default}")
sys.exit(0 if default == "boozer-avg" else 1)'
origin/main --Bcov default: avg
exit=1

Passing after:

$ python3 test/tests/test_gvec_chartmap_converter_static.py
PASS: GVEC converter defaults to Boozer covariant averaging
$ python3 -m py_compile tools/gvec_to_boozer_chartmap.py test/tests/test_gvec_chartmap_converter_static.py
exit=0
$ git diff --check
exit=0
$ fo test test_gvec_chartmap_converter_static
exit=0
$ fo test test_chartmap_aphi_abscissa
exit=0

Full local gate still blocked by the existing CMake/OpenMP_C configuration issue in this checkout:

$ fo check
Build: FAIL build failed: /opt/homebrew/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:654 (_FPHSA_FAILURE_MESSAGE)
...
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)

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.

1 participant