Skip to content

Commit

Permalink
Correct derivatives in Burgers equation (#389)
Browse files Browse the repository at this point in the history
* Correct derivatives in Burgers equation
  • Loading branch information
HGangloff authored Dec 9, 2024
1 parent 5e36d1b commit 59c9a17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/source/_rst/tutorials/tutorial12/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ parameter :math:`\nu`:
self.nu = nu
def equation(input_, output_):
return grad(output_, input_, d='x') +\
output_*grad(output_, input_, d='t') -\
return grad(output_, input_, d='t') +\
output_*grad(output_, input_, d='x') -\
self.nu*laplacian(output_, input_, d='x')
Expand Down
4 changes: 2 additions & 2 deletions tutorials/tutorial12/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
" self.nu = nu \n",
" \n",
" def equation(input_, output_):\n",
" return grad(output_, input_, d='x') +\\\n",
" output_*grad(output_, input_, d='t') -\\\n",
" return grad(output_, input_, d='t') +\\\n",
" output_*grad(output_, input_, d='x') -\\\n",
" self.nu*laplacian(output_, input_, d='x')\n",
"\n",
" \n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tutorial12/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self, nu = 0.):
self.nu = nu

def equation(input_, output_):
return grad(output_, input_, d='x') + output_*grad(output_, input_, d='t') - self.nu*laplacian(output_, input_, d='x')
return grad(output_, input_, d='t') + output_*grad(output_, input_, d='x') - self.nu*laplacian(output_, input_, d='x')


super().__init__(equation)
Expand Down

0 comments on commit 59c9a17

Please sign in to comment.