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

3D metrics #2025

Merged
merged 347 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
347 commits
Select commit Hold shift + click to select a range
06d6cfb
Do not make fields non-const
dschwoerer Feb 28, 2020
236fd8e
Set d1_dz
dschwoerer Feb 28, 2020
0dab643
Fix most tests
dschwoerer Feb 28, 2020
571b1ab
update examples for non-const dz
dschwoerer Feb 28, 2020
02b72e0
Update boutcore for non-const dz
dschwoerer Feb 28, 2020
b78177f
fix examples
dschwoerer Feb 29, 2020
7f524f8
fix bracket for 3D
dschwoerer Feb 29, 2020
766c6b0
Fix tests for 3d metrics
dschwoerer Feb 29, 2020
2cf2f25
Add more -all targets for checks
dschwoerer Feb 29, 2020
b979b73
Fix shift-transform
dschwoerer Mar 1, 2020
151e8e2
Ensure ffts are OpenMP thread safe
dschwoerer Mar 1, 2020
07b48ee
Re-enable fixed test
dschwoerer Mar 1, 2020
4d1b5a7
Add bout_config to cmake
dschwoerer Mar 1, 2020
109b906
Move boutconfig to own folder.
dschwoerer Mar 1, 2020
f739390
update configure
dschwoerer Mar 1, 2020
451037f
Update operators for FCI compatability
bshanahan Mar 16, 2020
31de678
Merge remote-tracking branch 'boutproject/master' into coord3d_merged2
dschwoerer Mar 18, 2020
5d40a88
Run 3D metric test with openmp enabled
dschwoerer Mar 18, 2020
1cdfa35
Merge remote-tracking branch 'boutproject/next' into coord3d_merged2
dschwoerer Mar 19, 2020
4ca152f
Fixes for dz being a Field
dschwoerer Mar 19, 2020
9d38bf0
Adjust field compat messages for fmt
dschwoerer Mar 19, 2020
1a4cd36
Evolve something in test-communications
dschwoerer Mar 19, 2020
d19ba26
Conditionally show backtrace
dschwoerer Mar 19, 2020
0a5a6d6
Don't use old-style-cast
dschwoerer Mar 20, 2020
42c525d
Don't use old-style-cast in boutexception
dschwoerer Mar 20, 2020
a7705fe
Better error if field is not positive
dschwoerer Mar 22, 2020
9060707
reduce code duplications in test-communications
dschwoerer Mar 22, 2020
cd03090
Merge remote-tracking branch 'boutproject/next' into coord3d_merged2
dschwoerer Mar 30, 2020
4b7611c
Ensure we communicate in both directions
dschwoerer Mar 31, 2020
2d52477
Fix test-griddata for 3d metrics
dschwoerer Mar 31, 2020
ba651d8
Fix boundary_standard for 2d metrics
dschwoerer Apr 2, 2020
7cef1c5
Drop pre python2.4 stuff
dschwoerer Apr 2, 2020
f672148
Improve CPU detection in run_wrapper
dschwoerer Apr 2, 2020
cce01c6
Update petsc3damg for 3d metrics
dschwoerer Apr 2, 2020
0517656
fix boundary standard for 3d metrics
dschwoerer Apr 2, 2020
dd70e8d
never communicate in coordinates constructor via get
dschwoerer Apr 2, 2020
38ec67a
fix test-laplacexz
dschwoerer Apr 2, 2020
e5d3e60
Don't use laplacexy with 3d metrics
dschwoerer Apr 3, 2020
f39ff36
Potential fix for laplacexz
dschwoerer Apr 3, 2020
b7d3d2e
Merge remote-tracking branch 'boutproject/next' into coord3d_merged2
dschwoerer Apr 3, 2020
b69c06f
prefer getConst() rather then ASSERT(isConst())
dschwoerer Apr 3, 2020
814baf7
Fix bad merge
dschwoerer Apr 4, 2020
ddc0563
Do not run test-petsc-laplace-mast-grid on travis
dschwoerer Apr 21, 2020
08a312d
Merge remote-tracking branch 'boutproject/next' into coord3d_merged2
dschwoerer Apr 21, 2020
189e0eb
Add RotatingEllipse magnetic field in Zoidberg
May 8, 2020
4345fa8
Minor printing improvements
dschwoerer May 14, 2020
fa4d519
Make more values const
dschwoerer May 14, 2020
60925e0
Do not return const
dschwoerer May 14, 2020
37861c4
Cleanup
dschwoerer May 14, 2020
a89fef0
Whitespace fixes
dschwoerer May 14, 2020
7809fd7
Merge branch 'coord3d_merged2' of github.com:boutproject/BOUT-dev int…
dschwoerer May 14, 2020
81155a2
Merge remote-tracking branch 'boutproject/next' into coord3d_merged2
dschwoerer May 14, 2020
891c40d
move definition of is3D to header
dschwoerer May 14, 2020
b7e02f1
Add R_maj function to RotatingEllipse in Zoidberg
May 14, 2020
58ecb47
Merge branch 'coord3d_merged2' of https://github.com/boutproject/BOUT…
bshanahan May 14, 2020
88605d0
Workaround for old gcc
dschwoerer May 14, 2020
0ff2f79
More const vars
dschwoerer May 14, 2020
115b522
Take dz at the same location as the other metric quantities
dschwoerer May 15, 2020
21e916c
Fix whitespace in coordinates.cxx
dschwoerer May 15, 2020
4b3dd1f
Don't use macro to add argument to interpolateAndExtrapolate
dschwoerer May 15, 2020
39a597c
Remove stale comment
dschwoerer May 15, 2020
faa2d62
use 1. if physical value is meant
dschwoerer May 15, 2020
8319e7d
interpolate all components
dschwoerer May 15, 2020
4c4cecf
Always use for loop in z
dschwoerer May 15, 2020
cf47f47
Add comment for test
dschwoerer May 15, 2020
a5e8bbc
Update CMake files for skipping 3D metric tests
dschwoerer May 15, 2020
b0729f0
Avoid copy of fields
dschwoerer May 18, 2020
351e81f
Remove outdated comments
dschwoerer May 18, 2020
4f38c35
use getConst
dschwoerer May 18, 2020
bba9241
Add DC operations to LaplaceXY
bshanahan May 18, 2020
f47f39f
Avoid uninitallised Field in vecops
dschwoerer May 18, 2020
74bb48d
Merge branch 'coord3d_merged2' of github.com:boutproject/BOUT-dev int…
dschwoerer May 20, 2020
0c61fc7
Add const to laplacexy DC functions.
bshanahan May 20, 2020
f95d006
Fix bad iteration over z
dschwoerer May 20, 2020
a43cd45
Apply DC to test-laplacexy-short
dschwoerer May 20, 2020
6009444
Merge branch 'coord3d_merged2' of github.com:boutproject/BOUT-dev int…
dschwoerer May 20, 2020
136625c
Fix bad iteration over z
dschwoerer May 20, 2020
0c5b881
[clang-format-command] fixes
github-actions[bot] May 22, 2020
ced8eaf
Update documentation for 3D metrics
dschwoerer May 26, 2020
0030cf8
Revert blobl2d-laplacexz changes
dschwoerer May 31, 2020
b446982
Remove some outdated documentation
dschwoerer May 31, 2020
5fc0a7f
Improve docs
johnomotani May 31, 2020
e0b39af
revert part of clang-format
dschwoerer May 31, 2020
d940767
Update printing and fix vector saving
dschwoerer May 31, 2020
7d2a4b3
Minimize difference between branches
dschwoerer May 31, 2020
034890b
Improve formating
dschwoerer May 31, 2020
856f1b8
move parts out of loop
dschwoerer May 31, 2020
8825a53
Move Div_Perp_Lap_FV to FV namespace
dschwoerer May 31, 2020
81f3e22
Apply suggestions from code review
dschwoerer May 31, 2020
15e5fda
Merge branch 'coord3d_merged2' of github.com:boutproject/BOUT-dev int…
dschwoerer May 31, 2020
ccaf491
Merge remote-tracking branch 'boutproject/next' into coord3d_merged2
dschwoerer May 31, 2020
54e042f
[clang-format-command] fixes
github-actions[bot] May 31, 2020
fe412c9
Fix extra const on definition of functions
ZedThree Jun 1, 2020
d724982
Fix some unused parameter warnings
ZedThree Jun 1, 2020
3db5a09
rename *Const -> *Uniform
dschwoerer Jul 15, 2020
fab9820
Avoid returning const objects
dschwoerer Jul 15, 2020
b3acaa1
Fix references in documentation
dschwoerer Jul 15, 2020
1a1aacb
escape $ for sub-shell invocation
dschwoerer Jul 15, 2020
4815b46
Merge remote-tracking branch 'boutproject/next' into coord3d_merged2
dschwoerer Jul 16, 2020
824537a
Merge remote-tracking branch 'boutproject/coord3d_merged2' into coord…
dschwoerer Jul 16, 2020
a64fb1b
auto-fix autoconf_build_defines.hxx.in
dschwoerer Jul 16, 2020
d426de4
Fix unit tests
dschwoerer Jul 17, 2020
87f879a
fix the boutcore library
dschwoerer Jul 17, 2020
80dd460
Merge branch 'boutconfig' into coord3d_merged2
dschwoerer Jul 17, 2020
0e94f79
fix bout-config
dschwoerer Jul 17, 2020
93d8795
bout::build::use_metric_3d
dschwoerer Jul 17, 2020
535a29d
rename metric_field_type to FieldMetric
dschwoerer Jul 17, 2020
23da002
getAtLocAndFillGuards
dschwoerer Jul 17, 2020
c4beed9
Do not use ternary expression with constexpr
dschwoerer Jul 17, 2020
00cf931
Add zlow coordinates for 3d metrics
ZedThree Jul 20, 2020
1f872c5
pass no_extra_interpolate on
dschwoerer Jul 20, 2020
a625943
Fix unit test
dschwoerer Jul 20, 2020
47a512a
Update zoidberg for W7-X vacuum fields.
bshanahan Aug 12, 2020
9291838
Update test-laplacexz
bshanahan Aug 12, 2020
ae3fced
Fix typo in vecops::Div()
bshanahan Aug 13, 2020
4eb766e
Implement a better check for Div() in vecops
bshanahan Aug 13, 2020
4d42a42
Merge remote-tracking branch 'origin/next' into coord3d_merged2
dschwoerer Aug 18, 2020
e985af7
Merge branch 'next' into coord3d_merged2
bshanahan Aug 18, 2020
1ffe949
Merge remote-tracking branch 'origin/legacy-netcdf-build-config' into…
bshanahan Aug 20, 2020
64b79df
Set sg as FieldMetric type in cyclic invert_par
bshanahan Aug 20, 2020
59dd735
Move metric dependence for cyclic invert_par out of header
bshanahan Aug 20, 2020
839fe77
Print more useful message when monitor fails/signals to quit
bendudson Aug 20, 2020
7ba9337
Update Div_a_Laplace_perp to 3D metrics
bshanahan Aug 21, 2020
46fc48e
Add outer X boundaries to Zoidberg
bshanahan Aug 21, 2020
6474bef
Add support for bndry_par_yx_xx
bshanahan Aug 26, 2020
a6216b7
Fix logic for outer parallel boundaries
bshanahan Aug 28, 2020
dba0339
Update Zoidberg for Screwpinch fields, fix W7-X calls
bshanahan Sep 11, 2020
5a87512
Don't save Bxy twice
dschwoerer Sep 23, 2020
2e3c793
Update .gitignore
dschwoerer Sep 23, 2020
139a99c
Always add Rxy and Bxy to metric
dschwoerer Sep 23, 2020
2108000
Merge branch 'next' into coord3d_merged2
dschwoerer Sep 23, 2020
b7a751d
Merge remote-tracking branch 'origin/next' into coord3d_merged2
dschwoerer Sep 23, 2020
bea4ab1
fix bad merge
dschwoerer Sep 23, 2020
45602bb
Add Dommaschk Potential zoidberg field object.
bshanahan Oct 19, 2020
0c544ec
CMake: Add CONFLICTS to bout_add_integrated_test
ZedThree Oct 21, 2020
920143f
CMake: Replace `REQUIRES NOT` with `CONFLICTS`
ZedThree Oct 21, 2020
2d83cac
Merge branch 'next' into coord3d_merged2
bendudson Dec 7, 2020
2945bf7
Remove c_get/set_dz from BoutCore
bendudson Dec 8, 2020
b9be466
Merge branch 'next' into coord3d_merged2
ZedThree Dec 10, 2020
baa9d6f
Register 3D metric-incompatible implementations as unavailable
ZedThree Dec 10, 2020
9387de6
Use FieldMetric in Coordinates test constructor
ZedThree Oct 27, 2020
0fed8fb
Add unit test for Coordinates::zlength in 3D metrics
ZedThree Oct 27, 2020
6543926
Add unit tests + docstrings for is/getUniform
ZedThree Oct 27, 2020
8e1926b
Add unit test for DC(Field2D)
ZedThree Oct 27, 2020
5596320
CMake: Skip building example if PETSc missing rather than error
ZedThree Dec 9, 2020
1236bba
CMake: Move METRIC_3D option with rest of feature options
ZedThree Dec 9, 2020
86b6c68
Silence clang-tidy warnings on AUTO_TRACE
ZedThree Dec 9, 2020
e6b53e9
Add back boutconfig import from bad merge
ZedThree Dec 9, 2020
d51c913
Fix test-io for change in Field type of Vector2D with 3D metrics
ZedThree Dec 9, 2020
2cf1104
Simplify nested if statements in Coordinate::maybeFromFieldAligned
ZedThree Dec 9, 2020
6b10086
Silence warnings on some optimised code in `bracket`
ZedThree Dec 9, 2020
fef1be7
Remove `const` from return type on vector operations
ZedThree Dec 9, 2020
e61fb2d
GHA: Add 3D metrics build
ZedThree Dec 10, 2020
cfe29e6
Replace macro with lambdas
ZedThree Dec 10, 2020
406f36a
Merge branch 'cmake-set-pythonpath-for-tests' into coord3d_merged2
ZedThree Dec 10, 2020
46d4ecd
Move Coordinates::maybeFromFieldAligned out of header, add docstring
ZedThree Dec 10, 2020
0aa9af3
Merge branch 'next' into coord3d_merged2
ZedThree Dec 10, 2020
d1f15f2
Silence some unused parameter warnings when compiling with 3D metric
ZedThree Dec 10, 2020
6426a3a
Fix typos in coordinates and fv_ops headers
bshanahan Dec 11, 2020
11ba037
Move calls to Coordinates::geometry() out of constructor
johnomotani Dec 14, 2020
91174cc
Add Field2D versions of to/fromFieldAligned() to ParallelTransform
johnomotani Dec 14, 2020
5a77878
Remove derivative workarounds in Coordinates
johnomotani Dec 14, 2020
8d30f3c
Check for Field2D in interp_to, don't shift to/from field-aligned
johnomotani Dec 14, 2020
9e58e8a
Exception creating ShiftedMetric by interpolating with 3d metrics
johnomotani Dec 14, 2020
6a9e00b
Only call geometry() after Coordinates are added to Mesh::coords_map
johnomotani Dec 15, 2020
a84789f
test-laplacexy-fv not compatible with 3d metrics
johnomotani Dec 15, 2020
865d274
test-petsc_laplace not compatible with 3d metrics
johnomotani Dec 15, 2020
cd0500f
Correct exception message for staggered zShift
johnomotani Dec 15, 2020
c0fda06
Don't interpolate if not necessary
johnomotani Dec 15, 2020
ce0a526
Merge branch 'mesh-get-location' into coord3d_merged2_simplify_Coordi…
johnomotani Dec 15, 2020
98cbe71
test-laplacexy-short not compatible with 3d metrics
johnomotani Dec 15, 2020
ff6b801
Fix test-twistshift-staggered
johnomotani Dec 15, 2020
39b17fe
Merge pull request #2084 from boutproject/coord3d_merged2-message
bendudson Dec 28, 2020
7b52468
Remove partially-reverted changes to Mesh::createDefaultCoordinates()
johnomotani Jan 5, 2021
f855c1b
Merge pull request #2179 from boutproject/coord3d_merged2_simplify_Co…
ZedThree Jan 5, 2021
323b5e5
Merge branch 'next' into coord3d_merged2
ZedThree Jan 5, 2021
716333a
Fix BoutException::what() returning pointer to temporary
ZedThree Dec 10, 2020
77bf023
Fix conflict with IPT solver and 3D metrics
ZedThree Jan 5, 2021
2566cae
Add note about breaking changes with dz/zlength
ZedThree Jan 5, 2021
7318f32
Fix some issues with zoidberg/field.py
ZedThree Jan 5, 2021
b952e96
Simplify some pickle reading/writing in zoidberg
ZedThree Jan 5, 2021
b208835
Turn a couple of zoidberg comments into docstrings
ZedThree Jan 5, 2021
89488e2
Apply black formatting to zoidberg/field.py
ZedThree Jan 5, 2021
849c498
Throw in Vol_Integral if using 3D metrics
ZedThree Jan 6, 2021
af4f5cc
Partial revert of ca8c533, unused Regions
ZedThree Jan 7, 2021
1e8d09f
Delete some commented out code in laplacexz-petsc
ZedThree Jan 7, 2021
7f5051a
Apply clang-format to 3D metric branch
ZedThree Jan 7, 2021
f7ce2e4
Remove declaration of deleted methods
ZedThree Jan 7, 2021
d40ecb0
Remove Coordinates::is3D
ZedThree Jan 7, 2021
9c86215
Merge branch 'next' into coord3d_merged2
ZedThree Jan 7, 2021
d6e4ec0
Add some explanatory comments
ZedThree Jan 7, 2021
cfb263a
Use existing free-function communicate instead of inline code
ZedThree Jan 7, 2021
10f5b98
Remove superfluous semi-colon
ZedThree Jan 7, 2021
1657c84
Make local variable const
ZedThree Jan 7, 2021
c59c86a
Correct Laplacexz petsc implementation of g13 terms
bendudson Jan 8, 2021
b4b20c1
Merge pull request #2204 from boutproject/coord3d_merged2-laplacexz
ZedThree Jan 8, 2021
08d7771
Write some documentation for 3D metrics
ZedThree Jan 8, 2021
a5d147f
Make boundary condition exception messages more explicit
ZedThree Jan 8, 2021
b6d3420
Delete an extraneous interpolation of ShiftTorsion in Coordinates
ZedThree Jan 8, 2021
10b2adf
Remove a couple of unhelpful comments
ZedThree Jan 8, 2021
819aed5
Revert `MAYBE_UNUSED` attribute on Delp2 useFFT argument
ZedThree Jan 8, 2021
13c5af3
Partially revert 4c06a94
ZedThree Jan 8, 2021
e85f561
Merge branch 'next' into coord3d_merged2
ZedThree Jan 11, 2021
d391e1b
Fix previous merge for inner/outer parallel boundaries
ZedThree Jan 11, 2021
c99ac24
Revert use of abs(xt_prime) in FCI
ZedThree Jan 11, 2021
502bc4d
Change Field2D -> FieldMetric in FCI
ZedThree Jan 11, 2021
8ee7727
Disable crashing clang-tidy check
ZedThree Jan 11, 2021
97e369e
Remove unused imports from laplacexz runtest
ZedThree Jan 12, 2021
9e9fc1d
Apply black formatting to laplacexz runtest
ZedThree Jan 12, 2021
94f1098
Give slightly more helpful error messages in fci.hxx
bshanahan Jan 12, 2021
d71321c
Initialize zt_prime_corner consistent with zt_prime
bshanahan Jan 13, 2021
792936a
remove stale comment in fv_ops.cxx
bshanahan Jan 13, 2021
3dfebb0
In the case of 3D FCI we need to take care to not call index::DDY
dschwoerer Jan 21, 2021
294bc14
Only keep special case for 3D+FCI
dschwoerer Jan 22, 2021
51ee19c
Chunk download
dschwoerer Feb 9, 2021
0a59fbf
Add some ducumentation
dschwoerer Feb 9, 2021
66a642d
Fix progress bar
dschwoerer Feb 9, 2021
1ae9d86
Add underrelaxation
dschwoerer Feb 9, 2021
1512060
Merge remote-tracking branch 'draco/coord3d_merged2' into coord3d_mer…
dschwoerer Feb 9, 2021
7915e1a
black
dschwoerer Feb 9, 2021
0356fe8
Make it more obvious that default is 2D grid
dschwoerer Feb 9, 2021
4831afc
Merge pull request #2219 from boutproject/zoidberg_changes
ZedThree Feb 9, 2021
07a7844
Merge remote-tracking branch 'origin/next' into HEAD
dschwoerer Feb 16, 2021
41296c1
Ensure dz is const in tests
dschwoerer Feb 16, 2021
036177b
Switch back to hypre preconditioner
dschwoerer Feb 16, 2021
086b7c6
black format everything
dschwoerer Feb 19, 2021
6e3f99c
Merge remote-tracking branch 'origin/next' into coord3d_merged2
dschwoerer Feb 19, 2021
0791520
Merge remote-tracking branch 'origin/next' into HEAD
dschwoerer Mar 2, 2021
093706c
set BOUT_TOP absolute in case BOUT_TOP is set
dschwoerer Mar 2, 2021
2c8f6e7
skip test-laplacexy with 3d metrics
dschwoerer Mar 2, 2021
4fd9dfb
skip mpi plugin in clang format
dschwoerer Mar 3, 2021
2ef34fd
Fix boundary detection
dschwoerer Mar 22, 2021
6ab2136
Return non-const should be preferred
dschwoerer Mar 22, 2021
9eae08e
Set all boundary cells in petsc-laplacexz.
bshanahan Mar 26, 2021
404f222
Merge pull request #2269 from boutproject/less-const
ZedThree Apr 9, 2021
3a63092
Merge branch 'next' of github.com:boutproject/BOUT-dev into coord3d_m…
dschwoerer Apr 20, 2021
5801465
Merge remote-tracking branch 'origin/next' into coord3d_merged2
dschwoerer May 7, 2021
a351b17
Use Bxy.ydown() for div_a_laplace_perp
bshanahan May 12, 2021
af698ef
Ensure boundaries are valid
dschwoerer May 7, 2021
c03c91e
Merge remote-tracking branch 'origin/next' into coords-boundary
dschwoerer May 19, 2021
ffabb13
Merge pull request #2312 from boutproject/3d_div_a_laplace_perp_fix
ZedThree May 19, 2021
7701426
fix bad merge
dschwoerer May 19, 2021
5edd3e1
Merge remote-tracking branch 'origin/next' into coords-boundary
dschwoerer Jun 3, 2021
b5712fb
Fix pcr for dz being a Field2D
dschwoerer Jun 3, 2021
d54512f
Don't specify boundary condition
dschwoerer Jun 29, 2021
58843dd
Merge remote-tracking branch 'origin/next' into coords-boundary
dschwoerer Jun 29, 2021
867e303
Temporarily disable python interface with 3D in CI
dschwoerer Jun 30, 2021
2d3635f
Merge pull request #2326 from boutproject/coords-boundary
dschwoerer Jun 30, 2021
1ba36af
CMake: Add CMakeLists.txt for test-laplacexz
ZedThree Feb 16, 2021
b4732f3
Merge branch 'next' into coord3d_merged2
ZedThree Jul 1, 2021
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 .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
build_dir: build
apt_packages: "libfftw3-dev,libnetcdf-c++4-dev,libopenmpi-dev,petsc-dev,slepc-dev,liblapack-dev,libparpack2-dev,libsundials-dev,uuid-dev"
clang_tidy_checks: '-*,performance-*,readability-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-*,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-misc-non-private-member-variables-in-classes,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-type-vararg'
clang_tidy_checks: '-*,performance-*,readability-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-*,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-misc-non-private-member-variables-in-classes,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-type-vararg,-clang-analyzer-optin.mpi*'
# Googletest triggers a _lot_ of clang-tidy warnings, so ignore all
# the unit tests until they're fixed or ignored upstream
exclude: "tests/unit/*cxx"
13 changes: 13 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ jobs:
-DSUNDIALS_ROOT=/home/runner/local"
omp_num_threads: 2

