関数get_initialized_3d_data マニュアル

(The documentation of function get_initialized_3d_data)

Last Update: 2022/10/17


◆機能・用途(Purpose)

初期化されたstruct _3d_data型構造体を作成する。 格子点配置を配列で与えるバージョン。
Create an initialized struct _3d_data-type structure, by specifying the grid node configuration by arrays.


◆形式(Format)

#include <3d_data/initialize.h>
inline struct _3d_data get_initialized_3d_data
(const int ∗N,const double ∗x0,const double ∗dx)


◆引数(Arguments)

N \(x\), \(y\), \(z\)方向の格子点数 (\(N_x\), \(N_y\), \(N_z\)) を並べた配列。
An array composed of the numbers of grid nodes along \(x\)-, \(y\)-, and \(z\)-directions (\(N_x\), \(N_y\), and \(N_z\), respectively).
x0 \(x\), \(y\), \(z\)方向のデータ定義範囲の下端 (\(x_0\), \(y_0\), \(z_0\)) を並べた配列。
An array composed of the lower bounds of the data definition ranges along \(x\)-, \(y\)-, and \(z\)-directions (\(x_0\), \(y_0\), and \(z_0\), respectively).
dx \(x\), \(y\), \(z\)方向の格子点間隔 (\(\Delta x\), \(\Delta y\), \(\Delta z\)) を並べた配列。
An array composed of the grid intervals along \(x\)-, \(y\)-, and \(z\)-directions (\(\Delta x\), \(\Delta y\), and \(\Delta z\), respectively).


◆戻り値(Return value)

\(x\), \(y\), \(z\)方向の格子点数を\(N_x\), \(N_y\), \(N_z\)、 データ定義範囲の下端を\(x_0\), \(y_0\), \(z_0\)、 格子点間隔を\(x\), \(y\), \(z\) とする空の(値が未設定の)3次元データを表す構造体。 戻り値の各メンバの値は以下のようになる。
A structure which represents an empty 3-D data (i.e., a 3-D data with values not set) defined on \(N_x\times N_y\times N_z\) grid nodes at \((\Delta x, \Delta y, \Delta z)\) grid intervals starting from \((x_0, y_0, z_0)\). The values of members of the return value are as follows.

戻り値のメンバ
Member of the return value

Value
N[0] 引数N[0]の値(\(N_x\))。
The value of argument N[0] (\(N_x\)).
N[1] 引数N[1]の値(\(N_y\))。
The value of argument N[1] (\(N_y\)).
N[2] 引数N[2]の値(\(N_z\))。
The value of argument N[2] (\(N_z\)).
x0[0] 引数x0[0]の値(\(x_0\))。
The value of argument x0[0] (\(x_0\)).
x0[1] 引数x0[1]の値(\(y_0\))。
The value of argument x0[1] (\(y_0\)).
x0[2] 引数x0[2]の値(\(z_0\))。
The value of argument x0[2] (\(z_0\)).
dx[0] 引数dx[0]の値(\(\Delta x\))。
The value of argument dx[0] (\(\Delta x\)).
dx[1] 引数dx[1]の値(\(\Delta y\))。
The value of argument dx[1] (\(\Delta y\)).
dx[2] 引数dx[2]の値(\(\Delta z\))。
The value of argument dx[2] (\(\Delta z\)).
xmax[0] \(x_0+(N_x-1)\Delta x\)
xmax[1] \(y_0+(N_y-1)\Delta y\)
xmax[2] \(z_0+(N_z-1)\Delta z\)
index[i][j][k] (\(i=0,1,\cdots,N_x-1\); \(j=0,1,\cdots,N_y-1\); \(k=0,1,\cdots,N_z-1\)) \(iN_yN_z+jN_z+k\)
value 値の設定されていない1次元配列(要素数:\(N_xN_yN_z\))。
A 1-D array whose values are not set; the array size is \(N_xN_yN_z\).
checked[0] ′y′


◆使用例(Example)

int N[]={2,3,4};
double x0[]={0.1,-1.0,12.3};
double dx[]={0.2,0.5,0.3};
struct _3d_data data=get_initialized_3d_data(N,x0,dx);