The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research 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_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) |
Needs docs. | |
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. | |
subroutine | tokamaker_eval_green (n, r, z, rc, zc, vals) |
Needs docs. | |
subroutine | tokamaker_flux_int (tmaker_ptr, psi_vals, field_vals, nvals, result, error_str) |
Needs docs. | |
subroutine | tokamaker_get_coil_currents (tmaker_ptr, currents, reg_currents, error_str) |
Needs docs. | |
subroutine | tokamaker_get_coil_lmat (tmaker_ptr, lmat, error_str) |
Needs docs. | |
subroutine | tokamaker_get_dels_curr (tmaker_ptr, psi_vals, error_str) |
Needs docs. | |
subroutine | tokamaker_get_field_eval (tmaker_ptr, imode, int_obj, error_str) |
Create an interpolation object for tokamaker fields. | |
subroutine | tokamaker_get_globals (tmaker_ptr, itor, centroid, vol, pvol, dflux, tflux, bp_vol, error_str) |
Needs docs. | |
subroutine | tokamaker_get_jtor (tmaker_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_profs (tmaker_ptr, npsi, psi_in, f, fp, p, pp, error_str) |
Needs docs. | |
subroutine | tokamaker_get_psi (tmaker_ptr, psi_vals, psi_lim, psi_max, error_str) |
Needs docs. | |
subroutine | tokamaker_get_q (tmaker_ptr, npsi, psi_q, qvals, ravgs, dl, rbounds, zbounds, error_str) |
Needs docs. | |
subroutine | tokamaker_get_refs (tmaker_ptr, o_point, lim_point, x_points, diverted, plasma_bounds, alam, pnorm, error_str) |
Needs docs. | |
subroutine | tokamaker_get_vfixed (tmaker_ptr, npts, pts, fluxes, error_str) |
Needs docs. | |
subroutine | tokamaker_gs_calc_vloop (tmaker_ptr, vloop, error_str) |
Needs docs. | |
subroutine | tokamaker_init_psi (tmaker_ptr, r0, z0, a, kappa, delta, rhs_source, error_str) |
Needs docs. | |
subroutine | tokamaker_load_profiles (tmaker_ptr, f_file, f_offset, p_file, eta_file, f_ni_file, error_str) |
Needs docs. | |
subroutine | tokamaker_recon_run (tmaker_ptr, vacuum, settings, error_flag) |
Needs docs. | |
subroutine | tokamaker_sauter_fc (tmaker_ptr, npsi, psi_saut, fc, r_avgs, modb_avgs, error_str) |
Needs docs. | |
subroutine | tokamaker_save_eqdsk (tmaker_ptr, filename, nr, nz, rbounds, zbounds, run_info, psi_pad, rcentr, trunc_eq, lim_filename, lcfs_press, error_str) |
Needs docs. | |
subroutine | tokamaker_save_ifile (tmaker_ptr, filename, npsi, ntheta, psi_pad, lcfs_press, pack_lcfs, single_prec, error_str) |
Needs docs. | |
subroutine | tokamaker_save_mug (tmaker_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, 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_psi (tmaker_ptr, psi_vals, error_str) |
Needs docs. | |
subroutine | tokamaker_set_psi_dt (tmaker_ptr, psi_vals, dt, error_str) |
Needs docs. | |
subroutine | tokamaker_set_saddles (tmaker_ptr, targets, weights, ntargets, error_str) |
Needs docs. | |
subroutine | tokamaker_set_settings (tmaker_ptr, settings, error_str) |
Needs docs. | |
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_setup (tmaker_ptr, order, full_domain, ncoils, 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, error_str) |
Needs docs. | |
subroutine | tokamaker_step_td (tmaker_ptr, time, dt, nl_its, lin_its, nretry, error_str) |
Needs docs. | |
subroutine | tokamaker_trace_surf (tmaker_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 | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_apply_field_eval | ( | type(c_ptr), intent(in), value | tmaker_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_ptr | TokaMaker 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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | vec_vals | Needs docs |
[in] | reg_ind | Needs docs |
[out] | result | Needs docs |
[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] | 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 | Needs docs |
[in] | neigs | Needs docs |
[in] | eigs | Needs docs |
[in] | eig_vecs | Needs docs |
[in] | include_bounds | Needs docs |
[in] | eta_plasma | Needs docs |
[in] | pm | Needs docs |
[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 | Needs docs |
[in] | eigs | Needs docs |
[in] | eig_vecs | Needs docs |
[in] | pm | Needs docs |
[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 | Needs docs |
[in] | rc | Needs docs |
[in] | zc | Needs docs |
[in] | r | Needs docs |
[in] | z | Needs docs |
[in] | vals | Needs docs |
subroutine tokamaker_flux_int | ( | type(c_ptr), intent(in), value | tmaker_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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | psi_vals | Needs docs |
[in] | field_vals | Needs docs |
[out] | result | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_coil_currents | ( | type(c_ptr), intent(in), value | tmaker_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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | currents | Needs docs |
[in] | reg_currents | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_coil_lmat | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
type(c_ptr), intent(in), value | lmat, | ||
character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | lmat | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_dels_curr | ( | type(c_ptr), intent(in), value | tmaker_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_ptr | Pointer to TokaMaker object |
[in] | psi_vals | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_field_eval | ( | type(c_ptr), intent(in), value | tmaker_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_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_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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[out] | itor | Needs docs |
[out] | centroid | Needs docs |
[out] | vol | Needs docs |
[out] | pvol | Needs docs |
[out] | dflux | Needs docs |
[out] | tflux | Needs docs |
[out] | bp_vol | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_jtor | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
type(c_ptr), intent(in), value | jtor, | ||
character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | jtor | Needs docs |
[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 | Needs docs |
[out] | loop_ptr | Needs docs |
[out] | np | Needs docs |
[out] | nloops | Needs docs |
[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 | Needs docs |
[out] | r_loc | Needs docs |
[out] | reg_loc | Needs docs |
[out] | np | Needs docs |
[out] | nc | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_profs | ( | type(c_ptr), intent(in), value | tmaker_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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | npsi | Needs docs |
[in] | psi_in | Needs docs |
[out] | f | Needs docs |
[out] | fp | Needs docs |
[out] | p | Needs docs |
[out] | pp | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_psi | ( | type(c_ptr), intent(in), value | tmaker_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_ptr | Pointer to TokaMaker object |
[in] | psi_vals | Needs docs |
[out] | psi_lim | Needs docs |
[out] | psi_max | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_q | ( | type(c_ptr), intent(in), value | tmaker_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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | npsi | Needs docs |
[in] | psi_q | Needs docs |
[out] | qvals | Needs docs |
[out] | ravgs | Needs docs |
[in,out] | dl | Needs docs |
[out] | rbounds | Needs docs |
[out] | zbounds | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_refs | ( | type(c_ptr), intent(in), value | tmaker_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) | alam, | ||
type(c_ptr), intent(out) | pnorm, | ||
character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[out] | o_point | Needs docs |
[out] | lim_point | Needs docs |
[out] | x_points | Needs docs |
[out] | diverted | Needs docs |
[out] | plasma_bounds | Needs docs |
[out] | alam | Needs docs |
[out] | pnorm | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_get_vfixed | ( | type(c_ptr), intent(in), value | tmaker_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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[out] | npts | Needs docs |
[out] | pts | Needs docs |
[out] | fluxes | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_gs_calc_vloop | ( | type(c_ptr), intent(in), value | tmaker_ptr, |
real(c_double), intent(out) | vloop, | ||
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_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 | Needs docs |
[in] | z0 | Needs docs |
[in] | a | Needs docs |
[in] | kappa | Needs docs |
[in] | delta | Needs docs |
[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_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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker 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) prof.in file |
[in] | f_ni_file | Non-inductive F*F' prof.in 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 |
subroutine tokamaker_sauter_fc | ( | type(c_ptr), intent(in), value | tmaker_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 | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | npsi | Needs docs |
[in] | psi_saut | Needs docs |
[out] | fc | Needs docs |
[out] | r_avgs | Needs docs |
[out] | modb_avgs | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_save_eqdsk | ( | type(c_ptr), intent(in), value | tmaker_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, | ||
character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
) |
Needs docs.
[in] | tmaker_ptr | TokaMaker 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 |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_save_ifile | ( | type(c_ptr), intent(in), value | tmaker_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_ptr | TokaMaker 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_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_ptr | TokaMaker 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, | ||
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] | locations | Needs docs |
[in] | targets | Needs docs |
[in] | weights | Needs docs |
[in] | ntargets | 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] | targets | Needs docs |
[in] | ref_points | Needs docs |
[in] | weights | Needs docs |
[in] | ntargets | Needs docs |
[in] | grad_wt_lim | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_set_psi | ( | type(c_ptr), intent(in), value | tmaker_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_ptr | TokaMaker instance |
[in] | psi_vals | Needs docs |
[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, | ||
real(c_double), intent(in), value | dt, | ||
character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
) |
Needs docs.
[in] | tmaker_ptr | TokaMaker instance |
[in] | psi_vals | Needs docs |
[in] | dt | Needs docs |
[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] | targets | Needs docs |
[in] | weights | Needs docs |
[in] | ntargets | 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 | ||
) |
Needs docs.
[in] | tmaker_ptr | TokaMaker instance |
[in] | settings | Needs docs |
[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_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, | ||
character(kind=c_char), dimension(oft_error_slen), intent(out) | error_str | ||
) |
Needs docs.
[in] | tmaker_ptr | Pointer to TokaMaker object |
[in] | order | Needs docs |
[in] | full_domain | Needs docs |
[out] | ncoils | 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 | Needs docs |
[in] | lin_tol | Needs docs |
[in] | nl_tol | Needs docs |
[in] | pre_plasma | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_solve | ( | 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_step_td | ( | type(c_ptr), intent(in), value | tmaker_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,out] | time | Needs docs |
[in,out] | dt | Needs docs |
[out] | nl_its | Needs docs |
[out] | lin_its | Needs docs |
[out] | nretry | Needs docs |
[out] | error_str | Error string (empty if no error) |
subroutine tokamaker_trace_surf | ( | type(c_ptr), intent(in), value | tmaker_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_ptr | Pointer to TokaMaker 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 |
[in] | rhs_source | Current source term (optional) |
[out] | error_str | Error string (empty if no error) |