![]() |
The Open FUSION Toolkit 1.0.0-6f445ef
An open-source framework for fusion and plasma science and engineering
|
Fortran part of Python wrapper for Grad-Shafranov functionality.
Data Types | |
| type | tokamaker_instance |
| Needs docs. More... | |
| type | tokamaker_recon_settings_type |
| Needs docs. More... | |
| type | tokamaker_settings_type |
| Needs docs. More... | |
Functions/Subroutines | |
| subroutine | tokamaker_alloc (tmaker_ptr, mesh_ptr, error_str) |
| Needs docs. | |
| subroutine | tokamaker_apply_field_eval (tmaker_equil_ptr, int_obj, int_type, pt, fbary_tol, cell, dim, field) |
| Evaluate a TokaMaker field with an interpolation object created by tokamaker_f::tokamaker_get_field_eval. | |
| subroutine | tokamaker_area_int (tmaker_ptr, vec_vals, reg_ind, result, error_str) |
| Compute area integral of a scalar field over a specified region. | |
| logical function | tokamaker_ccast (tmaker_cptr, tmaker_obj, error_str) |
| Needs docs. | |
| subroutine | tokamaker_destroy (tmaker_ptr, error_str) |
| Needs docs. | |
| subroutine | tokamaker_eig_td (tmaker_ptr, omega, neigs, eigs, eig_vecs, include_bounds, eta_plasma, pm, error_str) |
| Needs docs. | |
| subroutine | tokamaker_eig_wall (tmaker_ptr, neigs, eigs, eig_vecs, pm, error_str) |
| Needs docs. | |
| logical function | tokamaker_equil_ccast (tmaker_equil_cptr, tmaker_equil_obj, error_str) |
| Evaluate Green's function for axisymmetric toroidal current loop. | |
| subroutine | tokamaker_equil_copy (tmaker_ptr, old_equil_ptr, new_equil_ptr, error_str) |
| Needs docs. | |
| subroutine | tokamaker_equil_destroy (tmaker_equil_ptr, error_str) |
| Needs docs. | |
| subroutine | tokamaker_equil_set (tmaker_ptr, new_equil_ptr, error_str) |
| Needs docs. | |
| subroutine | tokamaker_eval_green (n, r, z, rc, zc, vals) |
| Needs docs. | |
| subroutine | tokamaker_flux_int (tmaker_equil_ptr, psi_vals, field_vals, nvals, result, error_str) |
| Compute the area integral of a flux function over the plasma region. | |
| subroutine | tokamaker_get_coil_currents (tmaker_equil_ptr, currents, reg_currents, error_str) |
| Get coil currents. | |
| subroutine | tokamaker_get_dels_curr (tmaker_equil_ptr, psi_vals, error_str) |
| Needs docs. | |
| subroutine | tokamaker_get_field_eval (tmaker_equil_ptr, imode, int_obj, error_str) |
| Create an interpolation object for tokamaker fields. | |
| subroutine | tokamaker_get_globals (tmaker_equil_ptr, itor, centroid, vol, pvol, dflux, tflux, bp_vol, error_str) |
| Compute various global quantities for Grad-Shafranov equilibrium. | |
| subroutine | tokamaker_get_jtor (tmaker_equil_ptr, jtor, error_str) |
| Needs docs. | |
| subroutine | tokamaker_get_limiter (tmaker_ptr, np, r_loc, nloops, loop_ptr, error_str) |
| Needs docs. | |
| subroutine | tokamaker_get_mesh (tmaker_ptr, np, r_loc, nc, lc_loc, reg_loc, error_str) |
| Needs docs. | |
| subroutine | tokamaker_get_plasma_lmat (tmaker_equil_ptr, lmat, error_str) |
| Get mutual inductance matrix for coils and plasma. | |
| subroutine | tokamaker_get_profs (tmaker_equil_ptr, npsi, psi_in, f, fp, p, pp, error_str) |
| Retrieve F and P profiles and their derivatives. | |
| subroutine | tokamaker_get_psi (tmaker_equil_ptr, psi_vals, psi_lim, psi_max, error_str) |
| Needs docs. | |
| subroutine | tokamaker_get_q (tmaker_equil_ptr, npsi, psi_q, qvals, ravgs, dl, rbounds, zbounds, error_str) |
| Compute q profile and related quantities. | |
| subroutine | tokamaker_get_refs (tmaker_equil_ptr, o_point, lim_point, x_points, diverted, plasma_bounds, ffp_scale, p_scale, has_plasma, error_str) |
| Get references to internal variables for direct access from Python. | |
| subroutine | tokamaker_get_vfixed (tmaker_equil_ptr, npts, pts, fluxes, error_str) |
| Compute external flux needed to reproduce fixed boundary equilibrium at domain boundary. | |
| subroutine | tokamaker_gs_calc_vloop (tmaker_equil_ptr, vloop, error_str) |
| Compute loop voltage required to maintain Grad-Shafranov equilibrium. | |
| subroutine | tokamaker_init_psi (tmaker_ptr, r0, z0, a, kappa, delta, rhs_source, error_str) |
| Needs docs. | |
| subroutine | tokamaker_load_profiles (tmaker_equil_ptr, f_file, f_offset, p_file, eta_file, f_ni_file, error_str) |
| Load profile specification files. | |
| subroutine | tokamaker_recon_run (tmaker_ptr, vacuum, settings, error_flag) |
| Needs docs. | |
| logical function | tokamaker_require_equil (tmaker_obj, error_str) |
| Needs docs. | |
| subroutine | tokamaker_sauter_fc (tmaker_equil_ptr, npsi, psi_saut, fc, r_avgs, modb_avgs, error_str) |
| Evaluate Sauter trapped particle fraction and related quantities. | |
| subroutine | tokamaker_save_eqdsk (tmaker_equil_ptr, filename, nr, nz, rbounds, zbounds, run_info, psi_pad, rcentr, trunc_eq, lim_filename, lcfs_press, cocos, error_str) |
| Needs docs. | |
| subroutine | tokamaker_save_ifile (tmaker_equil_ptr, filename, npsi, ntheta, psi_pad, lcfs_press, pack_lcfs, single_prec, error_str) |
| Needs docs. | |
| subroutine | tokamaker_save_mug (tmaker_equil_ptr, filename, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_coil_bounds (tmaker_ptr, coil_bounds, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_coil_current_dist (tmaker_ptr, icoil, curr_dist, dist_pointer, normalize, error_str) |
| Overwrites default coil flux contribution to non-uniform current distribution. | |
| subroutine | tokamaker_set_coil_currents (tmaker_ptr, currents, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_coil_regmat (tmaker_ptr, nregularize, coil_reg_mat, coil_reg_targets, coil_reg_weights, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_coil_vsc (tmaker_ptr, coil_gains, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_dipole_a (tmaker_ptr, dipole_a, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_flux (tmaker_ptr, locations, targets, weights, ntargets, grad_wt_lim, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_isoflux (tmaker_ptr, targets, ref_points, weights, ntargets, grad_wt_lim, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_mirror_slosh (tmaker_ptr, mirror_n, mirror_bturn, mirror_zthroat, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_psi (tmaker_equil_ptr, psi_vals, update_bounds, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_psi_dt (tmaker_ptr, psi_vals, icoils, vcoils, dt, error_str) |
| Set flux/coil current at previous time and coil voltage for quasi-static solve. | |
| subroutine | tokamaker_set_saddles (tmaker_ptr, targets, weights, ntargets, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_settings (tmaker_ptr, settings, error_str) |
| Update TokaMaker settings. | |
| subroutine | tokamaker_set_targets (tmaker_ptr, ip_target, ip_ratio_target, pax_target, estore_target, r0_target, v0_target, error_str) |
| Needs docs. | |
| subroutine | tokamaker_set_vcoil (tmaker_ptr, rcoils, error_str) |
| Set Vcoils by defining non-zero resistance of coils. | |
| subroutine | tokamaker_setup (tmaker_ptr, order, full_domain, ncoils, coil_lmat, error_str) |
| Needs docs. | |
| subroutine | tokamaker_setup_regions (tmaker_ptr, coil_file, reg_eta, contig_flag, xpoint_mask, coil_nturns, ncoils, error_str) |
| Needs docs. | |
| subroutine | tokamaker_setup_td (tmaker_ptr, dt, lin_tol, nl_tol, pre_plasma, error_str) |
| Needs docs. | |
| subroutine | tokamaker_solve (tmaker_ptr, vacuum, error_str) |
| Needs docs. | |
| subroutine | tokamaker_step_td (tmaker_ptr, curr_ptr, volt_ptr, time, dt, nl_its, lin_its, nretry, error_str) |
| Needs docs. | |
| subroutine | tokamaker_trace_surf (tmaker_equil_ptr, psi_surf, points, npoints, error_str) |
| Needs docs. | |
| subroutine | tokamaker_vac_solve (tmaker_ptr, psi_in, rhs_source, error_str) |
| Needs docs. | |
| subroutine tokamaker_alloc | ( | type(c_ptr), intent(out) | tmaker_ptr, |
| type(c_ptr), intent(in), value | mesh_ptr, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out), optional | error_str | ||
| ) |
Needs docs.
| [out] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | mesh_ptr | Pointer to mesh object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_apply_field_eval | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(in), value | int_obj, | ||
| integer(c_int), intent(in), value | int_type, | ||
| real(c_double), dimension(3), intent(in) | pt, | ||
| real(c_double), intent(in), value | fbary_tol, | ||
| integer(c_int), intent(inout) | cell, | ||
| integer(c_int), intent(in), value | dim, | ||
| real(c_double), dimension(dim), intent(out) | field | ||
| ) |
Evaluate a TokaMaker field with an interpolation object created by tokamaker_f::tokamaker_get_field_eval.
| [in] | tmaker_equil_ptr | TokaMaker equilibrium instance |
| [in] | int_obj | Pointer to interpolation object |
| [in] | int_type | Field type (negative to destroy) |
| [in] | pt | Location for evaluation [R,Z,0] |
| [in] | fbary_tol | Tolerance for physical to logical mapping |
| [in,out] | cell | Cell containing pt (starting guess on input) |
| [in] | dim | Dimension of field |
| [out] | field | Field at pt |
| subroutine tokamaker_area_int | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | vec_vals, | ||
| integer(c_int), intent(in), value | reg_ind, | ||
| real(c_double), intent(out) | result, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Compute area integral of a scalar field over a specified region.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | vec_vals | Value of integrand at node points |
| [in] | reg_ind | Index of region to integrate over (reg_ind < 0 -> full domain) |
| [out] | result | \( \int f dA \) |
| [out] | error_str | Error string (empty if no error) |
| logical function tokamaker_ccast | ( | type(c_ptr), intent(in) | tmaker_cptr, |
| type(tokamaker_instance), intent(out), pointer | tmaker_obj, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out), optional | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_cptr | C pointer to TokaMaker object |
| [out] | tmaker_obj | Fortran TokaMaker object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_destroy | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_eig_td | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), intent(in), value | omega, | ||
| integer(c_int), intent(in), value | neigs, | ||
| type(c_ptr), intent(in), value | eigs, | ||
| type(c_ptr), intent(in), value | eig_vecs, | ||
| logical(c_bool), intent(in), value | include_bounds, | ||
| real(c_double), intent(in), value | eta_plasma, | ||
| logical(c_bool), intent(in), value | pm, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | omega | Shift parameter for eigenvalue solve |
| [in] | neigs | Number of eigenvalues to compute |
| [in] | eigs | Eigenvalues array |
| [in] | eig_vecs | Eigenvectors array |
| [in] | include_bounds | Include boundary conditions |
| [in] | eta_plasma | Plasma resistivity |
| [in] | pm | Report solver progress? |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_eig_wall | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| integer(c_int), intent(in), value | neigs, | ||
| type(c_ptr), intent(in), value | eigs, | ||
| type(c_ptr), intent(in), value | eig_vecs, | ||
| logical(c_bool), intent(in), value | pm, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | neigs | Number of eigenvalues to compute |
| [in] | eigs | Eigenvalues array |
| [in] | eig_vecs | Eigenvectors array |
| [in] | pm | Report solver progress? |
| [out] | error_str | Error string (empty if no error) |
| logical function tokamaker_equil_ccast | ( | type(c_ptr), intent(in) | tmaker_equil_cptr, |
| type(gs_equil), intent(out), pointer | tmaker_equil_obj, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out), optional | error_str | ||
| ) |
Evaluate Green's function for axisymmetric toroidal current loop.
| [in] | tmaker_equil_cptr | C pointer to TokaMaker equilibrium object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_equil_copy | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | old_equil_ptr, | ||
| type(c_ptr), intent(out) | new_equil_ptr, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out), optional | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | old_equil_ptr | Pointer to old equilibrium object |
| [out] | new_equil_ptr | Pointer to new equilibrium object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_equil_destroy | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_equil_set | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | new_equil_ptr, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out), optional | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | new_equil_ptr | Pointer to old equilibrium object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_eval_green | ( | integer(c_int), intent(in), value | n, |
| type(c_ptr), intent(in), value | r, | ||
| type(c_ptr), intent(in), value | z, | ||
| real(c_double), intent(in), value | rc, | ||
| real(c_double), intent(in), value | zc, | ||
| type(c_ptr), intent(in), value | vals | ||
| ) |
Needs docs.
| [in] | n | Number of evaluation points |
| [in] | rc | R coordinate of coil |
| [in] | zc | Z coordinate of coil |
| [in] | r | R coordinates for evaluation |
| [in] | z | Z coordinates for evaluation |
| [in] | vals | Psi values |
| subroutine tokamaker_flux_int | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(in), value | psi_vals, | ||
| type(c_ptr), intent(in), value | field_vals, | ||
| integer(c_int), intent(in), value | nvals, | ||
| real(c_double), intent(out) | result, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Compute the area integral of a flux function over the plasma region.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | psi_vals | \( \psi \) values for flux function definition |
| [in] | field_vals | Value of the flux function at matching psi_vals |
| [in] | nvals | Number of values in psi_vals and field_vals |
| [out] | result | Integral result |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_coil_currents | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(in), value | currents, | ||
| type(c_ptr), intent(in), value | reg_currents, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Get coil currents.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | currents | Coil currents by coil index |
| [in] | reg_currents | Currents in each region due to coils |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_dels_curr | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(in), value | psi_vals, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | psi_vals | \( \psi \) at node points |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_field_eval | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| integer(kind=c_int), intent(in), value | imode, | ||
| type(c_ptr), intent(out) | int_obj, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Create an interpolation object for tokamaker fields.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker object |
| [in] | imode | Field type |
| [out] | int_obj | Pointer to interpolation object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_globals | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| real(c_double), intent(out) | itor, | ||
| real(c_double), dimension(2), intent(out) | centroid, | ||
| real(c_double), intent(out) | vol, | ||
| real(c_double), intent(out) | pvol, | ||
| real(c_double), intent(out) | dflux, | ||
| real(c_double), intent(out) | tflux, | ||
| real(c_double), intent(out) | bp_vol, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Compute various global quantities for Grad-Shafranov equilibrium.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [out] | itor | Toroidal current |
| [out] | centroid | Plasma current centroid (R,Z) |
| [out] | vol | Plasma volume |
| [out] | pvol | \( \int P dV \) |
| [out] | dflux | Diamagnetic flux |
| [out] | tflux | Toroidal flux contained within plasma |
| [out] | bp_vol | \( \int B_p^2 dV \) |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_jtor | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(in), value | jtor, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | jtor | \( J_{\phi} \) at node points |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_limiter | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| integer(c_int), intent(out) | np, | ||
| type(c_ptr), intent(out) | r_loc, | ||
| integer(c_int), intent(out) | nloops, | ||
| type(c_ptr), intent(out) | loop_ptr, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [out] | r_loc | Limiter vertex list pointer |
| [out] | loop_ptr | Limiter loops pointer |
| [out] | np | Number of limiter vertices |
| [out] | nloops | Number of limiter loops |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_mesh | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| integer(c_int), intent(out) | np, | ||
| type(c_ptr), intent(out) | r_loc, | ||
| integer(c_int), intent(out) | nc, | ||
| type(c_ptr), intent(out) | lc_loc, | ||
| type(c_ptr), intent(out) | reg_loc, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [out] | lc_loc | Cell list pointer |
| [out] | r_loc | Vertex list pointer |
| [out] | reg_loc | Region ID pointer |
| [out] | np | Number of vertices |
| [out] | nc | Number of cells |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_plasma_lmat | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(in), value | lmat, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Get mutual inductance matrix for coils and plasma.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | lmat | Inductance matrix |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_profs | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| integer(c_int), intent(in), value | npsi, | ||
| real(c_double), dimension(npsi), intent(in) | psi_in, | ||
| real(c_double), dimension(npsi), intent(out) | f, | ||
| real(c_double), dimension(npsi), intent(out) | fp, | ||
| real(c_double), dimension(npsi), intent(out) | p, | ||
| real(c_double), dimension(npsi), intent(out) | pp, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Retrieve F and P profiles and their derivatives.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | npsi | Evaluation points |
| [in] | psi_in | \( \psi \) values to evaluate profiles |
| [out] | f | \( F( \psi ) \) |
| [out] | fp | \( F'( \psi ) \) |
| [out] | p | \( P( \psi ) \) |
| [out] | pp | \( P'( \psi ) \) |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_psi | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(in), value | psi_vals, | ||
| real(c_double), intent(out) | psi_lim, | ||
| real(c_double), intent(out) | psi_max, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | psi_vals | \( \psi \) values at node points |
| [out] | psi_lim | Psi value at plasma boundary |
| [out] | psi_max | Psi value at magnetic axis |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_q | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| integer(c_int), intent(in), value | npsi, | ||
| real(c_double), dimension(npsi), intent(in) | psi_q, | ||
| real(c_double), dimension(npsi), intent(out) | qvals, | ||
| real(c_double), dimension(npsi,3), intent(out) | ravgs, | ||
| real(c_double), intent(inout) | dl, | ||
| real(c_double), dimension(2,2), intent(out) | rbounds, | ||
| real(c_double), dimension(2,2), intent(out) | zbounds, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Compute q profile and related quantities.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | npsi | Number of evaluation points |
| [in] | psi_q | \( \psi \) values to compute q and other fields |
| [out] | qvals | q values |
| [out] | ravgs | <R>, <1/R>, and dV/dPsi |
| [in,out] | dl | Length of LCFS flux surface (psi_q(1)) |
| [out] | rbounds | Radial bounds of LCFS |
| [out] | zbounds | Vertical bounds of LCFS |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_refs | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(out) | o_point, | ||
| type(c_ptr), intent(out) | lim_point, | ||
| type(c_ptr), intent(out) | x_points, | ||
| type(c_ptr), intent(out) | diverted, | ||
| type(c_ptr), intent(out) | plasma_bounds, | ||
| type(c_ptr), intent(out) | ffp_scale, | ||
| type(c_ptr), intent(out) | p_scale, | ||
| type(c_ptr), intent(out) | has_plasma, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Get references to internal variables for direct access from Python.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [out] | o_point | Pointer to magnetic axis array |
| [out] | lim_point | Pointer to limiting point array |
| [out] | x_points | Pointer to X-point array |
| [out] | diverted | Pointer to diverted flag |
| [out] | plasma_bounds | Pointer to plasma axis/LCFS values |
| [out] | ffp_scale | Pointer to F*F' scale factor |
| [out] | p_scale | Pointer to P' scale factor |
| [out] | has_plasma | Pointer to plasma/vacuum flag |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_get_vfixed | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| integer(c_int), intent(out) | npts, | ||
| type(c_ptr), intent(out) | pts, | ||
| type(c_ptr), intent(out) | fluxes, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Compute external flux needed to reproduce fixed boundary equilibrium at domain boundary.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [out] | npts | Number of node points on domain boundary |
| [out] | pts | Location of node points on domain boundary |
| [out] | fluxes | Required flux at node points |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_gs_calc_vloop | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| real(c_double), intent(out) | vloop, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Compute loop voltage required to maintain Grad-Shafranov equilibrium.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [out] | vloop | Loop voltage |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_init_psi | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), intent(in), value | r0, | ||
| real(c_double), intent(in), value | z0, | ||
| real(c_double), intent(in), value | a, | ||
| real(c_double), intent(in), value | kappa, | ||
| real(c_double), intent(in), value | delta, | ||
| type(c_ptr), intent(in), value | rhs_source, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | r0 | Major radius |
| [in] | z0 | Vertical position |
| [in] | a | Minor radius |
| [in] | kappa | Elongation |
| [in] | delta | Triangularity |
| [in] | rhs_source | Current source term (optional) |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_load_profiles | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| character(kind=c_char), dimension(oft_path_slen), intent(in) | f_file, | ||
| real(c_double), intent(in), value | f_offset, | ||
| character(kind=c_char), dimension(oft_path_slen), intent(in) | p_file, | ||
| character(kind=c_char), dimension(oft_path_slen), intent(in) | eta_file, | ||
| character(kind=c_char), dimension(oft_path_slen), intent(in) | f_ni_file, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Load profile specification files.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | f_file | F*F' prof.in file |
| [in] | p_file | P' prof.in file |
| [in] | f_offset | Vacuum F_0 value (must be > -1E98 to update) |
| [in] | eta_file | Resistivity (eta) profile specification file |
| [in] | f_ni_file | Non-inductive F*F' profile specification file |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_recon_run | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| logical(c_bool), intent(in), value | vacuum, | ||
| type(tokamaker_recon_settings_type), intent(in) | settings, | ||
| integer(c_int), intent(out) | error_flag | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | vacuum | Needs docs |
| [in] | settings | Needs docs |
| [out] | error_flag | Needs docs |
| logical function tokamaker_require_equil | ( | type(tokamaker_instance), intent(in) | tmaker_obj, |
| character(kind=c_char), dimension(oft_error_slen), intent(out), optional | error_str | ||
| ) |
Needs docs.
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_sauter_fc | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| integer(c_int), intent(in), value | npsi, | ||
| real(c_double), dimension(npsi), intent(in) | psi_saut, | ||
| real(c_double), dimension(npsi), intent(out) | fc, | ||
| real(c_double), dimension(npsi,3), intent(out) | r_avgs, | ||
| real(c_double), dimension(npsi,2), intent(out) | modb_avgs, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Evaluate Sauter trapped particle fraction and related quantities.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | npsi | Number of evaluation points |
| [in] | psi_saut | \( \psi \) values to compute trapped particle fraction and other fields |
| [out] | fc | Trapped particle fraction |
| [out] | r_avgs | Flux surface averaged radial coordinates \(<R>\), \(<1/R>\), \(<a>\) |
| [out] | modb_avgs | Flux surface averaged field strength \(<|B|>\), \(<|B|^2>\) |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_save_eqdsk | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| character(kind=c_char), dimension(oft_path_slen), intent(in) | filename, | ||
| integer(c_int), intent(in), value | nr, | ||
| integer(c_int), intent(in), value | nz, | ||
| real(c_double), dimension(2), intent(in) | rbounds, | ||
| real(c_double), dimension(2), intent(in) | zbounds, | ||
| character(kind=c_char), dimension(40), intent(in) | run_info, | ||
| real(c_double), intent(in), value | psi_pad, | ||
| real(c_double), intent(in), value | rcentr, | ||
| logical(c_bool), intent(in), value | trunc_eq, | ||
| character(kind=c_char), dimension(oft_path_slen), intent(in) | lim_filename, | ||
| real(c_double), intent(in), value | lcfs_press, | ||
| integer(c_int), intent(in), value | cocos, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | TokaMaker equilibrium instance |
| [in] | filename | Needs docs |
| [in] | run_info | Needs docs |
| [in] | nr | Needs docs |
| [in] | nz | Needs docs |
| [in] | rbounds | Needs docs |
| [in] | zbounds | Needs docs |
| [in] | psi_pad | Needs docs |
| [in] | rcentr | Needs docs |
| [in] | trunc_eq | Needs docs |
| [in] | lim_filename | Needs docs |
| [in] | lcfs_press | Needs docs |
| [in] | cocos | COCOS version. (Only 2 or 7 supported. COCOS=7 is the default.) |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_save_ifile | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| character(kind=c_char), dimension(oft_path_slen), intent(in) | filename, | ||
| integer(c_int), intent(in), value | npsi, | ||
| integer(c_int), intent(in), value | ntheta, | ||
| real(c_double), intent(in), value | psi_pad, | ||
| real(c_double), intent(in), value | lcfs_press, | ||
| logical(c_bool), intent(in), value | pack_lcfs, | ||
| logical(c_bool), intent(in), value | single_prec, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | TokaMaker equilibrium instance |
| [in] | filename | Needs docs |
| [in] | npsi | Needs docs |
| [in] | ntheta | Needs docs |
| [in] | psi_pad | Needs docs |
| [in] | lcfs_press | Needs docs |
| [in] | pack_lcfs | Needs docs |
| [in] | single_prec | Needs docs |
| [out] | error_str | Needs docs |
| subroutine tokamaker_save_mug | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| character(kind=c_char), dimension(oft_path_slen), intent(in) | filename, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | TokaMaker equilibrium instance |
| [in] | filename | Needs docs |
| [out] | error_str | Needs docs |
| subroutine tokamaker_set_coil_bounds | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | coil_bounds, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | coil_bounds | Needs docs |
| [out] | error_str | Error information |
| subroutine tokamaker_set_coil_current_dist | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| integer(c_int), intent(in), value | icoil, | ||
| type(c_ptr), intent(in), value | curr_dist, | ||
| type(c_ptr), intent(out) | dist_pointer, | ||
| logical(c_bool), intent(in), value | normalize, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Overwrites default coil flux contribution to non-uniform current distribution.
| [in] | tmaker_ptr | TokaMaker instance |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_coil_currents | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | currents, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | currents | Needs docs |
| [out] | error_str | Error information |
| subroutine tokamaker_set_coil_regmat | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| integer(c_int), intent(in), value | nregularize, | ||
| type(c_ptr), intent(in), value | coil_reg_mat, | ||
| type(c_ptr), intent(in), value | coil_reg_targets, | ||
| type(c_ptr), intent(in), value | coil_reg_weights, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | nregularize | Needs docs |
| [in] | coil_reg_mat | Needs docs |
| [in] | coil_reg_targets | Needs docs |
| [in] | coil_reg_weights | Needs docs |
| [out] | error_str | Error information |
| subroutine tokamaker_set_coil_vsc | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | coil_gains, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | coil_gains | Needs docs |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_dipole_a | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), intent(in), value | dipole_a, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | dipole_a | New value for dipole_a |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_flux | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), dimension(2,ntargets), intent(in) | locations, | ||
| real(c_double), dimension(ntargets), intent(in) | targets, | ||
| real(c_double), dimension(ntargets), intent(in) | weights, | ||
| integer(c_int), intent(in), value | ntargets, | ||
| real(c_double), intent(in), value | grad_wt_lim, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | ntargets | Needs docs |
| [in] | locations | Needs docs |
| [in] | targets | Needs docs |
| [in] | weights | Needs docs |
| [in] | grad_wt_lim | Needs docs |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_isoflux | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), dimension(2,ntargets), intent(in) | targets, | ||
| real(c_double), dimension(2,ntargets), intent(in) | ref_points, | ||
| real(c_double), dimension(ntargets), intent(in) | weights, | ||
| integer(c_int), intent(in), value | ntargets, | ||
| real(c_double), intent(in), value | grad_wt_lim, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | ntargets | Needs docs |
| [in] | targets | Needs docs |
| [in] | ref_points | Needs docs |
| [in] | weights | Needs docs |
| [in] | grad_wt_lim | Needs docs |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_mirror_slosh | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), intent(in), value | mirror_n, | ||
| real(c_double), intent(in), value | mirror_bturn, | ||
| real(c_double), intent(in), value | mirror_zthroat, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | mirror_n | New value for dipole_a |
| [in] | mirror_bturn | New value for dipole_a |
| [in] | mirror_zthroat | New value for dipole_a |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_psi | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| type(c_ptr), intent(in), value | psi_vals, | ||
| logical(c_bool), intent(in), value | update_bounds, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | TokaMaker equilibrium instance |
| [in] | psi_vals | Needs docs |
| [in] | update_bounds | Update bounds by determining new limiting points |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_psi_dt | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | psi_vals, | ||
| type(c_ptr), intent(in), value | icoils, | ||
| type(c_ptr), intent(in), value | vcoils, | ||
| real(c_double), intent(in), value | dt, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Set flux/coil current at previous time and coil voltage for quasi-static solve.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | psi_vals | \( \psi \) values at reference time (t - dt) |
| [in] | icoils | Coil currents at reference time (t - dt) |
| [in] | vcoils | Coil voltages over time step |
| [in] | dt | Time step size |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_saddles | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), dimension(2,ntargets), intent(in) | targets, | ||
| real(c_double), dimension(ntargets), intent(in) | weights, | ||
| integer(c_int), intent(in), value | ntargets, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | ntargets | Needs docs |
| [in] | targets | Needs docs |
| [in] | weights | Needs docs |
| [out] | error_str | Error information |
| subroutine tokamaker_set_settings | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(tokamaker_settings_type), intent(in) | settings, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Update TokaMaker settings.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | settings | Settings object |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_targets | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), intent(in), value | ip_target, | ||
| real(c_double), intent(in), value | ip_ratio_target, | ||
| real(c_double), intent(in), value | pax_target, | ||
| real(c_double), intent(in), value | estore_target, | ||
| real(c_double), intent(in), value | r0_target, | ||
| real(c_double), intent(in), value | v0_target, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | ip_target | Needs docs |
| [in] | ip_ratio_target | Needs docs |
| [in] | pax_target | Needs docs |
| [in] | estore_target | Needs docs |
| [in] | r0_target | Needs docs |
| [in] | v0_target | Needs docs |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_set_vcoil | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | rcoils, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Set Vcoils by defining non-zero resistance of coils.
| [in] | tmaker_ptr | TokaMaker instance |
| [in] | rcoils | Resistance of coils (Ohm) |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_setup | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| integer(kind=c_int), intent(in), value | order, | ||
| logical(kind=c_bool), intent(in), value | full_domain, | ||
| integer(kind=c_int), intent(out) | ncoils, | ||
| type(c_ptr), intent(out) | coil_lmat, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | order | FE order for Lagrange elements |
| [in] | full_domain | Needs docs |
| [out] | ncoils | Needs docs |
| [out] | coil_lmat | Needs docs |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_setup_regions | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| character(kind=c_char), dimension(oft_path_slen), intent(in) | coil_file, | ||
| type(c_ptr), intent(in), value | reg_eta, | ||
| type(c_ptr), intent(in), value | contig_flag, | ||
| type(c_ptr), intent(in), value | xpoint_mask, | ||
| type(c_ptr), intent(in), value | coil_nturns, | ||
| integer(c_int), intent(in), value | ncoils, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | coil_file | Needs docs |
| [in] | reg_eta | Needs docs |
| [in] | contig_flag | Needs docs |
| [in] | xpoint_mask | Needs docs |
| [in] | coil_nturns | Needs docs |
| [in] | ncoils | Needs docs |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_setup_td | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| real(c_double), intent(in), value | dt, | ||
| real(c_double), intent(in), value | lin_tol, | ||
| real(c_double), intent(in), value | nl_tol, | ||
| logical(c_bool), intent(in), value | pre_plasma, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | dt | Time step size |
| [in] | lin_tol | Linear solver tolerance |
| [in] | nl_tol | Nonlinear solver tolerance |
| [in] | pre_plasma | Include plasma contributions in preconditioner? |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_solve | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| logical(c_bool), intent(in), value | vacuum, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | vacuum | Perform vacuum solve? |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_step_td | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | curr_ptr, | ||
| type(c_ptr), intent(in), value | volt_ptr, | ||
| real(c_double), intent(inout) | time, | ||
| real(c_double), intent(inout) | dt, | ||
| integer(c_int), intent(out) | nl_its, | ||
| integer(c_int), intent(out) | lin_its, | ||
| integer(c_int), intent(out) | nretry, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | curr_ptr | Coil currents at end of step |
| [in] | volt_ptr | Coil voltages at end of step |
| [in,out] | time | Current simulation time |
| [in,out] | dt | Time step size |
| [out] | nl_its | Number of nonlinear iterations performed |
| [out] | lin_its | Number of linear iterations performed |
| [out] | nretry | Number of retries performed |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_trace_surf | ( | type(c_ptr), intent(in), value | tmaker_equil_ptr, |
| real(c_double), intent(in), value | psi_surf, | ||
| type(c_ptr), intent(out) | points, | ||
| integer(c_int), intent(out) | npoints, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_equil_ptr | Pointer to TokaMaker equilibrium object |
| [in] | psi_surf | Needs docs |
| [out] | points | Needs docs |
| [out] | npoints | Needs docs |
| [out] | error_str | Error string (empty if no error) |
| subroutine tokamaker_vac_solve | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
| type(c_ptr), intent(in), value | psi_in, | ||
| type(c_ptr), intent(in), value | rhs_source, | ||
| character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
| ) |
Needs docs.
| [in] | tmaker_ptr | Pointer to TokaMaker object |
| [in] | psi_in | Input: BCs for \( \psi \), Output: solution \( \psi \) |
| [in] | rhs_source | Current source term [A/m^2] (optional) |
| [out] | error_str | Error string (empty if no error) |