#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "syspro.h"
#include "sysprolinear.h"
Go to the source code of this file.
Defines | |
#define | ITER_STAGNATION -21 |
#define | ITER_DIVERGENCE -22 |
Functions | |
static PetscErrorCode | estimate_completion_from_hist (double *hist, int n, double rtol, int tracing, int *est) |
PetscErrorCode | MonitorAdjustMaxit (KSP ksp, int it, PetscReal cg_err, void *data) |
Variables | |
int | gmrescycleid |
#define ITER_DIVERGENCE -22 |
Definition at line 8 of file kspmonitor.c.
Referenced by estimate_completion_from_hist(), and MonitorAdjustMaxit().
#define ITER_STAGNATION -21 |
Definition at line 7 of file kspmonitor.c.
Referenced by estimate_completion_from_hist(), and MonitorAdjustMaxit().
static PetscErrorCode estimate_completion_from_hist | ( | double * | hist, | |
int | n, | |||
double | rtol, | |||
int | tracing, | |||
int * | est | |||
) | [static] |
Definition at line 13 of file kspmonitor.c.
References ITER_DIVERGENCE, and ITER_STAGNATION.
Referenced by MonitorAdjustMaxit().
PetscErrorCode MonitorAdjustMaxit | ( | KSP | ksp, | |
int | it, | |||
PetscReal | cg_err, | |||
void * | data | |||
) |
This routine analyzes the convergence history, and if the iterative method is still making progress, extends the maximum number of iterations.
Definition at line 83 of file kspmonitor.c.
References CHKERRQ(), estimate_completion_from_hist(), ierr, ITER_DIVERGENCE, and ITER_STAGNATION.
int gmrescycleid |