# 3. Iterative Finite Element Matrix (IFEM) Framework¶

Contents

## 3.1. Introduction¶

This manual presents the Iterative Finite Element Matrix (IFEM) library, a library for easily solving matrix problems derived from finite-element formulations. The library is designed to be matrix-free, in that the only matrix operation required is matrix-vector product, and hence the entire matrix need never be assembled

IFEM is built on the mesh and communication capabilities of the Charm++ FEM Framework, so for details on the basic runtime, problem setup, and partitioning see the FEM Framework manual.

### 3.1.1. Terminology¶

A FEM program manipulates elements and nodes. An **element** is a
portion of the problem domain, also known as a cell, and is typically
some simple shape like a triangle, square, or hexagon in 2D; or
tetrahedron or rectangular solid in 3D. A **node** is a point in the
domain, and is often the vertex of several elements. Together, the
elements and nodes form a **mesh**, which is the central data structure
in the FEM framework. See the FEM manual for details.

## 3.2. Solvers¶

A IFEM **solver** is a subroutine that controls the search for the
solution.

Solvers often take extra parameters, which are listed in a type called
in C `ILSI_Param`

, which in Fortran is an array of `ILSI_PARAM`

doubles. You
initialize these solver parameters using the subroutine `ILSI_Param_new`

,
which takes the parameters as its only argument. The input and output
parameters in an `ILSI_Param`

are listed in
Table 8 and
Table 9.

C Field Name | Fortran Field Offset | Use |
---|---|---|

maxResidual | 1 | If nonzero, termination criteria: magnitude of residual. |

maxIterations | 2 | If nonzero, termination criteria: number of iterations. |

solverIn[8] | 3-10 | Solver-specific input parameters. |

C Field Name | Fortran Field Offset | Use |
---|---|---|

residual | 11 | Magnitude of residual of final solution. |

iterations | 12 | Number of iterations actually taken. |

solverOut[8] | 13-20 | Solver-specific output parameters. |

### 3.2.1. Conjugate Gradient Solver¶

The only solver currently written using IFEM is the conjugate gradient solver. This linear solver requires the matrix to be real, symmetric and positive definite.

Each iteration of the conjugate gradient solver requires one matrix-vector product and two global dot products. For well-conditioned problems, the solver typically converges in some small multiple of the diameter of the mesh-the number of elements along the largest side of the mesh.

You access the conjugate gradient solver via the subroutine name
`ILSI_CG_Solver`

.