|
System Preprocessors
|
#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, const char **type, const char **reason) |
| static PetscErrorCode | scale_system (const char *type, int nopt, PetscBool overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscBool *success) |
| static PetscErrorCode | unscale_system (const char *scaling_type, PetscBool 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.
| #define PREPROCESSOR "scaling" |
Definition at line 16 of file scaling.c.
Referenced by DeclareScalingPreprocessor(), and setup_scaling_choices().
| 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 | ( | const char * | type, |
| int | nopt, | ||
| PetscBool | overwrite, | ||
| NumericalProblem | inproblem, | ||
| NumericalProblem * | outproblem, | ||
| void * | gctx, | ||
| void ** | ctx, | ||
| PetscBool * | 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, |
| const char ** | type, | ||
| const 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 | ( | const char * | scaling_type, |
| PetscBool | overwrite, | ||
| void * | gctx, | ||
| void * | ctx, | ||
| NumericalProblem | problem, | ||
| NumericalProblem | nextproblem, | ||
| NumericalSolution | scaled, | ||
| NumericalSolution | unscaled | ||
| ) | [static] |
Definition at line 190 of file scaling.c.
References CHKERRQ(), ierr, LinearSolutionCopyStats(), and LinearSolutionGetVector().
Referenced by DeclareScalingPreprocessor().
1.7.6.1