メッシュファイル関数
int GiD_OpenPostMeshFile(char* FileName,GiD_PostMode Mode);
説明:
新しいポストメッシュファイルをオープンする
パラメータ:
char* FileName
name of the mesh file (*.flavia.msh)
GiD_PostMode Mode
GiD_PostAscii = 0 for ascii output
GiD_PostAsciiZipped = 1 for compressed ascii output
GiD_PostBinary = 2 for compressed binary output
記述例:
c/c++
GiD_OpenPostMeshFile( "testpost.flavia.msh", GiD_PostAscii);
FORTRAN
CALL GID_OPENPOSTMESHFILE('testpost.flavia.msh',0)
int GiD_ClosePostMeshFile();
説明:
カレントポストメッシュファイルをクローズする
パラメータ:
なし
記述例:
c/c++
GiD_ClosePostMeshFile();
FORTRAN
CALL GID_CLOSEPOSTMESHFILE
int GiD_BeginMesh(char* MeshName,GiD_Dimension Dim, GiD_ElementType EType, int NNode);
説明:
新しいメッシュを開始する。新しいメッシュを開始した後に、ノードや要素を記述してください。要素
を記述するときは、NNodeに設定した個数と同じ個数にしてください。
パラメータ:
char* MeshName
Name of the mesh
GiD_Dimension Dim
GiD_2D=2 for a 2D mesh (is assumed coordinates z=0)
GiD_3D=3 for a 3D mesh
GiD_ElementType EType
GiD_Point=1 for a 1 noded-element
GiD_Linear=2 for a line element
(the number of nodes can be 2 for a linear case or 3 for the quadratic case)
GiD_Triangle=3 for a triangle element
(the number of nodes can be 3 for a linear case or 6 for the quadratic case)
GiD_Quadrilateral=4 for a quadrilateral element
(the number of nodes can be 4 for a linear case and 8 or 9 for the quadratic case)
GiD_Tetrahedra=5 for a tetrahedral element
(the number of nodes can be 4 for a linear case or 10 for the quadratic case)
GiD_Hexahedra=6 for a hexahedral element
(the number of nodes can be 8 for a linear case and 20 or 27 for the quadratic case)
int NNode
Number of nodes of this type of element. The element type an nnods must be constant
for all mesh elements, but it is valid to define more that one mesh.
記述例:
c/c++
GiD_BeginMesh("TestMsh",GiD_2D,GiD_Triangle,3);
FORTRAN
CALL GID_BEGINMESH('quadmesh',2,4,4)
int GiD_EndMesh();
説明:
カレントメッシュを終了する
パラメータ:
なし
記述例:
c/c++
GiD_EndMesh();
FORTRAN
CALL GID_ENDMESH
int GiD_BeginCoordinates();
説明:
カレントメッシュに座標ブロックを開始する。全てのノード座標を
この関数とGiD_EndCoordinates関数の間に置く必要があります。
パラメータ:
なし
記述例:
c/c++
GiD_BeginCoordinates();
FORTRAN
CALL GID_BEGINCOORDINATES
int GiD_EndCoordinates();
説明:
座標ブロックを終了する
パラメータ:
なし
記述例:
c/c++
GiD_EndCoordinates();
FORTRAN
CALL GID_ENDCOORDINATES
int GiD_WriteCoordinates(int id,double x,double y,double z);
説明:
座標ブロックに座標メンバを出力する
パラメータ:
int id
Node number identifier (starting from 1, is recommended to avoid jumps in the numeration)
double x,double y,double z
Cartesian coordinates
記述例:
c/c++
int id=1;
double x=3.5,y=1.5e-2,z=0;
GiD_WriteCoordinates(id,x,y,z);
FORTRAN
REAL*8 rx, ry
INTEGER*4 idx
idx=1
rx=3.5
ry=-4.67
CALL GID_WRITECOORDINATES(idx,rx,ry,0.0)
int GiD_BeginElements();
説明:
メッシュの要素ブロックを開始する
パラメータ:
なし
記述例:
c/c++
GiD_BeginElements();
FORTRAN
CALL GID_BEGINELEMENTS
int GiD_EndElements();
説明:
要素ブロックを終了する
パラメータ:
なし
記述例:
c/c++
GiD_EndElements();
FORTRAN
CALL GID_ENDELEMENTS
int GiD_WriteElement(int id,int nid[]);
説明:
要素ブロックに要素メンバを出力する
パラメータ:
int id
Element number identifier
int nid[]
connectivities of the element,
the vector dimension must be equal to the NNode parameter given in the previous call to GiD_BeginMesh
記述例:
c/c++
int id=2;
int nid[3];
nid[0]=4; nid[1]=7; nid[2]=3;
GiD_WriteElementMat(id,nid);
FORTRAN
INTEGER *4 nid(1:3)
INTEGER*4 idx
idx=2
nid(1)=4
nid(2)=7
nid(3)=3
CALL GID_WRITEELEMENT(idx,nid)
int GiD_WriteElementMat(int id,int nid[]);
説明:
GiD_WriteElement関数に似ていますが、この関数ではnidの最後に設定する値と要素数が一致しなければならない。
結果ファイル関数
このライブラリでは、結果グループを出力することはできません。
GiDは、バージョン7.2からASCIIフォーマットの結果グループを読み込むことが可能になります。
int GiD_OpenPostResultFile(char* FileName,GiD_PostMode Mode);
説明:
ポスト結果ファイルを新規にオープンする。この関数がコールされた後は、新規にオープン
されたファイルに全ての情報が出力されます。メッシュファイルがオープンされていない場
合、メッシュの出力はこのファイルにされます。
パラメータ:
char* FileName
name of the mesh file (*.flavia.res)
GiD_PostMode Mode
GiD_PostAscii=0 for ascii output
GiD_PostAsciiZipped=1 for compressed ascii output
GiD_PostBinary=2 for compressed binary output
Note: In binary output, the mesh must be inside the same file of the results,
not call GiD_BeginMesh and GiD_EndMesh on this binary case.
記述例:
c/c++
GiD_OpenPostResultFile("testpost.bin",GiD_PostBinary);
FORTRAN
CALL GID_OPENPOSTRESULTFILE('testfortran.flavia.res',0)
int GiD_ClosePostResultFile();
説明:
ポスト結果ファイルをクローズする
パラメータ:
なし
記述例:
c/c++
GiD_ClosePostResultFile();
FORTRAN
CALL GID_CLOSEPOSTRESULTFILE
int GiD_BeginGaussPoint(
char* name, GiD_ElementType EType,char* MeshName,
int GP_number, int NodesIncluded, int InternalCoord
);
説明:
ガウスポイント定義を開始する。ガウスポイント定義では、結果ブロックを参照する
ための名前が必要です。ガウスポイントは、内部で設定できるもの(InternalCoord=1)
と外部から与えるもの(InternalCoord=0)がある。もし、ガウスポイントが与えられ
るならば、座標系のリストは、要素タイプの次元に依存したGiD_WriteGaussPoint2D関
数とGiD_WriteGaussPoint3D関数を使って、出力されなければならない。
パラメータ:
char* name
Name to reference this gauss points definition
GiD_ElementType EType
GiD_Point=1 for a 1 noded-element
GiD_Linear=2 for a line element
GiD_Triangle=3 for a triangle element
GiD_Quadrilateral=4 for a quadrilateral element
GiD_Tetrahedra=5 for a tetrahedral element
GiD_Hexahedra=6 for a hexahedral element
char* MeshName
An optional field. If this field is missing, the gauss points are defined
for all the elements of type my_type. If a mesh name is given, the gauss
points are only defined for this mesh.
int GP_number
number of gauss points per element. The GiD internal accepted number should be:
1, 3, 6 for Triangles;
1, 4, 9 for quadrilaterals;
1, 4 for Tetrahedras;
1, 8, 27 for hexahedras and
1, ... n points equally spaced over lines.
int NodesIncluded
Can be 0 for nodes not included or 1 for included. Only used for gauss
points on Linear elements which indicate whether the end nodes of the
Linear element are included in the number of gauss points per element
count or not.
int InternalCoord
Can be 0 for given coordinates or 1 for internal GiD gauss points location.
記述例:
c/c++
GiD_BeginGaussPoint("GPtria",GiD_Triangle,NULL,1,0,1);
FORTRAN
CHARACTER*4 NULL
NULL = CHAR(0)//CHAR(0)//CHAR(0)//CHAR(0)
CALL GID_BEGINGAUSSPOINT('GPtria',3,NULL,1,0,1);
int GiD_EndGaussPoint();
説明:
ガウスポイント定義を終了する
パラメータ:
なし
記述例:
c/c++
GiD_EndGaussPoint();
FORTRAN
CALL GID_ENDGAUSSPOINT
int GiD_WriteGaussPoint2D(double x,double y);
int GiD_WriteGaussPoint3D(double x,double y,double z);
説明:
内部ガウスポイント座標を出力する(InternalCoord=0のときだけ必要です)
パラメータ:
double x,double y,double z
Cartesian gauss points local coordinates
記述例:
c/c++
double x=3.5;
double y=-7;
GiD_WriteGaussPoint2D(double x,double y);
FORTRAN
REAL*8 x, y
rx=3.5
ry=-7
CALL GID_WRITEGAUSSPOINT2D(x,y)
int GiD_BeginRangeTable(char* name);
説明:
範囲テーブル定義を開始する。範囲テーブルは、範囲内の結果や名前を持った
お互いの範囲ラベルをまとめることができる。内部GiDは、外周の範囲を想像さ
せることができる。
パラメータ:
char* name
name identifier
記述例:
c/c++
GiD_BeginRangeTable("table1");
FORTRAN
CALL GID_BEGINRANGETABLE('table1')
int GiD_EndRangeTable();
説明:
範囲テーブル定義を終了する。
パラメータ:
なし
記述例:
c/c++
GiD_EndRangeTable();
FORTRAN
CALL GID_ENDRANGETABLE()
int GiD_WriteMinRange(double max,char* name);
int GiD_WriteRange(double min,double max,char* name);
int GiD_WriteMaxRange(double min,char* name);
説明:
範囲関数の出力。この関数を使用する場合は、
関数をGiD_BeginRangeTable関数とGiD_EndRangeTable関数の間に記述してください。
WriteMinRange : 最小値をもった範囲を出力します。
WriteRange : 最小値、最大値をもった範囲を出力します。
WritemaxRange: 最大値をもった範囲を出力します。
パラメータ:
double min,double max
Values to define a interval
char* name
string asociated to be showed for this interval
記述例:
c/c++
GiD_WriteRange(0.0,100.0,"Normal");
FORTRAN
CALL GID_WRITERANGE(0.0,100.0,'Normal')
int GiD_BeginResult(
char* Result,
char* Analysis,
double step,
GiD_ResultType Type,
GiD_ResultLocation Where,
char* GaussPointsName,
char* RangeTable,
int compc,char* compv[]
);
説明:
結果ブロックを開始する。この関数は、結果ブロックをオープンします。
パラメータ:
char* Result
a name for the Result, which will be used for menus.
char* Analysis
the name of the analysis of this Result, which will be used for menus.
double step
the value of the time step inside the analysis "analysis name". (for multiple steps results)
GiD_ResultType Type
The type of defined result:
GiD_Scalar=0
GiD_Vector=1
GiD_Matrix=2
GiD_PlainDeformationMatrix=3
GiD_MainMatrix=4
GiD_LocalAxes=5
GiD_ResultLocation Where
The location of the results
GiD_OnNodes=0
GiD_OnGaussPoints=1
char* GaussPointsName
If Where is GiD_OnGaussPoints a "location name"
(predefined in GiD_BeginGaussPoint) should be entered.
char* RangeTable
A valid Range table name or NULL
int compc
The number of component names or 0
char* compv[]
array of 'compc' strings to be used as component names
Note: in FORTRAN, instead use GID_BEGINRESULT, must be used a separate function foreach result type:
int GiD_BeginScalarResult(
char* Result,
char* Analysis,
float step,
GiD_ResultLocation Where,
char* GaussPointsName,
char* RangeTable,char* Comp
);
int GiD_BeginVectorResult(
char* Result,
char* Analysis,
float step,
GiD_ResultLocation Where,
char* GaussPointsName,
char* RangeTable,
char* Comp1,char* Comp2,char* Comp3,char* Comp4
);
int GiD_Begin2DMatResult(
char* Result,
char* Analysis,
float step,
GiD_ResultLocation Where,
char* GaussPointsName,
char* RangeTable,
char* Comp1,char* Comp2,char* Comp3
);
int GiD_Begin3DMatResult(
char* Result,
char* Analysis,
float step,
GiD_ResultLocation Where,
char* GaussPointsName,
char* RangeTable,
char* Comp1,char* Comp2,char* Comp3,
char* Comp4,char* Comp5,char* Comp6
);
int GiD_BeginPDMMatResult(
char* Result,
char* Analysis,
float step,
GiD_ResultLocation Where,
char* GaussPointsName,
char* RangeTable,
char* Comp1,char* Comp2,char* Comp3,char* Comp4
);
int GiD_BeginMainMatResult(
char* Result,
char* Analysis,
float step,
GiD_ResultLocation Where,
char* GaussPointsName,
char* RangeTable,
char* Comp1,char* Comp2,char* Comp3,
char* Comp4,char* Comp5,char* Comp6,
char* Comp7,char* Comp8,char* Comp9,
char* Comp10,char* Comp11,char* Comp12
);
int GiD_BeginLAResult(
char* Result,
char* Analysis,
float step,
GiD_ResultLocation Where,
char* GaussPointsName,
char* RangeTable,
char* Comp1,char* Comp2,char* Comp3
);
記述例:
c/c++
GiD_BeginResult("Result","Static",1.0,GiD_Scalar,GiD_OnNodes,NULL,NULL,0,NULL);
FORTRAN
CHARACTER*4 NULL
NULL = CHAR(0)//CHAR(0)//CHAR(0)//CHAR(0)
CALL GID_BEGINSCALARRESULT('Result','Analy.',1.0,0,0,NULL,NULL)
int GiD_EndResult();
説明:
結果ブロックを終了する。
パラメータ:
なし
記述例:
c/c++
GiD_EndResult();
FORTRAN
CALL GID_ENDRESULT
int GiD_WriteScalar(int id,double v);
int GiD_WriteVector(int id,double x,double y,double z);
int GiD_WriteVectorModule(int id,double x,double y,double z,double mod);
int GiD_Write2DMatrix(int id,double Sxx,double Syy,double Sxy);
int GiD_Write3DMatrix(int id,double Sxx,double Syy,double Szz,double Sxy,double Syz,double Sxz);
int GiD_WritePlainDefMatrix(int id,double Sxx,double Syy,double Sxy,double Szz);
int GiD_WriteMainMatrix(
int id,
double Si, double Sii, double Siii,
double Vix, double Viy, double Viz,
double Viix ,double Viiy, double Viiz,
double Viiix, double Viiiy, double Viiiz
);
int GiD_WriteLocalAxes(int id,double euler_1,double euler_2,double euler_3);
説明:
関数の処理結果を出力する。この関数を使用する場合は、関数を
GiD_BeginResult関数とGiD_EndResult関数の間に記述してください。
パラメータ:
なし
記述例:
c/c++
GiD_WriteScalar(3,4.6);
FORTRAN
INTEGER*4 idx
REAL*8 value
idx=3
value=4.6
CALL GID_WRITESCALAR(idx,value)