System Preprocessors
|
#include <stdlib.h>
#include <stdio.h>
#include "petsc.h"
#include "syspro.h"
#include "sysprotransform.h"
#include "sysprolinear.h"
#include "linear_impl.h"
#include "anamod.h"
Go to the source code of this file.
Defines | |
#define | PREPROCESSOR "flipsign" |
Functions | |
static PetscErrorCode | flipsign (const char *type, int nopt, PetscBool overwrite, NumericalProblem inproblem, NumericalProblem *outproblem, void *gctx, void **ctx, PetscBool *success) |
static PetscErrorCode | back_flipsign (const char *flipsign_type, PetscBool overwrite, void *gctx, void *ctx, NumericalProblem nextproblem, NumericalProblem problem, NumericalSolution flipped, NumericalSolution straight) |
static PetscErrorCode | setup_flipsign_choices () |
static PetscErrorCode | specific_flipsign_choices (NumericalProblem theproblem, SalsaTransform flipsign) |
PetscErrorCode | DeclareFlipsignPreprocessor (void) |
Definition in file flipsign.c.
#define PREPROCESSOR "flipsign" |
Definition at line 19 of file flipsign.c.
Referenced by DeclareFlipsignPreprocessor(), setup_flipsign_choices(), and specific_flipsign_choices().
static PetscErrorCode back_flipsign | ( | const char * | flipsign_type, |
PetscBool | overwrite, | ||
void * | gctx, | ||
void * | ctx, | ||
NumericalProblem | nextproblem, | ||
NumericalProblem | problem, | ||
NumericalSolution | flipped, | ||
NumericalSolution | straight | ||
) | [static] |
Definition at line 85 of file flipsign.c.
References CHKERRQ(), ierr, and LinearSolutionCopy().
Referenced by DeclareFlipsignPreprocessor().
PetscErrorCode DeclareFlipsignPreprocessor | ( | void | ) |
Definition at line 168 of file flipsign.c.
References back_flipsign(), CHKERRQ(), DeclarePreprocessor(), ierr, PREPROCESSOR, PreprocessorSetPreservedCategories(), setup_flipsign_choices(), and specific_flipsign_choices().
static PetscErrorCode flipsign | ( | const char * | type, |
int | nopt, | ||
PetscBool | overwrite, | ||
NumericalProblem | inproblem, | ||
NumericalProblem * | outproblem, | ||
void * | gctx, | ||
void ** | ctx, | ||
PetscBool * | success | ||
) | [static] |
Definition at line 24 of file flipsign.c.
References CHKERRQ(), ierr, LinearSystemDuplicatePointers(), LinearSystemGetParts(), LinearSystemSetParts(), and SysProComputeQuantity().
static PetscErrorCode setup_flipsign_choices | ( | ) | [static] |
This routine is only called when the flipsign preprocessor is created by DeclarePreprocessor() inside DeclareFlipsignPreprocessor()
Definition at line 114 of file flipsign.c.
References CHKERRQ(), ierr, NewTransformObject(), PREPROCESSOR, TransformGetByName(), and TransformObjectSetExplanation().
Referenced by DeclareFlipsignPreprocessor().
static PetscErrorCode specific_flipsign_choices | ( | NumericalProblem | theproblem, |
SalsaTransform | flipsign | ||
) | [static] |
This is the 'specific setup' phase of the flipsign preprocessor. See Usage modes for details.
It disables either the identity or the flip routine, to leave only the one applicable to this particular system.
Definition at line 143 of file flipsign.c.
References CHKERRQ(), ierr, PREPROCESSOR, SysProComputeQuantity(), TransformObjectGetByName(), and TransformObjectMark().
Referenced by DeclareFlipsignPreprocessor().