Routines implementing Brownian Dynamics (BD) solver.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private | :: | lhdia | ||||
logical, | private | :: | write_traj | ||||
integer, | private | :: | lanc_mxitr | ||||
integer, | private | :: | nlmxitr | ||||
integer, | private | :: | kdmax | ||||
integer, | private | :: | nts_mobsam | ||||
real(kind=rp), | private | :: | tim_stp | ||||
real(kind=rp), | private | :: | lanc_tol | ||||
real(kind=rp), | private | :: | ftol | ||||
real(kind=rp), | private | :: | stptol | ||||
integer(kind=ip_long), | private | :: | nts | ||||
integer(kind=ip_long), | private | :: | nts_sim | ||||
integer(kind=ip_long), | private | :: | nts_dump | ||||
integer(kind=ip_long), | private | :: | nts_samp | ||||
integer(kind=ip_long), | private | :: | nts_log | ||||
character(len=4), | private | :: | mob_fctr | ||||
character(len=4), | private | :: | bdintg | ||||
character(len=:), | private, | allocatable | :: | fn_revive | |||
type(smbx_t), | private, | pointer | :: | psmbx | => | null() | |
type(atmcfg_t), | private, | pointer | :: | patc | => | null() | |
integer, | private | :: | cntr_mobsam | ||||
real(kind=rp), | private | :: | sqrt_two_dt | ||||
real(kind=rp), | private, | dimension(: ), allocatable | :: | drift | |||
real(kind=rp), | private, | dimension(:,:), allocatable | :: | diffusion | |||
real(kind=rp), | private, | dimension(:,:), allocatable | :: | mob | |||
real(kind=rp), | private, | dimension(:), allocatable | :: | crd0 | |||
real(kind=rp), | private, | dimension(:), allocatable | :: | sol | |||
real(kind=rp), | private, | dimension(:), allocatable | :: | nitsol_rwork | |||
real(kind=rp), | private, | dimension(:), pointer | :: | pvcrd | => | null() | |
real(kind=rp), | private, | dimension(:), pointer | :: | pvfrc | => | null() |
Initializes the BD solver.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ctrlpar_t), | intent(in) | :: | cpar | |||
integer, | intent(in) | :: | num_atoms | |||
character(len=*), | intent(in) | :: | job_tag | |||
integer, | intent(out) | :: | ierr |
Clears up memory allocated in bds_init.
Driver for BD integrator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip_long), | intent(in) | :: | nts_beg | |||
type(smbx_t), | intent(in), | target | :: | simbox | ||
type(atmcfg_t), | intent(inout), | target | :: | atc | ||
integer, | intent(out) | :: | ierr | Error flag |
Performs one step of BD integration using explicit Euler-Maruyama scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | ierr |
Performs one step of BD integration using semi-implicit Euler scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | ierr |
Calculates the nonlinear function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
real(kind=rp), | intent(in), | dimension(*) | :: | xcur | ||
real(kind=rp), | intent(out), | dimension(*) | :: | fcur | ||
real(kind=rp), | intent(in), | dimension(*) | :: | rpar | ||
integer, | intent(in), | dimension(*) | :: | ipar | ||
integer, | intent(out) | :: | ierr |
Calculates jacobian times vector product. This is a dummy subroutine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
real(kind=rp), | intent(in), | dimension(:) | :: | xcur | ||
real(kind=rp), | intent(in), | dimension(:) | :: | fcur | ||
integer, | intent(in) | :: | ijob | |||
real(kind=rp), | intent(in), | dimension(:) | :: | v | ||
real(kind=rp), | intent(out), | dimension(:) | :: | z | ||
real(kind=rp), | intent(in), | dimension(:) | :: | rpar | ||
integer, | intent(in), | dimension(:) | :: | ipar | ||
integer, | intent(out) | :: | ierr |
Calculates the diffusion term of the SDE. Updates module variables
diffusion
and cntr_mobsam
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | ierr |
Calculates the drift term of the SDE.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | ierr |
Calculates the RPY approximation to the mobility tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(in), | dimension(:,:) | :: | coordinates | (3, num_atoms*) matrix; stores the atom positions. |
|
real(kind=rp), | intent(out), | dimension(:,:) | :: | mob | (3num_atoms, 3num_atoms) matrix; stores the mobility tensor. |