ksp.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include "string.h"
#include "syspro.h"
#include "sysprotransform.h"
#include "sysprolinear.h"
#include "sysprosuit.h"
#include "anamod.h"
#include "linksp.h"
#include "petscmat.h"
#include "petscpc.h"
#include "petscksp.h"

Go to the source code of this file.

Defines

#define PREPROCESSOR   "ksp"

Functions

static PetscErrorCode is_gmres_method (KSPType kspt, PetscTruth *f)
static PetscErrorCode setup_ksp_choices ()
static PetscErrorCode unset_ksps (NumericalProblem_ *dummy)
static PetscErrorCode disable_ksps (NumericalProblem theproblem, SalsaTransform ksp)
static PetscErrorCode set_ksp_options (SalsaTransformObject tf, int kspv)
static PetscErrorCode setup_ksp (char *kspt, int kspv, PetscTruth overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscTruth *success)
static PetscErrorCode unset_ksp (char *kspt, PetscTruth overwrite, void *gctx, void *ctx, NumericalProblem inproblem, NumericalProblem nextproblem, NumericalSolution old, NumericalSolution nnew)
PetscErrorCode DeclareKSPPreprocessor (void)
PetscErrorCode SysProLinearInstallCustomKSPMonitor (KSP solver)
PetscErrorCode SysProLinearDeclareCustomKSPMonitor (PetscErrorCode(*monitor)(KSP, int, PetscReal, void *), void *data)

Variables

int gmrescycleid
PetscErrorCode(* custommonitor )(KSP, int, PetscReal, void *) = NULL
void * monitordata = NULL


Define Documentation

#define PREPROCESSOR   "ksp"

Definition at line 22 of file ksp.c.


Function Documentation

PetscErrorCode DeclareKSPPreprocessor ( void   ) 

static PetscErrorCode disable_ksps ( NumericalProblem  theproblem,
SalsaTransform  ksp 
) [static]

static PetscErrorCode is_gmres_method ( KSPType  kspt,
PetscTruth *  f 
) [static]

Definition at line 27 of file ksp.c.

References CHKERRQ(), ierr, TransformObjectGetByName(), TransformObjectGetIntAnnotation(), and TRUTH.

Referenced by setup_ksp().

static PetscErrorCode set_ksp_options ( SalsaTransformObject  tf,
int  kspv 
) [static]

Definition at line 230 of file ksp.c.

References CHKERRQ(), ierr, TransformObjectGetIntAnnotation(), and TransformObjectGetName().

Referenced by setup_ksp().

static PetscErrorCode setup_ksp ( char *  kspt,
int  kspv,
PetscTruth  overwrite,
NumericalProblem  inproblem,
NumericalProblem outproblem,
void *  gctx,
void **  ctx,
PetscTruth *  success 
) [static]

static PetscErrorCode setup_ksp_choices (  )  [static]

PetscErrorCode SysProLinearDeclareCustomKSPMonitor ( PetscErrorCode(*)(KSP, int, PetscReal, void *)  monitor,
void *  data 
)

Definition at line 404 of file ksp.c.

References custommonitor.

PetscErrorCode SysProLinearInstallCustomKSPMonitor ( KSP  solver  ) 

Definition at line 390 of file ksp.c.

References CHKERRQ(), custommonitor, and ierr.

Referenced by setup_ksp().

static PetscErrorCode unset_ksp ( char *  kspt,
PetscTruth  overwrite,
void *  gctx,
void *  ctx,
NumericalProblem  inproblem,
NumericalProblem  nextproblem,
NumericalSolution  old,
NumericalSolution  nnew 
) [static]

Definition at line 346 of file ksp.c.

References CHKERRQ(), DeleteLinearSystem(), ierr, and LinearSolutionCopy().

Referenced by DeclareKSPPreprocessor().

static PetscErrorCode unset_ksps ( NumericalProblem_ dummy  )  [static]


Variable Documentation

PetscErrorCode(* custommonitor)(KSP, int, PetscReal, void *) = NULL

Definition at line 23 of file ksp.c.

Referenced by setup_ksp(), and setup_ksp_choices().

void* monitordata = NULL

Definition at line 386 of file ksp.c.


Generated on Sun Oct 4 04:03:04 2009 for System Preprocessors by  doxygen 1.5.9