- name: "CMake, shared, Ubuntu 20.04, 3D metrics"
os: ubuntu-20.04
cmake_options: "-DBUILD_SHARED_LIBS=ON
-DBOUT_ENABLE_METRIC_3D=ON
-DBOUT_ENABLE_OPENMP=ON
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_HDF5=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_ENABLE_PYTHON=OFF
-DSUNDIALS_ROOT=/home/runner/local"
omp_num_threads: 2

- name: "Coverage"
os: ubuntu-18.04
configure_options: "--enable-shared
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@
- `PhysicsModel` expects the options `datadir` and `dump_format` to
have been set; this is only a problem if you don't call
`BoutInitialise`. [\#2062](https://github.com/boutproject/BOUT-dev/pull/2062)
- `dz` is now a `Field2D`, and `Coordinates::zlength()` also returns a
`Field2D`. In most cases, wrapping these in a call to `getUniform`
in order to get a `BoutReal` will do the correct thing. If checks
are enabled, `getUniform` will throw an exception if its argument is
not uniform (that is, that all values are identical).
[\#2025](https://github.com/boutproject/BOUT-dev/pull/2025)
- The parallel boundaries `BNDRY_PAR_FWD` and `BNDRY_PAR_BKWD` have
been expanded to distinguish between the inner and outer boundaries
in x; the enums have been replaced with `BNDRY_PAR_*_XIN`, and
`BNDRY_PAR_*_XOUT` for both `FWD` and
`BKWD`. [\#2025](https://github.com/boutproject/BOUT-dev/pull/2025)
- Support for reading/writing HDF5 files has been removed ahead of completely
refactoring the I/O
- Support for reading/writing HDF5 files has been removed ahead of
completely refactoring the I/O
systems. [\#2208](https://github.com/boutproject/BOUT-dev/pull/2208)
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,14 @@ endif()
message(STATUS "Enable OpenMP: ${BOUT_ENABLE_OPENMP}")
set(BOUT_USE_OPENMP ${BOUT_ENABLE_OPENMP})

option(BOUT_ENABLE_METRIC_3D "Enable 3D metric support" OFF)
if(BOUT_ENABLE_METRIC_3D)
set(BOUT_METRIC_TYPE "3D")
else()
set(BOUT_METRIC_TYPE "2D")
endif()
set(BOUT_USE_METRIC_3D ${BOUT_ENABLE_METRIC_3D})

# Optional dependencies

option(BOUT_USE_PVODE "Enable support for bundled PVODE" ON)
Expand Down Expand Up @@ -991,6 +999,7 @@ message("
Field name tracking : ${BOUT_USE_TRACK}
Floating point exceptions: ${BOUT_USE_SIGFPE}
Backtrace enabled : ${BOUT_USE_BACKTRACE}
Metric type : ${BOUT_METRIC_TYPE}
Python API support : ${BOUT_USE_PYTHON}
Sanitizers enabled : ${BOUT_USE_SANITIZERS}

Expand Down
6 changes: 6 additions & 0 deletions autoconf_build_defines.hxx.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
/* Use libuuid for UUID generation */
#undef BOUT_HAS_UUID_SYSTEM_GENERATOR

/* Type of the metric fields */
#undef BOUT_METRIC_TYPE

/* OpenMP schedule */
#undef BOUT_OPENMP_SCHEDULE

Expand All @@ -60,6 +63,9 @@
/* Enable color logs option */
#undef BOUT_USE_COLOR

/* Is the metric field 3D */
#undef BOUT_USE_METRIC_3D

/* Enable MsgStack for traces */
#undef BOUT_USE_MSGSTACK

Expand Down
8 changes: 8 additions & 0 deletions bin/bout-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ has_fftw="@BOUT_HAS_FFTW@"

petsc_has_sundials="@PETSC_HAS_SUNDIALS@"

metric_type="@BOUT_METRIC_TYPE@"

usage()
{
cat <<EOF
Expand Down Expand Up @@ -79,6 +81,8 @@ Available values for OPTION include:
--has-nls Natural Language Support

--petsc-has-sundials

--metric-type
EOF

exit $1
Expand Down Expand Up @@ -116,6 +120,7 @@ all()
echo
echo " --petsc-has-sundials -> $petsc_has_sundials"
echo
echo " --metric-type -> $metric_type"
}

if test $# -eq 0; then
Expand Down Expand Up @@ -233,6 +238,9 @@ while test $# -gt 0; do
echo $has_nls
;;

--metric-type)
echo $metric_type
;;

--petsc-version)
# TODO: Remove in next release
Expand Down
1 change: 1 addition & 0 deletions bout++Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set(BOUT_USE_BACKTRACE @BOUT_USE_BACKTRACE@)
set(BOUT_USE_OPENMP @BOUT_USE_OPENMP@)
set(BOUT_HAS_OUTPUT_DEBUG @BOUT_HAS_OUTPUT_DEBUG@)
set(BOUT_CHECK_LEVEL @BOUT_CHECK_LEVEL@)
set(BOUT_USE_METRIC_3D @BOUT_USE_METRIC_3D@)

set(BOUT_HAS_PVODE @BOUT_HAS_PVODE@)
set(BOUT_HAS_NETCDF @BOUT_HAS_NETCDF@)
Expand Down
2 changes: 2 additions & 0 deletions cmake_build_defines.hxx.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#cmakedefine01 BOUT_USE_SIGFPE
#cmakedefine01 BOUT_USE_SIGNAL
#cmakedefine01 BOUT_USE_TRACK
#cmakedefine BOUT_METRIC_TYPE @BOUT_METRIC_TYPE@
#cmakedefine01 BOUT_USE_METRIC_3D
#cmakedefine01 BOUT_USE_MSGSTACK

// CMake build does not support legacy interface
Expand Down
38 changes: 38 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ PETSC_ARCH
PETSC_DIR
PETSC_MAKE_INCLUDE
PETSC_HAS_SUNDIALS
BOUT_METRIC_TYPE
BOUT_USE_MSGSTACK
BOUT_USE_TRACK
BOUT_USE_SIGNAL
Expand Down Expand Up @@ -827,6 +828,7 @@ enable_static
enable_openmp
with_openmp_schedule
enable_pvode_openmp
enable_metric_3d
with_gcov
enable_code_coverage
enable_nls
Expand Down Expand Up @@ -1487,6 +1489,7 @@ Optional Features:
--enable-static Enable building bout++ into an static library
--enable-openmp Enable building with OpenMP support
--enable-pvode-openmp Enable building PVODE with OpenMP support
--enable-metric-3d Use Field3D to store coordinates metric data
--disable-openmp do not use OpenMP
--enable-code-coverage Whether to enable code coverage support
--disable-nls do not use Native Language Support
Expand Down Expand Up @@ -2588,6 +2591,13 @@ else
enable_pvode_openmp=no
fi

# Check whether --enable-metric_3d was given.
if test "${enable_metric_3d+set}" = set; then :
enableval=$enable_metric_3d;
else
enable_metric_3d=no
fi




Expand Down Expand Up @@ -6045,6 +6055,20 @@ fi

fi

if test "x$enable_metric_3d" != "xno"; then :

{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using Field3D to store coordinates data, this is experimental." >&5
$as_echo "$as_me: WARNING: Using Field3D to store coordinates data, this is experimental." >&2;}
BOUT_METRIC_TYPE="3D"

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: Using Field2D to store coordinates data" >&5
$as_echo "$as_me: Using Field2D to store coordinates data" >&6;}
BOUT_METRIC_TYPE="2D"

fi

#############################################################
# Build into shared object (pic)
#############################################################
Expand Down Expand Up @@ -15759,6 +15783,18 @@ fi



cat >>confdefs.h <<_ACEOF
#define BOUT_METRIC_TYPE $BOUT_METRIC_TYPE
_ACEOF

BOUT_METRIC_3D=$(test $BOUT_METRIC_TYPE != 3D ; echo $?)

cat >>confdefs.h <<_ACEOF
#define BOUT_USE_METRIC_3D $BOUT_METRIC_3D
_ACEOF






Expand Down Expand Up @@ -17299,6 +17335,8 @@ $as_echo "$as_me: Enable FP exceptions : $BOUT_USE_SIGFPE" >&6;}
$as_echo "$as_me: Enable signal handlers : $BOUT_USE_SIGNAL" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Enable field names : $BOUT_USE_TRACK" >&5
$as_echo "$as_me: Enable field names : $BOUT_USE_TRACK" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Metric type : $BOUT_METRIC_TYPE" >&5
$as_echo "$as_me: Metric type : $BOUT_METRIC_TYPE" >&6;}

