SOLVE A 1D DIFFUSION PROBLEM. IT IS EXPECTED THAT GHOST CELLS WILL HAVE BEEN TRIMMED FROM ARRAYS BEFORE THEY ARE PASSED INTO THIS ROUTINE.
FORM OF EQUATION SOLVED IS: dT/dt + A T + B dT/dx + C d/dx(D dT/dx) = E
NOTE: UPON FURTHER REVIEW I THINK THE FORM SOLVED IS ACTUALLY: dT/dt = A T + B dT/dx + C d/dx(D dT/dx) + E
ORGANIZE SIZES AND THERMAL CONDUCTIVITY boundaries to be overwritten later... This is now done for each grid point in a separate statement
## TR HALF STEP: DEFINE A MATRIX USING BANDED STORAGE
MINX1 BOUNDARY (DIRICHLET) FIRST INTERIOR GRID POINT
ix1-1
ix1
ix1+1, super-diag. INTERIOR GRID POINTS do concurrent OK because only indexing already defined things ix1-2 grid point, sub-diag. ix1+2 grid point LAST INTERIOR GRID POINT MAXX1 BOUNDARY ### TR HALF STEP MATRIX SOLUTION: CALL LAPACK'S BANDED SOLVER
BANDED SOLVER (INPUT MATRIX MUST BE SHIFTED 'DOWN' BY KL ROWS)
## BDF2 STEP: DEFINE A MATRIX USING BANDED STORAGE
MINX1 BOUNDARY (DIRICHLET) FIRST INTERIOR GRID POINT INTERIOR GRID POINTS MAXX1 BOUNDARY ## BDF2 STEP MATRIX SOLUTION: CALL LAPACK'S BANDED SOLVER
BANDED SOLVER (INPUT MATRIX MUST BE SHIFTED 'DOWN' BY KL ROWS)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | Ts | ||
real(kind=wp), | intent(in), | dimension(:) | :: | A | ||
real(kind=wp), | intent(in), | dimension(:) | :: | B | ||
real(kind=wp), | intent(in), | dimension(:) | :: | C | ||
real(kind=wp), | intent(in), | dimension(:) | :: | D | ||
real(kind=wp), | intent(in), | dimension(:) | :: | E | ||
real(kind=wp), | intent(in) | :: | Tsminx1 | |||
real(kind=wp), | intent(in) | :: | Tsmaxx1 | |||
real(kind=wp), | intent(in) | :: | dt | |||
real(kind=wp), | intent(in), | dimension(0:) | :: | dx1 | ||
real(kind=wp), | intent(in), | dimension(:) | :: | dx1i |