7. Connect the points into tetrahedra

The mesh designer may use the following set of command to connect the points into a tetrahedral mesh:






dump /gmv/filename


The complete input for the tutorial is:

* create a 3D tetrahedral mesh object and name it *3dmesh*
* unit cube
**surface**/cube**/reflect** **/box**/0.0,0.0,0.0/1.0,1.0,1.0/
* define z=.5 plane as interface
**surface** /cutplane**/intrface/plane/0.,0.,.5/1.,0.,.5/1.,1.,.5**/
*define geometric regions
**region**/top**/ le** cube **and gt** cutplane ** ** /
**region**/bottom**/ le** cube **and le** cutplane /
*** define material regions**
**mregion**/mattop**/ le** cub**e and gt** cutplane /
**mregion**/matbot**/ le** cube **and lt** cutplane /
* create 25 points (5x5x1) in a plane above the unit cube
* place points on the boundaries in the x and y directions (1,1,0)
* give the points defined by the createpts command the name, rayend
* create rays between points in rayend and the plane below the cube
* distribute 3 points along these rays in the region top
* add one point at the upper external boundary for each ray
* distribute 4 points along these rays in the region *bottom*
* add one point at the lower external boundary for each ray
* add one point at the material interface for each ray since
* *bottom* contains the interface - a total of 5 points for each ray.
* points will be distributed such that the ratio of distances between
* any two consecutive pairs of points is 0.6 traveling from the source
* of the ray (the plane) to the ray end.
* eliminate coincident or nearly coincident points
* 1,0,0 means consider all points
* rayend points are set to invisible (21 is the code for invisible)
* they were used as end points of the rays in the regnpts command
**cmo/setall//itp/pset,get,**rayend/21** **/
* assign material colors to the points
* identify points that are on material interfaces
* identify constrained points
* connect the points into a Delaunay tetrahedral mesh
* do not connect across material interfaces -
* add points if necessary to resolve material interfaces
* set element (tetrahedral) type
* dump mesh to some output form
* terminate processing