|
System Preprocessors
|
#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, PetscBool *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, PetscBool overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscBool *success) |
| static PetscErrorCode | unset_ksp (const char *kspt, PetscBool 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 PREPROCESSOR "ksp" |
Definition at line 22 of file ksp.c.
Referenced by DeclareKSPPreprocessor(), setup_ksp_choices(), and unset_ksps().
| PetscErrorCode DeclareKSPPreprocessor | ( | void | ) |
Definition at line 368 of file ksp.c.
References CHKERRQ(), DeclarePreprocessor(), disable_ksps(), ierr, PREPROCESSOR, PreprocessorSetPreservedCategories(), setup_ksp(), setup_ksp_choices(), unset_ksp(), and unset_ksps().
| static PetscErrorCode disable_ksps | ( | NumericalProblem | theproblem, |
| SalsaTransform | ksp | ||
| ) | [static] |
Definition at line 166 of file ksp.c.
References CHKERRQ(), ierr, PreprocessorGetSetting(), TransformGetObjects(), TransformObjectGetByName(), TransformObjectGetIntAnnotation(), TransformObjectGetName(), TransformObjectMark(), and TransformObjectsUnmarkAll().
Referenced by DeclareKSPPreprocessor().
| static PetscErrorCode is_gmres_method | ( | KSPType | kspt, |
| PetscBool * | 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, | ||
| PetscBool | overwrite, | ||
| NumericalProblem | inproblem, | ||
| NumericalProblem * | outproblem, | ||
| void * | gctx, | ||
| void ** | ctx, | ||
| PetscBool * | success | ||
| ) | [static] |
Definition at line 299 of file ksp.c.
References CHKERRQ(), gmrescycleid, ierr, is_gmres_method(), LinearSystemDuplicatePointers(), PreprocessorGetContext(), set_ksp_options(), SysProLinearInstallCustomKSPMonitor(), and TransformObjectGetByName().
Referenced by DeclareKSPPreprocessor().
| static PetscErrorCode setup_ksp_choices | ( | ) | [static] |
Definition at line 40 of file ksp.c.
References CHKERRQ(), gmrescycleid, ierr, NewTransformObject(), onlyforsymmetricproblem(), PREPROCESSOR, SetSuitabilityContextTester(), SysProDefineCharAnnotation(), SysProDefineIntAnnotation(), TransformGetByName(), TransformObjectAddOption(), TransformObjectDefineOption(), TransformObjectIntAnnotate(), TransformObjectSetExplanation(), and TransformObjectSetSuitabilityFunction().
Referenced by DeclareKSPPreprocessor().
| 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, |
| PetscBool | 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] |
Definition at line 151 of file ksp.c.
References CHKERRQ(), ierr, PREPROCESSOR, TransformObjectGetByName(), and TransformObjectGetSuitabilityFunction().
Referenced by DeclareKSPPreprocessor().
| PetscErrorCode(* custommonitor)(KSP, int, PetscReal, void *) = NULL |
Definition at line 390 of file ksp.c.
Referenced by SysProLinearDeclareCustomKSPMonitor(), and SysProLinearInstallCustomKSPMonitor().
| int gmrescycleid |
Definition at line 23 of file ksp.c.
Referenced by setup_ksp(), and setup_ksp_choices().
| void* monitordata = NULL |
1.7.6.1