docstr: Test for PDE with default boundary condition with inner term.
  
  Take equation
  `u_{t} - (x - x**3)[u]_{xx} + [(x - x**3) u]_{x} + (3 * x**2 - 2)u = 0` with
  boundary conditions `u_{t} + (x - 1) u_{x} = 0` at x = 0
  and `u(t, 1) = exp(t + 1)`, and an initial condition `u(0, x) = exp(x)`.
  
  Solve this equation and compare the result to `u(t, x) = exp(t + x)`.
docstr_tok: ["Test","for","PDE","with","default","boundary","condition","with","inner","term",".","Take","equation","`","u_","{","t","}","-","(","x","-","x","*","*","3",")","[","u","]","_","{","xx","}","+","[","(","x","-","x","*","*","3",")","u","]","_","{","x","}","+","(","3","*","x","*","*","2","-","2",")","u","=","0","`","with","boundary","conditions","`","u_","{","t","}","+","(","x","-","1",")","u_","{","x","}","=","0","`","at","x","=","0","and","`","u","(","t",",","1",")","=","exp","(","t","+","1",")","`",",","and","an","initial","condition","`","u","(","0",",","x",")","=","exp","(","x",")","`",".","Solve","this","equation","and","compare","the","result","to","`","u","(","t",",","x",")","=","exp","(","t","+","x",")","`","."]
code: def testDefaultBoundaryConditionsInnerTermNoOuterLower(self):
      """Test for PDE with default boundary condition with inner term.
  
      Take equation
      `u_{t} - (x - x**3)[u]_{xx} + [(x - x**3) u]_{x} + (3 * x**2 - 2)u = 0` with
      boundary conditions `u_{t} + (x - 1) u_{x} = 0` at x = 0
      and `u(t, 1) = exp(t + 1)`, and an initial condition `u(0, x) = exp(x)`.
  
      Solve this equation and compare the result to `u(t, x) = exp(t + x)`.
      """
  
      def second_order_coeff_fn(t, coord_grid):
          del t
          x = coord_grid[0]
          return [[-(x - x**3)]]
  
      def first_order_coeff_fn(t, coord_grid):
          del t
          x = coord_grid[0]
          return [tf.ones_like(x)]
  
      def inner_first_order_coeff_fn(t, coord_grid):
          del t
          x = coord_grid[0]
          return [x - x**3]
  
      @dirichlet
      def upper_boundary_fn(t, x):
          del x
          return tf.math.exp(1 + t)
  
      def zeroth_order_coeff_fn(t, coord_grid):
          del t
          x = coord_grid[0]
          return 3 * x**2 - 2
  
      grid = self.evaluate(
          grids.uniform_grid(
              minimums=[0], maximums=[1], sizes=[100], dtype=np.float64
          )
      )
  
      initial_values = tf.expand_dims(tf.math.exp(grid[0]), axis=0)
      final_t = 0.1
      time_step = 0.001
  
      est_values = fd_solvers.solve_forward(
          start_time=0,
          end_time=final_t,
          coord_grid=grid,
          values_grid=initial_values,
          time_step=time_step,
          boundary_conditions=[(None, upper_boundary_fn)],
          second_order_coeff_fn=second_order_coeff_fn,
          first_order_coeff_fn=first_order_coeff_fn,
          inner_first_order_coeff_fn=inner_first_order_coeff_fn,
          zeroth_order_coeff_fn=zeroth_order_coeff_fn,
      )[0]
  
      true_values = tf.expand_dims(
          tf.math.exp(final_t + grid[0]), axis=0
      )
      self.assertAllClose(est_values, true_values, atol=1e-2, rtol=1e-2)
  
imports: import math
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 20 for calling the ParabolicEquationStepperTest obj's underlying member method code with example usage: obj.testDefaultBoundaryConditionsInnerTermNoOuterLower() and returns: list, list, list, tf, unknown