CA-EC tested
This commit is contained in:
parent
637c1e07bf
commit
7edcc47230
|
|
@ -78,6 +78,49 @@
|
||||||
"plot!(real.(mesh_E), imag.(mesh_E), label=\"contour\")\n",
|
"plot!(real.(mesh_E), imag.(mesh_E), label=\"contour\")\n",
|
||||||
"xlims!(0,1)"
|
"xlims!(0,1)"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"training_points = range(1.35, 0.9, 5)\n",
|
||||||
|
"training_E = Vector{ComplexF64}(undef, length(training_points))\n",
|
||||||
|
"EC_basis = Matrix{ComplexF64}(undef, length(p), length(training_points))\n",
|
||||||
|
"\n",
|
||||||
|
"for (j, c) in enumerate(training_points)\n",
|
||||||
|
" evals, evecs = eigen(get_H_matrix(V_system(c), p, w))\n",
|
||||||
|
" i = identify_pole_i(p, evals)\n",
|
||||||
|
" training_E[j] = evals[i]\n",
|
||||||
|
" EC_basis[:, j] = evecs[:, i]\n",
|
||||||
|
"end\n",
|
||||||
|
"\n",
|
||||||
|
"EC_basis = hcat(EC_basis, conj.(EC_basis)) # CA-EC\n",
|
||||||
|
"\n",
|
||||||
|
"extrapolate_points = range(0.75, 0.40, 8)\n",
|
||||||
|
"\n",
|
||||||
|
"exact_E = Vector{ComplexF64}(undef, length(extrapolate_points))\n",
|
||||||
|
"extrapolate_E = Vector{ComplexF64}(undef, length(extrapolate_points))\n",
|
||||||
|
"\n",
|
||||||
|
"for (j, c) in enumerate(extrapolate_points)\n",
|
||||||
|
" exact_E[j] = quick_pole_E(V_system(c))\n",
|
||||||
|
"\n",
|
||||||
|
" EC_basis_w = EC_basis .* w\n",
|
||||||
|
" H = get_H_matrix(V_system(c), p, w)\n",
|
||||||
|
" H_EC = transpose(EC_basis) * H * EC_basis\n",
|
||||||
|
" N_EC = transpose(EC_basis) * EC_basis\n",
|
||||||
|
" evals = eigvals(H_EC, N_EC)\n",
|
||||||
|
" i = argmin(abs.(evals .- exact_E[j]))\n",
|
||||||
|
" extrapolate_E[j] = evals[i]\n",
|
||||||
|
"end\n",
|
||||||
|
"\n",
|
||||||
|
"scatter(real.(training_E), imag.(training_E), label=\"training\")\n",
|
||||||
|
"scatter!(real.(exact_E), imag.(exact_E), label=\"exact\")\n",
|
||||||
|
"scatter!(real.(extrapolate_E), imag.(extrapolate_E), label=\"extrapolated\")\n",
|
||||||
|
"plot!(real.(mesh_E), imag.(mesh_E), label=\"contour\")\n",
|
||||||
|
"xlims!(-0.7,0.7)"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue