[BACK]Return to tk_ode_by_mpfr-ja.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-contrib / packages / doc / tk_ode_by_mpfr

Annotation of OpenXM/src/asir-contrib/packages/doc/tk_ode_by_mpfr/tk_ode_by_mpfr-ja.texi, Revision 1.6

1.6     ! takayama    1: %% %% $OpenXM: OpenXM/src/asir-contrib/packages/doc/tk_ode_by_mpfr/tk_ode_by_mpfr-ja.texi,v 1.5 2021/06/10 23:39:50 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.6     ! takayama   21: @setfilename asir-contrib-tk_ode
1.1       takayama   22:
                     23: @comment --- タイトル ---
1.6     ! takayama   24: @settitle tk_ode
1.1       takayama   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 --- タイトル, バージョン, 著者名, 著作権表示 ---
1.6     ! takayama   44: @title tk_ode
        !            45: @subtitle ODE の数値解析のためのパッケージ群
1.1       takayama   46: @subtitle 1.0 版
1.6     ! takayama   47: @subtitle 2021 年 6 月 13 日
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
1.6     ! takayama   69: * tk_odeについて
1.1       takayama   70: * tk_ode_by_mpfr函数::
1.6     ! takayama   71: * tk_ode_sparse_interp函数::
1.1       takayama   72: * Index::
                     73: @end menu
                     74:
                     75: @comment --- chapter の開始 ---
                     76: @comment --- 親 chapter 名を正確に. 親がない場合は Top ---
1.6     ! takayama   77: @node tk_odeについて,,, Top
        !            78: @chapter tk_oderについて
1.1       takayama   79:
1.6     ! takayama   80: この文書は ODE の数値解析を補助するパッケージ群のマニュアルである.
        !            81: パッケージは多くのファイルに分かれており,
        !            82: @example
        !            83: load("tk_ode.rr")$
        !            84: @end example
        !            85: とするとすべてのパッケージをロードできる.
        !            86:
        !            87: 主なパッケージは単独で読み込める.
1.1       takayama   88: ODE(ordinary differential equation)をMPFR(任意精度小数パッケージ)を援用して数値解析するための
1.6     ! takayama   89: C言語のプログラムを生成パッケージが tk_ode_by_mpfr である.
1.1       takayama   90: 下記のコマンドでこのパッケージがロードされる.
                     91: @example
                     92: load("tk_ode_by_mpfr.rr")$
                     93: @end example
                     94: @noindent
                     95:
                     96: @sp 3
                     97:
                     98: @noindent
                     99: このパッケージは HGM に出現する ODE の数値解析のために作成された.
                    100: HGM については次の web サイトを参照.
                    101: @itemize @bullet
                    102: @item [hgm]
                    103: @uref{http://www.math.kobe-u.ac.jp/OpenXM/Math/hgm/ref-hgm.html}
                    104: @end itemize
                    105:
                    106: @noindent
                    107: 内部函数の仕様は man-asir2mpfr.tex 参照(まだ未公開).
                    108: @c Ref: num-ht2/man-asir2mpfr.tex
                    109:
                    110: @node tk_ode_by_mpfr函数,,, Top
                    111: @chapter tk_ode_by_mpfr函数
                    112:
                    113: @menu
                    114: * pari::
                    115: @end menu
                    116:
                    117: @comment **********************************************************
                    118: @comment --- ◯◯◯◯  の説明
                    119: @comment --- 個々の函数の説明の開始 ---
                    120: @comment --- section 名を正確に ---
                    121: @node code_solve_ode_by_rk4_with_defuse,,, tk_ode_by_mpfr函数
                    122: @section @code{tk_ode_by_mpfr}
                    123: @comment --- 索引用キーワード
                    124: @findex code_solve_ode_by_rk4_with_defuse
                    125:
                    126: @table @t
                    127: @item code_solve_ode_by_rk4_with_defuse(@var{Pmat},@var{T0},@var{F0},@var{T1})
                    128: :: 係数 @var{Pmat} をもつ ODE の初期値問題を解くC言語のコードを生成する.
                    129: @end table
                    130:
                    131: @comment --- 引数の簡単な説明 ---  以下まだ書いてない.
                    132: @table @var
                    133: @item return
                    134: C言語のコード. main 函数を含む.
                    135: @item Pmat
                    136: ODE dF/dt = P F の係数行列 P(t). t の式を成分とすること.
                    137: @item T0
                    138: 初期時刻.
                    139: @item F0
                    140: 初期条件.
                    141: @item T1
                    142: 終了時刻. T1>T0 を満たすこと.
                    143: @end table
                    144:
                    145: @comment --- ここで函数の詳しい説明 ---
                    146: @comment --- @itemize〜@end itemize は箇条書き ---
                    147: @comment --- @bullet は黒点付き ---
                    148: @itemize @bullet
                    149: @item
                    150: dF/dt = PF を F(T0)=F0 の初期条件の元, 時刻 T1 まで求める.
                    151: @item
                    152: big float による matrix factorial を用いて計算する.
1.4       takayama  153: 仮数部(significand)のビットサイズは生成したプログラムに PREC の値として定義されている.
                    154: 仮数部のサイズを変更するには生成された C プログラムの #define PREC 64 の部分を
                    155: 変更するかこの関数の option prec を用いる.
1.1       takayama  156: @item
1.2       takayama  157: defusing heuristics や知られている値を用いて不安定性を
                    158: 回避コードも含む.
                    159: 初期値の値がエラーを含む場合, 本来の解でないものがドミナントとなる
                    160: 場合がある. この方法はそれを修正して解くのに有効である.
                    161: また知られている値が誤差を含む場合も有効である.
1.1       takayama  162: これらは下記の option 引数でコントロールする.
                    163: @end itemize
                    164:
                    165: @comment man-asir2mpfr.tex より
                    166: @c @verbatim
                    167: @c @end verbatim
                    168: @multitable {xxxxxxxxxx} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} {xxxxxxxxxxxxxx}
                    169: @item Option @tab    @tab  default value
