int GiD_fBeginMesh(GiD_FILE fd,const char* MeshName,GiD_Dimension Dim,GiD_ElementType EType,int NNode);

int GiD_fBeginMeshColor(GiD_FILE fd, const char* MeshName,GiD_Dimension Dim, GiD_ElementType EType,int NNode,double Red, double Green, double Blue);

Description: Begin a new mesh. After that you should write the nodes and the elements. When writing the elements it is assumed a connectivity of size given in the paramenter NNode. The second function allows to specify a color for the mesh where each component take values on the interval [0,1].

Parameters:

GiD_FILE fd the file descriptor

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 thequadratic case)

GiD_Prism=7 for a Prism element

(the number of nodes can be 6 for the linear case or 15 for the quadratic case)

GiD_Pyramid=8 for a Pyramid element

(the number of nodes can be 5 for the linear case or 13 for the quadratic case)

GiD_Sphere=9 for a sphere element with 1 node and a radius

GiD_Circle=10 for circle element, with 1 node, radius and a plane normal

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.

Example:

C/C++

GiD_fBeginMesh(fd,"TestMsh",GiD_2D,GiD_Triangle,3);

FORTRAN

CALL GID_FBEGINMESH(fd,'quadmesh',2,4,4)