Procedures for example_heat.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | lipar | = | 4 | |
integer, | public, | parameter | :: | lrpar | = | 2 | |
integer, | public, | parameter | :: | nrt | = | 2 |
This routine computes and loads the vector of initial values.
The initial u
values are given by the polynomial u = 16x(1-x)y(1-y)
.
The initial uprime
values are set to zero (DASKR corrects these during the first
time step).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(out) | :: | u(:) | |||
real(kind=rk), | intent(out) | :: | uprime(:) | |||
real(kind=rk), | intent(in) | :: | rpar(:) | |||
integer, | intent(in) | :: | ipar(:) |
User-supplied residuals subroutine. It computes the residuals for the 2D discretized heat equation, with zero boundary values.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | t | |||
real(kind=rk), | intent(in) | :: | u(*) | |||
real(kind=rk), | intent(in) | :: | uprime(*) | |||
real(kind=rk), | intent(in) | :: | cj | |||
real(kind=rk), | intent(out) | :: | delta(*) | |||
integer, | intent(inout) | :: | ires | |||
real(kind=rk), | intent(in) | :: | rpar(*) | |||
integer, | intent(in) | :: | ipar(*) |
Roots routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | neq | |||
real(kind=rk), | intent(in) | :: | t | |||
real(kind=rk), | intent(in) | :: | u(neq) | |||
real(kind=rk), | intent(in) | :: | uprime(neq) | |||
integer, | intent(in) | :: | nrt | |||
real(kind=rk), | intent(out) | :: | rval(nrt) | |||
real(kind=rk), | intent(in) | :: | rpar(*) | |||
integer, | intent(in) | :: | ipar(*) |