command

以下は Tutorial より.



load(e="ab") # load(equation="ab") に同じ
load(c="ab.1") # load(constants="ab.1") に同じ
run()



sv("hoge") # 結果を,ファイル "(hoge という基本名)+(頭に c,s,b,d,h等)" に保存.
ld(s="hoge") # solution file "s.hoge" を load してメモリに格納.計算の続きができる.
例えば,bifurcation diagram file fort.7 は,b.hoge という名で保存される.

base name = "hoge"

Long name Short name Transformed file name
equation e hoge.c
constants c c.hoge
solution s s.hoge
bifurcationDiagram b b.hoge
diagnostics d d.hoge
homcont h h.hoge



copydemo("hoge")

ld("hoge")
run()
sv("hoge")
ld(s="hoge")
data = sl("hoge") # "s.hoge" を python object の "data" へ変換

ch("NTST", 50) # "NTST" を 50 に変更.(メモリー上だけの変更で,"c.hoge" は変更されず.)

for solution in date:
if solution["Type name"] == "BP":
ch("IRS", solution["Label"])
ch("ISW", -1)
# Compute forward
run()
ap("hoge")
# Compute back
ch("DS", -pr("DS"))
run()
ap("hoge")
plot("bvp")
wait()


for solution in date : is used to loop over all solutions in the data variable by setting the variable solution to be one of the solution in data and then calling the rest of the code in the block.

if solution["Type name"] == "BP" :


ch("IRS", solution["Label"])
ch("ISW", -1)

run()
ap("hoge") # データ追記

ch("DS", -pr("DS")) # 逆分岐?の計算のため,符号を逆にする.
run()
ap("hoge")  # データ追記

plot("hoge") # b.hoge, s.hoge の内容からグラフを描く
wait() # 入力待機