Model File

EMFEM uses TetGen to triangulate the computational domain internally. We borrow some concepts from it. If the user is familiar with Tetgen, you will find that it is very easy to understand.

The model file is of ASCII form and may contain comments prefixed by the character #. It describes the boundary discretization, region definitions as well as the regional attributes. It consists of four parts.

  • The first part is a list of vertices.

  • The second part is a list of polygons that describes the boundary of each region.

  • The third part is a list of regions.

  • The fourth part is a list of region attributes.

Part 1 - vertex list

Part 1 lists all the vertices on the boundary (inner and outer). Each vertex has three coordinates (x, y, and z). The vertices are given by

First line: <# of vertices>
Remaining lines list # of vertices:
  <x> <y> <z>
  ...

Part 2 - polygon list

Part 2 lists all the polygons on the boundary. The polygons are given by

One line: <# of polygons>
Following lines list # of facets:
  <# of corners> <corner 1> <corner 2> ... <corner #> <boundary marker>
  ...

Each polygon is specified by giving the number of corners n, n >= 0, followed by the list of ordered indices of those corners. The <boundary marker> is preserved for future use.

Part 3 - region list

Part 3 lists regions and regional constraints on the maximum tetrahedron size.

One line: <# of regions>
Following lines list # of region attributes:
  <x> <y> <z> <region index> <edge length constraint>

<region index> is used to identify the region, two regions can have the same <region index>. Note that <region index> must be continuous and starting from zero. <edge length constraint> constrains the maximum tetrahedron edge in each region, -1 indicates no constraints are applied.

Part 4 - attribute list

Part 4 lists the attributes of each region.

One line: <# of attributes> <attribute type>
Following lines list # of region attributes:
  <attribute 1> <attribute 2> ... <attribute n> <lower bound> <upper bound>

Since EMFEM supports anisotropy media, so each region has several attributes depends on the <attribute type>. <attribute type> can be one of the following numbers: 0, 1, 2, 3.

  • 0 indicates that the media is isotropy, hence each region has only one attribute, i.e., the resistivity.

  • 1 indicates vertical transverse isotropic (VTI), each region has two attributes, i.e., the horizontal resistivity and vertical resistivity, respectively.

  • 2 indicates triaxial anisotropy, each region has three attributes, i.e., the resistivity in x, y, z direction, respectively.

  • 3 indicates arbitrary anisotropy, each region has six attributes, i.e., the resistivity in x, y, z direction, and the rotation angle in x, y, z direction, respectively.

<lower bound> and <upper bound> are not used for now, and are preserved for future use.

The following is a block of resistivity 0.5 ohm meters embedded into a half space model with two isotropic layers, air (1E8 ohm meters) and ground (100 ohm meters).

# Part 1, vertex list
20 # vertex count
-100000 -100000 -100000
 100000 -100000 -100000
 100000  100000 -100000
-100000  100000 -100000
-100000 -100000       0
 100000 -100000       0
 100000  100000       0
-100000  100000       0
-100000 -100000  100000
 100000 -100000  100000
 100000  100000  100000
-100000  100000  100000
   -500   -1000     200 # following 8 vertices are the corners of the block
    500   -1000     200
    500    1000     200
   -500    1000     200
   -500   -1000    2200
    500   -1000    2200
    500    1000    2200
   -500    1000    2200

# Part 2, polygon list
17 # polygon count
4  0  1  2  3 1 # 1st polygon has 4 corners, boundary marker is 1
4  4  5  6  7 1
4  8  9 10 11 1
4  0  4  7  3 1
4  1  5  4  0 1
4  2  6  5  1 1
4  3  7  6  2 1
4  4  8 11  7 1
4  5  9  8  4 1
4  6 10  9  5 1
4  7 11 10  6 1
4 12 13 14 15 1
4 16 17 18 19 1
4 12 16 19 15 1
4 13 17 16 12 1
4 14 18 17 13 1
4 15 19 18 14 1

# region list
3 # region count
0 0  -1 0 -1 # the air layer, with z coordinate less than 0, region index 0, no maximum edge length constraints
0 0   1 1 -1 # the ground layer, with z coordinate greater than 0, region index 1, no maximum edge length constraints
0 0 201 2 -1 # the block, region index 2, no maximum edge length constraints

# attribute list
3 0 # attribute count
1E08 1E08  1E08 # attributes of region index 0
100  100   100 # attributes of region index 1
0.5  0.5   0.5 # attributes of region index 2

Mesh File

EMFEM will save the mesh used in forward modeling procedure at each adaptive mesh refinement iteration, the mesh file has extension name .vtk and can be visualized by Paraview or VisIt.