trace Subroutine

public subroutine trace(x_init, y_init, phi_init, dphi, equi, x_end, y_end, phi_end, arclen, fluxexp, condition, stop_int, tracing_terminated, maxstep, istat)

Performs integration along field line. If condition is present, performs field line tracing while condition is true

Arguments

Type IntentOptional Attributes Name
real(kind=FP), intent(in) :: x_init

Start point (x-coordinate)

real(kind=FP), intent(in) :: y_init

Start point (y-coordinate)

real(kind=FP), intent(in) :: phi_init

Start point (phi-coordinate)

real(kind=FP), intent(in) :: dphi

Toroidal distance to be traced

class(equilibrium_t), intent(inout), target :: equi

Equilibrium defining the field line

real(kind=FP), intent(out), optional :: x_end

End point (x-coordinate)

real(kind=FP), intent(out), optional :: y_end

End point (y-coordinate)

real(kind=FP), intent(out), optional :: phi_end

Actual phi-coordinate end point of integration (relevant if condition is present)

real(kind=FP), intent(out), optional :: arclen

Length along field line

real(kind=FP), intent(out), optional :: fluxexp

Flux expansion, i.e. 1 / Btor integrated along fieldline

procedure(condition_interface), optional :: condition

Trace is performed until condition is true

logical, intent(in), optional :: stop_int

If = true, then the routine stops the integration once the condition is met. Otherwise, integration continues with integrand multiplied by zero. The default setting is false.

logical, intent(out), optional :: tracing_terminated

True, if given as an input, and the tracing was terminated due the fulfillment of the given condition. False by default.

real(kind=FP), intent(in), optional :: maxstep

Maximum stepsize for the integration

integer, intent(out), optional :: istat

PARALLAX error status of trace routine. If present, the trace routine will trigger a warning in case of error, and return an error code. If not present, the trace routine will trigger an error.


Calls

proc~~trace~~CallsGraph proc~trace trace destroy destroy proc~trace->destroy initialize initialize proc~trace->initialize integrate integrate proc~trace->integrate proc~get_stderr get_stderr proc~trace->proc~get_stderr proc~handle_error handle_error proc~trace->proc~handle_error none~handle_error error_handler_t%handle_error proc~handle_error->none~handle_error

Called by

proc~~trace~~CalledByGraph proc~trace trace proc~complete_support_map complete_support_map proc~complete_support_map->proc~trace proc~distance_to_boundary distance_to_boundary proc~distance_to_boundary->proc~trace proc~generate_poincare_data generate_poincare_data proc~generate_poincare_data->proc~trace proc~init_mag_axis_loc dommaschk_t%init_mag_axis_loc proc~init_mag_axis_loc->proc~trace proc~write_vtk_mesh write_vtk_mesh proc~write_vtk_mesh->proc~trace program~test_diffusion test_diffusion program~test_diffusion->proc~trace program~test_diffusion->proc~complete_support_map program~test_diffusion->proc~write_vtk_mesh proc~connection_length connection_length proc~connection_length->proc~distance_to_boundary proc~init immersed_trace_t%init proc~init->proc~distance_to_boundary proc~init~8 dommaschk_t%init proc~init~8->proc~init_mag_axis_loc proc~shortest_dist_to_bound shortest_dist_to_bound proc~shortest_dist_to_bound->proc~distance_to_boundary program~diagnose_poincare diagnose_poincare program~diagnose_poincare->proc~generate_poincare_data