Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
3580dc5
Coordinates: Invalidate caches when cell spacing set
bendudson Jul 9, 2026
7414796
test_coordinates: Fix IndexedAccessors
bendudson Jul 9, 2026
740f40f
Fix setting location of derivatives
ZedThree Jul 9, 2026
69950d1
Fix broken examples
ZedThree Jul 9, 2026
7da06af
Fix some clang-tidy warnings
ZedThree Jul 9, 2026
d546bec
Div_par: Use Field3DParallel
bendudson Jul 9, 2026
0870329
Coordinates: Use communicate_no_slices
bendudson Jul 9, 2026
312bfc3
Coordinates: Getters use BOUT_OMP_SAFE
bendudson Jul 9, 2026
23ddf98
Delete unneededed expr.hxx
bendudson Jul 9, 2026
49774de
Field3DParallel BinaryExpr templates
bendudson Jul 10, 2026
470abe4
Add unit test to ensure Field3DParallel works for products with FCI
dschwoerer Jul 8, 2026
c23f2d5
Allow FCI fixture
dschwoerer Jul 9, 2026
356fd0c
Move MockParallelTransform
dschwoerer Jul 9, 2026
8f66c00
test_field3d: Tidying, define FakeMeshFixtureFCI
bendudson Jul 10, 2026
ceaaf98
Functions of Field3DParallel preserve slices
dschwoerer Jul 9, 2026
16a66f0
Clang-Tidy: Use 'contains' to check for membership
tomchapman Jul 8, 2026
2520674
Refactor map::find expression: lookup and retrieval in a single step …
tomchapman Jul 8, 2026
28542c9
Lookup and retrieval in a single step with C++17 initializer syntax
tomchapman Jul 8, 2026
a56a996
Move variable 'search' to if-init-statement
tomchapman Jul 8, 2026
b2f52cd
Field3DParallel unit test
bendudson Jul 10, 2026
858c5c1
Lazy pow function on fields
bendudson Jul 10, 2026
c808fa7
floor: Return BinaryExpr
bendudson Jul 10, 2026
b9d13fd
Bump astral-sh/setup-uv from 5 to 7
dependabot[bot] Jul 10, 2026
c7493e4
generated_fieldops: Remove eager functions
bendudson Jul 10, 2026
d41d93c
Field3DParallel::View simplify
bendudson Jul 10, 2026
3c6565d
manual: Updates for Field3DParallel expressions
bendudson Jul 10, 2026
d8e5419
Options: ConvertContainer for Array/Matrix/Tensor
bendudson Jul 18, 2026
403f1c8
ASSERT: Wrap string literals in string_view
bendudson Jul 18, 2026
0934c93
BinaryExpr: size() can't be a DEVICE function
bendudson Jul 18, 2026
b5a0587
Fix warnings for NVCC
bendudson Jul 18, 2026
112e722
Improve cvode use_precon exception
mikekryjak Jul 20, 2026
a910167
Merge pull request #3418 from boutproject/next-is-600
dschwoerer Jul 21, 2026
4244d60
Fix comments by ensuring \\ is not at end of line
dschwoerer Jul 21, 2026
5bef26e
Merge remote-tracking branch 'origin/next' into legacy-boundary-condi…
malamast Jul 23, 2026
4687df8
Apply perk-formatting
malamast Jul 23, 2026
673665d
Merge pull request #3429 from boutproject/warning-multiline-comments
ZedThree Jul 24, 2026
6a18183
Merge pull request #3437 from boutproject/dependabot/github_actions/a…
ZedThree Jul 24, 2026
dcffc23
Bump actions/setup-python from 6 to 7
dependabot[bot] Jul 24, 2026
e4b126d
Don't compute G-values unnecessarily or when using FCI
ZedThree Jul 27, 2026
69a789f
Merge pull request #3426 from boutproject/cvode-precon-settings
mikekryjak Jul 28, 2026
99eaae1
Ensure option names updated to match path
cmacmackin Jul 28, 2026
6607c3a
Include header with size_t
cmacmackin Jul 28, 2026
93d6705
Merge pull request #3445 from boutproject/cmacmackin/options-names
ZedThree Jul 29, 2026
1b5149b
Cover corner-cases when updating option names
cmacmackin Jul 29, 2026
a972f3f
Use regionID of parallel slices for parallel slices
dschwoerer Jul 30, 2026
3e2b57c
Fix typos in `LaplacePetsc` after conversion
ZedThree Jul 30, 2026
d911d51
Extend ADIOSStream to read modes
Steven-Roberts Jul 30, 2026
86e6ba8
Add simple Get/Put
Steven-Roberts Jul 31, 2026
dcf3091
Add get for Array/Matrix/Tensor
Steven-Roberts Jul 31, 2026
50465fe
Add put for Array/Matrix/Tensor
Steven-Roberts Jul 31, 2026
d2ad823
Add get for Fields
Steven-Roberts Jul 31, 2026
357ec23
Add put for Fields
Steven-Roberts Jul 31, 2026
84d0788
Use new adios_object functionality in options_adios
Steven-Roberts Jul 31, 2026
f19cdd3
Merge pull request #3447 from boutproject/fix-laplace-petsc-typos
bendudson Aug 4, 2026
5a8ff78
Apply suggestions from code review
bendudson Aug 4, 2026
184c398
BOUT_UNREACHABLE macro
bendudson Aug 4, 2026
6e45535
Formatting
bendudson Aug 4, 2026
36a4b89
Simplify name updating logic
cmacmackin Aug 4, 2026
45d6b9e
Use regionID directly on view and add wrapper for getCommonRegionID
dschwoerer Aug 5, 2026
8b5cfcf
Merge pull request #3446 from boutproject/cmacmackin/options-names
ZedThree Aug 5, 2026
24d1742
Clang tidy fixes
bendudson Aug 5, 2026
d887f78
BinaryExpr: Track valid regionID of expressions
bendudson Aug 5, 2026
7018170
Merge pull request #3441 from boutproject/next-nvcc
ZedThree Aug 5, 2026
2786024
Merge pull request #3430 from boutproject/more-binaryexpr
bendudson Aug 6, 2026
df638bf
Get ADIOS tests passing
Steven-Roberts Aug 6, 2026
b5b946e
Remove unused code
Steven-Roberts Aug 6, 2026
0103177
Remove unnecessary arg
Steven-Roberts Aug 7, 2026
a511a66
Add Conduction_Methods to Div_par_K_Grad_par_mod
dschwoerer Aug 10, 2026
4cc1b15
Add missing headers
dschwoerer Aug 10, 2026
aee181f
Use internal implementation to private namespace
dschwoerer Aug 10, 2026
6341c8e
Prefere enum class
dschwoerer Aug 11, 2026
a012a67
Use Field3DParallel if we need parallel fields
dschwoerer Aug 11, 2026
2f228e2
Remove not used legacy wrappers
dschwoerer Aug 11, 2026
46863fe
Merge pull request #3444 from boutproject/dependabot/github_actions/a…
dschwoerer Aug 11, 2026
7fc1c2d
Fix signature in header for Div_par taking two fields
dschwoerer Aug 12, 2026
dfaab1b
Use enum in API and add docs
dschwoerer Aug 12, 2026
ad9fe72
Cast to int
dschwoerer Aug 12, 2026
1dfaf2f
Merge pull request #3453 from boutproject/more-f3dp
dschwoerer Aug 12, 2026
37adc61
Merge pull request #3450 from Steven-Roberts/adios-for-coupling
dschwoerer Aug 12, 2026
b213a15
Move header to enum definition
dschwoerer Aug 12, 2026
5ac885c
Merge remote-tracking branch 'origin/next' into refactor-coords-rebas…
dschwoerer Aug 12, 2026
359f187
First cast to f3dp to compute parallel slices for FCI
dschwoerer Aug 12, 2026
33f791e
Remove not-needed .asField3DParallel()
dschwoerer Aug 12, 2026
6ee7369
Grad_par: take Field3DParallel as parallel slices are needed for FCI
dschwoerer Aug 12, 2026
99c365e
Use switch to iterate through options
dschwoerer Aug 12, 2026
7741ff7
Merge pull request #3435 from tomc271/cpp20-if-with-initializer
ZedThree Aug 12, 2026
c5b5e2e
Apply formatting
ZedThree Aug 12, 2026
7fe3fec
Use std::ranges::find instead of std::find
tomchapman Jul 3, 2026
1e45173
Fix ranges::find with projection
tomchapman Jul 2, 2026
bd04875
Use std::ranges::end for consistency (and slightly safer)
tomchapman Jul 2, 2026
04bd654
Use std::ranges library for std::fill and std::transform
tomchapman Jul 3, 2026
fe342f9
Use `std::ranges::sort` and `std::ranges::unique` to avoid the verbos…
tomchapman Jul 8, 2026
aa7e4e9
Fix clang-tidy warnings
ZedThree Aug 12, 2026
10e3eec
Merge pull request #3452 from boutproject/move-conduction-method
ZedThree Aug 12, 2026
81dbea0
Merge pull request #3434 from tomc271/cpp20-map-contains
ZedThree Aug 12, 2026
3fed01e
Merge remote-tracking branch 'origin/next' into refactor-coords-rebas…
dschwoerer Aug 13, 2026
12351b9
Fix signature in cxx
dschwoerer Aug 13, 2026
912d8de
Merge pull request #3432 from tomc271/cpp20-ranges
ZedThree Aug 13, 2026
5ea320a
Merge pull request #3425 from boutproject/refactor-coords-rebase-rebase
ZedThree Aug 13, 2026
0213d07
Add BOUT_ENUM_CLASS_NS
dschwoerer Aug 13, 2026
efd6a66
Switch bout::ConductionMethod to BOUT_ENUM_CLASS_NS
dschwoerer Aug 13, 2026
615254c
Fix BOUT_ENUM_CLASS_NS
dschwoerer Aug 13, 2026
45fd7a3
Add unit tests for namespaced enum class
dschwoerer Aug 13, 2026
cc0ab45
Add unit test for nested namespaces
dschwoerer Aug 13, 2026
f32587a
Ensure we do not break B for FCI
dschwoerer Aug 13, 2026
25b79ad
Do not add parallel slices to parallel slices
dschwoerer Aug 13, 2026
d1d09e8
Add normalisation for metrics
dschwoerer Aug 13, 2026
1dd1583
Fix compilation for 2D metrics
dschwoerer Aug 13, 2026
2735dcb
Suppress unused var warnings
dschwoerer Aug 13, 2026
6fb9096
Use unsigned int for enum
dschwoerer Aug 13, 2026
6282f56
Switch to preprocessor #if
dschwoerer Aug 13, 2026
40ac19e
Div_par_K_Grad_par_mod: Error with ConductionMethod string
bendudson Aug 13, 2026
be2ff91
Use pre-computed cell areas for Div_par_fvv_heating
dschwoerer Aug 13, 2026
b445c7e
Merge pull request #3457 from boutproject/BOUT_ENUM_CLASS_NS
dschwoerer Aug 14, 2026
75d4fb9
Add dx normalisation for Tokamak geometry
dschwoerer Aug 14, 2026
993e633
Improve comments
dschwoerer Aug 14, 2026
bb4964e
Fix J normalisation
dschwoerer Aug 14, 2026
524ceab
Refactored Hypre boundary row elimination
bendudson Aug 14, 2026
4100f88
Adjust parallel diffusion operator for fci
totork Aug 17, 2026
6ba4f1d
Add missing class
totork Aug 17, 2026
3f35c51
Delete brackets
totork Aug 17, 2026
2111e68
Add missing () for dy
totork Aug 17, 2026
ae5e990
Merge branch 'next' of https://github.com/boutproject/BOUT-dev into n…
dschwoerer Aug 17, 2026
eddc7e1
Avoid returning void from function call
dschwoerer Aug 17, 2026
7913512
Generalize boundary elimination code
bendudson Aug 17, 2026
77a026c
Merge branch 'next' into next-elimBE-new-api
bendudson Aug 17, 2026
7c8012e
Merge pull request #3461 from totork/next-par-diffusion
bendudson Aug 18, 2026
fc347e9
Merge pull request #3456 from boutproject/div_par_fvv_heating_area
bendudson Aug 18, 2026
1a60d3f
SNES solver: Save Jacobian to file
bendudson Aug 18, 2026
bb0ca62
SNES solver: Save Jacobian to data directory
bendudson Aug 19, 2026
e932d23
integrated test test-snes-save-jacobian
bendudson Aug 19, 2026
70a6e70
Add PetscBinaryIO and Jacobian reader
bendudson Aug 19, 2026
fa34beb
Add normalisation of g_22_y*
dschwoerer Aug 19, 2026
adce6ca
Handle non-FCI case in normaliseMetricFCI
dschwoerer Aug 19, 2026
cf90f25
Remove non-const version from header
dschwoerer Aug 19, 2026
2e951d6
test-snes-save-jacobian: Test outputs
bendudson Aug 19, 2026
d6a66f1
read_jacobian: extract_block and tests
bendudson Aug 19, 2026
7b94346
Document Jacobian save methods and API
bendudson Aug 19, 2026
9de4335
Add missing headers
dschwoerer Aug 20, 2026
7ec4b68
apply clang-tidy fixes
dschwoerer Aug 20, 2026
767436b
Check for only for fields location
dschwoerer Aug 20, 2026
d418f68
Apply some clang-tidy fixes
dschwoerer Aug 20, 2026
bb63ea4
Added dissipative flag to Div_par_mod in Fci
totork Aug 21, 2026
d204053
Formatting
totork Aug 21, 2026
d5f4814
Only check if dissipative is used in Div_par_mod in the non-Fci part
totork Aug 21, 2026
d13ac5e
Add wrapper for Bxy
dschwoerer Aug 21, 2026
612c7fc
Merge pull request #3470 from boutproject/addBxyWrapper
dschwoerer Aug 21, 2026
d6e66f5
CVODE solver save jacobian
bendudson Aug 21, 2026
edaf4f7
Document cvode jacobian output
bendudson Aug 21, 2026
d8e8660
Use spaceship operator for comparison operators where possible
ZedThree Aug 21, 2026
93d9fa2
Fix some clang-tidy issues
ZedThree Aug 21, 2026
28a75eb
Bump externalpackages/googletest from `8b53336` to `91c99b6`
dependabot[bot] Aug 21, 2026
ce102be
Jacobian metadata always jacobian_metadata.json
bendudson Aug 23, 2026
eed8487
Merge pull request #3471 from boutproject/spaceship-operator
dschwoerer Aug 24, 2026
8ba04b2
Merge pull request #3467 from boutproject/divpar-diss
dschwoerer Aug 24, 2026
50f4b02
Add API to set metric tensors and J and B
dschwoerer Aug 21, 2026
8ca53f0
Add MetricNormaliser class
dschwoerer Aug 24, 2026
cd18251
Add normalisation to MetricTensors
dschwoerer Aug 24, 2026
f9210bc
Add generic normalisation to coordinates
dschwoerer Aug 24, 2026
30e7624
Remove specific normalisation
dschwoerer Aug 24, 2026
da0c682
Add normalisations to tokamak_coordinates
dschwoerer Aug 24, 2026
d49fbec
Add missing virtual/override
dschwoerer Aug 24, 2026
a220081
Turn MetricNormaliser into a plain struct
dschwoerer Aug 24, 2026
01621b9
Use const ref
dschwoerer Aug 24, 2026
ae9b5e7
Remove redundant initialisation
dschwoerer Aug 24, 2026
ebdcb73
Merge pull request #3472 from boutproject/dependabot/submodules/exter…
dschwoerer Aug 24, 2026
4117112
Update prek tools to work with python3.15
dschwoerer Aug 13, 2026
e4e2d6a
Update pyproject.toml and uv.lock
dschwoerer Aug 24, 2026
ef2fda3
Be explit about it being not set
dschwoerer Aug 25, 2026
bc7459c
Merge pull request #3454 from boutproject/python315
ZedThree Aug 25, 2026
553fa37
Merge pull request #3463 from boutproject/normalise-metrics
ZedThree Aug 25, 2026
5ca22b6
Remove unused enum
ZedThree Aug 18, 2026
9d6b9ca
Move `YBoundary` into `bout::boundary` namespace for consistency
ZedThree Aug 18, 2026
3e72665
Add some helper concepts for `YBoundary` functions
ZedThree Aug 18, 2026
bb1d5c9
Small refactor of `YBoundary`
ZedThree Aug 18, 2026
b3c5ab1
Add helper function for CRTP in boundary region iterator
ZedThree Aug 19, 2026
23d95be
Use concept to avoid passing `std::function`
ZedThree Aug 19, 2026
6c8adab
Try to expand the documentation for the boundary regions classes
ZedThree Aug 19, 2026
ca6dd1f
Remove raw pointer from new boundary regions
ZedThree Aug 19, 2026
999c444
Fix some missing methods on the derived boundary iterators
ZedThree Aug 19, 2026
3d1f39b
Move boundary condition kernels out of `BoundaryRegionIterBase`
ZedThree Aug 19, 2026
c5bf2c4
Remove duplicated function
ZedThree Aug 21, 2026
e27f32a
Move boundary region iterators inside their container classes
ZedThree Aug 24, 2026
0c6c7d2
Apply some clang-tidy fixes
ZedThree Aug 24, 2026
463fb08
Simplify implementation of FCI boundary iterator
ZedThree Aug 24, 2026
cb4d620
Reduce duplicated accessor code with templates
ZedThree Aug 24, 2026
13a1fed
Use concept to simplify function
ZedThree Aug 24, 2026
5917d08
Remove comparison operators between region points and `Ind3D`
ZedThree Aug 25, 2026
f63ff77
Fix some clang-tidy issues
ZedThree Aug 25, 2026
a0e5803
Rename `BoundaryRegionFCI` inner class
ZedThree Aug 25, 2026
5dd7e5c
Rename `BoundaryRegionIterBase::getAt` -> `::at`
ZedThree Aug 25, 2026
dd0d345
Ensure we're looking at the same FCI boundary in comparisons
ZedThree Aug 25, 2026
4641835
Apply suggestions from code review
bendudson Aug 25, 2026
9877936
Solvers: Namespace enums
bendudson Aug 25, 2026
4c5e3d3
Solver: Reduce duplication between SNES & CVODE
bendudson Aug 25, 2026
64d91bc
Solver: Move more common functions into base class
bendudson Aug 25, 2026
1ea20a6
Solver::writeJacobianMetadataJson use fmt::format_to
bendudson Aug 25, 2026
6a486b7
PetscBinaryIO tidying and PETSc license
bendudson Aug 25, 2026
706a0ee
Add unsorted boundary region iterator test
ZedThree Aug 26, 2026
acdeec1
Remove unused `BoundaryRegionPar`
ZedThree Aug 26, 2026
1d19b72
Fix FCI example
ZedThree Aug 26, 2026
5472277
Flip order of operands in single index `Delp2` to match `D2DX2`
ZedThree Aug 26, 2026
e80ad6a
Merge pull request #3464 from boutproject/save-petsc-jacobian
ZedThree Aug 26, 2026
52e95ea
Reorder members for improved alignment
ZedThree Aug 26, 2026
c077f47
Fix `BoundaryRegionXY::length` for staggered grids in Y
ZedThree Aug 26, 2026
34856d8
Merge pull request #3475 from boutproject/fix-delp2-fp-error
bendudson Aug 26, 2026
307074f
Update difops interface to take Field3DParallel
dschwoerer Aug 27, 2026
da3008f
Remove stale .asField3DParallel
dschwoerer Aug 27, 2026
9876ba4
Introduce `FieldMetricParallel`
dschwoerer Aug 27, 2026
090da9a
Extend unit test
dschwoerer Aug 27, 2026
17b43a3
Merge pull request #3474 from boutproject/y-boundary-tidying
dschwoerer Aug 27, 2026
61ca9f1
Merge pull request #3420 from boutproject/legacy-boundary-conditions
dschwoerer Aug 27, 2026
502a650
Add doc about `bout::FieldMetricParallel`
dschwoerer Aug 27, 2026
3f6510e
Merge pull request #3477 from boutproject/fci-cleanup
dschwoerer Aug 28, 2026
f7537c1
Honor bndry_flux for FCI for Div_par_K_Grad_par_mod
dschwoerer Aug 28, 2026
1a71822
Honor bndry_flux for FCI for Div_par_K_Grad_par
dschwoerer Aug 28, 2026
ed751ae
Merge pull request #3483 from boutproject/boundary-flux-fci
bendudson Sep 1, 2026
d28d4dc
MeshFactory::create read mesh from data directory first
bendudson Sep 2, 2026
fef8575
MeshFactory: Throw on ambiguous grid file
bendudson Sep 4, 2026
7c4db2b
Apply batched suggestions from code review
bendudson Sep 4, 2026
c5b645f
Document hypre_interface limitation
bendudson Sep 5, 2026
18c1197
HypreMatrix: Simplify number of boundary rows
bendudson Sep 5, 2026
f4d64c9
HypreMatrix: Rename elimBE -> use_boundary_elimination
bendudson Sep 5, 2026
33e9053
Merge pull request #3486 from boutproject/gridfile-in-datadir
bendudson Sep 7, 2026
cf92081
ARKODE_MRI interface
maggul Oct 25, 2024
8110eee
add missing files
maggul Oct 25, 2024
0ee723c
added treatment options
maggul Oct 25, 2024
6cd4c36
remove adaptivity
maggul Nov 18, 2024
153db72
adaptive step and SUNDIALS release updates
maggul Jan 9, 2025
25c6305
flag and test-kpr updates
maggul Feb 7, 2025
742e82e
ARKode-MRI: Register unavailable if sundials version is too low
bendudson Feb 8, 2025
1a6c0a0
Add fast and slow preconditioner callbacks
bendudson Feb 8, 2025
1f83051
added required header file
maggul Feb 8, 2025
595db6f
ARKode solver: Use ARKodeGetNumRhsEvals from v7.2.0
bendudson Feb 8, 2025
6f03a54
ARKode-MRI: Only call ARKodeGetCurrentStep if user requests it
bendudson Feb 8, 2025
4bcc813
Increment MRI rhs counts
bendudson Feb 12, 2025
887ede3
run_rhs_f/s internally
maggul Apr 14, 2025
0c40658
ARKodeSetStopTime before each evolve call
maggul Apr 21, 2025
2a6368b
continuous temporal filtering
maggul Nov 22, 2025
146dd5e
bug fix
maggul Nov 27, 2025
d35eb2a
print_allstats and new ARKODE functions
maggul Jun 2, 2026
68d1801
added error_bias
Jun 4, 2026
b7e440e
changed the default filtering_type to EMA
maggul Jun 4, 2026
fd8109d
macro inconsistancy
maggul Jun 18, 2026
d5619e2
print_allstats flag for CVODE
Jun 18, 2026
5361963
missing f and py placeholder for now
maggul Sep 4, 2026
0bd0b8f
Fix MRI integration follow-up issues
bendudson Sep 8, 2026
647237b
Merge branch 'next' into next-elimBE-new-api-mri-filter
bendudson Sep 8, 2026
ad3ba24
Tidy and fix build
bendudson Sep 9, 2026
85672ff
Merge branch 'next-elimBE-new-mri' into next-elimBE-new-api-mri-filter
maggul Sep 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ StatementMacros:
- BOUT_OMP
- BOUT_OMP_PERF
- BOUT_OMP_SAFE
Standard: c++14
Standard: c++20
TabWidth: 8
UseTab: Never
2 changes: 1 addition & 1 deletion .github/workflows/auto-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0