1.5       takayama  170: @item @var{ verbose} @tab  @tab  0
                    171: @item @var{ prec}    @tab  significand size of MPFR @tab  64
                    172: @item @var{ progname} @tab  @tab  @var{ tmp-test}
                    173: @item @var{ h}       @tab  step size @tab  0.001
                    174: @item @var{ t_noproj}@tab  time to apply defusing @tab  0
                    175: @item @var{ n_prune} @tab  number of eigen vectors to prune @tab  1
                    176: @item @var{ strat}   @tab  projection strategy @tab  1
                    177: @item @var{ n_defuse}@tab  number of the matrix factorial @tab  5 [1/h]
                    178: @item @var{ ref_value_file}@tab  File name of exact values @tab  @var{ tmp_ref_value.txt}
1.1       takayama  179: @end multitable
                    180:
                    181:
                    182: @sp 3
                    183: @noindent
                    184: 例:
                    185: Airy の微分方程式
                    186: dF/dt=[[0,1],[t,0]]F, F(0)=[0.355028053887817,-0.258819403792807]
                    187: の解 F(t) を t=10.1 まで計算.
                    188: @comment tk_mat2mpfr.rr, test0908();
                    189: @smallformat
                    190: @example
                    191: --> load("tk_ode_by_mpfr.rr");
                    192: --> Code=tk_ode_by_mpfr.code_solve_ode_by_rk4_with_defuse([[0,1],[t,0]],
                    193:      0,[0.355028053887817,-0.258819403792807],10.1 | h=0.001)$
                    194: -->  util_write_string_to_a_file("tmp-test.c",Code)$
                    195:
                    196: On the unix shell
1.5       takayama  197: ln -s $@{OpenXM_HOME@}/lib/asir-contrib/tk_ode_by_mpfr/proj.c tmp-proj.c
                    198: cc -I$@{OpenXM_HOME@}/lib/asir-contrib/tk_ode_by_mpfr -DNN=2 -c tmp-proj.c
1.1       takayama  199: cc -o tmp-test tmp-test.c tmp-proj.o -lmpfr -lgmp  -lgsl -lgslcblas  -lm
                    200:
                    201: ./tmp-test --verbose --t_noproj 8.1 --n_defuse 2000 --n_prune 1
                    202: @end example
                    203: @end smallformat
                    204: @noindent
                    205: 上記の compile 用のコマンドは上記のコマンドが出力する.
                    206: --t_noproj 8.1 は t<8.1 までは4次の Runge-Kutta 法を適用する.
                    207: t=8.1 以降は --n_prune で指定した個数の固有空間(Re(固有値)の順)の成分
                    208: を削除する.
                    209: --n_defuse 2000 は 2000 個の行列の matrix factorial を計算する.
                    210:
