System Preprocessors
|
#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 (const char *type, int pcv, PetscTruth overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscTruth *success) |
static PetscErrorCode | unset_pc (const char *type, PetscTruth overwrite, void *gctx, void *ctx, NumericalProblem thisproblem, NumericalProblem upproblem, NumericalSolution old, NumericalSolution nnew) |
PetscErrorCode | DeclarePCPreprocessor (void) |
#define PREPROCESSOR "pc" |
Definition at line 23 of file pc.c.
Referenced by DeclarePCPreprocessor(), pcoptionshandling(), and setup_pc_choices().
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 | ) |
Definition at line 392 of file pc.c.
References CHKERRQ(), create_solver(), DeclarePreprocessor(), destroy_solver(), disable_pcs(), ierr, SystemPreprocessor_::optionshandling, pcoptionshandling(), PREPROCESSOR, PreprocessorSetPreservedCategories(), setup_pc(), setup_pc_choices(), SystemPreprocessorGetByName(), and unset_pc().
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] |
Definition at line 217 of file pc.c.
References CHKERRQ(), ierr, SysProRetrieveQuantity(), TransformObjectGetByName(), and TransformObjectMark().
Referenced by DeclarePCPreprocessor().
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 | ( | const char * | type, |
int | pcv, | ||
PetscTruth | overwrite, | ||
NumericalProblem | inproblem, | ||
NumericalProblem * | outproblem, | ||
void * | gctx, | ||
void ** | ctx, | ||
PetscTruth * | success | ||
) | [static] |
Definition at line 314 of file pc.c.
References CHKERRQ(), ierr, LinearSystemDuplicatePointers(), LinearSystemGetParts(), LinearSystemSetParts(), PreprocessorGetContext(), set_preconditioner_base_matrix(), SetPetscOptionsForPC(), and TRUTH.
Referenced by DeclarePCPreprocessor().
static PetscErrorCode setup_pc_choices | ( | ) | [static] |
Definition at line 27 of file pc.c.
References CHKERRQ(), ierr, NewTransformObject(), PCBOOMERAMG, PCBS95, PCEUCLID, PCMUMPS, PCPARASAILS, PCPILUT, PCRASM, PCSILU, PCSPOOLES, PCSUPERLU, PCUMFPACK, PREPROCESSOR, SysProDefineIntAnnotation(), TransformGetByName(), TransformObjectAddOption(), TransformObjectAddOptionExplanation(), TransformObjectDefineOption(), TransformObjectIntAnnotate(), and TransformObjectSetExplanation().
Referenced by DeclarePCPreprocessor().
static PetscErrorCode unset_pc | ( | const 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(), ierr, LinearSolutionCopy(), and LinearSystemGetParts().
Referenced by DeclarePCPreprocessor().