System Preprocessors
Defines | Functions | Variables
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 ()
static PetscErrorCode disable_ksps (NumericalProblem theproblem, SalsaTransform ksp)
static PetscErrorCode set_ksp_options (SalsaTransformObject tf, int kspv)
static PetscErrorCode setup_ksp (const char *kspt, int kspv, PetscTruth overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscTruth *success)
static PetscErrorCode unset_ksp (const 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.

Referenced by DeclareKSPPreprocessor(), setup_ksp_choices(), and unset_ksps().


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 231 of file ksp.c.

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

Referenced by setup_ksp().

static PetscErrorCode setup_ksp ( const 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 409 of file ksp.c.

References custommonitor.

PetscErrorCode SysProLinearInstallCustomKSPMonitor ( KSP  solver)

Definition at line 395 of file ksp.c.

References CHKERRQ(), custommonitor, and ierr.

Referenced by setup_ksp().

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

Definition at line 347 of file ksp.c.

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

Referenced by DeclareKSPPreprocessor().

static PetscErrorCode unset_ksps ( ) [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 391 of file ksp.c.