1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
#
# periodic.tk
#
proc periodic(build) name {
build_Title $name "Periodic Orbits"
build_DismissButtonbar $name dbbar "window(dismiss) periodic" \
{"Go" periodic(go) }
set cmd [build_CmdFrame $name cmd]
# algorithm choice
build_PopupMenu $cmd p1 "Algorithm:" \
Porbit(Algorithm) periodic(leave) {"Newton" "Attracting PO only"}
build_LabelEntryColumns $cmd le1 \
{text {} {"Period"}} \
{ientry {} {Porbit(Period)}}
bind_LabelEntryColumns $cmd.le1 1 <Return> periodic(update)
build_PopupMenu $cmd p2 "Variable for section:" \
Porbit(Varb) periodic(leave) \
[drop_last_element [array_to_listvalues Model Varb_Names]]
build_LabelEntryColumns $cmd le2 \
{text {} {"Variable value of section"}} \
{dentry {} {Porbit(Value)}}
bind_LabelEntryColumns $cmd.le2 1 <Return> periodic(update)
# menu with parameter names
build_PopupMenu $cmd p3 "Parameter to vary:" \
Porbit(Param) periodic(leave) [array_to_listvalues Model Param_Names]
build_LabelEntryColumns $cmd le3 \
{text {} {"Number of steps"}} \
{ientry {} {Porbit(Numsteps)}}
bind_LabelEntryColumns $cmd.le3 1 <Return> periodic(update)
build_LabelEntryColumns $cmd le4 \
{text {} {"Parameter increment"}} \
{dentry {} {Porbit(Stepsize)}}
bind_LabelEntryColumns $cmd.le4 1 <Return> periodic(update)
pack $cmd -fill both -expand 1
}
proc periodic(enter) {} {
pm_to_tcl Porbit
}
proc periodic(leave) {} {
periodic(update)
}
proc periodic(update) {} {
tcl_to_pm Porbit
pm_to_tcl Porbit
}
proc periodic(go) {} {
global Model
begin_wait "Trying to compute periodic orbits."
periodic(update)
if {$Model(Mapping_Flag) == 0} {
pm EXEC Porbit.Go
pm_to_tcl Memory
end_wait
} else {
end_wait
message_show "Use Fixed Point routines."
}
}
|