streamlines

Module

Description

$Id$

** AUTOMATIC CPARAM.INC GENERATION ************************ Declare (for generation of cparam.inc) the number of f array variables and auxiliary variables added by this module

CPARAM logical, parameter :: lstreamlines = .true.


Quick access

Variables:

finished, grid_pos_b, h_max, h_min, int_q, l_max, ntracers, receive, request, status, tol, trace_field, trace_sub, ttrace_write, ttracers, vv_rcv, vv_rqst

Routines:

get_grid_pos(), get_vector(), interpolate_vv(), read_streamlines_init_pars(), read_streamlines_run_pars(), send_vec(), trace_single(), trace_streamlines(), tracers_prepare(), write_streamlines_init_pars(), write_streamlines_run_pars(), wtracers()

Needed modules

Variables

  • streamlines/finished [integer,optional/default=99]
  • streamlines/grid_pos_b (3) [integer]
  • streamlines/h_max [real,public/optional/default=0.4]
  • streamlines/h_min [real,public/optional/default=0.0001]
  • streamlines/int_q [character,public/optional/default='']
  • streamlines/l_max [real,public/optional/default=10.0]
  • streamlines/ntracers [integer,public]
  • streamlines/receive [integer,optional/default=0]
  • streamlines/request [integer]
  • streamlines/status (mpi_status_size) [integer]
  • streamlines/tol [real,public/optional/default=0.0001]
  • streamlines/trace_field [character,public/optional/default='']
  • streamlines/trace_sub [integer,public/optional/default=1]
  • streamlines/ttrace_write [real]
  • streamlines/ttracers [real,public]

    time of the tracer calculation

  • streamlines/vv_rcv [integer,optional/default=20]
  • streamlines/vv_rqst [integer,optional/default=10]

Subroutines and functions

subroutine  streamlines/tracers_prepare()

Prepare ltracers for writing tracers into tracers file

12-mar-12/simon: coded

Use :

sub (update_snaptime(), read_snaptime())

Called from:

helper_loop(), reload(), gen_output(), timeloop()

Call to:

read_snaptime(), update_snaptime(), fatal_error(), send_vec(), get_grid_pos(), get_vector(), interpolate_vv(), trace_single(), curl(), trace_streamlines()

subroutine  streamlines/get_grid_pos(phys_pos, grid_pos, n_int, outside)

Determines the grid cell in this core for the physical location ‘phys_pos’.

13-feb-12/simon: coded

Parameters:
  • phys_pos (3) [real,in]

  • grid_pos (8,3) [integer,out]

  • n_int [integer,out]

  • outside [integer,out]

Called from:

tracers_prepare(), get_grid_pos(), interpolate_vv(), get_vector(), trace_single()

Call to:

fatal_error(), send_vec(), get_grid_pos(), get_vector(), interpolate_vv(), trace_single(), curl(), trace_streamlines()

subroutine  streamlines/interpolate_vv(phys_pos, grid_pos, vv_adj, n_int, vv_int)

Interpolates the vector field by taking the adjacent values.

27-apr-12/simon: coded

Parameters:
  • phys_pos (3) [real,in]

  • grid_pos (8,3) [integer,in]

  • vv_adj (8,3 + mfarray) [real,in]

  • n_int [integer,in]

  • vv_int (3 + mfarray) [real,out]

Called from:

tracers_prepare(), get_grid_pos(), interpolate_vv(), get_vector(), trace_single()

Call to:

fatal_error(), send_vec(), get_grid_pos(), get_vector(), interpolate_vv(), trace_single(), curl(), trace_streamlines()

subroutine  streamlines/get_vector(f, grid_pos, vvb, vv)

Gets the vector field value and the f-array at grid_pos from another core.

20-feb-12/simon: coded

Parameters:
  • f (mx,my,mz,mfarray) [real]

  • grid_pos (3) [integer]

  • vvb (3 + mfarray) [real,out]

  • vv (,,*,*) [real,pointer] :: vector field which is beaing traced

Use :

mpicomm

Called from:

tracers_prepare(), get_grid_pos(), interpolate_vv(), get_vector(), trace_single()

Call to:

fatal_error(), send_vec(), get_grid_pos(), get_vector(), interpolate_vv(), trace_single(), curl(), trace_streamlines()

subroutine  streamlines/trace_single(tracer, f, vv)

Trace a single field line until it hits the core boundary.

20-mar-14/simon: coded

Parameters:
  • tracer (7) [real]

  • f (mx,my,mz,mfarray) [real]

  • vv (,,*,*) [real,pointer] :: vector field which is beaing traced

Called from:

tracers_prepare(), trace_streamlines(), get_grid_pos(), interpolate_vv(), get_vector(), trace_single()

Call to:

send_vec(), get_grid_pos(), get_vector(), interpolate_vv(), trace_single(), fatal_error(), curl(), trace_streamlines()

subroutine  streamlines/trace_streamlines(f, tracers, n_tracers, vv)

trace stream lines of the vetor field stored in vv

13-feb-12/simon: coded 20-mar-14/simon: moved the bulk of it into ‘trace_single’ routine

Parameters:
  • f (mx,my,mz,mfarray) [real]

  • tracers (,) [real,pointer]

  • n_tracers [integer]

  • vv (,,*,*) [real,pointer] :: vector field which is beaing traced

Use :

mpicomm

Called from:

tracers_prepare(), trace_streamlines(), wtracers(), get_grid_pos(), interpolate_vv(), get_vector(), trace_single(), send_vec()

Call to:

send_vec(), trace_single(), fatal_error(), curl(), trace_streamlines()

subroutine  streamlines/send_vec(vv, f)

Create a receive request for asynchronous communication of field information and perform such communication if required.

20-mar-14/simon: coded

Parameters:
  • vv (,,*,*) [real,pointer] :: vector field which is beaing traced

  • f (mx,my,mz,mfarray) [real]

Use :

mpicomm

Called from:

tracers_prepare(), trace_streamlines(), get_grid_pos(), interpolate_vv(), get_vector(), trace_single()

Call to:

fatal_error(), curl(), trace_streamlines()

subroutine  streamlines/wtracers(f, path)

Write the tracers values to tracer.dat. This should be called during runtime.

12-mar-12/simon: coded

Parameters:
Use :

general (keep_compiler_quiet()), sub (curl())

Called from:

helper_loop(), reload(), gen_output()

Call to:

curl(), trace_streamlines()

subroutine  streamlines/read_streamlines_init_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

subroutine  streamlines/write_streamlines_init_pars(unit)
Parameters:

unit [integer,in]

Called from:

get_datadir(), get_snapdir(), read_all_init_pars(), read_all_run_pars(), get_downpars()

subroutine  streamlines/read_streamlines_run_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

subroutine  streamlines/write_streamlines_run_pars(unit)
Parameters:

unit [integer,in]

Called from:

get_datadir(), get_snapdir(), read_all_init_pars(), read_all_run_pars(), get_downpars()