|
The Open FUSION Toolkit 1.0.0-beta5
Modeling tools for plasma and fusion research and engineering
|
Grad-Shafranov implementation for TokaMaker.
Data Types | |
| type | circular_curr |
| Interpolation class for an axisymmetric gaussian source in toroidal geometry. More... | |
| type | coil_region |
| Internal coil region structure. More... | |
| type | cond_region |
| Internal wall region structure. More... | |
| interface | flux_cofs_get |
| Needs Docs. More... | |
| interface | flux_cofs_set |
| Needs Docs. More... | |
| type | flux_func |
| Abstract flux function prototype. More... | |
| interface | flux_func_eval |
| Needs Docs. More... | |
| interface | flux_func_update |
| Needs Docs. More... | |
| type | gs_b_interp |
| Interpolate a Lagrange field. More... | |
| type | gs_eq |
| Grad-Shafranov equilibrium object. More... | |
| type | gs_prof_interp |
| Interpolate G-S profiles at a specific point in space. More... | |
| type | gs_region_info |
| Needs docs. More... | |
| type | gsinv_interp |
| Need docs. More... | |
| interface | region_eta_set |
| Needs Docs. More... | |
Functions/Subroutines | |
| subroutine | build_dels (mat, self, bc, dt, scale) |
| Construct laplacian matrix for Lagrange scalar representation. | |
| subroutine | build_mrop (mat, bc) |
| Construct mass matrix for a boundary Lagrange scalar representation. | |
| subroutine | circle_interp (self, cell, f, gop, val) |
| Evaluate torus source. | |
| subroutine | compute_bcmat (self) |
| Needs Docs. | |
| real(r8) function | dummy_fpp (self, psi) |
| subroutine | get_olbp (olbp) |
| subroutine | gs_analyze_saddles (self, o_point, o_psi, x_point, x_psi) |
| Needs Docs. | |
| subroutine | gs_b_interp_apply (self, cell, f, gop, val) |
| Reconstruct a Grad-Shafranov field. | |
| real(8) function, dimension(3) | gs_beta (self, beta_mr) |
| Compute plasma Beta. | |
| subroutine | gs_coil_mutual (self, icoil, b, mutual) |
| Compute inductance between coil and given poloidal flux. | |
| subroutine | gs_coil_source (self, icoil, b) |
| Needs Docs. | |
| subroutine | gs_cond_source (self, icond, imode, b) |
| Needs Docs. | |
| subroutine | gs_delete (self) |
| Cleanup Grad-Shafranov object internal storage. | |
| subroutine | gs_destroy (self) |
| Initialize Grad-Shafranov solution with the Taylor state. | |
| real(8) function | gs_dflux (self) |
| Compute diamagentic flux. | |
| subroutine | gs_epar (self, psi_lim, epar) |
| Needs Docs. | |
| character(len=40) function | gs_err_reason (ierr) |
| Compute Grad-Shafranov solution for current flux definitions. | |
| real(8) function | gs_estored (self) |
| Compute plasma stored energy. | |
| real(8) function | gs_eta_spitzer (t, lambda) |
| Needs Docs. | |
| subroutine | gs_find_saddle (self, psi_scale_len, psi_x, pt, stype) |
| Needs Docs. | |
| subroutine | gs_find_xpoint (self, psi_x, r, z) |
| Needs Docs. | |
| subroutine | gs_fit_isoflux (self, psi_full, ierr) |
| Compute Grad-Shafranov solution for current flux definitions. | |
| subroutine | gs_fit_walleigs (self, ierr) |
| Compute Grad-Shafranov solution for current flux definitions. | |
| subroutine | gs_fixed_vflux (self, pts, fluxes) |
| Compute required vacuum flux for fixed boundary equilibrium. | |
| subroutine | gs_gen_source (self, source_fun, b) |
| Needs Docs. | |
| subroutine | gs_get_chi (self) |
| Compute flux potential from Grad-Shafranov solution. | |
| subroutine | gs_get_cond_scales (self, vals, skip_fixed) |
| Needs Docs. | |
| subroutine | gs_get_cond_source (self, cond_fac) |
| Needs Docs. | |
| subroutine | gs_get_cond_weights (self, vals, skip_fixed) |
| Needs Docs. | |
| subroutine | gs_get_qprof (gseq, nr, psi_q, prof, dl, rbounds, zbounds, ravgs) |
| subroutine | gs_helicity (self, ener, helic) |
| Compute the magnetic energy and helicity of a fixed boundary equilibrium. | |
| subroutine | gs_init (self) |
| Initialize Grad-Shafranov solution with the Taylor state. | |
| subroutine | gs_init_psi (self, ierr, r0, a, kappa, delta, curr_source) |
| Initialize Grad-Shafranov solution with the Taylor state. | |
| real(8) function | gs_itor (self, psi_vec) |
| Compute toroidal current for Grad-Shafranov equilibrium. | |
| subroutine | gs_itor_nl (self, itor, centroid) |
| Compute toroidal current for Grad-Shafranov equilibrium. | |
| subroutine | gs_li (self, psi_lim, li) |
| Needs Docs. | |
| subroutine | gs_lin_solve (self, adjust_r0, ierr) |
| Compute Grad-Shafranov solution for current flux definitions. | |
| subroutine | gs_load_coils (self, ignore_inmesh) |
| Needs Docs. | |
| subroutine | gs_load_limiters (self) |
| Needs Docs. | |
| subroutine | gs_load_regions (self) |
| Needs Docs. | |
| subroutine | gs_mat_create (new) |
| subroutine | gs_plasma_mutual (self, b, mutual, itor) |
| Compute inductance between plasma current and given poloidal flux. | |
| subroutine | gs_prof_interp_apply (self, cell, f, gop, val) |
| Reconstruct a Grad-Shafranov field. | |
| subroutine | gs_prof_interp_delete (self) |
| subroutine | gs_prof_interp_setup (self) |
| subroutine | gs_psi2pt (self, psi_target, pt, pt_con, vec) |
| Find position of psi along a radial chord. | |
| subroutine | gs_psi2r (self, psi_target, pt) |
| Find position of psi along a radial chord. | |
| subroutine | gs_psimax (self, psi_max, r, z) |
| Needs Docs. | |
| subroutine | gs_save_fgrid (self, filename) |
| Needs Docs. | |
| subroutine | gs_save_fields (self, pts, npts, filename) |
| Compute magnetic fields from Grad-Shafranov equilibrium. | |
| subroutine | gs_save_prof (self, filename, mpsi_sample) |
| Needs Docs. | |
| subroutine | gs_set_cond_weights (self, vals, skip_fixed) |
| Needs Docs. | |
| subroutine | gs_setup_walls (self, skip_load, make_plot) |
| Needs Docs. | |
| subroutine | gs_solve (self, ierr) |
| Compute Grad-Shafranov solution for current flux definitions. | |
| subroutine | gs_source (self, a, b, b2, b3, itor_alam, itor_press, estore) |
| Needs Docs. | |
| logical function | gs_test_bounds (self, pt) |
| Test whether a point is inside the LCFS. | |
| real(8) function | gs_tflux (self) |
| Compute total enclosed toroidal flux. | |
| subroutine | gs_trace_surf (gseq, psi_in, points, npoints) |
| subroutine | gs_update_bounds (self, track_opoint) |
| Needs Docs. | |
| subroutine | gs_vac_solve (self, psi_sol, rhs_source, ierr) |
| Compute Grad-Shafranov solution for vacuum (no plasma) | |
| subroutine | gs_vacuum_solve (self, pol_flux, source, ierr) |
| Compute Grad-Shafranov solution for current flux definitions. | |
| subroutine | gs_wall_source (self, dpsi_dt, b) |
| Needs Docs. | |
| subroutine | gs_zerob (a) |
| Zero a surface Lagrange scalar field at all edge nodes. | |
| subroutine | gsinv_apply (self, cell, f, gop, val) |
| Needs Docs. | |
| subroutine | gsinv_destroy (self) |
| Needs Docs. | |
| subroutine | gsinv_setup (self) |
| Needs Docs. | |
| subroutine | psi2pt_error (m, n, cofs, err, iflag) |
| subroutine | psimax_error (m, n, cofs, err, iflag) |
| subroutine | psimax_error_grad (m, n, cofs, err, jac_mat, ldjac_mat, iflag) |
| subroutine | set_bcmat (self, mat) |
| Needs Docs. | |
Variables | |
| integer(i4) | cell_active = 0 |
| real(r8), parameter | gs_epsilon = 1.d-12 |
| integer(4), parameter | max_xpoints = 20 |
| logical, dimension(:), allocatable | node_flag |
| type(oft_lag_brinterp), pointer | psi_eval_active => NULL() |
| type(oft_lag_bg2interp), pointer | psi_g2eval_active => NULL() |
| type(oft_lag_bginterp), pointer | psi_geval_active => NULL() |
| real(r8) | psi_target_active = 0.d0 |
| real(r8), dimension(2) | pt_con_active = [0.d0,0.d0] |
| real(r8) | qp_int_tol = 1.d-12 |
| real(r8), dimension(2) | vec_con_active = [0.d0,0.d0] |
| subroutine build_dels | ( | class(oft_matrix), intent(inout), pointer | mat, |
| class(gs_eq), intent(inout) | self, | ||
| character(len=*), intent(in) | bc, | ||
| real(8), intent(in), optional | dt, | ||
| real(8), intent(in), optional | scale | ||
| ) |
Construct laplacian matrix for Lagrange scalar representation.
Supported boundary conditions
'none' Full matrix'zerob' Dirichlet for all boundary DOF'grnd' Dirichlet for only groundin point| [in,out] | mat | Matrix object |
| [in] | bc | Boundary condition |
| subroutine build_mrop | ( | class(oft_matrix), intent(inout), pointer | mat, |
| character(len=*), intent(in) | bc | ||
| ) |
Construct mass matrix for a boundary Lagrange scalar representation.
Supported boundary conditions
'none' Full matrix'zerob' Dirichlet for all boundary DOF| [in,out] | mat | Matrix object |
| [in] | bc | Boundary condition |
| subroutine circle_interp | ( | class(circular_curr), intent(inout) | self, |
| integer(i4), intent(in) | cell, | ||
| real(r8), dimension(:), intent(in) | f, | ||
| real(r8), dimension(3,3), intent(in) | gop, | ||
| real(r8), dimension(:), intent(out) | val | ||
| ) |
Evaluate torus source.
| [in] | cell | Cell for interpolation |
| [in] | f | Possition in cell in logical coord [4] |
| [in] | gop | Logical gradient vectors at f [3,4] |
| [out] | val | Reconstructed field at f [1] |
| subroutine compute_bcmat | ( | class(gs_eq), intent(inout) | self | ) |
Needs Docs.
| [in,out] | self | G-S object |
| [in,out] | a | Psi field |
| [in,out] | b | Source field |
| subroutine get_olbp | ( | integer(4), dimension(:), intent(out) | olbp | ) |
| subroutine gs_analyze_saddles | ( | class(gs_eq), intent(inout) | self, |
| real(8), dimension(2), intent(inout) | o_point, | ||
| real(8), intent(out) | o_psi, | ||
| real(8), dimension(2,max_xpoints), intent(out) | x_point, | ||
| real(8), dimension(max_xpoints), intent(out) | x_psi | ||
| ) |
Needs Docs.
| subroutine gs_b_interp_apply | ( | class(gs_b_interp), intent(inout) | self, |
| integer(4), intent(in) | cell, | ||
| real(8), dimension(:), intent(in) | f, | ||
| real(8), dimension(3,3), intent(in) | gop, | ||
| real(8), dimension(:), intent(out) | val | ||
| ) |
Reconstruct a Grad-Shafranov field.
| [in] | cell | Cell for interpolation |
| [in] | f | Possition in cell in logical coord [4] |
| [in] | gop | Logical gradient vectors at f [3,4] |
| [out] | val | Reconstructed field at f [1] |
| real(8) function, dimension(3) gs_beta | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(in), optional | beta_mr | ||
| ) |
Compute plasma Beta.
| [in] | beta_mr | Minor radius for optional calculations |
| subroutine gs_coil_mutual | ( | class(gs_eq), intent(inout) | self, |
| integer(4), intent(in) | icoil, | ||
| class(oft_vector), intent(inout) | b, | ||
| real(8), intent(out) | mutual | ||
| ) |
Compute inductance between coil and given poloidal flux.
| [in,out] | self | G-S solver object |
| [in] | icoil | Coil index for mutual calculation |
| [in,out] | b | \( \psi \) for mutual calculation |
| [out] | mutual | Mutual inductance \( \int I_C \psi dV / I_C \) |
| subroutine gs_coil_source | ( | class(gs_eq), intent(inout) | self, |
| integer(4), intent(in) | icoil, | ||
| class(oft_vector), intent(inout) | b | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| [in,out] | a | Psi field |
| [in,out] | b | Source field |
| subroutine gs_cond_source | ( | class(gs_eq), intent(inout) | self, |
| integer(4), intent(in) | icond, | ||
| integer(4), intent(in) | imode, | ||
| class(oft_vector), intent(inout) | b | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| [in,out] | a | Psi field |
| [in,out] | b | Source field |
| subroutine gs_delete | ( | class(gs_eq), intent(inout) | self | ) |
Cleanup Grad-Shafranov object internal storage.
| [in,out] | self | G-S object |
| subroutine gs_destroy | ( | class(gs_eq), intent(inout) | self | ) |
Initialize Grad-Shafranov solution with the Taylor state.
| [in,out] | self | G-S object |
| real(8) function gs_dflux | ( | class(gs_eq), intent(inout) | self | ) |
Compute diamagentic flux.
| subroutine gs_epar | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(in) | psi_lim, | ||
| real(8), intent(inout) | epar | ||
| ) |
Needs Docs.
| character(len=40) function gs_err_reason | ( | integer(4), intent(in) | ierr | ) |
Compute Grad-Shafranov solution for current flux definitions.
| [in,out] | self | G-S object |
| [out] | ierr | Error flag |
| real(8) function gs_estored | ( | class(gs_eq), intent(inout) | self | ) |
Compute plasma stored energy.
| real(8) function gs_eta_spitzer | ( | real(8), intent(in) | t, |
| real(8), intent(in), optional | lambda | ||
| ) |
Needs Docs.
| subroutine gs_find_saddle | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(in) | psi_scale_len, | ||
| real(8), intent(inout) | psi_x, | ||
| real(8), dimension(2), intent(inout) | pt, | ||
| integer(4), intent(out) | stype | ||
| ) |
Needs Docs.
| subroutine gs_find_xpoint | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(inout) | psi_x, | ||
| real(8), intent(inout) | r, | ||
| real(8), intent(inout) | z | ||
| ) |
Needs Docs.
| subroutine gs_fit_isoflux | ( | class(gs_eq), intent(inout) | self, |
| class(oft_vector), intent(inout), target | psi_full, | ||
| integer(4), intent(out) | ierr | ||
| ) |
Compute Grad-Shafranov solution for current flux definitions.
| [in,out] | self | G-S object |
| [out] | ierr | Error flag |
| subroutine gs_fit_walleigs | ( | class(gs_eq), intent(inout) | self, |
| integer(4), intent(out) | ierr | ||
| ) |
Compute Grad-Shafranov solution for current flux definitions.
| [in,out] | self | G-S object |
| [out] | ierr | Error flag |
| subroutine gs_fixed_vflux | ( | class(gs_eq), intent(inout) | self, |
| real(8), dimension(:,:), intent(inout), pointer | pts, | ||
| real(8), dimension(:), intent(inout), pointer | fluxes | ||
| ) |
Compute required vacuum flux for fixed boundary equilibrium.
| [in,out] | self | G-S object |
| subroutine gs_gen_source | ( | class(gs_eq), intent(inout) | self, |
| class(bfem_interp), intent(inout) | source_fun, | ||
| class(oft_vector), intent(inout) | b | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| [in,out] | a | Psi field |
| [in,out] | b | Source field |
| subroutine gs_get_chi | ( | class(gs_eq), intent(inout) | self | ) |
Compute flux potential from Grad-Shafranov solution.
| [in,out] | self | G-S object |
| subroutine gs_get_cond_scales | ( | class(gs_eq), intent(inout) | self, |
| real(8), dimension(:), intent(inout) | vals, | ||
| logical, intent(in) | skip_fixed | ||
| ) |
Needs Docs.
| subroutine gs_get_cond_source | ( | class(gs_eq), intent(inout) | self, |
| real(8), dimension(:), intent(inout) | cond_fac | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| [in,out] | a | Psi field |
| [in,out] | b | Source field |
| subroutine gs_get_cond_weights | ( | class(gs_eq), intent(inout) | self, |
| real(8), dimension(:), intent(inout) | vals, | ||
| logical, intent(in) | skip_fixed | ||
| ) |
Needs Docs.
| subroutine gs_get_qprof | ( | class(gs_eq), intent(inout) | gseq, |
| integer(4), intent(in) | nr, | ||
| real(8), dimension(nr), intent(in) | psi_q, | ||
| real(8), dimension(nr), intent(out) | prof, | ||
| real(8), intent(out) | dl, | ||
| real(8), dimension(2,2), intent(out) | rbounds, | ||
| real(8), dimension(2,2), intent(out) | zbounds, | ||
| real(8), dimension(nr,2), intent(out), optional | ravgs | ||
| ) |
| subroutine gs_helicity | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(out) | ener, | ||
| real(8), intent(out) | helic | ||
| ) |
Compute the magnetic energy and helicity of a fixed boundary equilibrium.
| [out] | ener | Total magnetic energy |
| [out] | helic | Total magnetic helicity |
| subroutine gs_init | ( | class(gs_eq), intent(inout) | self | ) |
Initialize Grad-Shafranov solution with the Taylor state.
| [in,out] | self | G-S object |
| subroutine gs_init_psi | ( | class(gs_eq), intent(inout) | self, |
| integer(4), intent(out) | ierr, | ||
| real(8), dimension(2), intent(in), optional | r0, | ||
| real(8), intent(in), optional | a, | ||
| real(8), intent(in), optional | kappa, | ||
| real(8), intent(in), optional | delta, | ||
| real(8), dimension(:), intent(in), optional | curr_source | ||
| ) |
Initialize Grad-Shafranov solution with the Taylor state.
| [in,out] | self | G-S object |
| real(8) function gs_itor | ( | class(gs_eq), intent(inout) | self, |
| class(oft_vector), intent(inout), optional | psi_vec | ||
| ) |
Compute toroidal current for Grad-Shafranov equilibrium.
| [in,out] | self | G-S object |
| subroutine gs_itor_nl | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(out) | itor, | ||
| real(8), dimension(2), intent(out), optional | centroid | ||
| ) |
Compute toroidal current for Grad-Shafranov equilibrium.
| [in,out] | self | G-S object |
| [out] | itor | Toroidal current |
| [out] | centroid | Current centroid (optional) [2] |
| subroutine gs_li | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(in) | psi_lim, | ||
| real(8), intent(inout) | li | ||
| ) |
Needs Docs.
| subroutine gs_lin_solve | ( | class(gs_eq), intent(inout) | self, |
| logical, intent(in) | adjust_r0, | ||
| integer(4), intent(out), optional | ierr | ||
| ) |
Compute Grad-Shafranov solution for current flux definitions.
| [in,out] | self | G-S object |
| [out] | ierr | Error flag |
| subroutine gs_load_coils | ( | class(gs_eq), intent(inout) | self, |
| logical, intent(in), optional | ignore_inmesh | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| subroutine gs_load_limiters | ( | class(gs_eq), intent(inout) | self | ) |
Needs Docs.
| [in,out] | self | G-S object |
| subroutine gs_load_regions | ( | class(gs_eq), intent(inout) | self | ) |
Needs Docs.
| [in,out] | self | G-S object |
| subroutine gs_mat_create | ( | class(oft_matrix), intent(out), pointer | new | ) |
| subroutine gs_plasma_mutual | ( | class(gs_eq), intent(inout) | self, |
| class(oft_vector), intent(inout) | b, | ||
| real(8), intent(out) | mutual, | ||
| real(8), intent(out) | itor | ||
| ) |
Compute inductance between plasma current and given poloidal flux.
| [in,out] | self | G-S solver object |
| [in,out] | b | \( \psi \) for mutual calculation |
| [out] | mutual | Mutual inductance \( \int J_p \psi dV / I_p \) |
| [out] | itor | Plasma toroidal current |
| subroutine gs_prof_interp_apply | ( | class(gs_prof_interp), intent(inout) | self, |
| integer(4), intent(in) | cell, | ||
| real(8), dimension(:), intent(in) | f, | ||
| real(8), dimension(3,3), intent(in) | gop, | ||
| real(8), dimension(:), intent(out) | val | ||
| ) |
Reconstruct a Grad-Shafranov field.
| [in] | cell | Cell for interpolation |
| [in] | f | Possition in cell in logical coord [4] |
| [in] | gop | Logical gradient vectors at f [3,4] |
| [out] | val | Reconstructed field at f [1] |
| subroutine gs_prof_interp_delete | ( | class(gs_prof_interp), intent(inout) | self | ) |
| subroutine gs_prof_interp_setup | ( | class(gs_prof_interp), intent(inout) | self | ) |
| subroutine gs_psi2pt | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(in) | psi_target, | ||
| real(8), dimension(2), intent(inout) | pt, | ||
| real(8), dimension(2), intent(in) | pt_con, | ||
| real(8), dimension(2), intent(in) | vec | ||
| ) |
Find position of psi along a radial chord.
| [in,out] | self | G-S object |
| [in] | psi_target | |
| [in,out] | r | |
| [in] | z |
| subroutine gs_psi2r | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(in) | psi_target, | ||
| real(8), dimension(2), intent(inout) | pt | ||
| ) |
Find position of psi along a radial chord.
| [in,out] | self | G-S object |
| [in] | psi_target | |
| [in,out] | r | |
| [in] | z |
| subroutine gs_psimax | ( | class(gs_eq), intent(inout) | self, |
| real(8), intent(inout) | psi_max, | ||
| real(8), intent(inout) | r, | ||
| real(8), intent(inout) | z | ||
| ) |
Needs Docs.
| subroutine gs_save_fgrid | ( | class(gs_eq), intent(inout), target | self, |
| character(len=*), intent(in), optional | filename | ||
| ) |
Needs Docs.
| subroutine gs_save_fields | ( | class(gs_eq), intent(inout) | self, |
| real(8), dimension(2,npts), intent(in) | pts, | ||
| integer(4), intent(in) | npts, | ||
| character(len=*), intent(in) | filename | ||
| ) |
Compute magnetic fields from Grad-Shafranov equilibrium.
| [in,out] | self | G-S object |
| [in] | pts | Sampling locations [2,npts] |
| [in] | npts | Number of points to sample |
| [in] | filename | Output file for field data |
| subroutine gs_save_prof | ( | class(gs_eq), intent(inout), target | self, |
| character(len=*), intent(in) | filename, | ||
| integer(4), intent(in), optional | mpsi_sample | ||
| ) |
Needs Docs.
| subroutine gs_set_cond_weights | ( | class(gs_eq), intent(inout) | self, |
| real(8), dimension(:), intent(in) | vals, | ||
| logical, intent(in) | skip_fixed | ||
| ) |
Needs Docs.
| subroutine gs_setup_walls | ( | class(gs_eq), intent(inout) | self, |
| logical, intent(in), optional | skip_load, | ||
| logical, intent(in), optional | make_plot | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| subroutine gs_solve | ( | class(gs_eq), intent(inout) | self, |
| integer(4), intent(out), optional | ierr | ||
| ) |
Compute Grad-Shafranov solution for current flux definitions.
| [in,out] | self | G-S object |
| [out] | ierr | Error flag |
| subroutine gs_source | ( | class(gs_eq), intent(inout) | self, |
| class(oft_vector), intent(inout), target | a, | ||
| class(oft_vector), intent(inout) | b, | ||
| class(oft_vector), intent(inout) | b2, | ||
| class(oft_vector), intent(inout) | b3, | ||
| real(8), intent(out) | itor_alam, | ||
| real(8), intent(out) | itor_press, | ||
| real(8), intent(out) | estore | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| [in,out] | a | Psi field |
| [in,out] | b | Source field |
| logical function gs_test_bounds | ( | class(gs_eq), intent(inout) | self, |
| real(8), dimension(2), intent(in) | pt | ||
| ) |
Test whether a point is inside the LCFS.
| [in,out] | self | G-S object |
| [in] | pt | Location to test in/out of plasma |
| real(8) function gs_tflux | ( | class(gs_eq), intent(inout) | self | ) |
Compute total enclosed toroidal flux.
| subroutine gs_trace_surf | ( | class(gs_eq), intent(inout) | gseq, |
| real(8), intent(in) | psi_in, | ||
| real(8), dimension(:,:), intent(out), pointer | points, | ||
| integer(4), intent(out) | npoints | ||
| ) |
| subroutine gs_update_bounds | ( | class(gs_eq), intent(inout) | self, |
| logical, intent(in), optional | track_opoint | ||
| ) |
Needs Docs.
| subroutine gs_vac_solve | ( | class(gs_eq), intent(inout) | self, |
| class(oft_vector), intent(inout) | psi_sol, | ||
| class(bfem_interp), intent(inout), optional | rhs_source, | ||
| integer(4), intent(out), optional | ierr | ||
| ) |
Compute Grad-Shafranov solution for vacuum (no plasma)
| [in,out] | self | G-S object |
| [in,out] | psi_sol | Input: BCs for \( \psi \), Output: solution |
| [in,out] | rhs_source | Specified current source (optional) |
| [out] | ierr | Error flag |
| subroutine gs_vacuum_solve | ( | class(gs_eq), intent(inout) | self, |
| class(oft_vector), intent(inout) | pol_flux, | ||
| class(oft_vector), intent(inout) | source, | ||
| integer(4), intent(out), optional | ierr | ||
| ) |
Compute Grad-Shafranov solution for current flux definitions.
| [in,out] | self | G-S object |
| [out] | ierr | Error flag |
| subroutine gs_wall_source | ( | class(gs_eq), intent(inout) | self, |
| class(oft_vector), intent(inout) | dpsi_dt, | ||
| class(oft_vector), intent(inout) | b | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| subroutine gs_zerob | ( | class(oft_vector), intent(inout) | a | ) |
Zero a surface Lagrange scalar field at all edge nodes.
| [in,out] | a | Field to be zeroed |
| subroutine gsinv_apply | ( | class(gsinv_interp), intent(inout) | self, |
| integer(4), intent(in) | cell, | ||
| real(8), dimension(:), intent(in) | f, | ||
| real(8), dimension(3,3), intent(in) | gop, | ||
| real(8), dimension(:), intent(out) | val | ||
| ) |
Needs Docs.
| subroutine gsinv_destroy | ( | class(gsinv_interp), intent(inout) | self | ) |
Needs Docs.
| subroutine gsinv_setup | ( | class(gsinv_interp), intent(inout) | self | ) |
Needs Docs.
| subroutine psi2pt_error | ( | integer(4), intent(in) | m, |
| integer(4), intent(in) | n, | ||
| real(8), dimension(n), intent(in) | cofs, | ||
| real(8), dimension(m), intent(out) | err, | ||
| integer(4), intent(inout) | iflag | ||
| ) |
| subroutine psimax_error | ( | integer(4), intent(in) | m, |
| integer(4), intent(in) | n, | ||
| real(8), dimension(n), intent(in) | cofs, | ||
| real(8), dimension(m), intent(out) | err, | ||
| integer(4), intent(inout) | iflag | ||
| ) |
| subroutine psimax_error_grad | ( | integer(4), intent(in) | m, |
| integer(4), intent(in) | n, | ||
| real(8), dimension(n), intent(in) | cofs, | ||
| real(8), dimension(m), intent(out) | err, | ||
| real(8), dimension(ldjac_mat,n), intent(out) | jac_mat, | ||
| integer(4), intent(in) | ldjac_mat, | ||
| integer(4), intent(in) | iflag | ||
| ) |
| subroutine set_bcmat | ( | class(gs_eq), intent(inout) | self, |
| class(oft_matrix), intent(inout) | mat | ||
| ) |
Needs Docs.
| [in,out] | self | G-S object |
| [in,out] | a | Psi field |
| [in,out] | b | Source field |
| integer(i4) cell_active = 0 |
| real(r8), parameter gs_epsilon = 1.d-12 |
| integer(4), parameter max_xpoints = 20 |
| logical, dimension(:), allocatable node_flag |
| type(oft_lag_brinterp), pointer psi_eval_active => NULL() |
| type(oft_lag_bg2interp), pointer psi_g2eval_active => NULL() |
| type(oft_lag_bginterp), pointer psi_geval_active => NULL() |
| real(r8) psi_target_active = 0.d0 |
| real(r8), dimension(2) pt_con_active = [0.d0,0.d0] |
| real(r8) qp_int_tol = 1.d-12 |
| real(r8), dimension(2) vec_con_active = [0.d0,0.d0] |