Write V diagonal values to a file
This commit is contained in:
parent
1e2bad2cd9
commit
0890f68d85
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Debugging V values"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# ./En.run -d 3 -n 3 -e 5 -c eps=0 -c pot=v_gauss,v0=-4,r=2 -N 6 -L 5:14 -c n_imag=1\n",
|
||||
"\n",
|
||||
"include(\"common.jl\")\n",
|
||||
"\n",
|
||||
"T=Float32\n",
|
||||
"\n",
|
||||
"function V_test(r2::T)::T\n",
|
||||
" return -4*exp(-r2/4)\n",
|
||||
"end\n",
|
||||
"\n",
|
||||
"N=6\n",
|
||||
"L::T=14.0\n",
|
||||
"n_image=1\n",
|
||||
"\n",
|
||||
"V=calculate_Vs(V_test, 3, 3, N, L, n_image)\n",
|
||||
"\n",
|
||||
"outfile = \"temp/V_vals.txt\"\n",
|
||||
"\n",
|
||||
"open(outfile, \"w\") do f\n",
|
||||
" for i in V\n",
|
||||
" println(f, i)\n",
|
||||
" end\n",
|
||||
"end"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Julia 1.8.5",
|
||||
"language": "julia",
|
||||
"name": "julia-1.8"
|
||||
},
|
||||
"language_info": {
|
||||
"file_extension": ".jl",
|
||||
"mimetype": "application/julia",
|
||||
"name": "julia",
|
||||
"version": "1.8.5"
|
||||
},
|
||||
"orig_nbformat": 4
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
Loading…
Reference in New Issue