- name: "Set up Python"
uses: actions/setup-python@v6
uses: actions/setup-python@v7

- name: Install uv
uses: astral-sh/setup-uv@v7
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
- name: Install dependencies
run: python -m pip install --upgrade pip &&
pip install --upgrade build &&
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
- name: Install dependencies
run: python -m pip install --upgrade pip &&
pip install --upgrade build &&
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
- name: Install dependencies
run: python -m pip install --upgrade pip &&
pip install --upgrade build &&
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ jobs:
submodules: true

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- uses: actions/setup-python@v6
- uses: actions/setup-python@v7
with:
python-version: '3.x'

Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ repos:

# C++ formatting
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.1
rev: v22.1.8
hooks:
- id: clang-format
types_or: [c++, c, cuda]

# Python linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.6
rev: v0.16.2
hooks:
# Run the linter.
- id: ruff-check
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [v6.0.0](https://github.com/boutproject/BOUT-dev/tree/v6.0.0

[Full Changelog](https://github.com/boutproject/BOUT-dev/compare/v5.2.0...)

### Breaking changes

- `Coordinates` has been refactored to with a more encapsulated interface. This
allows us to ensure that derived quantities are correctly updated when the
metric components are changed, as well as defer creation of the Christoffel
symbols, and other derivatives of the metric components. This change will
require most physics models to be updated. You can do this with the
`bout-upgrader` from `boutdata`:
```console
$ bout-upgrader v6 v6_upgrader file/to/update.cxx
````

## [v5.2.0](https://github.com/boutproject/BOUT-dev/tree/v5.2.0

[Full Changelog](https://github.com/boutproject/BOUT-dev/compare/v5.1.1...v5.2.0)
Expand Down
32 changes: 19 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ endif()
# Set the version here, strip any extra tags to use in `project`
# We try to use git to get a full description, inspired by setuptools_scm
set(_bout_previous_version "5.2.0")
set(_bout_next_version "5.2.1")
set(_bout_next_version "6.0.0")
execute_process(
COMMAND "git" describe --tags --match=v${_bout_previous_version}
COMMAND sed -e s/${_bout_previous_version}-/${_bout_next_version}.dev/ -e
Expand Down Expand Up @@ -116,10 +116,11 @@ set(BOUT_SOURCES
./include/bout/bout.hxx
./include/bout/bout_enum_class.hxx
./include/bout/bout_types.hxx
./include/bout/build_config.hxx
./include/bout/boutcomm.hxx
./include/bout/boutexception.hxx
./include/bout/build_config.hxx
./include/bout/caliper_wrapper.hxx
./include/bout/christoffel_symbols.hxx
./include/bout/constants.hxx
./include/bout/coordinates.hxx
./include/bout/coordinates_accessor.hxx
Expand All @@ -128,26 +129,28 @@ set(BOUT_SOURCES
./include/bout/deriv_store.hxx
./include/bout/derivs.hxx
./include/bout/difops.hxx
./include/bout/expr.hxx
./include/bout/fft.hxx
./include/bout/field.hxx
./include/bout/field2d.hxx
./include/bout/field3d.hxx
./include/bout/field_accessor.hxx
./include/bout/field_data.hxx
./include/bout/field_factory.hxx
./include/bout/fieldops.hxx
./include/bout/fieldgroup.hxx
./include/bout/fieldops.hxx
./include/bout/fieldperp.hxx
./include/bout/fv_ops.hxx
./include/bout/fv_ops_impl.hxx
./include/bout/g_values.hxx
./include/bout/generic_factory.hxx
./include/bout/git_metadata.hxx
./include/bout/globalfield.hxx
./include/bout/globalindexer.hxx
./include/bout/globals.hxx
./include/bout/griddata.hxx
./include/bout/gyro_average.hxx
./include/bout/hypre_interface.hxx
./include/bout/hyprelib.hxx
./include/bout/index_derivs.hxx
./include/bout/index_derivs_interface.hxx
./include/bout/initialprofiles.hxx
Expand All @@ -164,6 +167,7 @@ set(BOUT_SOURCES
./include/bout/macro_for_each.hxx
./include/bout/mask.hxx
./include/bout/mesh.hxx
./include/bout/metric_tensor.hxx
./include/bout/monitor.hxx
./include/bout/mpi_wrapper.hxx
./include/bout/msg_stack.hxx
Expand All @@ -176,7 +180,6 @@ set(BOUT_SOURCES
./include/bout/output.hxx
./include/bout/output_bout_types.hxx
./include/bout/parallel_boundary_op.hxx
./include/bout/parallel_boundary_region.hxx
./include/bout/paralleltransform.hxx
./include/bout/petsc_interface.hxx
./include/bout/petsc_operators.hxx
Expand Down Expand Up @@ -216,8 +219,9 @@ set(BOUT_SOURCES
./include/bout/vector2d.hxx
./include/bout/vector3d.hxx
./include/bout/where.hxx
./src/bout++.cxx
./include/bout/yboundary_regions.hxx
./src/bout++-time.hxx
./src/bout++.cxx
./src/field/field.cxx
./src/field/field2d.cxx
./src/field/field3d.cxx
Expand All @@ -240,6 +244,8 @@ set(BOUT_SOURCES
./src/invert/laplace/common_transform.hxx
./src/invert/laplace/impls/cyclic/cyclic_laplace.cxx
./src/invert/laplace/impls/cyclic/cyclic_laplace.hxx
./src/invert/laplace/impls/hypre3d/hypre3d_laplace.cxx
./src/invert/laplace/impls/hypre3d/hypre3d_laplace.hxx
./src/invert/laplace/impls/iterative_parallel_tri/iterative_parallel_tri.cxx
./src/invert/laplace/impls/iterative_parallel_tri/iterative_parallel_tri.hxx
./src/invert/laplace/impls/multigrid/multigrid_alg.cxx
Expand All @@ -262,8 +268,6 @@ set(BOUT_SOURCES
./src/invert/laplace/impls/serial_tri/serial_tri.hxx
./src/invert/laplace/impls/spt/spt.cxx
./src/invert/laplace/impls/spt/spt.hxx
./src/invert/laplace/impls/hypre3d/hypre3d_laplace.cxx
./src/invert/laplace/impls/hypre3d/hypre3d_laplace.hxx
./src/invert/laplace/invert_laplace.cxx
./src/invert/laplacexy/impls/hypre/laplacexy-hypre.cxx
./src/invert/laplacexy/impls/hypre/laplacexy-hypre.hxx
Expand All @@ -286,23 +290,26 @@ set(BOUT_SOURCES
./src/mesh/boundary_factory.cxx
./src/mesh/boundary_region.cxx
./src/mesh/boundary_standard.cxx
./src/mesh/christoffel_symbols.cxx
./src/mesh/coordinates.cxx
./src/mesh/coordinates_accessor.cxx
./src/mesh/data/gridfromfile.cxx
./src/mesh/data/gridfromoptions.cxx
./src/mesh/difops.cxx
./src/mesh/fv_ops.cxx
./src/mesh/g_values.cxx
./src/mesh/impls/bout/boutmesh.cxx
./src/mesh/impls/bout/boutmesh.hxx
./src/mesh/index_derivs.cxx
./src/mesh/interpolation_xz.cxx
./src/mesh/interpolation/bilinear_xz.cxx
./src/mesh/interpolation/hermite_spline_xz.cxx
./src/mesh/interpolation/hermite_spline_z.cxx
./src/mesh/interpolation/interpolation_z.cxx
./src/mesh/interpolation/lagrange_4pt_xz.cxx
./src/mesh/interpolation_xz.cxx
./src/mesh/invert3x3.hxx
./src/mesh/mesh.cxx
./src/mesh/metric_tensor.cxx
./src/mesh/parallel/fci.cxx
./src/mesh/parallel/fci.hxx
./src/mesh/parallel/fci_comm.cxx
Expand All @@ -316,6 +323,7 @@ set(BOUT_SOURCES
./src/mesh/petsc_operators.cxx
./src/mesh/surfaceiter.cxx
./src/mesh/tokamak_coordinates.cxx
./src/mesh/yboundary_regions.cxx
./src/physics/gyro_average.cxx
./src/physics/physicsmodel.cxx
./src/physics/smoothing.cxx
Expand Down Expand Up @@ -371,19 +379,18 @@ set(BOUT_SOURCES
./src/sys/derivs.cxx
./src/sys/expressionparser.cxx
./src/sys/generator_context.cxx
./include/bout/hyprelib.hxx
./src/sys/hyprelib.cxx
./src/sys/hypre_interface.cxx
./src/sys/msg_stack.cxx
./src/sys/options.cxx
./src/sys/options/optionparser.hxx
./src/sys/options/options_adios.cxx
./src/sys/options/options_adios.hxx
./src/sys/options/options_ini.cxx
./src/sys/options/options_ini.hxx
./src/sys/options/options_io.cxx
./src/sys/options/options_netcdf.cxx
./src/sys/options/options_netcdf.hxx
./src/sys/options/options_adios.cxx
./src/sys/options/options_adios.hxx
./src/sys/optionsreader.cxx
./src/sys/output.cxx
./src/sys/output_bout_types.cxx
Expand All @@ -393,7 +400,6 @@ set(BOUT_SOURCES
./src/sys/timer.cxx
./src/sys/type_name.cxx
./src/sys/utils.cxx
./include/bout/git_metadata.hxx
${CMAKE_CURRENT_BINARY_DIR}/include/bout/revision.hxx
${CMAKE_CURRENT_BINARY_DIR}/include/bout/version.hxx
)
Expand Down
50 changes: 33 additions & 17 deletions examples/6field-simple/elm_6f.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,32 @@
* T. Xia
*******************************************************************************/

#include "bout/assert.hxx"
#include "bout/bout.hxx"
#include "bout/bout_types.hxx"
#include "bout/build_defines.hxx"
#include "bout/constants.hxx"
#include "bout/coordinates.hxx"
#include "bout/derivs.hxx"
#include "bout/difops.hxx"
#include "bout/field2d.hxx"
#include "bout/field3d.hxx"
#include "bout/fieldgroup.hxx"
#include "bout/initialprofiles.hxx"
#include "bout/interpolation_xz.hxx"
#include "bout/invert_laplace.hxx"
#include "bout/invert_parderiv.hxx"
#include "bout/msg_stack.hxx"
#include "bout/output.hxx"
#include "bout/physicsmodel.hxx"
#include "bout/smoothing.hxx"
#include "bout/sourcex.hxx"
#include "bout/tokamak_coordinates.hxx"
#include "bout/unused.hxx"
#include "bout/vecops.hxx"
#include "bout/where.hxx"

#include <cmath>
#include <memory>

constexpr BoutReal eV_K = 11605.0; // 1eV = 11605K

Expand Down Expand Up @@ -356,7 +369,7 @@ class Elm_6f : public PhysicsModel {
result.allocate();
for (auto i : result) {
result[i] =
(fp[i.yp()] - fm[i.ym()]) / (2. * coord->dy[i] * sqrt(coord->g_22[i]));
(fp[i.yp()] - fm[i.ym()]) / (2. * coord->dy()[i] * sqrt(coord->g_22()[i]));
}
} else {
result = Grad_par(f, loc);
Expand Down Expand Up @@ -696,7 +709,7 @@ class Elm_6f : public PhysicsModel {

if (mesh->IncIntShear) {
// BOUT-06 style, using d/dx = d/dpsi + I * d/dz
mesh->getCoordinates()->IntShiftTorsion = I;
mesh->getCoordinates()->setIntShiftTorsion(I);
} else {
// Dimits style, using local coordinate system
if (include_curvature) {
Expand Down Expand Up @@ -929,7 +942,7 @@ class Elm_6f : public PhysicsModel {
output.write("\tlog Lambda: {:e}\n", LnLambda);

nu_e = 2.91e-6 * LnLambda * ((N0)*Nbar * density / 1.e6)
* pow(Te0 * Tebar, -1.5); // nu_e in 1/S.
* pow(Field2D{Te0 * Tebar}, -1.5); // nu_e in 1/S.
output.write("\telectron collision rate: {:e} -> {:e} [1/s]\n", min(nu_e), max(nu_e));
// nu_e.applyBoundary();
// mesh->communicate(nu_e);
Expand All @@ -941,7 +954,8 @@ class Elm_6f : public PhysicsModel {
// xqx addition, begin
// Use Spitzer thermal conductivities
nu_i = 4.80e-8 * (Zi * Zi * Zi * Zi / sqrt(AA)) * LnLambda
* ((N0)*Nbar * density / 1.e6) * pow(Ti0 * Tibar, -1.5); // nu_i in 1/S.
* ((N0)*Nbar * density / 1.e6)
* pow(Field2D{Ti0 * Tibar}, -1.5); // nu_i in 1/S.
// output.write("\tCoulomb Logarithm: {:e} \n", max(LnLambda));
output.write("\tion collision rate: {:e} -> {:e} [1/s]\n", min(nu_i), max(nu_i));

Expand Down Expand Up @@ -1006,8 +1020,9 @@ class Elm_6f : public PhysicsModel {
// Use Spitzer resistivity
output.write("\n\tSpizter parameters");
// output.write("\tTemperature: {:e} -> {:e} [eV]\n", min(Te), max(Te));
eta_spitzer = 0.51 * 1.03e-4 * Zi * LnLambda
* pow(Te0 * Tebar, -1.5); // eta in Ohm-m. NOTE: ln(Lambda) = 20
eta_spitzer =
0.51 * 1.03e-4 * Zi * LnLambda
* pow(Field2D{Te0 * Tebar}, -1.5); // eta in Ohm-m. NOTE: ln(Lambda) = 20
output.write("\tSpitzer resistivity: {:e} -> {:e} [Ohm m]\n", min(eta_spitzer),
max(eta_spitzer));
eta_spitzer /= SI::mu0 * Va * Lbar;
Expand Down Expand Up @@ -1114,7 +1129,7 @@ class Elm_6f : public PhysicsModel {
// Only if not restarting: Check initial perturbation

// Set U to zero where P0 < vacuum_pressure
U = where(P0 - vacuum_pressure, U, 0.0);
U = where(Field2D{P0 - vacuum_pressure}, U, 0.0);

// Field2D lap_temp = 0.0;
Field2D logn0 = laplace_alpha * N0;
Expand Down Expand Up @@ -1241,24 +1256,25 @@ class Elm_6f : public PhysicsModel {
// Update resistivity
if (spitzer_resist) {
// Use Spitzer formula
eta_spitzer = 0.51 * 1.03e-4 * Zi * LnLambda
* pow(Te_tmp * Tebar, -1.5); // eta in Ohm-m. ln(Lambda) = 20
eta_spitzer =
0.51 * 1.03e-4 * Zi * LnLambda
* pow(Field3D{Te_tmp * Tebar}, -1.5); // eta in Ohm-m. ln(Lambda) = 20
eta_spitzer /= SI::mu0 * Va * Lbar;
} else {
eta = core_resist + (vac_resist - core_resist) * vac_mask;
}

nu_e = 2.91e-6 * LnLambda * (N_tmp * Nbar * density / 1.e6)
* pow(Te_tmp * Tebar, -1.5); // nu_e in 1/S.
* pow(Field3D{Te_tmp * Tebar}, -1.5); // nu_e in 1/S.

if (diffusion_par > 0.0) {
// Use Spitzer thermal conductivities

nu_i = 4.80e-8 * (Zi * Zi * Zi * Zi / sqrt(AA)) * LnLambda
* (N_tmp * Nbar * density / 1.e6)
* pow(Ti_tmp * Tibar, -1.5); // nu_i in 1/S.
vth_i = 9.79e3 * sqrt(Ti_tmp * Tibar / AA); // vth_i in m/S.
vth_e = 4.19e5 * sqrt(Te_tmp * Tebar); // vth_e in m/S.
* pow(Field3D{Ti_tmp * Tibar}, -1.5); // nu_i in 1/S.
vth_i = 9.79e3 * sqrt(Ti_tmp * Tibar / AA); // vth_i in m/S.
vth_e = 4.19e5 * sqrt(Te_tmp * Tebar); // vth_e in m/S.
}

if (diffusion_par > 0.0) {
Expand Down Expand Up @@ -1399,11 +1415,11 @@ class Elm_6f : public PhysicsModel {
if (hyperviscos > 0.0) {
// Calculate coefficient.

hyper_mu_x = hyperviscos * coord->g_11 * SQ(coord->dx)
* abs(coord->g11 * D2DX2(U)) / (abs(U) + 1e-3);
hyper_mu_x = hyperviscos * coord->g_11() * SQ(coord->dx())
* abs(coord->g11() * D2DX2(U)) / (abs(U) + 1e-3);
hyper_mu_x.applyBoundary("dirichlet"); // Set to zero on all boundaries

ddt(U) += hyper_mu_x * coord->g11 * D2DX2(U);
ddt(U) += hyper_mu_x * coord->g11() * D2DX2(U);

if (first_run) {
// Print out maximum values of viscosity used on this processor
Expand Down
Loading
Loading