Module Linlib

Overview

線形計算ライブラリ SSL II と LAPACK のラッパー

Error Handling

Known Bugs

LAPACK を選択する部分をコーディングしていない.

Note

Future Plans

Public Interface

public linlib_init       !初期化ルーチン
public linsolv           !実 3 項行列の連立 1 次方程式(倍精度)

integer       :: LN = 10 !配列のサイズ. 値はダミー
character(1)  :: LLib    !用いるライブラリのフラグ

save LLib, LN

Procedure Interface

Initialize module and acquire NAMELIST

利用する線形計算パッケージを NAMELIST から設定し, 配列の大きさを決定する

subroutine linlib_init(cfgfile, N)

Dependency

use dc_trace, only : BeginSub, EndSub
use dc_message, only: MessageNotify
use ssl2_linear, only: ssl2_ltx_init
use lapack_linear, only: lapack_dgtsv_init

Input

integer, intent(in)      :: N       !配列サイズ
character(*), intent(in) :: cfgfile !設定ファイル (NAMELIST)

NAMELIST

NAMELIST /linlib/ LLib

Procedure Interface

Initialize module

利用する線形計算パッケージに配列を渡す

subroutine LinSolv(A, B, C, D)

Dependency

use dc_trace, only : BeginSub, EndSub
use dc_message, only: MessageNotify
use ssl2_linear, only: ssl2_ltx
use lapack_linear, only: lapack_dgtsv

Input

real(8), intent(in)    :: A(LN)
real(8), intent(in)    :: B(LN-1)
real(8), intent(in)    :: C(LN-1) 

In/Out

real(8), intent(inout) :: D(LN)