Procedures for example_web.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | value |
This routine sets the ID array in iwork
, indicating which components are differential
and which are algebraic.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | mx | |||
integer, | intent(in) | :: | my | |||
integer, | intent(in) | :: | ns | |||
integer, | intent(in) | :: | nsd | |||
integer, | intent(in) | :: | lid | |||
integer, | intent(inout) | :: | iwork(*) |
This routine computes and loads the vectors of initial values.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(out) | :: | c(:) | |||
real(kind=rk), | intent(out) | :: | cprime(:) | |||
real(kind=rk), | intent(in) | :: | pred_ic | |||
real(kind=rk), | intent(inout) | :: | rpar(:) |
This routine prints the values of the individual species densities at the current time
t
, to logical unit lout
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | t | |||
real(kind=rk), | intent(in) | :: | c(ns,mx,my) | |||
integer, | intent(in) | :: | ns | |||
integer, | intent(in) | :: | mx | |||
integer, | intent(in) | :: | my | |||
integer, | intent(in) | :: | lout |
This routine computes the residuals vector, using subroutine f for the right-hand sides.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | t | |||
real(kind=rk), | intent(in) | :: | c(*) | |||
real(kind=rk), | intent(in) | :: | cprime(*) | |||
real(kind=rk), | intent(in) | :: | cj | |||
real(kind=rk), | intent(out) | :: | delta(*) | |||
integer, | intent(in) | :: | ires | |||
real(kind=rk), | intent(inout) | :: | rpar(*) | |||
integer, | intent(in) | :: | ipar(*) |
This routine computes the right-hand sides of all the equations and returns them in the
array cprime
. The interaction rates are computed by calls to rates, and these are
saved in rpar
for later use in preconditioning.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | t | |||
real(kind=rk), | intent(in) | :: | c(*) | |||
real(kind=rk), | intent(out) | :: | cprime(*) | |||
real(kind=rk), | intent(inout) | :: | rpar(*) |
This routine computes one block of the rate term of the system , namely block
(jx, jy)
, for use in preconditioning.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | t | |||
integer, | intent(in) | :: | jx | |||
integer, | intent(in) | :: | jy | |||
real(kind=rk), | intent(in) | :: | c(*) | |||
real(kind=rk), | intent(inout) | :: | rate(*) |
This routine interfaces to subroutines DRBDJA or DRBGJA, depending on the flag
jbg=ipar(2)
, to generate and preprocess the block-diagonal Jacobian corresponding to
the reaction term .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | res_ | ||||
integer, | intent(in) | :: | ires | |||
integer, | intent(in) | :: | neq | |||
real(kind=rk), | intent(in) | :: | t | |||
real(kind=rk), | intent(in) | :: | c(*) | |||
real(kind=rk), | intent(in) | :: | cprime(*) | |||
real(kind=rk), | intent(in) | :: | rewt(*) | |||
real(kind=rk), | intent(in) | :: | savr(*) | |||
real(kind=rk), | intent(in) | :: | wk(*) | |||
real(kind=rk), | intent(in) | :: | h | |||
real(kind=rk), | intent(in) | :: | cj | |||
real(kind=rk), | intent(in) | :: | wp(*) | |||
integer, | intent(in) | :: | iwp(*) | |||
integer, | intent(in) | :: | ier | |||
real(kind=rk), | intent(in) | :: | rpar(*) | |||
integer, | intent(in) | :: | ipar(*) |
This routine applies the inverse of a product preconditioner matrix to the vector in the
array b
. Depending on the flag jpre
, this involves a call to gs, for the inverse
of the spatial factor, and/or a call to DRBDPS or DRBGPS for the inverse of the
reaction-based factor (cj*I_d - dR/dy
). The latter factor uses block-grouping (with a
call to DRBGPS) if jbg == 1
, and does not (with a call to DRBDPS) if jbg == 0
.
the flag jbg
is passed as ipar(2)
. The array b
is overwritten with the solution.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | neq | |||
real(kind=rk), | intent(in) | :: | t | |||
real(kind=rk), | intent(in) | :: | cc(*) | |||
real(kind=rk), | intent(in) | :: | ccprime(*) | |||
real(kind=rk), | intent(in) | :: | savr(*) | |||
real(kind=rk), | intent(inout) | :: | wk(*) | |||
real(kind=rk), | intent(in) | :: | cj | |||
real(kind=rk), | intent(in) | :: | wt(*) | |||
real(kind=rk), | intent(in) | :: | wp(*) | |||
integer, | intent(in) | :: | iwp(*) | |||
real(kind=rk), | intent(inout) | :: | b(*) | |||
real(kind=rk), | intent(in) | :: | eplin | |||
integer, | intent(inout) | :: | ier | |||
real(kind=rk), | intent(inout) | :: | rpar(*) | |||
integer, | intent(in) | :: | ipar(*) |
This routine provides the inverse of the spatial factor for a product preconditoner in an
ns-species reaction-diffusion problem. It performs itmax
Gauss-Seidel iterations to
compute an approximation to , where , and
represents the diffusion contributions to the Jacobian. The solution vector is returned
in z
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
real(kind=rk), | intent(in) | :: | hl0 | |||
real(kind=rk), | intent(inout) | :: | z(*) | |||
real(kind=rk), | intent(inout) | :: | x(*) |
This routine computes the spatial average value of .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | c(*) | |||
real(kind=rk), | intent(out) | :: | c1ave |
Roots routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | neq | |||
real(kind=rk), | intent(in) | :: | t | |||
real(kind=rk), | intent(in) | :: | c(neq) | |||
real(kind=rk), | intent(in) | :: | cprime(neq) | |||
integer, | intent(in) | :: | nrt | |||
real(kind=rk), | intent(out) | :: | rval(nrt) | |||
real(kind=rk), | intent(in) | :: | rpar(*) | |||
integer, | intent(in) | :: | ipar(*) |