System Preprocessors
|
Go to the source code of this file.
PetscErrorCode DeregisterTransform | ( | SalsaTransform | ) |
Definition at line 63 of file transform.c.
References SalsaTransform_::annotations_c, SalsaTransform_::annotations_i, SalsaTransform_::aprioriselection, CHECKVALIDTRANSFORM, CHKERRQ(), FreeTransformObject(), ierr, SalsaTransform_::n_objects, and SalsaTransform_::transformobjects.
Referenced by SysProFinalize().
PetscErrorCode FreeTransformObject | ( | SalsaTransformObject | tf | ) |
Definition at line 127 of file transform.c.
References SalsaTransformObject_::annotate_c, SalsaTransformObject_::annotate_i, CHECKVALIDTRANSFORMOBJECT, CHKERRQ(), ierr, SalsaTransformObject_::n_options, SalsaTransformObject_::name, SalsaTransformObject_::optionexplanation, SalsaTransformObject_::options, and SalsaTransformObject_::options_marked.
Referenced by DeregisterTransform().
PetscErrorCode NewTransform | ( | const char * | name, |
SalsaTransform * | tf | ||
) |
Define a new class of preprocessors, for instance scaling or permutation.
Definition at line 45 of file transform.c.
References SalsaTransform_::alloc_objects, SalsaTransform_::aprioriselection, CHKERRQ(), SalsaTransform_::cookie, ierr, SalsaTransform_::n_objects, SalsaTransform_::name, TFINC, TRANSFORMCOOKIE, and SalsaTransform_::transformobjects.
Referenced by DeclarePreprocessor().
PetscErrorCode NewTransformObject | ( | const char * | transform, |
const char * | name, | ||
SalsaTransformObject * | to | ||
) |
Create a transform object specified by name
for the preprocessor class transform
. The to
parameter can be NULL if no further specifications of the object are needed, in which case this only registers the name.
Definition at line 109 of file transform.c.
References SalsaTransform_::alloc_objects, CHKERRQ(), SalsaTransformObject_::cookie, ierr, SalsaTransform_::n_objects, SalsaTransformObject_::name, SalsaTransformObject_::transform, TransformGetByName(), TRANSFORMOBJECTCOOKIE, and SalsaTransform_::transformobjects.
Referenced by declareadders(), setup_approximation_choices(), setup_distribution_choices(), setup_flipsign_choices(), setup_ksp_choices(), setup_pc_choices(), setup_scaling_choices(), and setup_singleton_choices().
PetscErrorCode PreprocessorApplyAprioriSelection | ( | SystemPreprocessor | ) |
Definition at line 475 of file transform.c.
References SalsaTransform_::aprioriselection, SalsaTransformObject_::marked, SalsaTransform_::n_objects, SystemPreprocessor_::transform, and SalsaTransform_::transformobjects.
Referenced by PreprocessorSpecificSetup().
PetscErrorCode PreprocessorSaveAprioriSelection | ( | SystemPreprocessor | ) |
Definition at line 461 of file transform.c.
References SalsaTransform_::aprioriselection, CHECKVALIDTRANSFORMOBJECT, SalsaTransformObject_::marked, SalsaTransform_::n_objects, SystemPreprocessor_::transform, and SalsaTransform_::transformobjects.
Referenced by PreprocessorsOptionsHandling().
PetscErrorCode SalsaTransformIntegrityTest | ( | SalsaTransform | tf | ) |
Definition at line 907 of file transform.c.
References CHKERRQ(), ierr, SalsaTransform_::n_objects, SalsaTransform_::suitabilityctxtester, TestSuitabilityContext(), TransformObjectGetSuitabilityFunction(), and SalsaTransform_::transformobjects.
PetscErrorCode SetSuitabilityContextTester | ( | SalsaTransform | , |
PetscErrorCode(*)(void *) | |||
) |
Definition at line 884 of file transform.c.
References CHECKVALIDTRANSFORM, and SalsaTransform_::suitabilityctxtester.
Referenced by setup_ksp_choices().
PetscErrorCode SysProDefineCharAnnotation | ( | const char * | transform, |
const char * | ann | ||
) |
Define a character string annotation for a transform. The index of this annotation can be retrieved with TransformCharAnnotationGetIndex(). The actual annotation can be found with TransformItemGetCharAnnotation().
Definition at line 276 of file transform.c.
References SalsaTransform_::annotations_c, CHKERRQ(), ierr, SalsaTransform_::n_annotate_c, TFINC, and TransformGetByName().
Referenced by setup_ksp_choices().
PetscErrorCode SysProDefineIntAnnotation | ( | const char * | transform, |
const char * | ann | ||
) |
Define a integer string annotation for a transform. The index of this annotation can be retrieved with TransformIntAnnotationGetIndex(). The actual annotation can be found with TransformItemGetIntAnnotation().
Definition at line 332 of file transform.c.
References SalsaTransform_::annotations_i, CHKERRQ(), ierr, SalsaTransform_::n_annotate_i, TFINC, and TransformGetByName().
Referenced by setup_distribution_choices(), setup_ksp_choices(), setup_pc_choices(), and setup_scaling_choices().
PetscErrorCode TransformCharAnnotationGetIndex | ( | SalsaTransform | , |
const char * | , | ||
int * | , | ||
PetscBool * | |||
) |
Definition at line 311 of file transform.c.
References SalsaTransform_::annotations_c, CHECKVALIDTRANSFORM, CHKERRQ(), ierr, and SalsaTransform_::n_annotate_c.
Referenced by TransformObjectCharAnnotate().
PetscErrorCode TransformCurrentItemDefineOption | ( | SalsaTransform | , |
char * | , | ||
char * | |||
) |
PetscErrorCode TransformGetByName | ( | const char * | , |
SalsaTransform * | |||
) |
Definition at line 624 of file preprocess.c.
References CHKERRQ(), ierr, SystemPreprocessorGetByName(), and SystemPreprocessor_::transform.
Referenced by NewTransformObject(), PreprocessorsOptionsHandling(), PreprocessorSpecificSetup(), ReportEnabledPreprocessors(), setup_approximation_choices(), setup_distribution_choices(), setup_flipsign_choices(), setup_ksp_choices(), setup_pc_choices(), setup_scaling_choices(), setup_singleton_choices(), SysProDefineCharAnnotation(), SysProDefineIntAnnotation(), and TransformObjectGetByName().
PetscErrorCode TransformGetName | ( | SalsaTransform | , |
const char ** | |||
) |
Definition at line 81 of file transform.c.
References CHECKVALIDTRANSFORM, and SalsaTransform_::name.
PetscErrorCode TransformGetNextUnmarkedItem | ( | SalsaTransform | tf, |
const char * | old, | ||
SalsaTransformObject * | snew, | ||
PetscBool * | f | ||
) |
Find the next unmarked value; if old
is NULL, the first first unmarked value is given, otherwise the first one after a match with old
.
Definition at line 527 of file transform.c.
References CHECKVALIDTRANSFORM, CHECKVALIDTRANSFORMOBJECT, SalsaTransformObject_::marked, SalsaTransform_::n_objects, SalsaTransformObject_::name, SalsaTransform_::transformobjects, and TRUTH.
Referenced by ChooseFirstTransform(), PreprocessedSolution(), and PreprocessorsOptionsHandling().
PetscErrorCode TransformGetNItems | ( | SalsaTransform | , |
int * | n | ||
) |
PetscErrorCode TransformGetNUnmarked | ( | SalsaTransform | , |
int * | |||
) |
Definition at line 448 of file transform.c.
References CHECKVALIDTRANSFORM, SalsaTransformObject_::marked, SalsaTransform_::n_objects, and SalsaTransform_::transformobjects.
Referenced by PreprocessorsOptionsHandling().
PetscErrorCode TransformGetObjects | ( | SalsaTransform | , |
int * | , | ||
SalsaTransformObject ** | |||
) |
Definition at line 92 of file transform.c.
References CHECKVALIDTRANSFORM, SalsaTransform_::n_objects, and SalsaTransform_::transformobjects.
Referenced by disable_ksps(), specific_distribution_choices(), and specific_scaling_choices().
PetscErrorCode TransformGetUserChoices | ( | SalsaTransform | tf, |
PetscBool * | ch | ||
) |
Query whether the user has ordained which choice(s) to take for a specific transform. The values of these choices are implicitly given by disabling some transforms.
See also TransformSetUserChoices(), TransformObjectsUseOnly().
Definition at line 874 of file transform.c.
References CHECKVALIDTRANSFORM, and SalsaTransform_::userchoices.
Referenced by PreprocessedSolution().
PetscErrorCode TransformIntAnnotationGetIndex | ( | SalsaTransform | , |
const char * | , | ||
int * | , | ||
PetscBool * | |||
) |
Definition at line 365 of file transform.c.
References SalsaTransform_::annotations_i, CHECKVALIDTRANSFORM, CHKERRQ(), ierr, and SalsaTransform_::n_annotate_i.
Referenced by TransformObjectIntAnnotate().
PetscErrorCode TransformItemCharAnnotationGetIndex | ( | SalsaTransform | , |
char * | , | ||
int * | |||
) |
PetscErrorCode TransformItemDefineOption | ( | SalsaTransform | , |
int | , | ||
char * | , | ||
char * | |||
) |
PetscErrorCode TransformItemDescribeLong | ( | SalsaTransform | , |
char * | , | ||
int | , | ||
char ** | |||
) |
Definition at line 821 of file transform.c.
References CHECKVALIDTRANSFORM, CHKERRQ(), SalsaTransformObject_::explanation, ierr, SalsaTransform_::name, SalsaTransformObject_::options, and TransformObjectGetByName().
PetscErrorCode TransformItemDescribeShort | ( | SalsaTransform | , |
char * | , | ||
int | , | ||
char ** | |||
) |
Definition at line 802 of file transform.c.
References CHKERRQ(), ierr, SalsaTransformObject_::n_options, SalsaTransformObject_::name, SalsaTransform_::name, and TransformObjectGetByName().
PetscErrorCode TransformItemGetCharAnnotation | ( | SalsaTransform | , |
int | idx, | ||
char * | an, | ||
char ** | v, | ||
PetscBool * | |||
) |
PetscErrorCode TransformItemGetFirstOption | ( | const char * | , |
const char * | , | ||
int * | , | ||
PetscBool * | |||
) |
Definition at line 630 of file transform.c.
References CHKERRQ(), ierr, SalsaTransformObject_::n_options, SalsaTransformObject_::options, SalsaTransformObject_::options_marked, and TransformObjectGetByName().
Referenced by PreprocessedSolution().
PetscErrorCode TransformItemGetIntAnnotation | ( | SalsaTransform | , |
int | idx, | ||
char * | an, | ||
int * | v, | ||
PetscBool * | f | ||
) |
PetscErrorCode TransformItemGetNextOption | ( | const char * | , |
const char * | , | ||
int * | , | ||
PetscBool * | |||
) |
Definition at line 654 of file transform.c.
References CHKERRQ(), ierr, SalsaTransformObject_::n_options, SalsaTransformObject_::options, SalsaTransformObject_::options_marked, and TransformObjectGetByName().
Referenced by PreprocessedSolution().
PetscErrorCode TransformItemGetNOptions | ( | SalsaTransform | , |
int | it, | ||
int * | nopt | ||
) |
PetscErrorCode TransformItemGetOptionI | ( | SalsaTransform | , |
int | it, | ||
int | iopt, | ||
int * | v | ||
) |
PetscErrorCode TransformItemIntAnnotate | ( | SalsaTransform | , |
int | , | ||
int | |||
) |
PetscErrorCode TransformItemOptionMark | ( | SalsaTransform | , |
const char * | , | ||
int | |||
) |
Definition at line 678 of file transform.c.
References CHECKVALIDTRANSFORM, CHKERRQ(), ierr, SalsaTransformObject_::marked, SalsaTransformObject_::n_options, SalsaTransform_::name, SalsaTransformObject_::options, SalsaTransformObject_::options_marked, and TransformObjectGetByName().
PetscErrorCode TransformItemOptionsUseOnly | ( | SalsaTransformObject | , |
const char * | |||
) |
Definition at line 611 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, CHKERRQ(), ierr, SalsaTransformObject_::n_options, and TransformObjectAddOption().
Referenced by PreprocessorsOptionsHandling().
PetscErrorCode TransformObjectAddOption | ( | SalsaTransformObject | , |
int | |||
) |
Definition at line 571 of file transform.c.
References SalsaTransformObject_::alloc_options, CHECKVALIDTRANSFORMOBJECT, CHKERRQ(), ierr, SalsaTransformObject_::n_options, SalsaTransformObject_::name, SalsaTransformObject_::optionexplanation, SalsaTransformObject_::options, SalsaTransformObject_::options_marked, and TFINC.
Referenced by declareadders(), setup_ksp_choices(), setup_pc_choices(), and TransformItemOptionsUseOnly().
PetscErrorCode TransformObjectAddOptionExplanation | ( | SalsaTransformObject | , |
int | , | ||
const char * | |||
) |
Definition at line 594 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, SalsaTransformObject_::n_options, SalsaTransformObject_::optionexplanation, and SalsaTransformObject_::options.
Referenced by setup_pc_choices().
PetscErrorCode TransformObjectCharAnnotate | ( | SalsaTransformObject | , |
const char * | , | ||
const char * | |||
) |
Definition at line 694 of file transform.c.
References SalsaTransformObject_::alloc_annotate_c, SalsaTransformObject_::annotate_c, CHECKVALIDTRANSFORMOBJECT, CHKERRQ(), ierr, TFINC, SalsaTransformObject_::transform, and TransformCharAnnotationGetIndex().
PetscErrorCode TransformObjectDefineOption | ( | SalsaTransformObject | , |
const char * | |||
) |
Definition at line 561 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, and SalsaTransformObject_::option.
Referenced by declareadders(), setup_ksp_choices(), and setup_pc_choices().
PetscErrorCode TransformObjectGetByName | ( | const char * | , |
const char * | , | ||
SalsaTransformObject * | |||
) |
Definition at line 233 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, CHKERRQ(), ierr, SalsaTransform_::n_objects, SalsaTransformObject_::name, TransformGetByName(), and SalsaTransform_::transformobjects.
Referenced by disable_ksps(), disable_pcs(), is_gmres_method(), pcoptionshandling(), setup_ksp(), specific_approximation_choices(), specific_flipsign_choices(), specific_singleton_choices(), TransformItemDescribeLong(), TransformItemDescribeShort(), TransformItemGetFirstOption(), TransformItemGetNextOption(), TransformItemOptionMark(), TransformObjectsUseOnly(), and unset_ksps().
PetscErrorCode TransformObjectGetIntAnnotation | ( | SalsaTransformObject | , |
const char * | , | ||
int * | , | ||
PetscBool * | |||
) |
Definition at line 738 of file transform.c.
References SalsaTransformObject_::annotate_i, SalsaTransform_::annotations_i, CHECKVALIDTRANSFORMOBJECT, SalsaTransform_::n_annotate_i, SalsaTransformObject_::transform, and TRUTH.
Referenced by disable_ksps(), is_gmres_method(), pcoptionshandling(), set_ksp_options(), specific_distribution_choices(), and specific_scaling_choices().
PetscErrorCode TransformObjectGetMark | ( | SalsaTransformObject | , |
int * | |||
) |
Definition at line 438 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, and SalsaTransformObject_::marked.
Referenced by TransformReportEnabled().
PetscErrorCode TransformObjectGetName | ( | SalsaTransformObject | , |
const char ** | |||
) |
Definition at line 148 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, and SalsaTransformObject_::name.
Referenced by ChooseFirstTransform(), disable_ksps(), PreprocessedSolution(), PreprocessorsOptionsHandling(), PreprocessorSpecificSetup(), and set_ksp_options().
PetscErrorCode TransformObjectGetSuitabilityFunction | ( | SalsaTransformObject | tf, |
void ** | sctx, | ||
PetscErrorCode(**)(NumericalProblem, void *, SuitabilityValue *) | f | ||
) |
Retrieve the suitability function and context; see Suitability functions. Both arguments can be null.
See also TransformObjectSetSuitabilityFunction().
Definition at line 210 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, SalsaTransformObject_::suitabilityctx, and SalsaTransformObject_::suitabilityfunction.
Referenced by PreprocessorSpecificSetup(), SalsaTransformIntegrityTest(), and unset_ksps().
PetscErrorCode TransformObjectGetTransformName | ( | SalsaTransformObject | , |
char ** | |||
) |
Definition at line 222 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, SalsaTransform_::name, and SalsaTransformObject_::transform.
PetscErrorCode TransformObjectIntAnnotate | ( | SalsaTransformObject | , |
const char * | , | ||
int | |||
) |
Definition at line 716 of file transform.c.
References SalsaTransformObject_::alloc_annotate_i, SalsaTransformObject_::annotate_i, CHECKVALIDTRANSFORMOBJECT, CHKERRQ(), ierr, TFINC, SalsaTransformObject_::transform, and TransformIntAnnotationGetIndex().
Referenced by setup_distribution_choices(), setup_ksp_choices(), setup_pc_choices(), and setup_scaling_choices().
PetscErrorCode TransformObjectMark | ( | SalsaTransformObject | tf | ) |
Definition at line 382 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, SalsaTransformObject_::marked, SalsaTransformObject_::n_options, and SalsaTransformObject_::options_marked.
Referenced by disable_ksps(), disable_pcs(), pcoptionshandling(), PreprocessorSpecificSetup(), specific_approximation_choices(), specific_distribution_choices(), specific_flipsign_choices(), specific_scaling_choices(), specific_singleton_choices(), TransformObjectsMarkAll(), and TransformObjectsUseOnly().
PetscErrorCode TransformObjectSetExplanation | ( | SalsaTransformObject | , |
const char * | |||
) |
Definition at line 159 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, and SalsaTransformObject_::explanation.
Referenced by setup_approximation_choices(), setup_distribution_choices(), setup_flipsign_choices(), setup_ksp_choices(), setup_pc_choices(), setup_scaling_choices(), and setup_singleton_choices().
PetscErrorCode TransformObjectSetSuitabilityFunction | ( | SalsaTransformObject | tf, |
void * | sctx, | ||
PetscErrorCode(*)(NumericalProblem, void *, SuitabilityValue *) | f | ||
) |
Set the suitability function; see Suitability functions.
See also TransformObjectGetSuitabilityFunction().
Definition at line 192 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, SalsaTransformObject_::suitabilityctx, and SalsaTransformObject_::suitabilityfunction.
Referenced by setup_ksp_choices().
PetscErrorCode TransformObjectsGetNames | ( | SalsaTransform | tf, |
const char *** | names | ||
) |
Get the names of all declared transformobjects. An array is allocated for the names, which needs to be PetscFree()'d.
Definition at line 255 of file transform.c.
References CHECKVALIDTRANSFORM, CHKERRQ(), ierr, SalsaTransform_::n_objects, SalsaTransformObject_::name, and SalsaTransform_::transformobjects.
Referenced by ContinueRetrievingAllPreprocessors(), and TransformReportEnabled().
PetscErrorCode TransformObjectsMarkAll | ( | SalsaTransform | tf | ) |
Definition at line 408 of file transform.c.
References CHECKVALIDTRANSFORM, CHECKVALIDTRANSFORMOBJECT, CHKERRQ(), ierr, SalsaTransform_::n_objects, TransformObjectMark(), and SalsaTransform_::transformobjects.
Referenced by TransformObjectsUseOnly().
PetscErrorCode TransformObjectsUnmarkAll | ( | SalsaTransform | tf | ) |
Definition at line 423 of file transform.c.
References CHECKVALIDTRANSFORM, CHECKVALIDTRANSFORMOBJECT, CHKERRQ(), ierr, SalsaTransform_::n_objects, SalsaTransform_::transformobjects, and TransformObjectUnmark().
Referenced by disable_ksps(), and TransformObjectsUseOnly().
PetscErrorCode TransformObjectsUseOnly | ( | SalsaTransform | tf, |
const char * | list | ||
) |
Mark a list of names as to be used.
Cases:
"name1,name2,name3"
: all other names are marked as not to be used"not,name1,name2"
: all names will be used, except for the ones listed Definition at line 494 of file transform.c.
References CHECKVALIDTRANSFORM, CHKERRQ(), ierr, SalsaTransform_::name, TransformObjectGetByName(), TransformObjectMark(), TransformObjectsMarkAll(), TransformObjectsUnmarkAll(), and TransformObjectUnmark().
Referenced by PreprocessorsOptionsHandling().
PetscErrorCode TransformObjectUnmark | ( | SalsaTransformObject | tf | ) |
Definition at line 395 of file transform.c.
References CHECKVALIDTRANSFORMOBJECT, SalsaTransformObject_::marked, SalsaTransformObject_::n_options, and SalsaTransformObject_::options_marked.
Referenced by TransformObjectsUnmarkAll(), and TransformObjectsUseOnly().
PetscErrorCode TransformReportEnabled | ( | SalsaTransform | , |
const char ** | |||
) |
Definition at line 779 of file transform.c.
References CHKERRQ(), ierr, SalsaTransform_::n_objects, TransformObjectGetMark(), SalsaTransform_::transformobjects, and TransformObjectsGetNames().
Referenced by ReportEnabledPreprocessors().
PetscErrorCode TransformReportTeXTable | ( | SalsaTransform | , |
FILE * | |||
) |
Definition at line 756 of file transform.c.
References SalsaTransformObject_::explanation, SalsaTransform_::n_objects, SalsaTransformObject_::n_options, SalsaTransformObject_::name, SalsaTransformObject_::options, and SalsaTransform_::transformobjects.
PetscErrorCode TransformSetUserChoices | ( | SalsaTransform | tf, |
PetscBool | ch | ||
) |
Declare that the user has ordained which choice(s) to take for a specific transform. The values of these choices are implicitly given by disabling some transforms.
See also TransformGetUserChoices(), TransformObjectsUseOnly().
Definition at line 858 of file transform.c.
References CHECKVALIDTRANSFORM, and SalsaTransform_::userchoices.
Referenced by PreprocessorsOptionsHandling().