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

Dry up examples #3046

Open
wants to merge 83 commits into
base: refactor-coordinates
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
a2ca224
Extract function tokamak_coordinates(coord, Rxy, Bpxy, hthe, I, B0, B…
tomchapman Oct 10, 2024
144e13c
Use function in more examples
tomchapman Oct 10, 2024
0574623
Move and rename "examples/common.hxx" to "include/bout/tokamak_coordi…
tomchapman Oct 11, 2024
318a008
Use function `tokamak_coordinates` in tests
tomchapman Oct 11, 2024
5ff71b8
Make function `tokamak_coordinates` provide the Coordinates object
tomchapman Oct 15, 2024
e24886a
Bxy and dx may be Field2D or Field3D
tomchapman Nov 4, 2024
ac90d8a
Make tokamak_coordinates a method on new class TokamakCoordinatesFactory
tomchapman Nov 6, 2024
b1fba6b
Add constructor (taking mesh as parameter)
tomchapman Nov 6, 2024
169fd2d
Assign tokamak_coordinates_factory to variable
tomchapman Nov 6, 2024
a440822
Field mesh_m should be private
tomchapman Nov 6, 2024
b524064
Rename variable (Sign of Bp)
tomchapman Nov 6, 2024
35db3dc
Prefer const ref
tomchapman Nov 6, 2024
de9d651
Make Rxy a member variable of TokamakCoordinatesFactory
tomchapman Nov 6, 2024
6ec2c7d
Get coordinates from TokamakCoordinatesFactory instead of mesh->getCo…
tomchapman Nov 6, 2024
543c644
Rxy has to be of type Field2D
tomchapman Nov 6, 2024
3fc8cb2
Make Bpxy a member variable of TokamakCoordinatesFactory
tomchapman Nov 6, 2024
892d845
Make Btxy a member variable of TokamakCoordinatesFactory
tomchapman Nov 6, 2024
729cf24
Make B a member variable of TokamakCoordinatesFactory
tomchapman Nov 6, 2024
28e63d9
Make hthe a member variable of TokamakCoordinatesFactory
tomchapman Nov 6, 2024
7c31148
Make I a member variable of TokamakCoordinatesFactory
tomchapman Nov 8, 2024
53b92a8
Load values for metric quantities (from mesh) inside TokamakCoordinat…
tomchapman Nov 8, 2024
9b1ceb5
More fixes
tomchapman Nov 8, 2024
4730c07
Getters for Rxy, Bpxy, Btxy, Bxy, and hthe cannot be const
tomchapman Nov 9, 2024
2244bab
Fixes to dalf3 example
tomchapman Nov 9, 2024
6ace460
Fixes to elm_pb example
tomchapman Nov 9, 2024
23fd464
Fix typo (double semicolons)
tomchapman Nov 9, 2024
97adc43
Assign value to new (const) variable
tomchapman Nov 9, 2024
ece842a
Getters for Rxy, Bpxy, Btxy, Bxy, and hthe can be const
tomchapman Nov 9, 2024
ffce3fe
Fixes to elm_pb_outerloop example
tomchapman Nov 9, 2024
24c66cf
Extract method TokamakCoordinatesFactory.normalise()
tomchapman Nov 9, 2024
59f0250
Fix TokamakCoordinatesFactory method calls in elm_pb
tomchapman Nov 10, 2024
9aa88f2
Add dx to TokamakCoordinatesFactory.normalise() method
tomchapman Nov 10, 2024
059af23
Use extracted methods in more examples and tests
tomchapman Nov 10, 2024
eecec67
Extract method setShearFactor()
tomchapman Nov 10, 2024
b27d11e
Restore ShearFactor setter on TokamakCoordinatesFactory
tomchapman Nov 10, 2024
e26010e
Use extracted methods in alfven-wave example
tomchapman Nov 10, 2024
a0bf7e7
Extract method TokamakCoordinatesFactory.get_sign_of_bp()
tomchapman Nov 10, 2024
9ebdf2a
Use extracted method TokamakCoordinatesFactory.normalise() in more pl…
tomchapman Nov 10, 2024
c9b9ca7
Reorder (instantiate TokamakCoordinatesFactory before first use)
tomchapman Nov 10, 2024
7698cb3
Use new getters and setters elm_pb_outerloop
tomchapman Nov 10, 2024
0310bf6
More use of new getters and setters elm_pb_outerloop
tomchapman Nov 10, 2024
6c4138d
Get Bxy from the Coordinates object
tomchapman Nov 10, 2024
81140fe
Bxy has to be of type Field2D, so get from TokamakCoordinatesFactory …
tomchapman Nov 10, 2024
191ed7b
Bxy is now normalised in TokamakCoordinatesFactory.normalise()
tomchapman Nov 10, 2024
76a157c
Move b0xcv to TokamakCoordinatesFactory
tomchapman Nov 10, 2024
c6499e0
Normalise b0xcv (magnetic curvature term)
tomchapman Nov 10, 2024
dc620d2
dx is now normalised in TokamakCoordinatesFactory.normalise()
tomchapman Nov 10, 2024
5615e70
Make make_tokamak_coordinates method take optional boolean argument s…
tomchapman Nov 10, 2024
e06580f
dx is now normalised in TokamakCoordinatesFactory.normalise()
tomchapman Nov 10, 2024
9cf53d5
Normalise b0xcv (magnetic curvature term) moved to normalise() method…
tomchapman Nov 10, 2024
4805f9f
Pass arguments noshear include_curvature to make_tokamak_coordinates …
tomchapman Nov 10, 2024
1566702
Further fixes to `Pass arguments noshear include_curvature to make_to…
tomchapman Nov 10, 2024
cc51821
Remove unused method set_ShearFactor()
tomchapman Nov 10, 2024
275383e
More fixes
tomchapman Nov 10, 2024
2de8793
Finish: Move b0xcv to TokamakCoordinatesFactory
tomchapman Nov 10, 2024
31f0a28
Further fixes to `Pass arguments noshear include_curvature to make_to…
tomchapman Nov 10, 2024
24f1700
dx is now normalised in TokamakCoordinatesFactory.normalise()
tomchapman Nov 10, 2024
dca9249
Declare variable noshear
tomchapman Nov 10, 2024
047e09c
Further small fixes
tomchapman Nov 10, 2024
8876e5d
Declare variable noshear
tomchapman Nov 10, 2024
ecbb8bf
noshear and include_curvature variables don't exist in gem example
tomchapman Nov 10, 2024
505423e
TokamakCoordinatesFactory instance can't be const
tomchapman Nov 11, 2024
28c2c37
include_curvature variable doesn't exist in test-drift-instability/2f…
tomchapman Nov 18, 2024
a47815d
Fix: Move b0xcv to TokamakCoordinatesFactory
tomchapman Nov 18, 2024
657be16
Set ShearFactor before using it
tomchapman Nov 19, 2024
be62530
Extract method set_shearfactor_and_curvature_term()
tomchapman Nov 19, 2024
8025f5c
clang-tidy: directly include headers
tomchapman Nov 19, 2024
e93922c
Access b0xcv (curvature term) through getter
tomchapman Nov 19, 2024
2277213
Fix tests gbs and conducting-wall-mode/cwm - don't redefine coords ob…
tomchapman Nov 19, 2024
b58a9c1
Initialise noshear to false
tomchapman Nov 19, 2024
3d5af5a
Must call tokamak_coordinates_factory.normalise() before tokamak_coor…
tomchapman Nov 19, 2024
929ca38
Pass (optional) ShearFactor parameter to TokamakCoordinatesFactory.no…
tomchapman Nov 19, 2024
f628655
Fix mix up between the two shear factor variables
tomchapman Nov 19, 2024
9255ff9
Make variable const
tomchapman Nov 19, 2024
2da3805
Fix: "Must call tokamak_coordinates_factory.normalise() before tokama…
tomchapman Nov 21, 2024
ea455bc
Fix TokamakCoordinatesFactory: Set dx
tomchapman Nov 21, 2024
71fd669
Fix syntax typo (compound assignments operators in normalise() method)
tomchapman Nov 22, 2024
49ad261
Remove b0xcv (curvature term) from TokamakCoordinatesFactory
tomchapman Nov 22, 2024
9886b01
Make TokamakCoordinatesFactory.normalise() private and call in make_t…
tomchapman Dec 4, 2024
fc01781
Rename TokamakCoordinatesFactory getters
tomchapman Dec 4, 2024
fa35e6a
Rename class and method
tomchapman Dec 16, 2024
17689e3
Move implementation of TokamakCoordinates class out of header file
tomchapman Dec 16, 2024
5543e87
Apply clang-format changes
tomc271 Dec 16, 2024
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: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ set(BOUT_SOURCES
./src/mesh/g_values.cxx
${CMAKE_CURRENT_BINARY_DIR}/include/bout/revision.hxx
${CMAKE_CURRENT_BINARY_DIR}/include/bout/version.hxx
./include/bout/tokamak_coordinates.hxx
./src/mesh/tokamak_coordinates.cxx
)


Expand Down
Loading