System Preprocessors
sysprolinear.h
Go to the documentation of this file.
00001 #ifndef LINEAR_H
00002 #define LINEAR_H
00003 
00004 #include "petscmat.h"
00005 #include "petscksp.h"
00006 #include "syspro.h"
00007 #include "nmd.h"
00008 
00009 typedef struct LinearSystem_* LinearSystem;
00010 typedef struct LinearSolution_* LinearSolution;
00011 typedef struct Diagnostics_* Diagnostics;
00012 
00013 /*
00014  * Linear system object
00015  */
00016 extern PetscErrorCode CreateLinearSystem(MPI_Comm,LinearSystem*);
00017 extern PetscErrorCode LinearSystemDelete(LinearSystem);
00018 extern PetscErrorCode LinearDeleteNumericalProblem(NumericalProblem);
00019 extern PetscErrorCode LinearSystemSetParts(LinearSystem,Mat,Mat,Vec,Vec,Vec);
00020 extern PetscErrorCode LinearSystemInheritParts(LinearSystem,Mat,Mat,Vec,Vec,Vec);
00021 extern PetscErrorCode LinearSystemGetParts(LinearSystem,Mat*,Mat*,Vec*,Vec*,Vec*);
00022 extern PetscErrorCode LinearSystemGetTmpVector(LinearSystem,Vec*);
00023 extern PetscErrorCode LinearSystemSetContext(LinearSystem,void *ctx);
00024 extern PetscErrorCode LinearSystemGetContext(LinearSystem,void **ctx);
00025 extern PetscErrorCode LinearSystemSetKnownSolution(LinearSystem,PetscTruth);
00026 extern PetscErrorCode LinearSystemGetKnownSolution(LinearSystem,PetscTruth*);
00027 extern PetscErrorCode LinearSystemSetMetadata(LinearSystem,NMD_metadata);
00028 extern PetscErrorCode LinearSystemGetMetadata(LinearSystem,NMD_metadata*);
00029 
00030 extern PetscErrorCode LinearSystemDuplicatePointers(LinearSystem,LinearSystem*);
00031 extern PetscErrorCode LinearSystemDuplicate(LinearSystem,LinearSystem*);
00032 extern PetscErrorCode LinearSystemCopy(LinearSystem,LinearSystem);
00033 
00034 /*
00035  * Linear solution object
00036  */
00037 extern PetscErrorCode CreateLinearSolution(LinearSolution*);
00038 extern PetscErrorCode LinearCreateNumericalSolution(NumericalProblem,NumericalSolution*);
00039 extern PetscErrorCode LinearSolutionDelete(LinearSolution);
00040 extern PetscErrorCode LinearSolutionCopy(LinearSolution,LinearSolution);
00041 extern PetscErrorCode LinearSolutionCopyStats(LinearSolution,LinearSolution);
00042 extern PetscErrorCode LinearCopyNumericalSolution(NumericalSolution,NumericalSolution);
00043 extern PetscErrorCode LinearDeleteNumericalSolution(NumericalSolution);
00044 extern PetscErrorCode LinearDeleteNumericalSolutionContext(NumericalSolution);
00045 extern PetscErrorCode CreateDefaultLinearSolution(NumericalProblem,NumericalSolution*);
00046 extern PetscErrorCode LinearSolutionSetVector(LinearSolution,Vec);
00047 extern PetscErrorCode LinearSolutionGetVector(LinearSolution,Vec*);
00048 extern PetscErrorCode LinearSolutionGetStatistics(LinearSolution,NMD_metadata*);
00049 extern PetscErrorCode LinearSolutionSetTimes(LinearSolution,PetscLogDouble,PetscLogDouble,PetscLogDouble);
00050 extern PetscErrorCode LinearSolutionAddToPreprocessTime(LinearSolution,PetscLogDouble);
00051 extern PetscErrorCode LinearSolutionGetTimes(LinearSolution,PetscLogDouble*,PetscLogDouble*,PetscLogDouble*);
00052 extern PetscErrorCode LinearSolutionSetContext(LinearSolution,void *ctx);
00053 extern PetscErrorCode LinearSolutionGetContext(LinearSolution,void **ctx);
00054 extern PetscErrorCode LinearSystemTrueDistance
00055 (LinearSystem,LinearSolution,PetscReal*);
00056 extern PetscErrorCode LinearSystemTrueDistancePrint
00057 (NumericalProblem,NumericalSolution,char*);
00058 extern PetscErrorCode LinearSolutionCreateStatistics(LinearSolution sol);
00059 
00060 extern PetscErrorCode PreprocessedLinearSystemSolution(LinearSystem,LinearSolution*);
00061 
00062 extern PetscErrorCode delete_diagnostics(Diagnostics);
00063 extern PetscErrorCode make_diagnostics(char*,char*,Diagnostics*);
00064 
00065 /*
00066  * Declaration of linear solver preprocessors
00067  */
00068 extern PetscErrorCode DeclareSingletonPreprocessor(void);
00069 extern PetscErrorCode DeclareFlipsignPreprocessor(void);
00070 extern PetscErrorCode DeclareApproximationPreprocessor(void);
00071 extern PetscErrorCode DeclareDummyRowPreprocessor(void);
00072 extern PetscErrorCode DeclareDistributionPreprocessor(void);
00073 extern PetscErrorCode DeclareScalingPreprocessor(void);
00074 extern PetscErrorCode DeclarePCPreprocessor(void);
00075 extern PetscErrorCode DeclareKSPPreprocessor(void);
00076 
00077 #endif