Subsections


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 1 and Table 2.


Table 1: ILSI_Param solver input parameters.
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.



Table 2: ILSI_Param solver output 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.


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.

November 23, 2009
FEM Homepage
Charm Homepage