pdnmesh input format − used by pdnmesh, a 2D finite element program




pdnmesh is a 2D finite element problem solver. The specification of the problem to be solved should be given to pdnmesh using a text file with a standard format. The input file name should be specified to pdnmesh using the −i option. Lines starting with a "#" or blank lines are ignored. The input file can be divided into the following sections.


Input point set:

The first line should give the number of points defined. The following lines should specify the point number, x coordinate, y coordinate, potential and whether the potential is fixed(1) or variable(0). The numbering of the points should start from 0.

Line set:

After the points, the detail about the lines or edges follow. It starts by giving the number of lines, below which on each line of the file, one edge is described. The format for describing an edge is: line number, first point, second point and whether the line is Neumann(0) or Dirichlet(1). As in points, numbering starts from 0.


Finally, the boundaries should be specified. Boundaries are required to specify the problem geometry as well as to define material properties. In any problem there is at least one boundary i.e. the outer boundary.

The first line in the boundaries section should give the number of boundaries defined. There should be at least one. Then, the outer boundary detail should be specified and afterwards the remaining boundaries described in any order.

When describing any boundary, the following format should be used. In the first line, four items must be specified. The first one is the number of edges in the boundary. Next, either 1 or 0 should be given to keep or delete the triangles within this boundary.

The third item is the value of epsilon in the Poisson equation of the system. For instance, in an electrostatic problem, this can be the permittivity but in an electromagnetic system, this should be the inverse of the permeability.

Finally, an algebraic expression for rho in an equivalent Poisson equation should be given. For instance, rho can be a constant like 1.00 or -2.11 or an expression like x+y*2, where x and y specify the coordinates. The mathematical operators and functions that can be used are:


addition 2 + y

subtraction 1 − x


multiplication y*5.5


power x^2






natural logarithm


step function



It should be noted that some triangles would belong to more than one boundary. If so, the properties of these triangles will be dependent on the last updated boundary. Hence, it is advised to specify the smallest boundaries after specifying larger boundaries in the input file.

It is possible to import CAD Drawing Interchange Format (DXF) files to pdnMesh. Pease see the tutorial for more detail.




Copyright © 2001−2005 Sarod Yatawatta

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both copyright notice and this permission notice appear in supporting documentation.