Lennard Schober commited on
Commit
7a286ff
·
1 Parent(s): 0bb1ad3

Fix formatting

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -30,7 +30,7 @@ def complex_heat_eq_solution(x, t, k=glob_k, a=glob_a, b=glob_b, c=glob_c):
30
  global glob_k, glob_a, glob_b, glob_c
31
  glob_k, glob_a, glob_b, glob_c = k, a, b, c
32
  return (
33
- np.exp(-glob_k * (glob_b * np.pi) ** 2 * t) * np.cos(glob_a * np.pi * x)
34
  + np.exp(-glob_k * (glob_b * np.pi) ** 2 * t) * np.sin(glob_b * np.pi * x)
35
  + np.exp(-glob_k * (glob_c * np.pi) ** 2 * t) * np.sin(glob_c * np.pi * x)
36
  )
@@ -434,7 +434,6 @@ def plot_all(m, kernel):
434
  gr.update(visible=True, value=error_fig),
435
  )
436
 
437
-
438
  # Gradio interface
439
  def create_gradio_ui():
440
  global glob_k, glob_a, glob_b, glob_c
@@ -446,9 +445,9 @@ def create_gradio_ui():
446
  # Function parameter inputs
447
  gr.Markdown(
448
  """
449
- ## Function: $$u_k(x, t)\\coloneqq\\exp(-kt)\\cdot\\sin(\\pi x)+0.5\\cdot\\exp(\\textcolor{red}{a}kt)\\cdot\\sin(\\textcolor{red}{b}\\pi x)+0.25\\cdot\\exp(\\textcolor{red}{c}kt)\\cdot\\sin(\\textcolor{red}{d}\\pi x)$$
450
 
451
- Adjust the values for <span style='color: red;'>a</span>, <span style='color: red;'>b</span>, <span style='color: red;'>c</span> and <span style='color: red;'>d</span> with the sliders below.
452
  """
453
  )
454
 
 
30
  global glob_k, glob_a, glob_b, glob_c
31
  glob_k, glob_a, glob_b, glob_c = k, a, b, c
32
  return (
33
+ np.exp(-glob_k * (glob_a * np.pi) ** 2 * t) * np.cos(glob_a * np.pi * x)
34
  + np.exp(-glob_k * (glob_b * np.pi) ** 2 * t) * np.sin(glob_b * np.pi * x)
35
  + np.exp(-glob_k * (glob_c * np.pi) ** 2 * t) * np.sin(glob_c * np.pi * x)
36
  )
 
434
  gr.update(visible=True, value=error_fig),
435
  )
436
 
 
437
  # Gradio interface
438
  def create_gradio_ui():
439
  global glob_k, glob_a, glob_b, glob_c
 
445
  # Function parameter inputs
446
  gr.Markdown(
447
  """
448
+ ## Function: $$u(x, t)\\coloneqq\\exp(-\\textcolor{magenta}{k}(\\textcolor{cyan}{a}\\pi)^2t)\\sin(\\textcolor{cyan}{a}\\pi x)+0.5\\exp(-\\textcolor{magenta}{k}(\\textcolor{lime}{b}\\pi)^2t)\\sin(\\textcolor{lime}{b}\\pi x)+0.25\\exp(-\\textcolor{magenta}{k}(\\textcolor{orange}{c}\\pi)^2t)\\sin(\\textcolor{orange}{c}\\pi x)$$
449
 
450
+ Adjust the values for <span style='color: magenta;'>k</span>, <span style='color: cyan;'>a</span>, <span style='color: lime;'>b</span> and <span style='color: orange;'>c</span> with the sliders below.
451
  """
452
  )
453