;+ ; NAME: ; vt3d_step_impl_1loc ; PURPOSE: (one line) ; step the temperature one time step at a single location ; DESCRIPTION: ; step the temperature one time step at a single location ; CATEGORY: ; Volatile Transport ; CALLING SEQUENCE: ; vt3d_step_impl_1loc, alpha_i, beta_0, beta_i, gamma_0, gamma_J, temp_0, temp_i ; INPUTS: ; alpha_i: dependance of temp[1..J] on temp[0..J-1], unitless, float[J] ; beta_0: dependance of temp[0] on temp[1], unitless, float ; beta_i: dependance of temp[1..J] on temp[2..J+1], unitless, float[J] ; gamma_0: net flux at upper boundary, K, float ; gamma_J: net flux at lower boundary, K, float ; INPUT-OUTPUTS: ; temp_0 : temperature at layer 0, K, float ; temp_i : temperature at layer 1..J, K, float[J] ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; nsurf = 0 or 1 ; PROCEDURE: ; Solve implicit equation ; Young, L. A. 2016, Volatile transport on inhomogeneous surfaces: II. Numerical calculations (VT3D) ; Resubmitted to Icarus. ; This is not used directly in Young 2016, but is used as part of ; the Crank-Nicholson time step. See: ; Eq. 3.4-9b ; MODIFICATION HISTORY: ; Written 2011 Feb 6, by Leslie Young, SwRI ; 2016 Mar 24 LAY. Modified for inclusion in vt3d library. ;- pro vt3d_step_impl_1loc, alpha_i, beta_0, beta_i, gamma_0, gamma_J, temp_0, temp_i n_j = n_elements(alpha_i) temp_this = [temp_0, temp_i] temp_this[0] += gamma_0 temp_this[n_j] += gamma_J lower = -[alpha_i[1:n_j-1]] diag = 1 + (alpha_i + beta_i) upper = -beta_i[0:n_j-2] LA_TRIDC, lower, diag, upper, u2, index a_bar = replicate(0.d, n_j) a_bar[0] = -alpha_i[0] y = LA_TRISOL( lower, diag, upper, u2, index, a_bar,/double) z = LA_TRISOL( lower, diag, upper, u2, index, temp_this[1:n_j],/double) c = - beta_0 * y[0] d = - beta_0 * z[0] h_bar = 1 + beta_0 temp_0 = (temp_this[0] - d)/(h_bar - c) temp_i = (z - y * temp_0) end