Annotation of OpenXM/src/asir-contrib/packages/doc/tk_ode_by_mpfr/tk_ode_by_mpfr-ja.texi, Revision 1.3
1.3 ! takayama 1: %% $OpenXM: OpenXM/src/asir-contrib/packages/doc/tk_ode_by_mpfr/tk_ode_by_mpfr-ja.texi,v 1.2 2021/03/17 11:22:31 takayama Exp $
1.2 takayama 2: %% debug に ln -s ../texinfo-ja.tex . をしておく. txi-ja.tex も?
1.1 takayama 3: %% xetex tk_ode_by_mpfr-ja.texi (.texi までつける. )
4: %% 以下コメントは @comment で始める. \input texinfo 以降は普通の tex 命令は使えない.
5: \input texinfo-ja
6: @iftex
7: @catcode`@#=6
8: @def@fref#1{@xrefX[#1,,@code{#1},,,]}
9: @def@b#1{{@bf #1}}
10: @catcode`@#=@other
11: @end iftex
12: @c tex
13: @c \overfullrule=0pt
14: @c end tex
15: @documentlanguage ja
16: @c -*-texinfo-*-
17: @comment %**start of header
18: @comment --- おまじない終り ---
19:
20: @comment --- GNU info ファイルの名前 ---
1.3 ! takayama 21: @setfilename asir-contrib-tk_ode_by_mpfr
1.1 takayama 22:
23: @comment --- タイトル ---
24: @settitle ox_pari
25:
26: @comment %**end of header
27: @comment %@setchapternewpage odd
28:
29: @comment --- おまじない ---
30: @ifinfo
31: @macro fref{name}
32: @ref{\name\,,@code{\name\}}
33: @end macro
34: @end ifinfo
35:
36: @iftex
37: @comment @finalout
38: @end iftex
39:
40: @titlepage
41: @comment --- おまじない終り ---
42:
43: @comment --- タイトル, バージョン, 著者名, 著作権表示 ---
44: @title tk_ode_by_mpfr
45: @subtitle MPFR で ODE の数値解析をするC言語のコードを生成
46: @subtitle 1.0 版
1.2 takayama 47: @subtitle 2020 年 9 月 9 日
1.1 takayama 48:
49: @author by Nobuki Takayama
50: @page
51: @vskip 0pt plus 1filll
52: Copyright @copyright{} Risa/Asir committers
53: 2020--2020. All rights reserved.
54: @end titlepage
55:
56: @comment --- おまじない ---
57: @synindex vr fn
58: @comment --- おまじない終り ---
59:
60: @comment --- @node は GNU info, HTML 用 ---
61: @comment --- @node の引数は node-name, next, previous, up ---
62: @node Top,, (dir), (dir)
63:
64: @comment --- @menu は GNU info, HTML 用 ---
65: @comment --- chapter 名を正確に並べる ---
66: @comment --- この文書では chapter XYZ, Chapter Index がある.
67: @comment --- Chapter XYZ には section XYZについて, section XYZに関する函数がある.
68: @menu
69: * tk_ode_by_mpfrについて
70: * tk_ode_by_mpfr函数::
71: * Index::
72: @end menu
73:
74: @comment --- chapter の開始 ---
75: @comment --- 親 chapter 名を正確に. 親がない場合は Top ---
76: @node tk_ode_by_mpfrについて,,, Top
77: @chapter tk_ode_by_mpfrについて
78:
79: ODE(ordinary differential equation)をMPFR(任意精度小数パッケージ)を援用して数値解析するための
80: C言語のプログラムを生成する.
81: 下記のコマンドでこのパッケージがロードされる.
82: @example
83: load("tk_ode_by_mpfr.rr")$
84: @end example
85: @noindent
86:
87: @sp 3
88:
89: @noindent
90: このパッケージは HGM に出現する ODE の数値解析のために作成された.
91: HGM については次の web サイトを参照.
92: @itemize @bullet
93: @item [hgm]
94: @uref{http://www.math.kobe-u.ac.jp/OpenXM/Math/hgm/ref-hgm.html}
95: @end itemize
96:
97: @noindent
98: 内部函数の仕様は man-asir2mpfr.tex 参照(まだ未公開).
99: @c Ref: num-ht2/man-asir2mpfr.tex
100:
101: @node tk_ode_by_mpfr函数,,, Top
102: @chapter tk_ode_by_mpfr函数
103:
104: @menu
105: * pari::
106: @end menu
107:
108: @comment **********************************************************
109: @comment --- ◯◯◯◯ の説明
110: @comment --- 個々の函数の説明の開始 ---
111: @comment --- section 名を正確に ---
112: @node code_solve_ode_by_rk4_with_defuse,,, tk_ode_by_mpfr函数
113: @section @code{tk_ode_by_mpfr}
114: @comment --- 索引用キーワード
115: @findex code_solve_ode_by_rk4_with_defuse
116:
117: @table @t
118: @item code_solve_ode_by_rk4_with_defuse(@var{Pmat},@var{T0},@var{F0},@var{T1})
119: :: 係数 @var{Pmat} をもつ ODE の初期値問題を解くC言語のコードを生成する.
120: @end table
121:
122: @comment --- 引数の簡単な説明 --- 以下まだ書いてない.
123: @table @var
124: @item return
125: C言語のコード. main 函数を含む.
126: @item Pmat
127: ODE dF/dt = P F の係数行列 P(t). t の式を成分とすること.
128: @item T0
129: 初期時刻.
130: @item F0
131: 初期条件.
132: @item T1
133: 終了時刻. T1>T0 を満たすこと.
134: @end table
135:
136: @comment --- ここで函数の詳しい説明 ---
137: @comment --- @itemize〜@end itemize は箇条書き ---
138: @comment --- @bullet は黒点付き ---
139: @itemize @bullet
140: @item
141: dF/dt = PF を F(T0)=F0 の初期条件の元, 時刻 T1 まで求める.
142: @item
143: big float による matrix factorial を用いて計算する.
144: @item
1.2 takayama 145: defusing heuristics や知られている値を用いて不安定性を
146: 回避コードも含む.
147: 初期値の値がエラーを含む場合, 本来の解でないものがドミナントとなる
148: 場合がある. この方法はそれを修正して解くのに有効である.
149: また知られている値が誤差を含む場合も有効である.
1.1 takayama 150: これらは下記の option 引数でコントロールする.
151: @end itemize
152:
153: @comment man-asir2mpfr.tex より
154: @c @verbatim
155: @c @end verbatim
156: @multitable {xxxxxxxxxx} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} {xxxxxxxxxxxxxx}
157: @item Option @tab @tab default value
158: @item { verbose} @tab @tab 0
159: @item { prec} @tab doube size of MPFR @tab 64
160: @item { progname} @tab @tab { tmp-test}
161: @item { h} @tab step size @tab 0.001
162: @item { t_noproj}@tab time to apply defusing @tab 0
163: @item { n_prune} @tab number of eigen vectors to prune @tab 1
164: @item { strat} @tab projection strategy @tab 1
165: @item { n_defuse}@tab number of the matrix factorial @tab 5 [1/h]
166: @item { ref_value_file}@tab File name of exact values @tab { tmp_ref_value.txt}
167: @end multitable
168:
169:
170: @sp 3
171: @noindent
172: 例:
173: Airy の微分方程式
174: dF/dt=[[0,1],[t,0]]F, F(0)=[0.355028053887817,-0.258819403792807]
175: の解 F(t) を t=10.1 まで計算.
176: @comment tk_mat2mpfr.rr, test0908();
177: @smallformat
178: @example
179: --> load("tk_ode_by_mpfr.rr");
180: --> Code=tk_ode_by_mpfr.code_solve_ode_by_rk4_with_defuse([[0,1],[t,0]],
181: 0,[0.355028053887817,-0.258819403792807],10.1 | h=0.001)$
182: --> util_write_string_to_a_file("tmp-test.c",Code)$
183:
184: On the unix shell
185: ln -s ${OpenXM_HOME}/lib/asir-contrib/tk_ode_by_mpfr/proj.c tmp-proj.c
186: cc -I${OpenXM_HOME}/lib/asir-contrib/tk_ode_by_mpfr -DNN=2 -c tmp-proj.c
187: cc -o tmp-test tmp-test.c tmp-proj.o -lmpfr -lgmp -lgsl -lgslcblas -lm
188:
189: ./tmp-test --verbose --t_noproj 8.1 --n_defuse 2000 --n_prune 1
190: @end example
191: @end smallformat
192: @noindent
193: 上記の compile 用のコマンドは上記のコマンドが出力する.
194: --t_noproj 8.1 は t<8.1 までは4次の Runge-Kutta 法を適用する.
195: t=8.1 以降は --n_prune で指定した個数の固有空間(Re(固有値)の順)の成分
196: を削除する.
197: --n_defuse 2000 は 2000 個の行列の matrix factorial を計算する.
198:
199: @noindent
200:
201:
202:
203: @comment --- 参照(リンク)を書く ---
204: @table @t
205: @item 参照
206: @comment @ref{code_mat_fac_mpfr}
207: @end table
208:
209: @comment --- ChangeLog を書く. ソースコードの位置. 変更日時 など CVSサーバを見るため
210: @noindent
211: ChangeLog
212: @itemize @bullet
213: @item
214: tk_ode_by_mpfr/tk_man2mpfr.rr
215: @end itemize
216:
217:
218: @comment --- おまじない ---
219: @node Index,,, Top
220: @unnumbered Index
221: @printindex fn
222: @printindex cp
223: @iftex
224: @vfill @eject
225: @end iftex
226: @summarycontents
227: @contents
228: @bye
229: @comment --- おまじない終り ---
230:
231:
232: @comment テンプレート. start_of_template.
233: @comment **********************************************************
234: @comment --- ◯◯◯◯ の説明
235: @comment --- 個々の函数の説明の開始 ---
236: @comment --- section 名を正確に ---
237: @node gtt_ekn3.hoge,,, 超幾何函数E(k,n)
238: @subsection @code{gtt_ekn3.hoge}
239: @comment --- 索引用キーワード
240: @findex gtt_ekn3.hoge
241:
242: @table @t
243: @item gtt_ekn3.hoge(@var{i})
244: ::
245: @end table
246:
247: @comment --- 引数の簡単な説明 --- 以下まだ書いてない.
248: @table @var
249: @item i hage
250: @item return
251: @end table
252:
253: @comment --- ここで函数の詳しい説明 ---
254: @comment --- @itemize〜@end itemize は箇条書き ---
255: @comment --- @bullet は黒点付き ---
256: @itemize @bullet
257: @item 説明.
258: @end itemize
259:
260: @comment --- @example〜@end example は実行例の表示 ---
261: 例:
262: @example
263: [2221] gtt_ekn3.hoge([[1,4],[2,3]]);
264: @end example
265:
266:
267: @comment --- 参照(リンク)を書く ---
268: @table @t
269: @item 参照
270: @ref{gtt_ekn3.nc}
271: @ref{gtt_ekn3.gmvector}
272: @end table
273:
274: @comment --- ChangeLog を書く. ソースコードの位置. 変更日時 など CVSサーバを見るため
275: @noindent
276: ChangeLog
277: @itemize @bullet
278: @item
279: @end itemize
280: @comment end_of_template
281:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>