関数型¶
定義方法¶
1<Item name="discharge" caption="Discharge time series">
2 <Definition valueType="functional" >
3 <Parameter valueType="real" caption="Time" />
4 <Value valueType="real" caption="Discharge" />
5 </Definition>
6</Item>
条件の表示例¶
読み込み処理の記述方法¶
計算条件・格子生成条件¶
FORTRAN¶
1integer:: ier, discharge_size
2double precision, dimension(:), allocatable:: discharge_time, discharge_value
3
4! サイズを調べる
5call cg_iRIC_Read_FunctionalSize(fid, "discharge", discharge_size, ier)
6! メモリを確保
7allocate(discharge_time(discharge_size))
8allocate(discharge_value(discharge_size))
9! 確保したメモリに値を読み込む
10call cg_iRIC_Read_Functional(fid, "discharge", discharge_time, discharge_value, ier)
C/C++¶
1integer:: ier, discharge_size
2std::vector<double> discharge_time, discharge_value;
3
4// サイズを調べる
5ier = cg_iRIC_Read_FunctionalSize(fid, "discharge", &discharge_size)
6// メモリを確保
7discharge_time.assign(discharge_size, 0);
8discharge_value.assign(discharge_size, 0);
9// 確保したメモリに値を読み込む
10ier = cg_iRIC_Read_Functional(fid, "discharge", discharge_time.data(), discharge_value.data())
Python¶
1discharge_time, discharge_value = cg_iRIC_Read_Functional(fid, "discharge")
境界条件¶
FORTRAN¶
1integer:: ier, discharge_size
2double precision, dimension(:), allocatable:: discharge_time, discharge_value
3
4! サイズを調べる
5call cg_iRIC_Read_BC_FunctionalSize(fid, "inflow", 1, "discharge", discharge_size, ier)
6! メモリを確保
7allocate(discharge_time(discharge_size))
8allocate(discharge_value(discharge_size))
9! 確保したメモリに値を読み込む
10call cg_iRIC_Read_BC_Functional(fid, "inflow", 1, "discharge", discharge_time, discharge_value, ier)
C/C++¶
1integer:: ier, discharge_size
2std::vector<double> discharge_time, discharge_value;
3
4// サイズを調べる
5ier = cg_iRIC_Read_BC_FunctionalSize(fid, "inflow", 1, "discharge", &discharge_size)
6// メモリを確保
7discharge_time.assign(discharge_size, 0);
8discharge_value.assign(discharge_size, 0);
9// 確保したメモリに値を読み込む
10ier = cg_iRIC_Read_BC_Functional(fid, "inflow", 1, "discharge", discharge_time.data(), discharge_value.data());
Python¶
1discharge_time, discharge_value = cg_iRIC_Read_BC_Functional(fid, "inflow", 1, "discharge")