15 USE stel_kinds,
only: rprec
34 TYPE (
vertex),
POINTER :: chord_path => null()
36 REAL (rprec) :: resonance
55 REAL (rprec) :: resonance
57 TYPE (model_class),
POINTER ::
model => null()
92 REAL (rprec),
DIMENSION(3),
INTENT(in) :: start_path
93 REAL (rprec),
DIMENSION(3),
INTENT(in) :: end_path
94 REAL (rprec),
INTENT(in) :: resonance
97 REAL (rprec) :: start_time
100 start_time = profiler_get_start_time()
109 CALL profiler_set_stop_time(
'ece_construct', start_time)
128 TYPE (ece_class),
INTENT(inout) :: this
131 IF (
ASSOCIATED(this%chord_path))
THEN
133 this%chord_path => null()
160 TYPE (model_class),
POINTER :: a_model
161 REAL (rprec),
DIMENSION(4),
INTENT(out) :: sigma
162 REAL (rprec),
DIMENSION(4),
INTENT(in) :: last_value
166 REAL (rprec) :: start_time
169 start_time = profiler_get_start_time()
173 IF (btest(a_model%state_flags, model_state_vmec_flag) .or.
174 & btest(a_model%state_flags, model_state_siesta_flag) .or.
175 & btest(a_model%state_flags, model_state_te_flag) .or.
176 & btest(a_model%state_flags, model_state_shift_flag) .or.
177 & btest(a_model%state_flags, model_state_signal_flag))
THEN
193 CALL profiler_set_stop_time(
'ece_get_modeled_signal', start_time)
215 TYPE (model_class),
POINTER :: a_model
216 LOGICAL,
INTENT(out) :: found
219 CHARACTER(len=1),
ALLOCATABLE :: context(:)
220 INTEGER :: context_length
222 REAL (rprec) :: start_time
225 start_time = profiler_get_start_time()
228 temp_context%resonance = this%resonance
229 temp_context%model => a_model
233 context_length =
SIZE(transfer(temp_context, context))
234 ALLOCATE(context(context_length))
235 context = transfer(temp_context, context)
242 CALL profiler_set_stop_time(
'ece_get_cart', start_time)
264 REAL (rprec) :: start_time
267 start_time = profiler_get_start_time()
271 CALL profiler_set_stop_time(
'ece_get_type', start_time)
292 CHARACTER (len=data_name_length),
DIMENSION(7),
INTENT(inout) ::
296 REAL (rprec) :: start_time
299 start_time = profiler_get_start_time()
305 header(4) =
'model_sig(1)'
306 header(5) =
'model_sig(2)'
307 header(6) =
'model_sig(3)'
308 header(7) =
'model_sig(4)'
310 CALL profiler_set_stop_time(
'ece_get_header', start_time)
333 TYPE (model_class),
POINTER :: a_model
334 INTEGER,
INTENT(in) :: i
335 INTEGER,
INTENT(in) :: flags
338 REAL (rprec),
DIMENSION(3) :: x_cart
340 REAL (rprec) :: start_time
343 start_time = profiler_get_start_time()
345 x_cart = this%get_cart(a_model, found)
354 CALL profiler_set_stop_time(
'ece_get_gp_i', start_time)
377 TYPE (model_class),
POINTER :: a_model
379 INTEGER,
INTENT(in) :: flags
382 REAL (rprec),
DIMENSION(3) :: x_cart
384 REAL (rprec) :: start_time
387 start_time = profiler_get_start_time()
389 x_cart = this%get_cart(a_model, found)
398 CALL profiler_set_stop_time(
'ece_get_gp_s', start_time)
424 TYPE (model_class),
POINTER :: a_model
425 REAL (rprec),
DIMENSION(3),
INTENT(in) :: x_cart
426 INTEGER,
INTENT(in) :: flags
429 REAL (rprec),
DIMENSION(3) :: y_cart
431 REAL (rprec) :: start_time
434 start_time = profiler_get_start_time()
436 y_cart = this%get_cart(a_model, found)
445 CALL profiler_set_stop_time(
'ece_get_gp_x', start_time)
471 CHARACTER (len=1),
INTENT(in) :: context(:)
472 REAL (rprec),
DIMENSION(3),
INTENT(in) :: xcart1
473 REAL (rprec),
DIMENSION(3),
INTENT(in) :: xcart2
478 REAL (rprec),
DIMENSION(3) :: bcart1
479 REAL (rprec),
DIMENSION(3) :: bcart2
480 REAL (rprec) :: bmod1
481 REAL (rprec) :: bmod2
482 REAL (rprec) :: start_time
485 start_time = profiler_get_start_time()
489 temp_context = transfer(context, temp_context)
491 bcart1 = equilibrium_get_b_vec(temp_context%model%equilibrium,
493 bcart2 = equilibrium_get_b_vec(temp_context%model%equilibrium,
496 bmod1 = sqrt(dot_product(bcart1, bcart1))
497 bmod2 = sqrt(dot_product(bcart2, bcart2))
499 IF (abs(bmod1 - bmod2) .lt.
500 & temp_context%model%resonace_range)
THEN
505 CALL profiler_set_stop_time(
'ece_function', start_time)
525 REAL(rprec),
INTENT(in) :: xp
526 REAL(rprec),
INTENT(in) :: x1
527 REAL(rprec),
INTENT(in) :: x2