|
V3FIT
|
Go to the documentation of this file.
57 LOGICAL :: force_solve
59 TYPE (vmec_class),
POINTER :: vmec => null()
195 TYPE (vmec_class),
POINTER :: vmec_object
196 LOGICAL,
INTENT(in) :: force_solve
199 REAL (rprec) :: start_time
202 start_time = profiler_get_start_time()
210 CALL profiler_set_stop_time(
'equilibrium_construct_vmec',
233 LOGICAL,
INTENT(in) :: force_solve
236 REAL (rprec) :: start_time
239 start_time = profiler_get_start_time()
247 CALL profiler_set_stop_time(
'equilibrium_construct_vacuum',
270 LOGICAL,
INTENT(in) :: force_solve
273 REAL (rprec) :: start_time
276 start_time = profiler_get_start_time()
284 CALL profiler_set_stop_time(
'equilibrium_construct_siesta',
304 TYPE (equilibrium_class),
POINTER :: this
307 IF (
ASSOCIATED(this%vmec))
THEN
308 CALL vmec_destruct(this%vmec)
312 IF (
ASSOCIATED(this%vacuum))
THEN
314 this%vacuum => null()
317 IF (
ASSOCIATED(this%siesta))
THEN
319 this%siesta => null()
323 this%force_solve = .false.
352 & value, eq_comm, state_flags)
357 TYPE (equilibrium_class),
INTENT(inout) :: this
358 INTEGER,
INTENT(in) :: id
359 INTEGER,
INTENT(in) :: i_index
360 INTEGER,
INTENT(in) :: j_index
361 REAL (rprec),
INTENT(in) :: value
362 INTEGER,
INTENT(in) :: eq_comm
363 INTEGER,
INTENT(inout) :: state_flags
366 REAL (rprec) :: start_time
369 start_time = profiler_get_start_time()
371 SELECT CASE (this%type)
377 CALL vmec_set_param(this%vmec, id, i_index, j_index,
value,
378 & eq_comm, state_flags)
385 &
value, eq_comm, state_flags)
389 CALL profiler_set_stop_time(
'equilibrium_set_param', start_time)
420 TYPE (equilibrium_class),
INTENT(inout) :: this
421 TYPE (magnetic_response_class),
INTENT(in) :: response_object
422 INTEGER,
INTENT(in) :: state_flags
425 REAL (rprec) :: start_time
428 start_time = profiler_get_start_time()
430 SELECT CASE (this%type)
433 CALL vmec_set_magnetic_cache(this%vmec, response_object)
437 CALL vmec_set_magnetic_cache(this%vmec)
450 CALL profiler_set_stop_time(
451 &
'equilibrium_set_magnetic_cache_response', start_time)
480 TYPE (equilibrium_class),
INTENT(inout) :: this
481 LOGICAL,
INTENT(in) :: use_axi
482 INTEGER,
INTENT(in) :: state_flags
485 REAL (rprec) :: start_time
488 start_time = profiler_get_start_time()
490 SELECT CASE (this%type)
493 CALL vmec_set_magnetic_cache(this%vmec, use_axi)
497 CALL vmec_set_magnetic_cache(this%vmec)
510 CALL profiler_set_stop_time(
511 &
'equilibrium_set_magnetic_cache_point', start_time)
538 CHARACTER (len=*),
INTENT(in) :: param_name
541 REAL (rprec) :: start_time
544 start_time = profiler_get_start_time()
546 SELECT CASE (this%type)
550 & vmec_get_param_id(this%vmec, param_name)
565 CALL profiler_set_stop_time(
'equilibrium_get_param_id',
592 INTEGER,
INTENT(in) :: id
593 INTEGER,
INTENT(in) :: i_index
594 INTEGER,
INTENT(in) :: j_index
597 REAL (rprec) :: start_time
600 start_time = profiler_get_start_time()
602 SELECT CASE (this%type)
606 & vmec_get_param_value(this%vmec, id, i_index, j_index)
621 CALL profiler_set_stop_time(
'equilibrium_get_param_value',
646 INTEGER,
INTENT(in) :: id
649 REAL (rprec) :: start_time
652 start_time = profiler_get_start_time()
654 SELECT CASE (this%type)
658 & vmec_get_param_name(this%vmec, id)
673 CALL profiler_set_stop_time(
'equilibrium_get_param_name',
698 REAL (rprec) :: start_time
701 start_time = profiler_get_start_time()
703 SELECT CASE (this%type)
707 & vmec_get_gp_ne_num_hyper_param(this%vmec)
718 CALL profiler_set_stop_time(
719 &
'equilibrium_get_gp_ne_num_hyper_param', start_time)
743 REAL (rprec) :: start_time
746 start_time = profiler_get_start_time()
748 SELECT CASE (this%type)
785 INTEGER,
INTENT(in) :: i
786 INTEGER,
INTENT(in) :: j
789 REAL (rprec) :: start_time
792 start_time = profiler_get_start_time()
794 SELECT CASE (this%type)
808 CALL profiler_set_stop_time(
'equilibrium_get_gp_ne_ij',
835 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
836 INTEGER,
INTENT(in) :: i
839 REAL (rprec) :: start_time
842 start_time = profiler_get_start_time()
844 SELECT CASE (this%type)
859 CALL profiler_set_stop_time(
'equilibrium_get_gp_ne_pi',
887 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
888 REAL (rprec),
DIMENSION(3),
INTENT(in) :: y_cart
891 REAL (rprec) :: start_time
894 start_time = profiler_get_start_time()
896 SELECT CASE (this%type)
911 CALL profiler_set_stop_time(
'equilibrium_get_gp_ne_pp',
937 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
940 REAL (rprec) :: start_time
943 start_time = profiler_get_start_time()
945 SELECT CASE (this%type)
958 CALL profiler_set_stop_time(
'equilibrium_get_ne_cart',
984 REAL (rprec),
INTENT(in) :: r
987 REAL (rprec) :: start_time
990 start_time = profiler_get_start_time()
992 SELECT CASE (this%type)
1005 CALL profiler_set_stop_time(
'equilibrium_get_ne_radial',
1030 REAL (rprec) :: start_time
1033 start_time = profiler_get_start_time()
1035 SELECT CASE (this%type)
1039 & vmec_get_gp_te_num_hyper_param(this%vmec)
1050 CALL profiler_set_stop_time(
1051 &
'equilibrium_get_gp_te_num_hyper_param', start_time)
1075 REAL (rprec) :: start_time
1078 start_time = profiler_get_start_time()
1080 SELECT CASE (this%type)
1093 CALL profiler_set_stop_time(
'equilibrium_get_te_af', start_time)
1119 INTEGER,
INTENT(in) :: i
1120 INTEGER,
INTENT(in) :: j
1123 REAL (rprec) :: start_time
1126 start_time = profiler_get_start_time()
1128 SELECT CASE (this%type)
1142 CALL profiler_set_stop_time(
'equilibrium_get_gp_te_ij',
1170 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1171 INTEGER,
INTENT(in) :: i
1174 REAL (rprec) :: start_time
1177 start_time = profiler_get_start_time()
1179 SELECT CASE (this%type)
1194 CALL profiler_set_stop_time(
'equilibrium_get_gp_te_pi',
1222 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1223 REAL (rprec),
DIMENSION(3),
INTENT(in) :: y_cart
1226 REAL (rprec) :: start_time
1229 start_time = profiler_get_start_time()
1231 SELECT CASE (this%type)
1246 CALL profiler_set_stop_time(
'equilibrium_get_gp_te_pp',
1272 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1275 REAL (rprec) :: start_time
1278 start_time = profiler_get_start_time()
1280 SELECT CASE (this%type)
1293 CALL profiler_set_stop_time(
'equilibrium_get_te_cart',
1319 REAL (rprec),
INTENT(in) :: r
1322 REAL (rprec) :: start_time
1325 start_time = profiler_get_start_time()
1327 SELECT CASE (this%type)
1340 CALL profiler_set_stop_time(
'equilibrium_get_te_radial',
1365 REAL (rprec) :: start_time
1368 start_time = profiler_get_start_time()
1370 SELECT CASE (this%type)
1374 & vmec_get_gp_ti_num_hyper_param(this%vmec)
1385 CALL profiler_set_stop_time(
1386 &
'equilibrium_get_gp_ti_num_hyper_param', start_time)
1410 REAL (rprec) :: start_time
1413 start_time = profiler_get_start_time()
1415 SELECT CASE (this%type)
1428 CALL profiler_set_stop_time(
'equilibrium_get_ti_af', start_time)
1454 INTEGER,
INTENT(in) :: i
1455 INTEGER,
INTENT(in) :: j
1458 REAL (rprec) :: start_time
1461 start_time = profiler_get_start_time()
1463 SELECT CASE (this%type)
1477 CALL profiler_set_stop_time(
'equilibrium_get_gp_ti_ij',
1504 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1505 INTEGER,
INTENT(in) :: i
1508 REAL (rprec) :: start_time
1511 start_time = profiler_get_start_time()
1513 SELECT CASE (this%type)
1528 CALL profiler_set_stop_time(
'equilibrium_get_gp_ti_pi',
1556 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1557 REAL (rprec),
DIMENSION(3),
INTENT(in) :: y_cart
1560 REAL (rprec) :: start_time
1563 start_time = profiler_get_start_time()
1565 SELECT CASE (this%type)
1580 CALL profiler_set_stop_time(
'equilibrium_get_gp_ti_pp',
1606 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1609 REAL (rprec) :: start_time
1612 start_time = profiler_get_start_time()
1614 SELECT CASE (this%type)
1627 CALL profiler_set_stop_time(
'equilibrium_get_ti_cart',
1653 REAL (rprec),
INTENT(in) :: r
1656 REAL (rprec) :: start_time
1659 start_time = profiler_get_start_time()
1661 SELECT CASE (this%type)
1674 CALL profiler_set_stop_time(
'equilibrium_get_ti_radial',
1699 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1702 REAL (rprec) :: start_time
1705 start_time = profiler_get_start_time()
1707 SELECT CASE (this%type)
1721 CALL profiler_set_stop_time(
'equilibrium_get_ze_cart',
1746 REAL (rprec),
INTENT(in) :: r
1749 REAL (rprec) :: start_time
1752 start_time = profiler_get_start_time()
1754 SELECT CASE (this%type)
1768 CALL profiler_set_stop_time(
'equilibrium_get_ze_radial',
1792 INTEGER,
INTENT(in) :: index
1795 REAL (rprec) :: start_time
1798 start_time = profiler_get_start_time()
1800 SELECT CASE (this%type)
1804 & vmec_get_gp_sxrem_num_hyper_param(this%vmec, index)
1815 CALL profiler_set_stop_time(
1816 &
'equilibrium_get_gp_sxrem_num_hyper_param', start_time)
1839 INTEGER,
INTENT(in) :: index
1842 REAL (rprec) :: start_time
1845 start_time = profiler_get_start_time()
1847 SELECT CASE (this%type)
1887 INTEGER,
INTENT(in) :: i
1888 INTEGER,
INTENT(in) :: j
1889 INTEGER,
INTENT(in) :: index
1892 REAL (rprec) :: start_time
1895 start_time = profiler_get_start_time()
1897 SELECT CASE (this%type)
1901 & vmec_get_gp_sxrem(this%vmec, i, j, index)
1912 CALL profiler_set_stop_time(
'equilibrium_get_gp_sxrem_ij',
1941 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1942 INTEGER,
INTENT(in) :: i
1943 INTEGER,
INTENT(in) :: index
1946 REAL (rprec) :: start_time
1949 start_time = profiler_get_start_time()
1951 SELECT CASE (this%type)
1955 & vmec_get_gp_sxrem(this%vmec, x_cart, i, index)
1966 CALL profiler_set_stop_time(
'equilibrium_get_gp_sxrem_pi',
1995 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
1996 REAL (rprec),
DIMENSION(3),
INTENT(in) :: y_cart
1997 INTEGER,
INTENT(in) :: index
2000 REAL (rprec) :: start_time
2003 start_time = profiler_get_start_time()
2005 SELECT CASE (this%type)
2009 & vmec_get_gp_sxrem(this%vmec, x_cart, y_cart, index)
2020 CALL profiler_set_stop_time(
'equilibrium_get_gp_sxrem_pp',
2047 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
2048 INTEGER,
INTENT(in) :: index
2051 REAL (rprec) :: start_time
2054 start_time = profiler_get_start_time()
2056 SELECT CASE (this%type)
2071 CALL profiler_set_stop_time(
'equilibrium_get_sxrem_cart',
2098 REAL (rprec),
INTENT(in) :: r
2099 INTEGER,
INTENT(in) :: index
2102 REAL (rprec) :: start_time
2105 start_time = profiler_get_start_time()
2107 SELECT CASE (this%type)
2122 CALL profiler_set_stop_time(
'equilibrium_get_sxrem_radial',
2148 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
2151 REAL (rprec) :: start_time
2154 start_time = profiler_get_start_time()
2156 SELECT CASE (this%type)
2170 CALL profiler_set_stop_time(
'equilibrium_get_p_cart', start_time)
2195 REAL (rprec),
INTENT(in) :: r
2198 REAL (rprec) :: start_time
2201 start_time = profiler_get_start_time()
2203 SELECT CASE (this%type)
2217 CALL profiler_set_stop_time(
'equilibrium_get_p_radial',
2244 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
2245 LOGICAL,
INTENT(in) :: cyl
2248 REAL (rprec) :: start_time
2251 start_time = profiler_get_start_time()
2253 SELECT CASE (this%type)
2272 CALL profiler_set_stop_time(
'equilibrium_get_B_vec', start_time)
2298 REAL (rprec),
INTENT(in) :: r
2299 REAL (rprec),
INTENT(in) :: theta
2302 REAL (rprec) :: start_time
2305 start_time = profiler_get_start_time()
2307 SELECT CASE (this%type)
2311 & vmec_get_int_b_dphi(this%vmec, r, theta)
2326 CALL profiler_set_stop_time(
'equilibrium_get_Int_B_dphi',
2360 REAL (rprec),
INTENT (in) :: phi
2361 REAL (rprec),
DIMENSION(:),
POINTER :: r
2362 REAL (rprec),
DIMENSION(:),
POINTER :: z
2365 REAL (rprec) :: start_time
2368 start_time = profiler_get_start_time()
2370 SELECT CASE (this%type)
2374 & vmec_get_plasma_edge(this%vmec, phi, r, z)
2387 CALL profiler_set_stop_time(
'equilibrium_get_plasma_edge',
2408 REAL (rprec),
DIMENSION(:,:,:),
POINTER ::
2413 REAL (rprec) :: start_time
2416 start_time = profiler_get_start_time()
2418 SELECT CASE (this%type)
2422 & vmec_get_magnetic_volume_rgrid(this%vmec)
2433 CALL profiler_set_stop_time(
2434 &
'equilibrium_get_magnetic_volume_rgrid', start_time)
2454 REAL (rprec),
DIMENSION(:,:,:),
POINTER ::
2459 REAL (rprec) :: start_time
2462 start_time = profiler_get_start_time()
2464 SELECT CASE (this%type)
2468 & vmec_get_magnetic_volume_zgrid(this%vmec)
2479 CALL profiler_set_stop_time(
2480 &
'equilibrium_get_magnetic_volume_zgrid', start_time)
2500 REAL (rprec),
DIMENSION(:,:,:),
POINTER ::
2505 REAL (rprec) :: start_time
2508 start_time = profiler_get_start_time()
2510 SELECT CASE (this%type)
2514 & vmec_get_magnetic_volume_jrgrid(this%vmec)
2525 CALL profiler_set_stop_time(
2526 &
'equilibrium_get_magnetic_volume_jrgrid', start_time)
2546 REAL (rprec),
DIMENSION(:,:,:),
POINTER ::
2551 REAL (rprec) :: start_time
2554 start_time = profiler_get_start_time()
2556 SELECT CASE (this%type)
2560 & vmec_get_magnetic_volume_jphigrid(this%vmec)
2571 CALL profiler_set_stop_time(
2572 &
'equilibrium_get_magnetic_volume_jphigrid', start_time)
2592 REAL (rprec),
DIMENSION(:,:,:),
POINTER ::
2597 REAL (rprec) :: start_time
2600 start_time = profiler_get_start_time()
2602 SELECT CASE (this%type)
2606 & vmec_get_magnetic_volume_jzgrid(this%vmec)
2617 CALL profiler_set_stop_time(
2618 &
'equilibrium_get_magnetic_volume_jzgrid', start_time)
2642 REAL (rprec) :: start_time
2645 start_time = profiler_get_start_time()
2647 SELECT CASE (this%type)
2651 & vmec_get_volume_int_element(this%vmec)
2662 CALL profiler_set_stop_time(
'equilibrium_get_volume_int_element',
2683 REAL (rprec),
DIMENSION(:,:),
POINTER ::
2688 REAL (rprec) :: start_time
2691 start_time = profiler_get_start_time()
2693 SELECT CASE (this%type)
2697 & vmec_get_con_surface_krgrid(this%vmec)
2708 CALL profiler_set_stop_time(
2709 &
'equilibrium_get_con_surface_krgrid', start_time)
2729 REAL (rprec),
DIMENSION(:,:),
POINTER ::
2734 REAL (rprec) :: start_time
2737 start_time = profiler_get_start_time()
2739 SELECT CASE (this%type)
2743 & vmec_get_con_surface_kphigrid(this%vmec)
2754 CALL profiler_set_stop_time(
2755 &
'equilibrium_get_con_surface_kphigrid', start_time)
2775 REAL (rprec),
DIMENSION(:,:),
POINTER ::
2780 REAL (rprec) :: start_time
2783 start_time = profiler_get_start_time()
2785 SELECT CASE (this%type)
2789 & vmec_get_con_surface_kzgrid(this%vmec)
2800 CALL profiler_set_stop_time(
2801 &
'equilibrium_get_con_surface_kzgrid', start_time)
2825 REAL (rprec) :: start_time
2828 start_time = profiler_get_start_time()
2830 SELECT CASE (this%type)
2834 & vmec_get_area_int_element(this%vmec)
2845 CALL profiler_set_stop_time(
'equilibrium_get_area_int_element',
2877 REAL (rprec),
DIMENSION(:),
POINTER ::
2880 INTEGER :: num_currents
2881 LOGICAL,
INTENT(out) :: scale_currents
2884 REAL (rprec) :: start_time
2887 start_time = profiler_get_start_time()
2889 SELECT CASE (this%type)
2893 & vmec_get_ext_currents(this%vmec, num_currents,
2907 scale_currents = .false.
2912 CALL profiler_set_stop_time(
'equilibrium_get_ext_currents',
2938 REAL (rprec),
DIMENSION(3) :: position
2939 LOGICAL,
INTENT(in) :: axi_only
2942 REAL (rprec) :: start_time
2945 start_time = profiler_get_start_time()
2947 SELECT CASE (this%type)
2951 & vmec_get_ext_b_plasma(this%vmec, position, axi_only)
2962 CALL profiler_set_stop_time(
'equilibrium_get_ext_b_plasma',
2987 REAL (rprec) :: start_time
2990 start_time = profiler_get_start_time()
2992 SELECT CASE (this%type)
3006 CALL profiler_set_stop_time(
'equilibrium_get_grid_size',
3031 REAL (rprec) :: start_time
3034 start_time = profiler_get_start_time()
3036 SELECT CASE (this%type)
3050 CALL profiler_set_stop_time(
'equilibrium_get_grid_start',
3075 REAL (rprec) :: start_time
3078 start_time = profiler_get_start_time()
3080 SELECT CASE (this%type)
3094 CALL profiler_set_stop_time(
'equilibrium_get_grid_stop',
3121 INTEGER,
INTENT(in) :: id
3124 REAL (rprec) :: start_time
3127 start_time = profiler_get_start_time()
3129 SELECT CASE (this%type)
3133 & vmec_is_scaler_value(this%vmec, id)
3144 CALL profiler_set_stop_time(
'equilibrium_is_scaler_value',
3169 INTEGER,
INTENT(in) :: id
3172 REAL (rprec) :: start_time
3175 start_time = profiler_get_start_time()
3177 SELECT CASE (this%type)
3195 CALL profiler_set_stop_time(
'equilibrium_is_1d_array', start_time)
3218 INTEGER,
INTENT(in) :: id
3221 REAL (rprec) :: start_time
3224 start_time = profiler_get_start_time()
3226 SELECT CASE (this%type)
3240 CALL profiler_set_stop_time(
'equilibrium_is_2d_array', start_time)
3265 INTEGER,
INTENT(in) :: id
3268 REAL (rprec) :: start_time
3271 start_time = profiler_get_start_time()
3273 SELECT CASE (this%type)
3277 & vmec_is_recon_param(this%vmec, id)
3292 CALL profiler_set_stop_time(
'equilibrium_is_recon_param',
3317 REAL (rprec) :: start_time
3320 start_time = profiler_get_start_time()
3322 SELECT CASE (this%type)
3336 CALL profiler_set_stop_time(
'equilibrium_is_using_point',
3368 INTEGER,
INTENT(inout) :: num_iter
3369 INTEGER,
INTENT(in) :: iou
3370 INTEGER,
INTENT(in) :: eq_comm
3371 INTEGER,
INTENT(in) :: state_flags
3376 REAL (rprec) :: start_time
3379 start_time = profiler_get_start_time()
3381 #if defined(MPI_OPT)
3382 CALL mpi_bcast(num_iter, 1, mpi_integer, 0, eq_comm, error)
3384 SELECT CASE (this%type)
3393 & eq_comm, state_flags)
3400 CALL profiler_set_stop_time(
'equilibrium_converge', start_time)
3421 TYPE (equilibrium_class),
INTENT(in) :: this
3422 INTEGER,
INTENT(in) :: index
3423 INTEGER,
INTENT(in) :: eq_comm
3426 SELECT CASE (this%type)
3429 CALL vmec_read_vac_file(this%vmec, index, eq_comm)
3453 TYPE (equilibrium_class),
INTENT(inout) :: this
3456 REAL (rprec) :: start_time
3459 start_time = profiler_get_start_time()
3461 SELECT CASE (this%type)
3464 CALL vmec_save_state(this%vmec)
3471 CALL profiler_set_stop_time(
'equilibrium_save_state', start_time)
3491 TYPE (equilibrium_class),
INTENT(inout) :: this
3494 REAL (rprec) :: start_time
3497 start_time = profiler_get_start_time()
3499 SELECT CASE (this%type)
3502 CALL vmec_reset_state(this%vmec)
3509 CALL profiler_set_stop_time(
'equilibrium_reset_state',
3531 TYPE (equilibrium_class),
INTENT(in) :: this
3532 INTEGER,
INTENT(in) :: iou
3535 REAL (rprec) :: start_time
3538 start_time = profiler_get_start_time()
3540 SELECT CASE (this%type)
3543 CALL vmec_write(this%vmec, iou)
3553 CALL profiler_set_stop_time(
'equilibrium_write', start_time)
3574 TYPE (equilibrium_class),
INTENT(in) :: this
3575 INTEGER :: current_step
3578 REAL (rprec) :: start_time
3581 start_time = profiler_get_start_time()
3583 SELECT CASE (this%type)
3586 CALL vmec_write_input(this%vmec, current_step)
3596 CALL profiler_set_stop_time(
'equilibrium_write_input', start_time)
3622 TYPE (equilibrium_class),
INTENT(in) :: this
3623 INTEGER,
INTENT(in) :: result_ncid
3624 INTEGER,
INTENT(in) :: maxnsetps_dim_id
3627 REAL (rprec) :: start_time
3630 start_time = profiler_get_start_time()
3632 SELECT CASE (this%type)
3635 CALL vmec_def_result(this%vmec, result_ncid,
3644 CALL profiler_set_stop_time(
'equilibrium_def_result', start_time)
3664 TYPE (equilibrium_class),
INTENT(in) :: this
3665 INTEGER,
INTENT(in) :: result_ncid
3668 REAL (rprec) :: start_time
3671 start_time = profiler_get_start_time()
3673 SELECT CASE (this%type)
3676 CALL vmec_write_init_data(this%vmec, result_ncid)
3683 CALL profiler_set_stop_time(
'equilibrium_write_init_data',
3706 TYPE (equilibrium_class),
INTENT(in) :: this
3707 INTEGER,
INTENT(in) :: result_ncid
3708 INTEGER,
INTENT(in) :: current_step
3711 REAL (rprec) :: start_time
3714 start_time = profiler_get_start_time()
3716 SELECT CASE (this%type)
3719 CALL vmec_write_step_data(this%vmec, result_ncid,
3728 CALL profiler_set_stop_time(
'equilibrium_write_step_data',
3750 TYPE (equilibrium_class),
INTENT(in) :: this
3751 INTEGER,
INTENT(in) :: result_ncid
3752 INTEGER,
INTENT(in) :: current_step
3755 REAL (rprec) :: start_time
3758 start_time = profiler_get_start_time()
3760 SELECT CASE (this%type)
3763 CALL vmec_restart(this%vmec, result_ncid, current_step)
3770 CALL profiler_set_stop_time(
'equilibrium_restart', start_time)
3791 TYPE (equilibrium_class),
INTENT(inout) :: this
3792 INTEGER,
INTENT(in) :: recon_comm
3794 #if defined(MPI_OPT)
3796 REAL (rprec) :: start_time
3800 start_time = profiler_get_start_time()
3802 SELECT CASE (this%type)
3805 CALL vmec_sync_state(this%vmec, recon_comm)
3812 CALL profiler_set_stop_time(
'equilibrium_sync_state', start_time)
3832 TYPE (equilibrium_class),
INTENT(inout) :: this
3833 INTEGER,
INTENT(in) :: index
3834 INTEGER,
INTENT(in) :: recon_comm
3836 #if defined(MPI_OPT)
3838 REAL (rprec) :: start_time
3843 start_time = profiler_get_start_time()
3845 CALL mpi_comm_rank(recon_comm, mpi_rank, error)
3847 SELECT CASE (this%type)
3850 CALL vmec_sync_child(this%vmec, index, recon_comm)
3857 CALL profiler_set_stop_time(
'equilibrium_sync_child', start_time)
character(len=data_name_length) function equilibrium_get_param_name(this, id)
Gets the name of a reconstruction equilibrium parameter.
real(rprec) function equilibrium_get_area_int_element(this)
Get area integration element.
logical function vacuum_is_recon_param(this, id)
Checks if a parameter id is a reconstruction parameter.
integer function equilibrium_get_gp_ti_num_hyper_param(this)
Get the number of ion temperature gp kernel hyper parameters.
real(rprec) function, dimension(:,:), pointer siesta_get_con_surface_kphigrid(this)
Get the conducting surface integration kphi grid points.
subroutine equilibrium_def_result(this, result_ncid, maxnsetps_dim_id)
Define NetCDF variables for the result file.
real(rprec) function, dimension(:,:,:), pointer siesta_get_magnetic_volume_rgrid(this)
Get volume magnetic volume integration radial grid points.
logical function equilibrium_is_2d_array(this, id)
Checks if a parameter id is a 2d array.
real(rprec) function, dimension(:), pointer siesta_get_ne_af(this)
Gets the electron density profile af array.
real(rprec) function, dimension(3) vacuum_get_b_vec(this, x_cart, cyl)
Gets the magnetic field vector at a position.
real(rprec) function, dimension(:), pointer equilibrium_get_sxrem_af(this, index)
Get the soft x-ray emissivity profile af array.
real(rprec) function, dimension(3) equilibrium_get_b_vec(this, x_cart, cyl)
Gets the magnetic field vector at a position.
real(rprec) function siesta_get_grid_stop(this)
Get radial grid size.
real(rprec) function siesta_get_area_int_element(this)
Get area integration element.
logical function siesta_is_scaler_value(this, id)
Checks if a parameter id is a scaler value.
subroutine siesta_save_state(this)
Save the internal state of the equilibrium.
real(rprec) function, dimension(:,:,:), pointer equilibrium_get_magnetic_volume_jphigrid(this)
Get volume magnetic volume integration jphi grid points.
Interface for the equilibrium density profile values.
integer function equilibrium_get_gp_sxrem_num_hyper_param(this, index)
Get the number of soft x-ray emissivity gp kernel hyper parameters.
subroutine siesta_def_result(this, result_ncid, maxnsetps_dim_id)
Define NetCDF variables for the result file.
logical function equilibrium_is_recon_param(this, id)
Checks if a parameter id is a reconstruction parameter.
real(rprec) function equilibrium_get_p_cart(this, x_cart)
Gets the plasma pressure at a cartesian position.
real(rprec) function equilibrium_get_gp_ti_pp(this, x_cart, y_cart)
Get the ion temperature gp kernel value for the position and position.
Interface for the siesta electron temperature profile values.
subroutine equilibrium_write_step_data(this, result_ncid, current_step)
Write step data to NetCDF result file.
logical function siesta_is_using_point(this)
Checks if a the point magnetics are being used.
integer, parameter equilibrium_siesta_type
Type descriptor for the equilibrium_class subclass siesta_equilibrium.
Interface for the equilibrium guassian process soft x-ray emissivity profile values.
real(rprec) function, dimension(:,:), pointer siesta_get_con_surface_krgrid(this)
Get the conducting surface integration kr grid points.
real(rprec) function, dimension(3) siesta_get_b_vec(this, x_cart, cyl)
Gets the magnetic field vector at a position.
Defines the base class of the type equilibrium_class. Equilibrium is an abstract interface to the equ...
type(equilibrium_class) function, pointer equilibrium_construct_vacuum(vacuum_object, force_solve)
Construct a equilibrium_class containing a vacuum_equilibrium object.
subroutine equilibrium_restart(this, result_ncid, current_step)
Restart equilibrium.
Interface for the equilibrium guassian process density profile values.
real(rprec) function, dimension(:), pointer equilibrium_get_ti_af(this)
Get the ion temperature profile af array.
integer function equilibrium_get_param_id(this, param_name)
Get the id for a reconstruction parameter.
Interface for the equilibrium electron temperature profile values.
real(rprec) function equilibrium_get_gp_ne_pp(this, x_cart, y_cart)
Get the electron density gp kernel value for the position and position.
real(rprec) function equilibrium_get_gp_sxrem_pp(this, x_cart, y_cart, index)
Get the soft x-ray emissivity gp kernel value for the position and position.
real(rprec) function equilibrium_get_ti_radial(this, r)
Gets the ion temperature at a radial position.
real(rprec) function, dimension(:,:,:), pointer siesta_get_magnetic_volume_jphigrid(this)
Get volume magnetic volume integration jphi grid points.
real(rprec) function equilibrium_get_gp_te_ij(this, i, j)
Get the electron temperature gp kernel value for the two indicies.
integer function siesta_get_plasma_edge(this, phi, r, z)
Gets the r and z positions of the outer surface at a toroidal angle.
logical function equilibrium_converge(this, num_iter, iou, eq_comm, state_flags)
Solves the equilibrium.
integer function siesta_get_gp_te_num_hyper_param(this)
Get the number of electron temperature gp kernel hyper parameters.
Interface for the setting the siesta_magnetic_cache types using siesta_set_magnetic_cache_responce,...
logical function siesta_converge(this, num_iter, iou, eq_comm, state_flags)
Solves the siesta equilibrium.
subroutine equilibrium_sync_child(this, index, recon_comm)
Syncronize a child equilibrium state to the parent.
real(rprec) function equilibrium_get_p_radial(this, r)
Gets the plasma pressure at a radial position.
integer function siesta_get_grid_size(this)
Get radial grid size.
integer, parameter equilibrium_vacuum_type
Type descriptor for the equilibrium_class subclass vacuum_equilibrium.
Interface for the equilibrium set magnetic cache.
real(rprec) function, dimension(:,:), pointer equilibrium_get_con_surface_kphigrid(this)
Get the conducting surface integration kphi grid points.
integer function siesta_get_param_id(this, param_name)
Get the id for a reconstruction parameter.
real(rprec) function equilibrium_get_te_radial(this, r)
Gets the electron temperature at a radial position.
real(rprec) function, dimension(:), pointer vacuum_get_ext_currents(this, scale_currents)
Get external current.
Interface for the siesta ion temperature profile values.
real(rprec) function vacuum_get_int_b_dphi(this, r, theta)
Gets the loop integrated magnetic field at a position.
Interface for the construction of equilibrium_class types using equilibrium_construct_vmec,...
subroutine vacuum_destruct(this)
Deconstruct a vacuum_class object.
real(rprec) function, dimension(:), pointer siesta_get_ti_af(this)
Gets the ion temperature profile af array.
subroutine siesta_reset_state(this)
Reset the internal state of the equilibrium.
subroutine equilibrium_set_magnetic_cache_point(this, use_axi, state_flags)
Sets the magnetic cache of the equilibrium for points.
real(rprec) function equilibrium_get_ne_radial(this, r)
Gets the electron density at a radial position.
Interface for the equilibrium ion temperature profile values.
real(rprec) function equilibrium_get_gp_ti_ij(this, i, j)
Get the ion temperature gp kernel value for the two indicies.
real(rprec) function equilibrium_get_gp_sxrem_ij(this, i, j, index)
Get the electron density gp kernel value for the two indicies.
subroutine equilibrium_save_state(this)
Save the internal state of the equilibrium.
real(rprec) function, dimension(:,:,:), pointer equilibrium_get_magnetic_volume_zgrid(this)
Get volume magnetic volume integration z grid points.
real(rprec) function, dimension(:,:), pointer equilibrium_get_con_surface_kzgrid(this)
Get the conducting surface integration kz grid points.
subroutine equilibrium_set_param(this, id, i_index, j_index, value, eq_comm, state_flags)
Sets the value of a reconstruction equilibrium parameter.
subroutine siesta_write_init_data(this, result_ncid)
Write inital data to NetCDF result file.
real(rprec) function equilibrium_get_gp_ti_pi(this, x_cart, i)
Get the ion temperature gp kernel value for the position and index.
subroutine siesta_write_input(this, current_step)
Write the current valid input.
real(rprec) function, dimension(:), pointer siesta_get_ext_currents(this, num_currents, scale_currents)
Get external current.
real(rprec) function, dimension(3) equilibrium_get_ext_b_plasma(this, position, axi_only)
Get external plasma magnetic field.
subroutine equilibrium_destruct(this)
Deconstruct a equilibrium_class object.
logical function siesta_is_1d_array(this, id)
Checks if a parameter id is a 1d array.
real(rprec) function, dimension(:), pointer equilibrium_get_te_af(this)
Get the electron temperature profile af array.
Contains parameters defining the bit positions for flags that mark changes in different parts of the ...
real(rprec) function, dimension(:,:,:), pointer siesta_get_magnetic_volume_jrgrid(this)
Get volume magnetic volume integration jr grid points.
real(rprec) function equilibrium_get_ze_radial(this, r)
Gets the effective charge at a radial position.
real(rprec) function, dimension(3) siesta_get_ext_b_plasma(this, position, axi_only)
Get external plasma magnetic field.
real(rprec) function, dimension(:), pointer siesta_get_te_af(this)
Gets the electron temperature profile af array.
Interface for the siesta soft x-ray emission profile values.
Interface for the siesta pressure profile values.
integer function equilibrium_get_grid_size(this)
Get radial grid size.
real(rprec) function vacuum_get_param_value(this, id, i_index)
Get the value of a reconstruction vacuum parameter.
logical function equilibrium_is_scaler_value(this, id)
Checks if a parameter id is a scaler value.
real(rprec) function equilibrium_get_ze_cart(this, x_cart)
Gets the effective charge at a cartesian position.
Interface for the equilibrium guassian process electron temperature profile values.
subroutine siesta_write_step_data(this, result_ncid, current_step)
Write step data to NetCDF result file.
integer, parameter equilibrium_vmec_type
Type descriptor for the equilibrium_class subclass vmec_equilibrium.
subroutine siesta_destruct(this)
Deconstruct a siesta_class object.
real(rprec) function siesta_get_param_value(this, id, i_index, j_index)
Get the value of a reconstruction siesta parameter.
subroutine vacuum_write(this, iou)
Write out the equilibrium to an output file.
real(rprec) function, dimension(:,:,:), pointer equilibrium_get_magnetic_volume_jzgrid(this)
Get volume magnetic volume integration jz grid points.
integer, parameter model_state_vmec_flag
VMEC Equilibrium changed bit position.
logical function siesta_is_2d_array(this, id)
Checks if a parameter id is a 2d array.
character(len=data_name_length) function vacuum_get_param_name(this, id)
Get the name of a reconstruction vacuum parameter.
real(rprec) function equilibrium_get_ti_cart(this, x_cart)
Gets the ion temperature at a cartesian position.
real(rprec) function equilibrium_get_ne_cart(this, x_cart)
Gets the electron density at a cartesian position.
Interface for the siesta guassian process density profile values.
real(rprec) function equilibrium_get_sxrem_cart(this, x_cart, index)
Gets the soft x-ray emissivity at a cartesian position.
real(rprec) function, dimension(:,:), pointer equilibrium_get_con_surface_krgrid(this)
Get the conducting surface integration kr grid points.
subroutine equilibrium_sync_state(this, recon_comm)
Syncronize the equilibrium state to children.
Interface for the siesta density profile values.
Interface for the equilibrium guassian process ion temperature profile values.
real(rprec) function equilibrium_get_grid_start(this)
Get start of the radial grid.
real(rprec) function equilibrium_get_int_b_dphi(this, r, theta)
Gets the loop integrated magnetic field at a position.
real(rprec) function equilibrium_get_gp_sxrem_pi(this, x_cart, i, index)
Get the soft x-ray emissivity gp kernel value for the position and index.
Interface for the siesta guassian process soft x-ray emissivity profile values.
subroutine equilibrium_read_vac_file(this, index, eq_comm)
Loads the vacuum magnetic field file.
real(rprec) function equilibrium_get_grid_stop(this)
Get stop of the radial grid.
real(rprec) function equilibrium_get_param_value(this, id, i_index, j_index)
Gets the value of a reconstruction equilibrium parameter.
real(rprec) function, dimension(:,:,:), pointer equilibrium_get_magnetic_volume_rgrid(this)
Get volume magnetic volume integration radial grid points.
real(rprec) function, dimension(:), pointer equilibrium_get_ext_currents(this, num_currents, scale_currents)
Get external current.
subroutine equilibrium_set_magnetic_cache_response(this, response_object, state_flags)
Sets the magnetic cache of the equilibrium for the magnetic responce.
Base class representing a equilibrium.
integer function vacuum_get_param_id(this, param_name)
Get the id for a reconstruction parameter.
subroutine equilibrium_write_input(this, current_step)
Write the current valid input.
real(rprec) function siesta_get_int_b_dphi(this, r, theta)
Gets the loop integrated magnetic field at a position.
real(rprec) function siesta_get_grid_start(this)
Get start of the radial grid.
real(rprec) function, dimension(:,:,:), pointer siesta_get_magnetic_volume_zgrid(this)
Get volume magnetic volume integration z grid points.
subroutine siesta_read_vac_file(this, index, eq_comm)
Loads the vacuum magnetic field file.
real(rprec) function equilibrium_get_gp_te_pi(this, x_cart, i)
Get the electron temperature gp kernel value for the position and index.
Interface for the siesta guassian process ion temperature profile values.
Base class representing a siesta_equilibrium.
logical function equilibrium_is_1d_array(this, id)
Checks if a parameter id is a 1d array.
integer, parameter equilibrium_no_type
Type descriptor for the equilibrium_class no subclass.
real(rprec) function equilibrium_get_gp_ne_pi(this, x_cart, i)
Get the electron density gp kernel value for the position and index.
subroutine siesta_write(this, iou)
Write out the equilibrium to an output file.
integer function equilibrium_get_gp_ne_num_hyper_param(this)
Get the number of electron density gp kernel hyper parameters.
real(rprec) function equilibrium_get_volume_int_element(this)
Get volume integration element.
integer function siesta_get_gp_sxrem_num_hyper_param(this, index)
Get the number of soft x-ray emission gp kernel hyper parameters.
logical function vacuum_is_1d_array(this, id)
Checks if a parameter id is a 1d array.
real(rprec) function, dimension(:,:,:), pointer equilibrium_get_magnetic_volume_jrgrid(this)
Get volume magnetic volume integration jr grid points.
subroutine equilibrium_reset_state(this)
Reset the internal state of the equilibrium.
logical function equilibrium_is_using_point(this)
Checks if a the point magnetics are being used.
Defines the base class of the type magnetic_response_class.
real(rprec) function equilibrium_get_sxrem_radial(this, r, index)
Gets the soft x-ray emissivity at a radial position.
Interface for the equilibrium pressure profile values.
real(rprec) function, dimension(:), pointer siesta_get_sxrem_af(this, index)
Gets the soft x-ray emissivity profile af array.
integer function equilibrium_get_gp_te_num_hyper_param(this)
Get the number of electron temperature gp kernel hyper parameters.
real(rprec) function equilibrium_get_te_cart(this, x_cart)
Gets the electron temperature at a cartesian position.
subroutine vacuum_write_input(this, current_step)
Write the current valid input.
integer function siesta_get_gp_ne_num_hyper_param(this)
Get the number of electron density gp kernel hyper parameters.
real(rprec) function equilibrium_get_gp_ne_ij(this, i, j)
Get the electron density gp kernel value for the two indicies.
subroutine equilibrium_write(this, iou)
Write out the equilibrium to an output file.
Interface for the siesta guassian process electron temperature profile values.
Interface for the effective charge profile values.
subroutine siesta_set_param(this, id, i_index, j_index, value, eq_comm, state_flags)
Sets the value of a reconstruction equilibrium parameter.
subroutine vacuum_set_param(this, id, i_index, value)
Sets the value of a reconstruction equilibrium parameter.
Defines the base class of the type siesta_class. This module contains all the code necessary to inter...
subroutine siesta_sync_state(this, recon_comm)
Syncronize the siesta state to children.
type(equilibrium_class) function, pointer equilibrium_construct_siesta(siesta_object, force_solve)
Construct a equilibrium_class containing a siesta_equilibrium object.
real(rprec) function, dimension(:,:,:), pointer siesta_get_magnetic_volume_jzgrid(this)
Get volume magnetic volume integration jz grid points.
real(rprec) function, dimension(:,:), pointer siesta_get_con_surface_kzgrid(this)
Get the conducting surface integration kz grid points.
Base class representing a vacuum_equilibrium.
subroutine siesta_restart(this, result_ncid, current_step)
Restart from a result file.
real(rprec) function equilibrium_get_gp_te_pp(this, x_cart, y_cart)
Get the electron temperature gp kernel value for the position and position.
character(len=data_name_length) function siesta_get_param_name(this, id)
Get the name of a reconstruction siesta parameter.
subroutine siesta_sync_child(this, index, recon_comm)
Syncronize a child siesta state to the parent.
integer, parameter model_state_siesta_flag
SIESTA Equilibrium changed bit position.
type(equilibrium_class) function, pointer equilibrium_construct_vmec(vmec_object, force_solve)
Construct a equilibrium_class containing a vmec_equilibrium object.
subroutine equilibrium_write_init_data(this, result_ncid)
Write inital data to NetCDF result file.
real(rprec) function siesta_get_volume_int_element(this)
Get volume integration element.
integer function equilibrium_get_plasma_edge(this, phi, r, z)
Gets the r and z positions of the outer surface at a toroidal angle.
Defines the base class of the type vacuum_class. This module contains all the code necessary to inter...
Interface for the equilibrium soft x-ray emissivity profile values.
real(rprec) function, dimension(:), pointer equilibrium_get_ne_af(this)
Get the electron density profile af array.
integer function siesta_get_gp_ti_num_hyper_param(this)
Get the number of ion temperature gp kernel hyper parameters.
logical function siesta_is_recon_param(this, id)
Checks if a parameter id is a reconstruction parameter.