{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
$as_echo "$as_me: " >&6;}
Expand Down
15 changes: 15 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ AC_ARG_WITH(openmp_schedule,[AS_HELP_STRING([--with-openmp-schedule=static/dynam
[Set OpenMP schedule (default: static)])],,[with_openmp_schedule=static])
AC_ARG_ENABLE(pvode_openmp, [AS_HELP_STRING([--enable-pvode-openmp],
[Enable building PVODE with OpenMP support])],,[enable_pvode_openmp=no])
AC_ARG_ENABLE(metric_3d, [AS_HELP_STRING([--enable-metric-3d],
[Use Field3D to store coordinates metric data])],,[enable_metric_3d=no])

AC_ARG_VAR(EXTRA_INCS,[Extra compile flags])
AC_ARG_VAR(EXTRA_LIBS,[Extra linking flags])
Expand Down Expand Up @@ -423,6 +425,14 @@ AS_IF([test "x$enable_backtrace" = "xyes" || test "x$enable_backtrace" = "xmaybe
])
])

AS_IF([test "x$enable_metric_3d" != "xno"], [
AC_MSG_WARN([Using Field3D to store coordinates data, this is experimental.])
BOUT_METRIC_TYPE="3D"
], [
AC_MSG_NOTICE([Using Field2D to store coordinates data])
BOUT_METRIC_TYPE="2D"
])

