Skip to content

Commit d08ecf9

Browse files
committed
Rename struct TokamakCoordinates to TokamakOptions
1 parent 2ee750f commit d08ecf9

File tree

18 files changed

+146
-146
lines changed

18 files changed

+146
-146
lines changed

examples/6field-simple/elm_6f.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class Elm_6f : public PhysicsModel {
235235
int damp_width; // Width of inner damped region
236236
BoutReal damp_t_const; // Timescale of damping
237237

238-
TokamakCoordinates tokamak_coordinates = TokamakCoordinates(*mesh);
238+
TokamakOptions tokamak_options = TokamakOptions(*mesh);
239239

240240
BoutReal LnLambda; // ln(Lambda)
241241

@@ -366,7 +366,7 @@ class Elm_6f : public PhysicsModel {
366366
result = Grad_par(f, loc);
367367

368368
if (nonlinear) {
369-
result -= bracket(Psi, f, bm_mag) * tokamak_coordinates.Bxy;
369+
result -= bracket(Psi, f, bm_mag) * tokamak_options.Bxy;
370370
}
371371
}
372372

@@ -681,7 +681,7 @@ class Elm_6f : public PhysicsModel {
681681

682682
if (noshear) {
683683
if (include_curvature) {
684-
b0xcv.z += tokamak_coordinates.ShearFactor * b0xcv.x;
684+
b0xcv.z += tokamak_options.ShearFactor * b0xcv.x;
685685
}
686686
}
687687

@@ -691,7 +691,7 @@ class Elm_6f : public PhysicsModel {
691691
if (not mesh->IncIntShear) {
692692
// Dimits style, using local coordinate system
693693
if (include_curvature) {
694-
b0xcv.z += tokamak_coordinates.ShearFactor * b0xcv.x;
694+
b0xcv.z += tokamak_options.ShearFactor * b0xcv.x;
695695
}
696696
}
697697

@@ -835,11 +835,11 @@ class Elm_6f : public PhysicsModel {
835835
dump.add(sp_length, "sp_length", 1);
836836
}
837837

838-
auto Bpxy = tokamak_coordinates.Bpxy;
839-
auto hthe = tokamak_coordinates.hthe;
840-
auto Rxy = tokamak_coordinates.Rxy;
841-
auto Btxy = tokamak_coordinates.Btxy;
842-
auto B0 = tokamak_coordinates.Bxy;
838+
auto Bpxy = tokamak_options.Bpxy;
839+
auto hthe = tokamak_options.hthe;
840+
auto Rxy = tokamak_options.Rxy;
841+
auto Btxy = tokamak_options.Btxy;
842+
auto B0 = tokamak_options.Bxy;
843843

844844
J0 = SI::mu0 * Lbar * J0 / B0;
845845
P0 = P0 / (SI::kb * (Tibar + Tebar) * eV_K / 2. * Nbar * density);
@@ -1034,7 +1034,7 @@ class Elm_6f : public PhysicsModel {
10341034
}
10351035

10361036
/**************** CALCULATE METRICS ******************/
1037-
set_tokamak_coordinates_on_mesh(tokamak_coordinates, *mesh, noshear, Lbar, Bbar);
1037+
set_tokamak_coordinates_on_mesh(tokamak_options, *mesh, noshear, Lbar, Bbar);
10381038

10391039
//////////////////////////////////////////////////////////////
10401040
// SHIFTED RADIAL COORDINATES
@@ -1224,7 +1224,7 @@ class Elm_6f : public PhysicsModel {
12241224
// Field2D lap_temp=0.0;
12251225
Field2D logn0 = laplace_alpha * N0;
12261226

1227-
auto B0 = tokamak_coordinates.Bxy;
1227+
auto B0 = tokamak_options.Bxy;
12281228

12291229
ubyn = U * B0 / N0;
12301230
if (diamag) {

examples/conducting-wall-mode/cwm.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class CWM : public PhysicsModel {
121121
hthe0 / rho_s);
122122
}
123123

124-
auto tokamak_coordinates = TokamakCoordinates(*mesh);
124+
auto tokamak_options = TokamakOptions(*mesh);
125125

126126
/************** NORMALISE QUANTITIES *****************/
127127

@@ -132,7 +132,7 @@ class CWM : public PhysicsModel {
132132
Te0 /= Te_x;
133133

134134
// Normalise geometry
135-
set_tokamak_coordinates_on_mesh(tokamak_coordinates, *mesh, noshear, rho_s, bmag / 1e4, ShearFactor);
135+
set_tokamak_coordinates_on_mesh(tokamak_options, *mesh, noshear, rho_s, bmag / 1e4, ShearFactor);
136136

137137
// Set nu
138138
nu = nu_hat * Ni0 / pow(Te0, 1.5);
@@ -143,10 +143,10 @@ class CWM : public PhysicsModel {
143143
// add evolving variables to the communication object
144144
SOLVE_FOR(rho, te);
145145

146-
Field2D Rxy = tokamak_coordinates.Rxy;
147-
Field2D Bpxy = tokamak_coordinates.Bpxy;
148-
Field2D Btxy = tokamak_coordinates.Btxy;
149-
Field2D hthe = tokamak_coordinates.hthe;
146+
Field2D Rxy = tokamak_options.Rxy;
147+
Field2D Bpxy = tokamak_options.Bpxy;
148+
Field2D Btxy = tokamak_options.Btxy;
149+
Field2D hthe = tokamak_options.hthe;
150150
SAVE_ONCE(Rxy, Bpxy, Btxy, Zxy, hthe);
151151
SAVE_ONCE(nu_hat, hthe0);
152152

examples/constraints/alfven-wave/alfven.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ class Alfven : public PhysicsModel {
173173
noshear = true;
174174
}
175175

176-
auto tokamak_coordinates = TokamakCoordinates(*mesh);
177-
set_tokamak_coordinates_on_mesh(tokamak_coordinates, *mesh, noshear, Lnorm, Bnorm);
176+
auto tokamak_options = TokamakOptions(*mesh);
177+
set_tokamak_coordinates_on_mesh(tokamak_options, *mesh, noshear, Lnorm, Bnorm);
178178
}
179179
};
180180

examples/dalf3/dalf3.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class DALF3 : public PhysicsModel {
8181
std::unique_ptr<LaplaceXY> laplacexy{nullptr}; // Laplacian solver in X-Y (n=0)
8282
Field2D phi2D; // Axisymmetric potential, used when split_n0=true
8383

84-
TokamakCoordinates tokamak_coordinates = TokamakCoordinates(*mesh);
84+
TokamakOptions tokamak_options = TokamakOptions(*mesh);
8585

8686
protected:
8787
int init(bool UNUSED(restarting)) override {
@@ -164,7 +164,7 @@ class DALF3 : public PhysicsModel {
164164

165165
if (lowercase(ptstr) == "shifted") {
166166
// Dimits style, using local coordinate system
167-
b0xcv.z += tokamak_coordinates.ShearFactor * b0xcv.x;
167+
b0xcv.z += tokamak_options.ShearFactor * b0xcv.x;
168168
noshear = true;
169169
}
170170

@@ -224,7 +224,7 @@ class DALF3 : public PhysicsModel {
224224
b0xcv.z *= rho_s * rho_s;
225225

226226
// Metrics
227-
set_tokamak_coordinates_on_mesh(tokamak_coordinates, *mesh, noshear, rho_s, Bnorm);
227+
set_tokamak_coordinates_on_mesh(tokamak_options, *mesh, noshear, rho_s, Bnorm);
228228

229229
SOLVE_FOR3(Vort, Pe, Vpar);
230230
comms.add(Vort, Pe, Vpar);

examples/elm-pb-outerloop/elm_pb_outerloop.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class ELMpb : public PhysicsModel {
288288
int damp_width; // Width of inner damped region
289289
BoutReal damp_t_const; // Timescale of damping
290290

291-
TokamakCoordinates tokamak_coordinates = TokamakCoordinates(*mesh);
291+
TokamakOptions tokamak_options = TokamakOptions(*mesh);
292292

293293
const BoutReal MU0 = 4.0e-7 * PI;
294294
const BoutReal Mi = 2.0 * 1.6726e-27; // Ion mass
@@ -717,13 +717,13 @@ class ELMpb : public PhysicsModel {
717717
if (mesh->get(Lbar, "rmag") != 0) { // Typical length scale
718718
Lbar = 1.0;
719719
}
720-
set_tokamak_coordinates_on_mesh(tokamak_coordinates, *mesh, true, Lbar, Bbar);
720+
set_tokamak_coordinates_on_mesh(tokamak_options, *mesh, true, Lbar, Bbar);
721721

722-
auto Bpxy = tokamak_coordinates.Bpxy;
723-
auto hthe = tokamak_coordinates.hthe;
724-
auto Rxy = tokamak_coordinates.Rxy;
725-
auto Btxy = tokamak_coordinates.Btxy;
726-
auto B0 = tokamak_coordinates.Bxy;
722+
auto Bpxy = tokamak_options.Bpxy;
723+
auto hthe = tokamak_options.hthe;
724+
auto Rxy = tokamak_options.Rxy;
725+
auto Btxy = tokamak_options.Btxy;
726+
auto B0 = tokamak_options.Bxy;
727727

728728
V0 = -Rxy * Bpxy * Dphi0 / B0;
729729

@@ -820,7 +820,7 @@ class ELMpb : public PhysicsModel {
820820

821821
if (noshear) {
822822
if (include_curvature) {
823-
b0xcv.z += tokamak_coordinates.ShearFactor * b0xcv.x;
823+
b0xcv.z += tokamak_options.ShearFactor * b0xcv.x;
824824
}
825825
}
826826

@@ -830,7 +830,7 @@ class ELMpb : public PhysicsModel {
830830
if (not mesh->IncIntShear) {
831831
// Dimits style, using local coordinate system
832832
if (include_curvature) {
833-
b0xcv.z += tokamak_coordinates.ShearFactor * b0xcv.x;
833+
b0xcv.z += tokamak_options.ShearFactor * b0xcv.x;
834834
}
835835
}
836836

@@ -1231,7 +1231,7 @@ class ELMpb : public PhysicsModel {
12311231

12321232
Field3D result = Grad_par(f, loc);
12331233

1234-
auto B0 = tokamak_coordinates.Bxy;
1234+
auto B0 = tokamak_options.Bxy;
12351235

12361236
if (nonlinear) {
12371237
result -= bracket(interp_to(Psi, loc), f, bm_mag) * B0;
@@ -1252,7 +1252,7 @@ class ELMpb : public PhysicsModel {
12521252

12531253
Coordinates* metric = mesh->getCoordinates();
12541254

1255-
auto B0 = tokamak_coordinates.Bxy;
1255+
auto B0 = tokamak_options.Bxy;
12561256

12571257
////////////////////////////////////////////
12581258
// Transitions from 0 in core to 1 in vacuum
@@ -1999,7 +1999,7 @@ class ELMpb : public PhysicsModel {
19991999

20002000
Field3D U1 = ddt(U);
20012001

2002-
auto B0 = tokamak_coordinates.Bxy;
2002+
auto B0 = tokamak_options.Bxy;
20032003

20042004
U1 += (gamma * B0 * B0) * Grad_par(Jrhs, CELL_CENTRE) + (gamma * b0xcv) * Grad(P);
20052005

@@ -2053,7 +2053,7 @@ class ELMpb : public PhysicsModel {
20532053
JP.setBoundary("P");
20542054
JP.applyBoundary();
20552055

2056-
auto B0 = tokamak_coordinates.Bxy;
2056+
auto B0 = tokamak_options.Bxy;
20572057

20582058
Field3D B0phi = B0 * phi;
20592059
mesh->communicate(B0phi);

0 commit comments

Comments
 (0)