[table of contents] [master index] [comments] [modules] [programs] [variables] [types] [procedures]
MODULE
step_mod
PURPOSE
Implements pseudo-spectral algorithm for integration of the modified diffusion equation. The algorithm combines the operator-splitting method of Rasmussen and Kaloskas with Richardson extrapolation to obtain an algorithm with errors of O(ds**4). Subroutine init_step must be called once to allocate the FFT arrays used by the module. Subroutine make_propg must be called once at the beginning of each block of a block copolymer, to set variables that are used throughout that block. Subroutine step_exp implements one 'time' step of the integration algorithm.
SOURCE
module step_mod use const_mod use fft_mod implicit none private public :: init_step ! allocate array needed by module public :: make_propg ! evaluate exp(-ds*b^2*nabla/6), exp(-ds*omega/2) public :: step_exp ! evaluate on integration step
SUBROUTINE
init_step(n)
PURPOSE
allocate memory to module arrays
ARGUMENTS
integer n(3) - grid dimensions
SOURCE
subroutine init_step(n) implicit none integer, intent(IN) :: n(3)
SUBROUTINE
make_propg(ds,ksq,omega)
PURPOSE
evaluate exp_ksq, exp_omega's
ARGUMENTS
real(long) ds - step size real(long) b - statistical segment length real(long) ksq - k^2 on grid real(long) omega - omega field on grid
SOURCE
subroutine make_propg(ds,b,ksq,omega) implicit none real(long), intent(IN) :: ds real(long), intent(IN) :: b real(long), intent(IN) :: ksq(0:,0:,0:) real(long), intent(IN) :: omega(0:,0:,0:)
SUBROUTINE
step_exp
PURPOSE
Calculate one step in pseudo-spectral algorithm for integrating the modified diffusion equation.
ARGUMENTS
real q_in - input q(r,s) real q_out - output q(r,s+-ds) fft_plan plan - see fft_mod for details
SOURCE
subroutine step_exp(q_in, q_out, plan) implicit none real(long), intent(IN) :: q_in(0:,0:,0:) real(long), intent(OUT) :: q_out(0:,0:,0:) type(fft_plan), intent(IN) :: plan