#############################################################
# Build into shared object (pic)
#############################################################
Expand Down Expand Up @@ -1372,6 +1382,10 @@ BOUT_DEFINE_SUBST(BOUT_USE_SIGFPE, [Enable floating point exceptions])
BOUT_DEFINE_SUBST(BOUT_USE_SIGNAL, [Enable signal handlers])
BOUT_DEFINE_SUBST(BOUT_USE_TRACK, [Enable field name tracking])
BOUT_DEFINE_SUBST(BOUT_USE_MSGSTACK, [Enable MsgStack for traces])
AC_DEFINE_UNQUOTED([BOUT_METRIC_TYPE], $BOUT_METRIC_TYPE, [Type of the metric fields])
BOUT_METRIC_3D=$(test $BOUT_METRIC_TYPE != 3D ; echo $?)
AC_DEFINE_UNQUOTED([BOUT_USE_METRIC_3D], $BOUT_METRIC_3D, [Is the metric field 3D])
AC_SUBST(BOUT_METRIC_TYPE)

AC_SUBST(PETSC_HAS_SUNDIALS)
AC_SUBST(PETSC_MAKE_INCLUDE)
Expand Down Expand Up @@ -1420,6 +1434,7 @@ AC_MSG_NOTICE([ Enable OpenMP : $BOUT_USE_OPENMP])
AC_MSG_NOTICE([ Enable FP exceptions : $BOUT_USE_SIGFPE])
AC_MSG_NOTICE([ Enable signal handlers : $BOUT_USE_SIGNAL])
AC_MSG_NOTICE([ Enable field names : $BOUT_USE_TRACK])
AC_MSG_NOTICE([ Metric type : $BOUT_METRIC_TYPE])

