#include <stdlib.h>#include <stdio.h>#include "petsc.h"#include "syspro.h"#include "sysprotransform.h"#include "sysprolinear.h"#include "petscmat.h"Go to the source code of this file.
Defines | |
| #define | PREPROCESSOR "scaling" |
Functions | |
| static PetscErrorCode | set_intelligent_scaling (NumericalProblem theproblem, char **type, char **reason) |
| static PetscErrorCode | scale_system (char *type, int nopt, PetscTruth overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscTruth *success) |
| static PetscErrorCode | unscale_system (char *scaling_type, PetscTruth overwrite, void *gctx, void *ctx, NumericalProblem problem, NumericalProblem nextproblem, NumericalSolution scaled, NumericalSolution unscaled) |
| static PetscErrorCode | setup_scaling_choices () |
| static PetscErrorCode | specific_scaling_choices (NumericalProblem theproblem, SalsaTransform scaling) |
| PetscErrorCode | DeclareScalingPreprocessor (void) |
Definition in file scaling.c.
| PetscErrorCode DeclareScalingPreprocessor | ( | void | ) |
Definition at line 292 of file scaling.c.
References CHKERRQ(), DeclarePreprocessor(), DeclarePreprocessorIntelligentChoice(), ierr, PREPROCESSOR, PreprocessorSetPreservedCategories(), scale_system(), set_intelligent_scaling(), setup_scaling_choices(), specific_scaling_choices(), and unscale_system().
Referenced by main().
| static PetscErrorCode scale_system | ( | char * | type, | |
| int | nopt, | |||
| PetscTruth | overwrite, | |||
| NumericalProblem | inproblem, | |||
| NumericalProblem * | outproblem, | |||
| void * | gctx, | |||
| void ** | ctx, | |||
| PetscTruth * | success | |||
| ) | [static] |
Definition at line 67 of file scaling.c.
References CHKERRQ(), ierr, LinearSystemCopy(), LinearSystemDuplicate(), and LinearSystemGetParts().
Referenced by DeclareScalingPreprocessor().
| static PetscErrorCode set_intelligent_scaling | ( | NumericalProblem | theproblem, | |
| char ** | type, | |||
| char ** | reason | |||
| ) | [static] |
Definition at line 21 of file scaling.c.
References CHKERRQ(), ierr, SysProRetrieveQuantity(), and TRUTH.
Referenced by DeclareScalingPreprocessor().
| static PetscErrorCode setup_scaling_choices | ( | ) | [static] |
This routine is called by DeclarePreprocessor()
Definition at line 230 of file scaling.c.
References CHKERRQ(), ierr, NewTransformObject(), PREPROCESSOR, SysProDefineIntAnnotation(), TransformGetByName(), TransformObjectIntAnnotate(), and TransformObjectSetExplanation().
Referenced by DeclareScalingPreprocessor().
| static PetscErrorCode specific_scaling_choices | ( | NumericalProblem | theproblem, | |
| SalsaTransform | scaling | |||
| ) | [static] |
This is the 'specific setup' phase of the scaling preprocessor. See Usage modes for details.
This routine eliminates unsymmetric scalings if we are dealing with a symmetric system.
Definition at line 265 of file scaling.c.
References CHKERRQ(), ierr, SysProRetrieveQuantity(), TransformGetObjects(), TransformObjectGetIntAnnotation(), and TransformObjectMark().
Referenced by DeclareScalingPreprocessor().
| static PetscErrorCode unscale_system | ( | char * | scaling_type, | |
| PetscTruth | overwrite, | |||
| void * | gctx, | |||
| void * | ctx, | |||
| NumericalProblem | problem, | |||
| NumericalProblem | nextproblem, | |||
| NumericalSolution | scaled, | |||
| NumericalSolution | unscaled | |||
| ) | [static] |
Definition at line 190 of file scaling.c.
References CHKERRQ(), DeleteLinearSystem(), ierr, LinearSolutionCopyStats(), and LinearSolutionGetVector().
Referenced by DeclareScalingPreprocessor().
1.5.9