Skip to content

Instantly share code, notes, and snippets.

<html>
<head><meta charset="utf-8" /></head>
<body>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script type="text/javascript">
window.PlotlyConfig = {MathJaxConfig: 'local'};
</script>
<script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>
<html>
<head><meta charset="utf-8" /></head>
<body>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script type="text/javascript">
window.PlotlyConfig = {MathJaxConfig: 'local'};
</script>
<script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>
#########
N: 3
- start, im: 1
Delete: [[2]]
- start, im: 2
Nmax is : 1
Success!!!
0.160049 seconds (138.49 k allocations: 10.031 MiB, 26.36% gc time, 99.89% compilation time)
#########
import numpy as np
from numba import jit
from numba.typed import Dict
@jit(nopython=True, cache=True, fastmath=True)
def func_solution_f_1st(r):
return np.pi/(1.0+0.561769*r+14.1245*r**2)
@jit(nopython=True, cache=True, fastmath=True)
def func_solution_f_2nd(r):
import numpy as np
def func_initial_vortex(x):
return np.tanh(0.3*x)
def func_correctsolution_vortex(x):
return np.tanh(0.54795*x)
def func_gradE_vortex(r,f,df,ddf,m):
return (ddf+df/r-m**2*f/r**2+(1.0-f**2)*f)
<html>
<head><meta charset="utf-8" /></head>
<body>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script type="text/javascript">
window.PlotlyConfig = {MathJaxConfig: 'local'};
</script>
<script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>
<html>
<head><meta charset="utf-8" /></head>
<body>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script type="text/javascript">
window.PlotlyConfig = {MathJaxConfig: 'local'};
</script>
<script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>
<html>
<head><meta charset="utf-8" /></head>
<body>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script type="text/javascript">
window.PlotlyConfig = {MathJaxConfig: 'local'};
</script>
<script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>
<html>
<head><meta charset="utf-8" /></head>
<body>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script type="text/javascript">
window.PlotlyConfig = {MathJaxConfig: 'local'};
</script>
<script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>
<html>
<head><meta charset="utf-8" /></head>
<body>
<div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script type="text/javascript">
window.PlotlyConfig = {MathJaxConfig: 'local'};
</script>
<script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>