Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
204 changes: 204 additions & 0 deletions .ipynb_checkpoints/Untitled-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"id": "3e3ae5f0-9a0b-48bf-94a4-01d645f5c49d",
"metadata": {},
"outputs": [],
"source": [
"using Revise"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "62143b80-f5eb-4f31-b537-51eed82a5291",
"metadata": {},
"outputs": [],
"source": [
"using NonlinearNormalForm, TPSAInterface, GTPSA\n",
"import TPSAInterface as TI\n",
"import NonlinearNormalForm as NNF"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "8f4f2601-c371-411e-83af-1e4bf4a87a57",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.0e-9"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"GTPSA.show_eps=1e-9"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "bed44cca-3ff1-4752-915d-4681ed7de6ea",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"read_fpp_map (generic function with 1 method)"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"include(\"test/readfpp.jl\")"
]
},
{
"cell_type": "code",
"execution_count": 48,
"id": "6be3dd50-4409-4ce3-8ee0-08ca50542cf0",
"metadata": {},
"outputs": [],
"source": [
"#m = read_fpp_map(\"test/radiation/test.map\", spin=false);\n",
"#r_fpp = read_fpp_map(\"test/radiation/R.map\", spin=false);\n",
"#m = read_fpp_map(\"test/order6var4/test.map\",spin=false)\n",
"#r_fpp = read_fpp_map(\"test/order6var4/R.map\",spin=false)\n",
"m = real(read_fpp_map(\"test/canonize_rad/test.map\", spin=false));\n",
"a_fpp = real(read_fpp_map(\"test/canonize_rad/ac.map\", spin=false));"
]
},
{
"cell_type": "code",
"execution_count": 49,
"id": "acc00a9e-7db8-485b-b13f-52a3b2e4127e",
"metadata": {},
"outputs": [],
"source": [
"a = normal(m);"
]
},
{
"cell_type": "code",
"execution_count": 56,
"id": "9ccd9c90-8fda-4cd7-9045-7b0732a99d8b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"9.028272880922649e-15\n",
"damp = [-1.0488645846794094e-7, -1.5779694936159807e-6, -5.449690493512178e-6]\n"
]
},
{
"data": {
"text/plain": [
"3-element Vector{Float64}:\n",
" -1.0488645846794094e-7\n",
" -1.5779694936159807e-6\n",
" -5.449690493512178e-6"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"damp = [0.,0.,0.]\n",
"r_c = canonize(a, damping=true, damp=damp);\n",
"NNF.checksymp(NNF.jacobian(r_c))\n",
"NNF.jacobian(a∘r_c)\n",
"println(norm(NNF.jacobian(a_fpp) - NNF.jacobian(a∘r_c)))\n",
"damp"
]
},
{
"cell_type": "code",
"execution_count": 52,
"id": "8f5949e1-10f0-4568-a307-9c8592e7e776",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"9.028272880922649e-15"
]
},
"execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r_c = canonize(a, damping=true);\n",
"NNF.checksymp(NNF.jacobian(r_c))\n",
"NNF.jacobian(a∘r_c) #-real(a_fpp)\n",
"norm(NNF.jacobian(a_fpp) - NNF.jacobian(a∘r_c))"
]
},
{
"cell_type": "code",
"execution_count": 53,
"id": "435466b9-215c-481d-8dc5-b583be488d8c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6×6 StaticArraysCore.SMatrix{6, 6, Float64, 36} with indices SOneTo(6)×SOneTo(6):\n",
" -5.25831e-7 1.00089 -0.010719 0.00214115 0.00406777 0.00440329\n",
" -0.998985 0.00553445 -0.00489753 -0.00968604 0.00395478 0.00595919\n",
" 0.00191131 -0.00986871 -0.995125 0.00208363 0.0339313 0.00609627\n",
" 0.01084 0.00484174 -8.58974e-5 -1.00376 0.0105029 0.0318269\n",
" -0.00424473 -0.00556934 0.0313766 -0.00293569 0.999196 0.0200211\n",
" 0.00369695 0.00374198 -0.0131774 0.0337981 9.62622e-5 0.99979"
]
},
"execution_count": 53,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"NNF.jacobian(a)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "600cb76f-e92e-42ed-817b-5f13488ce6fb",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia Global (10 threads) 1.10",
"language": "julia",
"name": "julia-global-_10-threads_-1.10"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading