-
Notifications
You must be signed in to change notification settings - Fork 108
Refactor Coordinates with more encapsulation
#3425
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
base: next
Are you sure you want to change the base?
Changes from all commits
9df3238
c761c01
adec652
448fadb
b7b7f12
3580dc5
7414796
740f40f
69950d1
7da06af
d546bec
0870329
312bfc3
e4b126d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,14 +5,26 @@ | |
| * Model version in the code created by M. Umansky and J. Myra. | ||
| *******************************************************************************/ | ||
|
|
||
| #include <bout/bout_types.hxx> | ||
| #include <bout/coordinates.hxx> | ||
| #include <bout/derivs.hxx> | ||
| #include <bout/difops.hxx> | ||
| #include <bout/field2d.hxx> | ||
| #include <bout/field3d.hxx> | ||
| #include <bout/globals.hxx> | ||
| #include <bout/initialprofiles.hxx> | ||
| #include <bout/interpolation.hxx> | ||
| #include <bout/invert_laplace.hxx> | ||
| #include <bout/output.hxx> | ||
| #include <bout/physicsmodel.hxx> | ||
| #include <bout/sys/range.hxx> | ||
| #include <bout/tokamak_coordinates.hxx> | ||
| #include <bout/unused.hxx> | ||
| #include <bout/utils.hxx> | ||
|
|
||
| #include <cmath> | ||
| #include <memory> | ||
|
|
||
| class CWM : public PhysicsModel { | ||
| private: | ||
| // 2D initial profiles | ||
|
|
@@ -319,7 +331,7 @@ class CWM : public PhysicsModel { | |
| result = VDDX(DDZ(p), f); | ||
| } else { | ||
| // Use full expression with all terms | ||
| result = b0xGrad_dot_Grad(p, f) / coord->Bxy; | ||
| result = b0xGrad_dot_Grad(p, f) / coord->Bxy(); | ||
| } | ||
| return result; | ||
| } | ||
|
|
@@ -328,10 +340,10 @@ class CWM : public PhysicsModel { | |
| Field3D result; | ||
| if (bout_exb) { | ||
| // Use a subset of terms for comparison to BOUT-06 | ||
| result = VDDZ(-DDX(p), f); | ||
| result = VDDZ(Field2D{-DDX(p)}, f); | ||
| } else { | ||
| // Use full expression with all terms | ||
| result = b0xGrad_dot_Grad(p, f) / coord->Bxy; | ||
| result = b0xGrad_dot_Grad(p, f) / coord->Bxy(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "b0xGrad_dot_Grad" is directly included [misc-include-cleaner] result = b0xGrad_dot_Grad(p, f) / coord->Bxy();
^ |
||
| } | ||
| return result; | ||
| } | ||
|
|
@@ -343,7 +355,7 @@ class CWM : public PhysicsModel { | |
| result = VDDX(DDZ(p), f) + VDDZ(-DDX(p), f); | ||
| } else { | ||
| // Use full expression with all terms | ||
| result = b0xGrad_dot_Grad(p, f) / coord->Bxy; | ||
| result = b0xGrad_dot_Grad(p, f) / coord->Bxy(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "b0xGrad_dot_Grad" is directly included [misc-include-cleaner] result = b0xGrad_dot_Grad(p, f) / coord->Bxy();
^ |
||
| } | ||
| return result; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "b0xGrad_dot_Grad" is directly included [misc-include-cleaner]
result = b0xGrad_dot_Grad(p, f) / coord->Bxy(); ^