3.3 defpol3d – Initialize polyhedron type¶
The defpol3d routine selects one of the polyhedral geometries shown in Fig. 3.2, determined by the integer parameter icelltype (see Table 3.4).
Table 3.4. Values of the index used to denote the cell geometry routines considered in the test programs.
Routine name |
``icelltype`` index |
|---|---|
3D geometries |
|
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
2D geometries |
|
|
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
The calling conventions for this routine in Fortran, C, and Python are as follows:
Fortran:
call defpol3d(icelltype,ipv,nipv,ntp,nts,ntv,vertp,xns,yns,zns)
C:
defpol3d(&icelltype,ipv,nipv,&ntp,&nts,&ntv,vertp,xns,yns,zns);
Python:
(ipv,nipv,ntp,nts,ntv,vertp,xns,yns,zns)=voft.defpol3d(icelltype)
Arguments:
|
|
|
cell geometry index |
|
|
|
array of dimensions |
|
|
|
array of length \(\texttt{ns}\) storing the number of vertices per face boundary |
|
|
|
maximum vertex index in the connectivity list |
|
|
|
total number of face boundaries |
|
|
|
total number of vertices |
|
|
|
array of dimensions \(({nv},3)\) storing the \(x,y,z\)-coordinates of each vertex |
|
|
|
arrays of length \(\texttt{ns}\) storing the \(x,y,z\)-components of the outward-pointing unit normal vectors for each face boundary |
Note: The defpol3d routine, used by the test3d program to select predefined cells, accepts icelltype values 11–16 for convex cells and 111–120 for non-convex cells. This selection does not restrict users to these geometries: user-defined polyhedral cells can be supplied directly to the relevant VOFTools routines through their vertex coordinates, face connectivity, and outward-pointing unit face normals, subject to each routine’s requirements and the compiled array capacities. An invalid icelltype value causes defpol3d to print a diagnostic message and terminate the program through a Fortran STOP statement, including when called from C or Python.