docstr: Test for Robin boundary conditions.
  
  Tests solving heat equation with the following boundary conditions:
  `u(x, t=1) = e * sin(x)`, `u_x(0, t) + 2u(0, t) = e^t`, and
  `2u(x_max, t) + u_x(x_max, t) = 2*e^t`, where `x_max = 2 pi n + pi/2` with
  some integer `n`.
  
  The exact solution `u(x, t=0) = e^t sin(x)`.
docstr_tok: ["Test","for","Robin","boundary","conditions",".","Tests","solving","heat","equation","with","the","following","boundary","conditions",":","`","u","(","x",",","t=1",")","=","e","*","sin","(","x",")","`",",","`","u_x","(","0",",","t",")","+","2u","(","0",",","t",")","=","e^t","`",",","and","`","2u","(","x_max",",","t",")","+","u_x","(","x_max",",","t",")","=","2","*","e^t","`",",","where","`","x_max","=","2","pi","n","+","pi\/2","`","with","some","integer","`","n","`",".","The","exact","solution","`","u","(","x",",","t=0",")","=","e^t","sin","(","x",")","`","."]
code: def testHeatEquation_WithRobinBoundaryConditions(self):
      """Test for Robin boundary conditions.
  
      Tests solving heat equation with the following boundary conditions:
      `u(x, t=1) = e * sin(x)`, `u_x(0, t) + 2u(0, t) = e^t`, and
      `2u(x_max, t) + u_x(x_max, t) = 2*e^t`, where `x_max = 2 pi n + pi/2` with
      some integer `n`.
  
      The exact solution `u(x, t=0) = e^t sin(x)`.
      """
  
      def final_cond_fn(x):
          return math.e * math.sin(x)
  
      def expected_result_fn(x):
          return tf.sin(x)
  
      def lower_boundary_fn(t, x):
          del x
          return 2, -1, tf.math.exp(t)
  
      def upper_boundary_fn(t, x):
          del x
          return 2, 1, 2 * tf.math.exp(t)
  
      grid = grids.uniform_grid(
          minimums=[0],
          maximums=[4.5 * math.pi],
          sizes=[1000],
          dtype=np.float64,
      )
      self._testHeatEquation(
          grid,
          final_t=1,
          time_step=0.01,
          final_cond_fn=final_cond_fn,
          expected_result_fn=expected_result_fn,
          one_step_fn=crank_nicolson_step(),
          lower_boundary_fn=lower_boundary_fn,
          upper_boundary_fn=upper_boundary_fn,
          error_tolerance=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 4 for calling the ParabolicEquationStepperTest obj's underlying member method code with example usage: obj.testHeatEquation_WithRobinBoundaryConditions() and returns: unknown, tf, int,  unknown,  tf, int,  int,  unknown