AC_MSG_NOTICE([])
AC_MSG_NOTICE([-------------------------------])
Expand Down
8 changes: 4 additions & 4 deletions examples/conducting-wall-mode/cwm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ class CWM : public PhysicsModel {
for (int jz = 0; jz < mesh->LocalNz; jz++) {

var(xrup.ind, jy, jz) = var(xrup.ind, jy - 1, jz)
+ coord->dy(xrup.ind, jy)
* sqrt(coord->g_22(xrup.ind, jy))
+ coord->dy(xrup.ind, jy, jz)
* sqrt(coord->g_22(xrup.ind, jy, jz))
* value(xrup.ind, jy, jz);
}
}
Expand All @@ -322,8 +322,8 @@ class CWM : public PhysicsModel {
for (int jz = 0; jz < mesh->LocalNz; jz++) {

var(xrdn.ind, jy, jz) = var(xrdn.ind, jy + 1, jz)
- coord->dy(xrdn.ind, jy)
* sqrt(coord->g_22(xrdn.ind, jy))
- coord->dy(xrdn.ind, jy, jz)
* sqrt(coord->g_22(xrdn.ind, jy, jz))
* value(xrdn.ind, jy, jz);
}
}
Expand Down
11 changes: 7 additions & 4 deletions examples/elm-pb/elm_pb.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ class ELMpb : public PhysicsModel {
// 2D inital profiles
Field2D J0, P0; // Current and pressure
Vector2D b0xcv; // Curvature term
Field2D beta, gradparB; // Used for Vpar terms
Field2D beta; // Used for Vpar terms
Coordinates::FieldMetric gradparB;
Field2D phi0; // When diamagnetic terms used
Field2D U0, Psixy, x; // 0th vorticity of equilibrium flow,
Field2D Psixy, x;
Coordinates::FieldMetric U0; // 0th vorticity of equilibrium flow,
// radial flux coordinate, normalized radial flux coordinate

bool constn0;
Expand Down Expand Up @@ -659,8 +661,9 @@ class ELMpb : public PhysicsModel {
for (int jy = 0; jy < mesh->LocalNy; jy++) {
for (int jz = 0; jz < mesh->LocalNz; jz++) {

BoutReal angle = rmp_m * pol_angle(jx, jy)
+ rmp_n * ((BoutReal)jz) * mesh->getCoordinates()->dz;
BoutReal angle =
rmp_m * pol_angle(jx, jy)
+ rmp_n * ((BoutReal)jz) * mesh->getCoordinates()->dz(jx, jy, jz);
rmp_Psi0(jx, jy, jz) =
(((BoutReal)(jx - 4)) / ((BoutReal)(mesh->LocalNx - 5)))
* rmp_factor * cos(angle);
Expand Down
2 changes: 1 addition & 1 deletion examples/gyro-gem/gem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class GEM : public PhysicsModel {

Vector3D B0vec; // Equilibrium B field vector
Field2D logB; // For curvature
Field2D Grad_par_logB; // Grad_par(log(B))
Coordinates::FieldMetric Grad_par_logB; // Grad_par(log(B))

Field2D Ni0, Ne0; // Gyro-center densities
Field2D Ti0, Te0; // Starting isotropic temperatures
Expand Down
Loading