Stellarator-Tools
siesta_quantities.hpp
Go to the documentation of this file.
1 //******************************************************************************
4 //******************************************************************************
5 
6 #ifndef siesta_quantities_hpp
7 #define siesta_quantities_hpp
8 
9 #include <string>
10 #include <netcdf.h>
11 
12 #include "grid_quantity.hpp"
13 
14 //------------------------------------------------------------------------------
18 //------------------------------------------------------------------------------
20 public:
62  const double curtor;
65 
66 //------------------------------------------------------------------------------
72 //------------------------------------------------------------------------------
73  siesta_quantities(const std::string &restart_file) :
75  r(load_fourier<full_grid, cosine> (restart_file, "rmnc_m_n_r_")),
76  drds(to_prime(r)),
77  z(load_fourier<full_grid, sine> (restart_file, "zmns_m_n_r_")),
78  dzds(to_prime(z)),
79  phipf(load<full_grid> (restart_file, "phipf_r_")),
80  chipf(load<full_grid> (restart_file, "chipf_r_")),
81  jbsups(load_fourier_denorm<half_grid, sine> (restart_file, "JBsupssh_m_n_r_")),
83  jbsupu(load_fourier_denorm<half_grid, cosine> (restart_file, "JBsupuch_m_n_r_")),
84  jbsupv(load_fourier_denorm<half_grid, cosine> (restart_file, "JBsupvch_m_n_r_")),
85  bsups(load_fourier<half_grid, sine> (restart_file, "bsupsmnsh_m_n_r_")),
86  bsupu(load_fourier<half_grid, cosine> (restart_file, "bsupumnch_m_n_r_")),
87  bsupv(load_fourier<half_grid, cosine> (restart_file, "bsupvmnch_m_n_r_")),
88  bsubs(load_fourier<half_grid, sine> (restart_file, "bsubsmnsh_m_n_r_")),
89  bsubu(load_fourier<half_grid, cosine> (restart_file, "bsubumnch_m_n_r_")),
90  bsubv(load_fourier<half_grid, cosine> (restart_file, "bsubvmnch_m_n_r_")),
91  jksups(load_fourier<full_grid, sine> (restart_file, "jksupsmnsf_m_n_r_")),
92  jksupu(load_fourier<full_grid, cosine> (restart_file, "jksupumncf_m_n_r_")),
93  jksupv(load_fourier<full_grid, cosine> (restart_file, "jksupvmncf_m_n_r_")),
94  curtor(load_scalar(restart_file, "curtor")),
95  p(load_fourier<half_grid, cosine> (restart_file, "pmnch_m_n_r_")) {}
96 
97 //------------------------------------------------------------------------------
101 //------------------------------------------------------------------------------
103  std::vector<double> temp(100);
104 
105  for (size_t i = 0; i < 100; i++) {
106  double s = static_cast<double> (i)/99.0;
107  s *= s;
108 
109  temp[i] = cos(s);
110  }
111 
112  return siesta_grid<full_grid> (temp);
113  }
114 
115 //------------------------------------------------------------------------------
121 //------------------------------------------------------------------------------
122  template<class GIRD_CLASS>
123  static siesta_grid<GIRD_CLASS> load(const std::string &restart_file,
124  const std::string &name) {
125  int ncid;
126  int status = nc_open(restart_file.c_str(), NC_NOWRITE, &ncid);
127  if (status) {
128  std::cout << "Failed to open " << restart_file << std::endl;
129  exit(status);
130  }
131 
132  int varid;
133  int nrad;
134  nc_inq_varid(ncid, "nrad", &varid);
135  nc_get_var(ncid, varid, &nrad);
136 
137  std::vector<double> temp(nrad);
138  nc_inq_varid(ncid, name.c_str(), &varid);
139  nc_get_var(ncid, varid, temp.data());
140 
141  nc_close(ncid);
142 
143  return siesta_grid<GIRD_CLASS> (temp);
144  }
145 
146 //------------------------------------------------------------------------------
152 //------------------------------------------------------------------------------
153  static double load_scalar(const std::string &restart_file,
154  const std::string &name) {
155  int ncid;
156  int status = nc_open(restart_file.c_str(), NC_NOWRITE, &ncid);
157  if (status) {
158  std::cout << "Failed to open " << restart_file << std::endl;
159  exit(status);
160  }
161 
162  int varid;
163  double temp;
164  nc_inq_varid(ncid, "curtor", &varid);
165  nc_get_var(ncid, varid, &temp);
166 
167  nc_close(ncid);
168 
169  return temp;
170  }
171 
172 //------------------------------------------------------------------------------
178 //------------------------------------------------------------------------------
179  template<class GIRD_CLASS, class PARITY>
180  static siesta_fourier<GIRD_CLASS, PARITY> load_fourier(const std::string &restart_file,
181  const std::string &name) {
182  int ncid;
183  int status = nc_open(restart_file.c_str(), NC_NOWRITE, &ncid);
184  if (status) {
185  std::cout << "Failed to open " << restart_file << std::endl;
186  exit(status);
187  }
188 
189  int varid;
190  int nrad;
191  nc_inq_varid(ncid, "nrad", &varid);
192  nc_get_var(ncid, varid, &nrad);
193 
194  int mpol;
195  nc_inq_varid(ncid, "mpol", &varid);
196  nc_get_var(ncid, varid, &mpol);
197 
198  int ntor;
199  nc_inq_varid(ncid, "ntor", &varid);
200  nc_get_var(ncid, varid, &ntor);
201 
202  nc_inq_varid(ncid, "tor_modes", &varid);
203  std::vector<int> tor_modes(2*ntor + 1);
204  nc_get_var(ncid, varid, tor_modes.data());
205 
206  int nfp;
207  nc_inq_varid(ncid, "nfp", &varid);
208  nc_get_var(ncid, varid, &nfp);
209 
211  for (size_t m = 0, em = mpol; m <= em; m++) {
212  for (long n = -ntor, en = ntor; n <= en; n++) {
213  const size_t ni = n + ntor;
214 
215  std::vector<double> temp(nrad);
216  nc_inq_varid(ncid, name.c_str(), &varid);
217 
218  const std::array<size_t, 3> start = {0, ni, m};
219  const std::array<size_t, 3> end = {static_cast<size_t> (nrad), 1, 1};
220  nc_get_vara(ncid, varid,
221  start.data(), end.data(),
222  temp.data());
223 
224  if (n == -ntor) {
226  new_grid.push_back(temp);
227  quantity.push_back(new_grid);
228  } else {
229  quantity[m].push_back(siesta_grid<GIRD_CLASS> (temp));
230  }
231  }
232  }
233 
234  nc_close(ncid);
235 
236  return siesta_fourier<GIRD_CLASS, PARITY> (quantity, mpol, ntor,
237  tor_modes, nfp);
238  }
239 
240 //------------------------------------------------------------------------------
246 //------------------------------------------------------------------------------
247  template<class GIRD_CLASS, class PARITY>
248  static siesta_fourier<GIRD_CLASS, PARITY> load_fourier_denorm(const std::string &restart_file,
249  const std::string &name) {
250  int ncid;
251  int status = nc_open(restart_file.c_str(), NC_NOWRITE, &ncid);
252  if (status) {
253  std::cout << "Failed to open " << restart_file << std::endl;
254  exit(status);
255  }
256 
257  int varid;
258  int nrad;
259  nc_inq_varid(ncid, "nrad", &varid);
260  nc_get_var(ncid, varid, &nrad);
261 
262  int mpol;
263  nc_inq_varid(ncid, "mpol", &varid);
264  nc_get_var(ncid, varid, &mpol);
265 
266  int ntor;
267  nc_inq_varid(ncid, "ntor", &varid);
268  nc_get_var(ncid, varid, &ntor);
269 
270  nc_inq_varid(ncid, "tor_modes", &varid);
271  std::vector<int> tor_modes(2*ntor + 1);
272  nc_get_var(ncid, varid, tor_modes.data());
273 
274  int nfp;
275  nc_inq_varid(ncid, "nfp", &varid);
276  nc_get_var(ncid, varid, &nfp);
277 
278  double bfactor;
279  nc_inq_varid(ncid, "b_factor", &varid);
280  nc_get_var(ncid, varid, &bfactor);
281 
283  for (size_t m = 0, em = mpol; m <= em; m++) {
284  for (long n = -ntor, en = ntor; n <= en; n++) {
285  const size_t ni = n + ntor;
286 
287  std::vector<double> temp(nrad);
288  nc_inq_varid(ncid, name.c_str(), &varid);
289 
290  const std::array<size_t, 3> start = {0, ni, m};
291  const std::array<size_t, 3> end = {static_cast<size_t> (nrad), 1, 1};
292  nc_get_vara(ncid, varid,
293  start.data(), end.data(),
294  temp.data());
295 
296  for (size_t i = 0; i < nrad; i++) {
297  if (m == 0 && n == 0) {
298  temp[i] = temp[i]/bfactor;
299  } else {
300  temp[i] = sqrt(2.0)*temp[i]/bfactor;
301  }
302  }
303 
304  if (n == -ntor) {
306  new_grid.push_back(temp);
307  quantity.push_back(new_grid);
308  } else {
309  quantity[m].push_back(siesta_grid<GIRD_CLASS> (temp));
310  }
311  }
312  }
313 
314  nc_close(ncid);
315 
316  return siesta_fourier<GIRD_CLASS, PARITY> (quantity, mpol, ntor,
317  tor_modes, nfp);
318  }
319 
320 //------------------------------------------------------------------------------
325 //------------------------------------------------------------------------------
326  template<class PARITY>
328  siesta_quantity<half_grid> half_quanity;
329 
330  for (const siesta_quantity_1d<full_grid> slice : siesta.quantity) {
332 
333  for (const siesta_grid<full_grid> &q : slice) {
334  half_slice.push_back(siesta_grid<half_grid> (q.grid.get_prime()));
335  }
336 
337  half_quanity.push_back(half_slice);
338  }
339 
340  return siesta_fourier<half_grid, PARITY> (half_quanity,
341  siesta.mpol,
342  siesta.ntor,
343  siesta.tor_modes,
344  siesta.nfp);
345  }
346 
347 //------------------------------------------------------------------------------
352 //------------------------------------------------------------------------------
353  template<class PARITY>
355  siesta_quantity<full_grid> full_quanity;
356 
357  for (size_t m = 0, em = siesta.mpol; m <= em; m++) {
359 
360  for (long n = - siesta.ntor, en = siesta.ntor; n <= en; n++) {
361  const size_t ni = n + siesta.ntor;
362  full_slice.push_back(siesta_grid<full_grid> (siesta.quantity[m][ni].grid.get_prime(static_cast<double> (m))));
363  }
364 
365  full_quanity.push_back(full_slice);
366  }
367 
368  return siesta_fourier<full_grid, PARITY> (full_quanity,
369  siesta.mpol,
370  siesta.ntor,
371  siesta.tor_modes,
372  siesta.nfp);
373  }
374 
375 //------------------------------------------------------------------------------
382 //------------------------------------------------------------------------------
383  double get_r(const double s, const double u, const double v) const {
384  return r.get(s, u, v);
385  }
386 
387 //------------------------------------------------------------------------------
394 //------------------------------------------------------------------------------
395  double get_r_prime(const double s, const double u, const double v) const {
396  return drds.get(s, u, v);
397  }
398 
399 //------------------------------------------------------------------------------
406 //------------------------------------------------------------------------------
407  double get_dr_du(const double s, const double u, const double v) const {
408  return r.get_du(s, u, v);
409  }
410 
411 //------------------------------------------------------------------------------
418 //------------------------------------------------------------------------------
419  double get_dr_dv(const double s, const double u, const double v) const {
420  return r.get_dv(s, u, v);
421  }
422 
423 //------------------------------------------------------------------------------
430 //------------------------------------------------------------------------------
431  double get_z(const double s, const double u, const double v) const {
432  return z.get(s, u, v);
433  }
434 
435 //------------------------------------------------------------------------------
442 //------------------------------------------------------------------------------
443  double get_z_prime(const double s, const double u, const double v) const {
444  return dzds.get(s, u, v);
445  }
446 
447 //------------------------------------------------------------------------------
454 //------------------------------------------------------------------------------
455  double get_dz_du(const double s, const double u, const double v) const {
456  return z.get_du(s, u, v);
457  }
458 
459 //------------------------------------------------------------------------------
466 //------------------------------------------------------------------------------
467  double get_dz_dv(const double s, const double u, const double v) const {
468  return z.get_dv(s, u, v);
469  }
470 
471 //------------------------------------------------------------------------------
476 //------------------------------------------------------------------------------
477  double get_phipf(const double s) const {
478  return phipf.get(s);
479  }
480 
481 //------------------------------------------------------------------------------
486 //------------------------------------------------------------------------------
487  double get_chipf(const double s) const {
488  return chipf.get(s);
489  }
490 
491 //------------------------------------------------------------------------------
498 //------------------------------------------------------------------------------
499  double get_bsups(const double s, const double u, const double v) const {
500  return bsups.get(s, u, v);
501  }
502 
503 //------------------------------------------------------------------------------
510 //------------------------------------------------------------------------------
511  double get_bsupu(const double s, const double u, const double v) const {
512  return bsupu.get(s, u, v);
513  }
514 
515 //------------------------------------------------------------------------------
522 //------------------------------------------------------------------------------
523  double get_bsupv(const double s, const double u, const double v) const {
524  return bsupv.get(s, u, v);
525  }
526 
527 //------------------------------------------------------------------------------
534 //------------------------------------------------------------------------------
535  double get_bsubs(const double s, const double u, const double v) const {
536  return bsubs.get(s, u, v);
537  }
538 
539 //------------------------------------------------------------------------------
546 //------------------------------------------------------------------------------
547  double get_bsubu(const double s, const double u, const double v) const {
548  return bsubu.get(s, u, v);
549  }
550 
551 //------------------------------------------------------------------------------
558 //------------------------------------------------------------------------------
559  double get_bsubv(const double s, const double u, const double v) const {
560  return bsubv.get(s, u, v);
561  }
562 
563 //------------------------------------------------------------------------------
570 //------------------------------------------------------------------------------
571  double get_jksups(const double s, const double u, const double v) const {
572  return jksups.get(s, u, v)/(M_PI*4.0E-7);
573  }
574 
575 //------------------------------------------------------------------------------
582 //------------------------------------------------------------------------------
583  double get_jksupu(const double s, const double u, const double v) const {
584  return jksupu.get(s, u, v)/(M_PI*4.0E-7);
585  }
586 
587 //------------------------------------------------------------------------------
594 //------------------------------------------------------------------------------
595  double get_jksupv(const double s, const double u, const double v) const {
596  return jksupv.get(s, u, v)/(M_PI*4.0E-7);
597  }
598 
599 //------------------------------------------------------------------------------
606 //------------------------------------------------------------------------------
607  double get_jbsups(const double s, const double u, const double v) const {
608  return jbsups.get(s, u, v);
609  }
610 
611 //------------------------------------------------------------------------------
618 //------------------------------------------------------------------------------
619  double get_jbsupu(const double s, const double u, const double v) const {
620  return jbsupu.get(s, u, v);
621  }
622 
623 //------------------------------------------------------------------------------
630 //------------------------------------------------------------------------------
631  double get_jbsupv(const double s, const double u, const double v) const {
632  return jbsupv.get(s, u, v);
633  }
634 
635 //------------------------------------------------------------------------------
642 //------------------------------------------------------------------------------
643  double get_jacobian(const double s, const double u, const double v) const {
644  return get_r(s, u, v)*(get_dr_du(s, u, v)*get_z_prime(s, u, v) -
645  get_r_prime(s, u, v)*get_dz_du(s, u, v));
646  }
647 
648 //------------------------------------------------------------------------------
652 //------------------------------------------------------------------------------
653  double get_curtor() const {
654  return curtor;
655  }
656 
657 //------------------------------------------------------------------------------
664 //------------------------------------------------------------------------------
665  double get_djbsups_ds(const double s, const double u, const double v) const {
666  return djbsupsds.get(s, u, v);
667  }
668 
669 //------------------------------------------------------------------------------
676 //------------------------------------------------------------------------------
677  double get_djbsupu_du(const double s, const double u, const double v) const {
678  return jbsupu.get_du(s, u, v);
679  }
680 
681 //------------------------------------------------------------------------------
688 //------------------------------------------------------------------------------
689  double get_djbsupv_dv(const double s, const double u, const double v) const {
690  return jbsupv.get_dv(s, u, v);
691  }
692 
693 //------------------------------------------------------------------------------
700 //------------------------------------------------------------------------------
701  double get_divb(const double s, const double u, const double v) const {
702  return get_djbsups_ds(s,u,v) + get_djbsupu_du(s,u,v) + get_djbsupv_dv(s,u,v);
703  }
704 
705 //------------------------------------------------------------------------------
712 //------------------------------------------------------------------------------
713  double get_pressure(const double s, const double u, const double v) const {
714  return p.get(s,u,v);
715  }
716 
717 //------------------------------------------------------------------------------
722 //------------------------------------------------------------------------------
723  double get_test(const double s) const {
724  return test_full.get(s);
725  }
726 };
727 
728 #endif
Cosine Parity function interface.
Definition: parity.hpp:62
A full grid quantity.
Definition: grid_quantity.hpp:49
A half grid quantity.
Definition: grid_quantity.hpp:80
double get(const double s, const double u, const double v) const
Get a value at a radial s position.
Definition: grid_quantity.hpp:329
double get_du(const double s, const double u, const double v) const
Get a poloidal derivative at a radial s position.
Definition: grid_quantity.hpp:354
double get_dv(const double s, const double u, const double v) const
Get a toroidal derivative at a radial s position.
Definition: grid_quantity.hpp:379
double get(const double s) const
Get a value at a radial s position.
Definition: grid_quantity.hpp:175
Siesta quantities.
Definition: siesta_quantities.hpp:19
double get_z(const double s, const double u, const double v) const
Get Z quantity.
Definition: siesta_quantities.hpp:431
double get_jacobian(const double s, const double u, const double v) const
Get jacobian.
Definition: siesta_quantities.hpp:643
double get_r_prime(const double s, const double u, const double v) const
Get R' quantity.
Definition: siesta_quantities.hpp:395
const siesta_fourier< full_grid, sine > djbsupsds
dJB^sds
Definition: siesta_quantities.hpp:38
double get_bsups(const double s, const double u, const double v) const
Get bsups quantity.
Definition: siesta_quantities.hpp:499
static siesta_grid< full_grid > make_full()
Factory method to make a test quantity.
Definition: siesta_quantities.hpp:102
double get_jksupv(const double s, const double u, const double v) const
Get jksupv quantity.
Definition: siesta_quantities.hpp:595
const siesta_fourier< full_grid, cosine > jksupv
JK^v.
Definition: siesta_quantities.hpp:60
const siesta_fourier< full_grid, cosine > r
r
Definition: siesta_quantities.hpp:24
double get_jksups(const double s, const double u, const double v) const
Get jksups quantity.
Definition: siesta_quantities.hpp:571
siesta_quantities(const std::string &restart_file)
Siesta quantities.
Definition: siesta_quantities.hpp:73
double get_dr_du(const double s, const double u, const double v) const
Get dRdu quantity.
Definition: siesta_quantities.hpp:407
double get_dr_dv(const double s, const double u, const double v) const
Get dRdv quantity.
Definition: siesta_quantities.hpp:419
const siesta_fourier< full_grid, sine > z
z
Definition: siesta_quantities.hpp:28
static double load_scalar(const std::string &restart_file, const std::string &name)
Factory method to load a scalar siesta quantity.
Definition: siesta_quantities.hpp:153
const siesta_fourier< half_grid, cosine > bsupu
JB^u.
Definition: siesta_quantities.hpp:46
double get_djbsups_ds(const double s, const double u, const double v) const
Get djbsupsds quantity.
Definition: siesta_quantities.hpp:665
const siesta_fourier< full_grid, cosine > jksupu
JK^u.
Definition: siesta_quantities.hpp:58
static siesta_fourier< half_grid, PARITY > to_prime(const siesta_fourier< full_grid, PARITY > siesta)
Convert full grid quantity to half grid primed.
Definition: siesta_quantities.hpp:327
const siesta_grid< full_grid > chipf
Radial derivative of poloidal flux.
Definition: siesta_quantities.hpp:34
double get_jbsups(const double s, const double u, const double v) const
Get jbsups quantity.
Definition: siesta_quantities.hpp:607
const siesta_fourier< half_grid, cosine > bsupv
JB^v.
Definition: siesta_quantities.hpp:48
const siesta_fourier< half_grid, sine > jbsups
JB^s.
Definition: siesta_quantities.hpp:36
double get_chipf(const double s) const
Get chipf quantity.
Definition: siesta_quantities.hpp:487
const siesta_fourier< half_grid, cosine > bsubu
B_u.
Definition: siesta_quantities.hpp:52
double get_divb(const double s, const double u, const double v) const
Get divergence of B.
Definition: siesta_quantities.hpp:701
double get_z_prime(const double s, const double u, const double v) const
Get Z' quantity.
Definition: siesta_quantities.hpp:443
const siesta_fourier< half_grid, cosine > jbsupu
JB^u.
Definition: siesta_quantities.hpp:40
const siesta_fourier< half_grid, cosine > drds
drds
Definition: siesta_quantities.hpp:26
const siesta_fourier< half_grid, sine > dzds
dzds
Definition: siesta_quantities.hpp:30
double get_r(const double s, const double u, const double v) const
Get R quantity.
Definition: siesta_quantities.hpp:383
double get_jksupu(const double s, const double u, const double v) const
Get jksupu quantity.
Definition: siesta_quantities.hpp:583
static siesta_fourier< GIRD_CLASS, PARITY > load_fourier(const std::string &restart_file, const std::string &name)
Factory method to load a fourier siesta quantity.
Definition: siesta_quantities.hpp:180
double get_djbsupv_dv(const double s, const double u, const double v) const
Get djbsupvdv quantity.
Definition: siesta_quantities.hpp:689
double get_bsubv(const double s, const double u, const double v) const
Get bsubv quantity.
Definition: siesta_quantities.hpp:559
double get_pressure(const double s, const double u, const double v) const
Get pressure.
Definition: siesta_quantities.hpp:713
const siesta_fourier< half_grid, cosine > jbsupv
JB^v.
Definition: siesta_quantities.hpp:42
static siesta_fourier< full_grid, PARITY > to_prime(const siesta_fourier< half_grid, PARITY > siesta)
Convert full grid quantity to half grid primed.
Definition: siesta_quantities.hpp:354
const siesta_fourier< half_grid, sine > bsubs
B_s.
Definition: siesta_quantities.hpp:50
double get_bsubs(const double s, const double u, const double v) const
Get bsubs quantity.
Definition: siesta_quantities.hpp:535
const siesta_fourier< full_grid, sine > jksups
JK^s.
Definition: siesta_quantities.hpp:56
const siesta_grid< full_grid > phipf
Radial derivative of toroidal flux.
Definition: siesta_quantities.hpp:32
double get_bsupv(const double s, const double u, const double v) const
Get bsupv quantity.
Definition: siesta_quantities.hpp:523
double get_bsupu(const double s, const double u, const double v) const
Get bsupu quantity.
Definition: siesta_quantities.hpp:511
const siesta_fourier< half_grid, cosine > bsubv
B_v.
Definition: siesta_quantities.hpp:54
double get_phipf(const double s) const
Get phipf quantity.
Definition: siesta_quantities.hpp:477
double get_test(const double s) const
Get test quantity.
Definition: siesta_quantities.hpp:723
const siesta_fourier< half_grid, sine > bsups
JB^s.
Definition: siesta_quantities.hpp:44
double get_jbsupu(const double s, const double u, const double v) const
Get jbsupu quantity.
Definition: siesta_quantities.hpp:619
static siesta_grid< GIRD_CLASS > load(const std::string &restart_file, const std::string &name)
Factory method to load a siesta quantity.
Definition: siesta_quantities.hpp:123
double get_dz_dv(const double s, const double u, const double v) const
Get dZdv quantity.
Definition: siesta_quantities.hpp:467
double get_djbsupu_du(const double s, const double u, const double v) const
Get djbsupudu quantity.
Definition: siesta_quantities.hpp:677
const double curtor
Total toroidal current.
Definition: siesta_quantities.hpp:62
double get_curtor() const
Get total toroidal current.
Definition: siesta_quantities.hpp:653
double get_dz_du(const double s, const double u, const double v) const
Get dZdu quantity.
Definition: siesta_quantities.hpp:455
double get_bsubu(const double s, const double u, const double v) const
Get bsubu quantity.
Definition: siesta_quantities.hpp:547
static siesta_fourier< GIRD_CLASS, PARITY > load_fourier_denorm(const std::string &restart_file, const std::string &name)
Factory method to load a fourier denormalized siesta quantity.
Definition: siesta_quantities.hpp:248
const siesta_grid< full_grid > test_full
test function
Definition: siesta_quantities.hpp:22
const siesta_fourier< half_grid, cosine > p
Pressure.
Definition: siesta_quantities.hpp:64
double get_jbsupv(const double s, const double u, const double v) const
Get jbsupv quantity.
Definition: siesta_quantities.hpp:631
Sine Parity function interface.
Definition: parity.hpp:36
Contains classes to interpolate full and half grid quanities.
std::vector< siesta_grid< GRID_CLASS > > siesta_quantity_1d
Type for siesta fourier quantities for a single dimension.
Definition: grid_quantity.hpp:279
std::vector< siesta_quantity_1d< GRID_CLASS > > siesta_quantity
Type for siesta fourier quantities.
Definition: grid_quantity.hpp:283
integer nfp
Number of field periods.
Definition: vmec_input.f:350
integer ntor
Largest value of the toroidal modes.
Definition: vmec_input.f:348
integer mpol
Total number of poloidal modes.
Definition: vmec_input.f:346
program siesta
SIESTA is an ideal MHD equilibrium code that allows for islands and stocastic fields....
Definition: siesta.f90:32