Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

omgJac.h

Go to the documentation of this file.
00001 
00007 #ifndef __OMG_JAC_H
00008 #define __OMG_JAC_H
00009 
00010 //Stuff for the case where the material properties on the coarser grids are
00011 //constructed by averaging the material properties of the immediately finer
00012 //grid 
00013 struct Jac2MFreeData {
00014   std::vector<double>* matProp;
00015   bool isFinestLevel;
00016   Mat Jmat_private;
00017   Vec inTmp;
00018   Vec outTmp;
00019 };
00020 
00021 struct Jac3MFreeData { 
00022   ot::DA* daf;
00023   bool isFinestLevel;
00024   bool isCoarsestLevel;
00025   std::vector<double>* matProp;
00026   std::vector<double>* matPropFine;
00027   bool changedPartition; 
00028   Mat JmatThisLevel;
00029   Mat BmatThisLevel;
00030   Mat Jmat_private;
00031   Vec inTmp;
00032   Vec outTmp;
00033 };
00034 
00035 struct DirichletJacData {
00036   unsigned char* bdyArr;
00037   Mat Jmat_private;
00038   Vec inTmp;
00039   Vec outTmp;
00040 };
00041 
00042 void SetDirichletJacContexts(ot::DAMG* damg);
00043 void DestroyDirichletJacContexts(ot::DAMG* damg);
00044 
00045 void SetUserContexts(ot::DAMG* damg);
00046 void SetUserContextsCoarsestToFinest(ot::DAMG* damg);
00047 
00048 void SetCoarseToFineFromPts(ot::DAMG* damg,
00049     const std::vector<double>& pts,
00050     const std::vector<double> & lapJump);
00051 
00052 void SetUserContextsFromPts(ot::DAMG* damg, const std::vector<double>& pts,
00053     const std::vector<double> & lapJump);
00054 
00055 void DestroyUserContexts(ot::DAMG* damg);
00056 
00057 PetscErrorCode CreateTmpDirichletLaplacian(ot::DAMG damg,Mat *B);
00058 PetscErrorCode CreateDirichletLaplacian(ot::DAMG damg,Mat *B);
00059 PetscErrorCode ComputeDirichletLaplacian(ot::DAMG damg,Mat J, Mat B);
00060 
00061 PetscErrorCode TmpDirichletLaplacianMatMult(Mat, Vec, Vec);
00062 PetscErrorCode DirichletLaplacianMatMult(Mat, Vec, Vec);
00063 PetscErrorCode DirichletLaplacianShellMatMult(Mat, Vec, Vec);
00064 PetscErrorCode DirichletLaplacianMatGetDiagonal(Mat, Vec);
00065 PetscErrorCode DirichletLaplacianMatDestroy(Mat);
00066 
00067 PetscErrorCode CreateTmpDirichletJacobian(ot::DAMG damg,Mat *B);
00068 PetscErrorCode CreateDirichletJacobian(ot::DAMG damg,Mat *B);
00069 PetscErrorCode ComputeDirichletJacobian(ot::DAMG damg,Mat J, Mat B);
00070 
00071 PetscErrorCode TmpDirichletJacobianMatMult(Mat, Vec, Vec);
00072 PetscErrorCode DirichletJacobianMatMult(Mat, Vec, Vec);
00073 PetscErrorCode DirichletJacobianShellMatMult(Mat, Vec, Vec);
00074 PetscErrorCode DirichletJacobianMatGetDiagonal(Mat, Vec);
00075 PetscErrorCode DirichletJacobianMatDestroy(Mat);
00076 
00077 PetscErrorCode CreateJacobian1(ot::DAMG damg,Mat *B);
00078 PetscErrorCode ComputeJacobian1(ot::DAMG damg,Mat J, Mat B);
00079 PetscErrorCode CreateAndComputeFullJacobian1(ot::DAMG damg,Mat *B);
00080 PetscErrorCode CreateAndComputeFullActiveJacobian1(ot::DAMG damg,Mat *B);
00081 
00082 PetscErrorCode CreateAndComputeMassMatrix(ot::DAMG damg, Mat* B);
00083 
00084 PetscErrorCode CreateJacobian2(ot::DAMG damg,Mat *B);
00085 PetscErrorCode ComputeJacobian2(ot::DAMG damg,Mat J, Mat B);
00086 
00087 PetscErrorCode Jacobian2MatMult(Mat, Vec, Vec);
00088 PetscErrorCode Jacobian2ShellMatMult(Mat, Vec, Vec);
00089 PetscErrorCode Jacobian2MatGetDiagonal(Mat, Vec);
00090 PetscErrorCode Jacobian2MatDestroy(Mat);
00091 
00092 PetscErrorCode ComputeSol(ot::DAMG damg, Vec expectedSol); 
00093 PetscErrorCode ComputeRandomRHS(ot::DAMG damg, Vec in);
00094 PetscErrorCode ComputeConsistentRandomRHS(ot::DAMG damg, Vec in);
00095 PetscErrorCode ComputeRHS0(ot::DAMG damg, Vec rhs);
00096 PetscErrorCode ComputeRHS1(ot::DAMG damg, Vec rhs);
00097 PetscErrorCode ComputeRHS2(ot::DAMG damg, Vec in);
00098 PetscErrorCode ComputeRHS3(ot::DAMG damg, Vec in);
00099 PetscErrorCode ComputeRHS4(ot::DAMG damg, Vec in);
00100 PetscErrorCode ComputeRHS5(ot::DAMG damg, Vec in);
00101 PetscErrorCode ComputeRHS6(ot::DAMG damg, Vec in);
00102 PetscErrorCode ComputeRHS7(ot::DAMG damg, Vec in);
00103 PetscErrorCode ComputeRHS8(ot::DAMG damg, Vec in);
00104 PetscErrorCode ComputeRHS9(ot::DAMG damg, Vec in);
00105 PetscErrorCode ComputeTestFBM_RHS(ot::DAMG damg, Vec in);
00106 PetscErrorCode ComputeFBM2_RHS(ot::DAMG damg, Vec in);
00107 PetscErrorCode ComputeFBM2_RHS_Part1(ot::DAMG damg, Vec in);
00108 PetscErrorCode ComputeFBM2_RHS_Part2(ot::DAMG damg, Vec in);
00109 PetscErrorCode SetSolutionFBM2(ot::DAMG damg, Vec in);
00110 PetscErrorCode EnforceZeroFBM2(ot::DAMG damg, Vec in);
00111 PetscErrorCode ComputeFBM_RHS(ot::DAMG damg, Vec in);
00112 PetscErrorCode ComputeFBM_RHS_Part1(ot::DAMG damg, Vec in);
00113 PetscErrorCode ComputeFBM_RHS_Part2(ot::DAMG damg, Vec in);
00114 PetscErrorCode ComputeFBM_RHS_Part3(ot::DAMG damg, Vec in);
00115 PetscErrorCode SetSolutionFBM(ot::DAMG damg, Vec in);
00116 PetscErrorCode EnforceZeroFBM(ot::DAMG damg, Vec in);
00117 PetscErrorCode SetSolution5(ot::DA* da, Vec in);
00118 
00119 double ComputeError5(ot::DA* da, Vec in);
00120 double TestError5(ot::DA* da);
00121 
00122 PetscErrorCode CreateJacobian3(ot::DAMG damg, Mat *B);
00123 PetscErrorCode ComputeJacobian3(ot::DAMG damg, Mat J, Mat B);
00124 
00125 PetscErrorCode Jacobian3MatMult(Mat, Vec, Vec);
00126 PetscErrorCode Jacobian3ShellMatMult(Mat, Vec, Vec);
00127 PetscErrorCode Jacobian3MatGetDiagonal(Mat, Vec);
00128 PetscErrorCode Jacobian3MatDestroy(Mat);
00129 
00130 void getActiveStateAndActiveCommForKSP_Shell_DirichletJac(Mat mat,
00131     bool & activeState, MPI_Comm & activeComm);
00132 
00133 void getActiveStateAndActiveCommForKSP_Shell_Jac1(Mat mat,
00134     bool & activeState, MPI_Comm & activeComm);
00135 
00136 void getActiveStateAndActiveCommForKSP_Shell_Jac2or3(Mat mat,
00137     bool & activeState, MPI_Comm & activeComm);
00138 
00139 void getPrivateMatricesForKSP_Shell_DirichletJac(Mat mat,
00140     Mat *AmatPrivate, Mat *PmatPrivate, MatStructure* pFlag);
00141 
00142 void getPrivateMatricesForKSP_Shell_Jac1(Mat mat,
00143     Mat *AmatPrivate, Mat *PmatPrivate, MatStructure* pFlag);
00144 
00145 void getPrivateMatricesForKSP_Shell_Jac2(Mat mat,
00146     Mat *AmatPrivate, Mat *PmatPrivate, MatStructure* pFlag);
00147 
00148 void getPrivateMatricesForKSP_Shell_Jac3(Mat mat,
00149     Mat *AmatPrivate, Mat *PmatPrivate, MatStructure* pFlag);
00150 
00151 #endif
00152 

Generated on Tue Mar 24 16:13:57 2009 for DENDRO by  doxygen 1.3.9.1