testperturb

Module

Description

$Id$

test perturbation method

** 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 :: ltestperturb = .true.


Quick access

Variables:

b1cz, b1k1cz, b1k1sz, b1sz, bk1cz, bk1sz, btest0, it_testperturb_finalize, nt_testperturb

Routines:

add_a0test_b11_b22(), initialize_testperturb(), read_testperturb_init_pars(), read_testperturb_run_pars(), register_testperturb(), rprint_testperturb(), testperturb_begin(), testperturb_finalize(), write_testperturb_init_pars(), write_testperturb_run_pars()

Needed modules

Variables

  • testperturb/b1cz (mz) [real]
  • testperturb/b1k1cz (mz) [real]
  • testperturb/b1k1sz (mz) [real]
  • testperturb/b1sz (mz) [real]
  • testperturb/bk1cz (mz) [real]
  • testperturb/bk1sz (mz) [real]
  • testperturb/btest0 [real,optional/default=1.0]
  • testperturb/cz (mz) [real]
  • testperturb/idiag_alp11 [integer,optional/default=0]
  • testperturb/idiag_alp12 [integer,optional/default=0]
  • testperturb/idiag_alp21 [integer,optional/default=0]
  • testperturb/idiag_alp22 [integer,optional/default=0]
  • testperturb/idiag_alp31 [integer,optional/default=0]
  • testperturb/idiag_alp32 [integer,optional/default=0]
  • testperturb/idiag_eta11 [integer,optional/default=0]
  • testperturb/idiag_eta12 [integer,optional/default=0]
  • testperturb/idiag_eta21 [integer,optional/default=0]
  • testperturb/idiag_eta22 [integer,optional/default=0]
  • testperturb/idiag_eta31 [integer,optional/default=0]
  • testperturb/idiag_eta32 [integer,optional/default=0]
  • testperturb/it_testperturb_finalize [integer,optional/default=0]
  • testperturb/itestfield [character,optional/default='b11-b21']
  • testperturb/ktestfield [real,optional/default=1.0]
  • testperturb/ktestfield1 [real,optional/default=1.0]
  • testperturb/njtest [integer,optional/default=0]
  • testperturb/nt_testperturb [integer,optional/default=0]
  • testperturb/sz (mz) [real]

Subroutines and functions

subroutine  testperturb/register_testperturb()

Initialise variables

2-july-02/nils: coded

Use :

mpicomm (stop_it())

Call to:

svn_id(), fatal_error(), add_a0test_b11_b22(), time_step(), curl(), cross_mn(), stop_it()

subroutine  testperturb/initialize_testperturb()

22-mar-08/axel: adapted from testfield_z

pre-calculate cos(kz) and sin(kz), as well as 1/ktestfield

Call to:

fatal_error(), add_a0test_b11_b22(), time_step(), curl(), cross_mn(), stop_it()

subroutine  testperturb/read_testperturb_init_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

add_a0test_b11_b22(), fatal_error(), time_step(), curl(), cross_mn(), stop_it()

subroutine  testperturb/write_testperturb_init_pars(unit)
Parameters:

unit [integer,in]

Call to:

add_a0test_b11_b22(), fatal_error(), time_step(), curl(), cross_mn(), stop_it()

subroutine  testperturb/read_testperturb_run_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

add_a0test_b11_b22(), fatal_error(), time_step(), curl(), cross_mn(), stop_it()

subroutine  testperturb/write_testperturb_run_pars(unit)
Parameters:

unit [integer,in]

Call to:

add_a0test_b11_b22(), fatal_error(), time_step(), curl(), cross_mn(), stop_it()

subroutine  testperturb/testperturb_begin(f, df)

Calculate the response to perturbations after one timestep.

19-mar-08/axel: coded

Parameters:
Use :

diagnostics, hydro (calc_pencils_hydro()), timestep (time_step())

Call to:

add_a0test_b11_b22(), fatal_error(), time_step(), curl(), cross_mn(), stop_it()

subroutine  testperturb/testperturb_finalize(f)

Finalize testperturb method by subtracting contribution emf of the reference state.

22-mar-08/axel: adapted from testperturb_begin

Parameters:

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

Use :

diagnostics, equ (diagnostic()), hydro (calc_pencils_hydro())

Call to:

curl(), cross_mn(), stop_it()

subroutine  testperturb/add_a0test_b11_b22(f, jtest)

add testfields into f array:

( 0 ) ( 0 ) ( B*coskz )

B^11 = ( 0 ) x ( -B/k*sinkz ) = ( 0 )

( dz) ( 0 ) ( 0 )

( 0 ) ( 0 ) ( B*sinkz )

B^21 = ( 0 ) x ( +B/k*coskz ) = ( 0 )

( dz) ( 0 ) ( 0 )

( 0 ) ( +B/k*sinkz ) ( 0 )

B^12 = ( 0 ) x ( 0 ) = ( B*coskz )

( dz) ( 0 ) ( 0 )

( 0 ) ( -B/k*coskz ) ( 0 )

B^22 = ( 0 ) x ( 0 ) = ( B*sinkz )

( dz) ( 0 ) ( 0 )

22-mar-08/axel: adapted from testfield_z

Parameters:
Use :

cdata, mpicomm (stop_it())

Called from:

read_testperturb_init_pars(), write_testperturb_init_pars()

Call to:

stop_it()

subroutine  testperturb/rprint_testperturb(lreset[, lwrite])

reads and registers print parameters relevant to testperturb

20-mar-08/axel: adapted from shear.f90

Parameters:
  • lreset [logical]

  • lwrite [logical]

Use :

cdata, diagnostics, farraymanager (farray_index_append())