next up previous contents
Next: User Parameters Up: Problem Definition Previous: Boundary Conditions

Domain and Initial Triangulation

 

The domain is defined by the initial triangulation, and hence can be any polygonal shape. The initial triangulation is defined in subroutine inittr which you should place in file user.f.

Each side of the polygon is assigned a boundary segment number. This positive integer is sent to the subroutine bcond to help identify which form of the boundary condition should be used.

If your domain is rectangular, then you can use the sample inittr provided in the files user.f.*. The sample routine triangulates the rectangular domain with a uniform grid consisting of ngridx ngridy rectangles cut into triangles along one of the diagonals. You need only edit subroutine inittr to define ax, bx, ay, by, ngridx and ngridy near the beginning. ngridx and ngridy must be even.

For nonrectangular domains, definition is a little more difficult. The file inittr.L contains an example for an L shaped domain. The domain is defined by the initial triangulation. The domain is restricted to be polygonal and all corners of the polygon must be vertices of the initial triangulation. The initial triangulation is specified by providing the coordinates of the vertices and the three vertices of each triangle. This is given by six variables:

integer nvert
number of vertices
integer ntri
number of triangles
real xvert(i)
x coordinate of the vertex
real yvert(i)
y coordinate of the vertex
integer vertex(i,j)
vertex of the triangle. Vertex 3 is called the peak.
integer neigh(i,j)
negative of boundary segment number for the side opposite the vertex of triangle j. Does not need to be set for non-boundary sides.

The following restrictions are imposed on the initial triangulation:

  1. Each vertex is always in the same position of every triangle in which it occurs. For example, if vertex i is the first vertex of triangle j ( vertex(1,j)=i) then it cannot be the second vertex of triangle k ( vertex(2,k)=i), it would have to be the first vertex ( vertex(1,k)=i).

  2. A vertex which is not a peak (first and second vertices) can be in at most 8 triangles.

  3. A vertex which is a peak (third vertices) can be in at most 4 triangles.



next up previous contents
Next: User Parameters Up: Problem Definition Previous: Boundary Conditions



william.mitchell@nist.gov