Streamer fluid modeling - An overview of ARCoS  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions/Subroutines
cdr_advect_diffu_vec.f90 File Reference

This code replaces the original c code of cdr_advect_diffu in file cdr.c. More...

Go to the source code of this file.

Functions/Subroutines

subroutine cdr_advect_vec (mass, charge, dens_array, d_dens_array, er_array, ez_array, diffusion_coeff, dr, dz, sprite_module, r0, r1, z0, z1)
 
subroutine mat_efield_r (er_array, efield, d_iso, cm0, d_iso0, r0, r1, dz, z0, z1, z_shift, dx, sprite_module)
 
subroutine mat_efield_z (ez_array, efield, d_iso, cm0, d_iso0, r0, r1, dz, z0, z1, z_shift, dx, sprite_module)
 
subroutine mat_cdr_f_ad_r (data_array, efield, d_iso, mat_r, r0, r1, z0, z1)
 
subroutine mat_cdr_f_ad_z (data_array, efield, d_iso, mat_z, r0, r1, z0, z1)
 
subroutine make_vecs_er (er_min, er, r0, r1, dr)
 

Detailed Description

This code replaces the original c code of cdr_advect_diffu in file cdr.c.

Author
Margreet Nool
The arrays er_array and ez_array are in C stored as
1D arrays. In the wrapper routine cdr_advect_diffu_wrap.c it is
checked of their sizes, er_len, ez_len are equal to rmax-by-zmax.

Note that these are NOT the r0, z0 we received.  The idea here is that
RZ(array, r0, z0) will produce the correct result, where the allocated
array looks like (in the picture, r0, z0 ARE the received ones).
Note: in the picture there is only one buffer cell, while we actually
allocate two.

 +--------------+--------------+...+--------------+--------------+
 |r0 - 1, z0 - 1|              |   |              |              |
 +--------------+--------------+...+--------------+--------------+
 |              |   r0, z0     |   |              |              |
 +--------------+--------------+...+--------------+--------------+
               ...             |...|             ...
 +--------------+--------------+...+--------------+--------------+
 |              |              |   |r1 - 1, z1 - 1|              |
 +--------------+--------------+...+--------------+--------------+
 |              |              |   |              |    r1, z1    |
 +--------------+--------------+...+--------------+--------------+

but the rows z0 +/- 1 and the columns r0 +/- 1 do not belong to the
physical space and are used only to specify boundary conditions.

In the C routines r0, and z0 are zero, and the calculations start 
at the third element (r0-2, r0-1, r0, ...., r1, r1+1), and
(z0-2, z0-1, r0, ...., z1, z1+1), respectively. 
rmax = r1 - r0 + 4 and zmax = z1 - z0 + 4.

Definition in file cdr_advect_diffu_vec.f90.

Function/Subroutine Documentation

subroutine cdr_advect_vec ( double precision, intent(in)  mass,
double precision, intent(in)  charge,
double precision, dimension(r0-2:r1+1,z0-2:z1+1), intent(in)  dens_array,
double precision, dimension(r0-2:r1+1,z0-2:z1+1), intent(out)  d_dens_array,
double precision, dimension(r0-2:r1+1,z0-2:z1+1), intent(in)  er_array,
double precision, dimension(r0-2:r1+1,z0-2:z1+1), intent(in)  ez_array,
double precision, intent(in)  diffusion_coeff,
double precision, intent(in)  dr,
double precision, intent(in)  dz,
logical, intent(in)  sprite_module,
integer, intent(in)  r0,
integer, intent(in)  r1,
integer, intent(in)  z0,
integer, intent(in)  z1 
)

Definition at line 45 of file cdr_advect_diffu_vec.f90.

Here is the call graph for this function:

subroutine mat_efield_r ( double precision, dimension(r1-r0+1,z1-z0), intent(in)  er_array,
double precision, dimension(r1-r0+1,z1-z0), intent(out)  efield,
double precision, dimension(z1-z0), intent(out)  d_iso,
double precision, intent(in)  cm0,
double precision, intent(in)  d_iso0,
integer, intent(in)  r0,
integer, intent(in)  r1,
double precision, intent(in)  dz,
integer, intent(in)  z0,
integer, intent(in)  z1,
integer, intent(in)  z_shift,
double precision, intent(in)  dx,
logical, intent(in)  sprite_module 
)

Definition at line 134 of file cdr_advect_diffu_vec.f90.

Here is the caller graph for this function:

subroutine mat_efield_z ( double precision, dimension(r0:r1-1,z0-1:z1-1), intent(in)  ez_array,
double precision, dimension(r0:r1-1,z0-1:z1-1), intent(out)  efield,
double precision, dimension(z0-1:z1-1), intent(out)  d_iso,
double precision, intent(in)  cm0,
double precision, intent(in)  d_iso0,
integer, intent(in)  r0,
integer, intent(in)  r1,
double precision, intent(in)  dz,
integer, intent(in)  z0,
integer, intent(in)  z1,
integer, intent(in)  z_shift,
double precision, intent(in)  dx,
logical, intent(in)  sprite_module 
)

Definition at line 183 of file cdr_advect_diffu_vec.f90.

Here is the caller graph for this function:

subroutine mat_cdr_f_ad_r ( double precision, dimension(r1-r0+4,z1-z0), intent(in)  data_array,
double precision, dimension(r1-r0+1,z1-z0), intent(in)  efield,
double precision, dimension(z1-z0), intent(in)  d_iso,
double precision, dimension(r1-r0+1,z1-z0), intent(out)  mat_r,
integer, intent(in)  r0,
integer, intent(in)  r1,
integer, intent(in)  z0,
integer, intent(in)  z1 
)

Definition at line 233 of file cdr_advect_diffu_vec.f90.

Here is the caller graph for this function:

subroutine mat_cdr_f_ad_z ( double precision, dimension(r1-r0,z1-z0+4), intent(in)  data_array,
double precision, dimension(r0:r1-1,z0-1:z1-1), intent(in)  efield,
double precision, dimension(z1-z0+1), intent(in)  d_iso,
double precision, dimension(r1-r0,z1-z0+1), intent(out)  mat_z,
integer, intent(in)  r0,
integer, intent(in)  r1,
integer, intent(in)  z0,
integer, intent(in)  z1 
)

Definition at line 310 of file cdr_advect_diffu_vec.f90.

Here is the caller graph for this function:

subroutine make_vecs_er ( double precision, dimension(r0:r1-1), intent(out)  er_min,
double precision, dimension(r0+1:r1), intent(out)  er,
integer, intent(in)  r0,
integer, intent(in)  r1,
double precision, intent(in)  dr 
)

Definition at line 388 of file cdr_advect_diffu_vec.f90.

Here is the caller graph for this function: