|
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 | PetscObjectStateDecrease(obj) ((obj)->state--,0) |
| #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, PetscBool overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscBool *success) |
| static PetscErrorCode | unset_pc (const char *type, PetscBool overwrite, void *gctx, void *ctx, NumericalProblem thisproblem, NumericalProblem upproblem, NumericalSolution old, NumericalSolution nnew) |
| PetscErrorCode | DeclarePCPreprocessor (void) |
| #define PetscObjectStateDecrease | ( | obj | ) | ((obj)->state--,0) |
Definition at line 23 of file pc.c.
Referenced by unset_pc().
| #define PREPROCESSOR "pc" |
Definition at line 25 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 276 of file pc.c.
References CHKERRQ(), NumericalProblem_::comm, and ierr.
Referenced by DeclarePCPreprocessor().
| PetscErrorCode DeclarePCPreprocessor | ( | void | ) |
Definition at line 394 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 296 of file pc.c.
References CHKERRQ(), and ierr.
Referenced by DeclarePCPreprocessor().
| static PetscErrorCode disable_pcs | ( | NumericalProblem | theproblem, |
| SalsaTransform | pc | ||
| ) | [static] |
Definition at line 219 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 242 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, | ||
| PetscBool | overwrite, | ||
| NumericalProblem | inproblem, | ||
| NumericalProblem * | outproblem, | ||
| void * | gctx, | ||
| void ** | ctx, | ||
| PetscBool * | success | ||
| ) | [static] |
Definition at line 316 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 29 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, |
| PetscBool | overwrite, | ||
| void * | gctx, | ||
| void * | ctx, | ||
| NumericalProblem | thisproblem, | ||
| NumericalProblem | upproblem, | ||
| NumericalSolution | old, | ||
| NumericalSolution | nnew | ||
| ) | [static] |
Definition at line 371 of file pc.c.
References CHKERRQ(), ierr, LinearSolutionCopy(), LinearSystemGetParts(), and PetscObjectStateDecrease.
Referenced by DeclarePCPreprocessor().
1.7.6.1