[table of contents] [master index] [comments] [modules] [programs] [variables] [types] [procedures]
MODULE
chain_mod
PURPOSE
Define derived type chain_grid_type, and allocate arrays of this type. Subroutines to make and destroy objects of chain_type.
SOURCE
module chain_mod use const_mod use fft_mod, only : fft_plan implicit none private public :: chain_grid_type public :: null_chain_grid public :: make_chain_grid public :: destroy_chain_grid
TYPE
chain_grid_type
PURPOSE
Data structures defining discretization of s for a chain. Pointers to qf(r,s) and qr(r,s) functions for a chain Pointers to del_qf and del_qr functions for perturbation theory
SOURCE
type chain_grid_type integer, pointer :: block_bgn(:) ! 1st element of block real(long), pointer :: block_ds(:) ! step size for block real(long), pointer :: qf(:,:,:,:) ! function qf(x,y,x,s) real(long), pointer :: qr(:,:,:,:) ! function qr(x,y,z,s) real(long), pointer :: rho(:,:,:,:) ! rho(x,y,z,s,block) type(fft_plan) :: plan ! fft plan, see fft_mod real(long) :: bigQ ! chain partition func. complex(long), pointer :: del_qf(:,:,:,:) ! perturbation in qf complex(long), pointer :: del_qr(:,:,:,:) ! perturbation in qr complex(long) :: delQ ! perturbation in bigQ end type
PURPOSE
Nullify the pointers to ensure they have the "dissociated" status.
SOURCE
subroutine null_chain_grid(chain) implicit none type(chain_grid_type), intent(INOUT) :: chain
SUBROUTINE
make_chains(chain,plan,nblk,blk_length,ds,allocate_q)
PURPOSE
allocate memory for a single chain_grid_type variable initiate chain(:)%block_bgn, chain(:)%block_ds
ARGUMENTS
plan = grid dimensions and FFT plan, see fft_mod nblk = # of blocks of a single chain blk_length = block lengths ds = segment length used to discretize the block allocate_q = true if qf and qr need to be allocated COMMENTS The # of segments for each block need to be even, because of the use of Simpson's rule in density/stress calculation
SOURCE
subroutine & make_chain_grid(chain,plan,nblk,blk_length,ds0,allocate_q,perturb,order) implicit none type(chain_grid_type), intent(INOUT) :: chain type(fft_plan), intent(IN) :: plan integer, intent(IN) :: nblk real(long), intent(IN) :: blk_length(:) real(long), intent(IN) :: ds0 logical, intent(IN) :: allocate_q logical,optional, intent(IN) :: perturb integer,optional, intent(IN) :: order
SUBROUTINE
destroy_chain_grid(chain)
PURPOSE
Deallocate memories use by chain%...
ARGUMENTS
chain = the chain_grid_type to be deallocated
SOURCE
subroutine destroy_chain_grid(chain) implicit none type(chain_grid_type) :: chain