1.4       takayama  211: @sp 3
                    212: @noindent
                    213: 例:
                    214: H^k_n(1,t) k=10, n=1, 10000<=t<=10100 の計算とその値fと真の値Hとの relative error (f-H)/Hの計算.
                    215: "Hkn10000" は "h2" でもよい(alias).
                    216: @smallformat
                    217: @example
                    218: --> load("tk_ode_assert.rr");
                    219: --> tk_ode_assert.usage_assert();   // Usage of assert
                    220: --> tk_ode_assert.hkn2()
                    221: ==>   Compile tmp-test.c following the instruction.
                    222: ==>   ./tmp-test --go --output_stepsize 1 | grep '^gnuplot' | awk '{print $2,$3}' > t.txt
                    223:       // Data is stored in t.txt.
                    224: -->  tk_ode_assert.output_relative_error("Hkn10000","t.txt"|zoom=10^4301);
                    225:   // The initial value for tmp-test is multiplied by 10^4301.
                    226:   // Output tmp-rerror.txt
                    227: ==>   Start the gnuplot and plot "tmp-rerror.txt" w lp to show the relative error
                    228: @end example
                    229: @end smallformat
1.1       takayama  230: @noindent
                    231:
1.4       takayama  232: @sp 3
                    233: @noindent
                    234: 例: Airy や H^k_n(1,t) で 1<=t<=400 で同様.
                    235: @smallformat
                    236: @example
                    237: --> tk_ode_assert.airy1()
                    238: ==>   Run tmp-test
                    239: --> tk_ode_assert.output_relative_error("a","t.txt"|zoom=1);
                    240:
                    241: --> tk_ode_assert.hkn1()
                    242: ==>   Run tmp-test
                    243: --> tk_ode_assert.output_relative_error("h","t.txt"|zoom=1);
                    244: @end example
                    245: @end smallformat
                    246: @noindent
1.1       takayama  247:
                    248:
                    249: @comment --- 参照(リンク)を書く ---
                    250: @table @t
                    251: @item 参照
                    252: @comment @ref{code_mat_fac_mpfr}
                    253: @end table
                    254:
                    255: @comment --- ChangeLog を書く. ソースコードの位置. 変更日時 など CVSサーバを見るため
                    256: @noindent
                    257: ChangeLog
                    258: @itemize @bullet
                    259: @item
                    260:  tk_ode_by_mpfr/tk_man2mpfr.rr
                    261: @end itemize
                    262:
1.6     ! takayama  263: @node tk_ode_sparse_interp函数,,, Top
        !           264: @chapter tk_ode_sparse_interp函数
        !           265:
        !           266: @menu
        !           267: * pari::
        !           268: @end menu
1.1       takayama  269:
                    270: @comment --- おまじない ---
                    271: @node Index,,, Top
                    272: @unnumbered Index
                    273: @printindex fn
                    274: @printindex cp
                    275: @iftex
                    276: @vfill @eject
                    277: @end iftex
                    278: @summarycontents
                    279: @contents
                    280: @bye
                    281: @comment --- おまじない終り ---
                    282:
                    283:
                    284: @comment テンプレート.  start_of_template.
                    285: @comment **********************************************************
                    286: @comment --- ◯◯◯◯  の説明
                    287: @comment --- 個々の函数の説明の開始 ---
                    288: @comment --- section 名を正確に ---
                    289: @node gtt_ekn3.hoge,,, 超幾何函数E(k,n)
                    290: @subsection @code{gtt_ekn3.hoge}
                    291: @comment --- 索引用キーワード
                    292: @findex gtt_ekn3.hoge
                    293:
                    294: @table @t
                    295: @item gtt_ekn3.hoge(@var{i})
                    296: ::
                    297: @end table
                    298:
                    299: @comment --- 引数の簡単な説明 ---  以下まだ書いてない.
                    300: @table @var
                    301: @item i  hage
                    302: @item return
                    303: @end table
                    304:
                    305: @comment --- ここで函数の詳しい説明 ---
                    306: @comment --- @itemize〜@end itemize は箇条書き ---
                    307: @comment --- @bullet は黒点付き ---
                    308: @itemize @bullet
                    309: @item 説明.
                    310: @end itemize
                    311:
                    312: @comment --- @example〜@end example は実行例の表示 ---
                    313: 例:
                    314: @example
                    315: [2221] gtt_ekn3.hoge([[1,4],[2,3]]);
                    316: @end example
                    317:
                    318:
                    319: @comment --- 参照(リンク)を書く ---
                    320: @table @t
                    321: @item 参照
                    322: @ref{gtt_ekn3.nc}
                    323: @ref{gtt_ekn3.gmvector}
                    324: @end table
                    325:
                    326: @comment --- ChangeLog を書く. ソースコードの位置. 変更日時 など CVSサーバを見るため
                    327: @noindent
                    328: ChangeLog
                    329: @itemize @bullet
                    330: @item
                    331: @end itemize
                    332: @comment end_of_template
                    333:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>