pc.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include "syspro.h"
#include "syspro_impl.h"
#include "sysprolinear.h"
#include "sysprotransform.h"
#include "linear_impl.h"
#include "linpc.h"
#include "linksp.h"
#include "petsc.h"
#include "petscmat.h"
#include "petscpc.h"
#include "petscksp.h"
#include "anamod.h"

Go to the source code of this file.

Defines

#define PREPROCESSOR   "pc"

Functions

static PetscErrorCode setup_pc_choices ()
static PetscErrorCode disable_pcs (NumericalProblem theproblem, SalsaTransform pc)
static PetscErrorCode pcoptionshandling ()
static PetscErrorCode create_solver (NumericalProblem prob, void **ctx)
static PetscErrorCode destroy_solver (void *ctx)
static PetscErrorCode setup_pc (char *type, int pcv, PetscTruth overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscTruth *success)
static PetscErrorCode unset_pc (char *type, PetscTruth overwrite, void *gctx, void *ctx, NumericalProblem thisproblem, NumericalProblem upproblem, NumericalSolution old, NumericalSolution nnew)
PetscErrorCode DeclarePCPreprocessor (void)


Define Documentation

#define PREPROCESSOR   "pc"

Definition at line 23 of file pc.c.


Function Documentation

static PetscErrorCode create_solver ( NumericalProblem  prob,
void **  ctx 
) [static]

Create a solver and install a monitor that dynamically increases the maximum number of iterations.

Definition at line 274 of file pc.c.

References CHKERRQ(), NumericalProblem_::comm, and ierr.

Referenced by DeclarePCPreprocessor().

PetscErrorCode DeclarePCPreprocessor ( void   ) 

static PetscErrorCode destroy_solver ( void *  ctx  )  [static]

Definition at line 294 of file pc.c.

References CHKERRQ(), and ierr.

Referenced by DeclarePCPreprocessor().

static PetscErrorCode disable_pcs ( NumericalProblem  theproblem,
SalsaTransform  pc 
) [static]

static PetscErrorCode pcoptionshandling (  )  [static]

Disable certain preconditioners based on commandline options.

At the moment this is only disabling of direct solvers if the user asks for iterative only.

Definition at line 240 of file pc.c.

References CHKERRQ(), ierr, PREPROCESSOR, RetrieveAllPreprocessorValues(), TransformObjectGetByName(), TransformObjectGetIntAnnotation(), and TransformObjectMark().

Referenced by DeclarePCPreprocessor().

static PetscErrorCode setup_pc ( char *  type,
int  pcv,
PetscTruth  overwrite,
NumericalProblem  inproblem,
NumericalProblem outproblem,
void *  gctx,
void **  ctx,
PetscTruth *  success 
) [static]

static PetscErrorCode setup_pc_choices (  )  [static]

static PetscErrorCode unset_pc ( char *  type,
PetscTruth  overwrite,
void *  gctx,
void *  ctx,
NumericalProblem  thisproblem,
NumericalProblem  upproblem,
NumericalSolution  old,
NumericalSolution  nnew 
) [static]

Definition at line 369 of file pc.c.

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

Referenced by DeclarePCPreprocessor().


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