#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 (NumericalProblem_ *dummy) |
| static PetscErrorCode | disable_ksps (NumericalProblem theproblem, SalsaTransform ksp) |
| static PetscErrorCode | set_ksp_options (SalsaTransformObject tf, int kspv) |
| static PetscErrorCode | setup_ksp (char *kspt, int kspv, PetscTruth overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscTruth *success) |
| static PetscErrorCode | unset_ksp (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 |
| PetscErrorCode DeclareKSPPreprocessor | ( | void | ) |
Definition at line 367 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 165 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, | |
| 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 230 of file ksp.c.
References CHKERRQ(), ierr, TransformObjectGetIntAnnotation(), and TransformObjectGetName().
Referenced by setup_ksp().
| static PetscErrorCode setup_ksp | ( | char * | kspt, | |
| int | kspv, | |||
| PetscTruth | overwrite, | |||
| NumericalProblem | inproblem, | |||
| NumericalProblem * | outproblem, | |||
| void * | gctx, | |||
| void ** | ctx, | |||
| PetscTruth * | success | |||
| ) | [static] |
Definition at line 298 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, SysProDefineCharAnnotation(), SysProDefineIntAnnotation(), TransformGetByName(), TransformObjectAddOption(), TransformObjectDefineOption(), TransformObjectIntAnnotate(), TransformObjectSetExplanation(), and TransformObjectSetSuitabilityFunction().
Referenced by DeclareKSPPreprocessor().
| PetscErrorCode SysProLinearDeclareCustomKSPMonitor | ( | PetscErrorCode(*)(KSP, int, PetscReal, void *) | monitor, | |
| void * | data | |||
| ) |
| PetscErrorCode SysProLinearInstallCustomKSPMonitor | ( | KSP | solver | ) |
Definition at line 390 of file ksp.c.
References CHKERRQ(), custommonitor, and ierr.
Referenced by setup_ksp().
| static PetscErrorCode unset_ksp | ( | char * | kspt, | |
| PetscTruth | overwrite, | |||
| void * | gctx, | |||
| void * | ctx, | |||
| NumericalProblem | inproblem, | |||
| NumericalProblem | nextproblem, | |||
| NumericalSolution | old, | |||
| NumericalSolution | nnew | |||
| ) | [static] |
Definition at line 346 of file ksp.c.
References CHKERRQ(), DeleteLinearSystem(), ierr, and LinearSolutionCopy().
Referenced by DeclareKSPPreprocessor().
| static PetscErrorCode unset_ksps | ( | NumericalProblem_ * | dummy | ) | [static] |
Definition at line 150 of file ksp.c.
References CHKERRQ(), ierr, PREPROCESSOR, TransformObjectGetByName(), and TransformObjectGetSuitabilityFunction().
Referenced by DeclareKSPPreprocessor().
| PetscErrorCode(* custommonitor)(KSP, int, PetscReal, void *) = NULL |
Referenced by SysProLinearDeclareCustomKSPMonitor(), and SysProLinearInstallCustomKSPMonitor().
| int gmrescycleid |
| void* monitordata = NULL |
1.5.9