00001
00007 #ifndef __ELASTICITY_JAC_H
00008 #define __ELASTICITY_JAC_H
00009
00010
00011
00012
00013 struct ElasticityData {
00014 unsigned char* bdyArr;
00015 PetscReal mu;
00016 PetscReal lambda;
00017 Mat Jmat_private;
00018 Vec inTmp;
00019 Vec outTmp;
00020 };
00021
00022 void SetElasticityContexts(ot::DAMG* damg);
00023 void DestroyElasticityContexts(ot::DAMG* damg);
00024
00025 PetscErrorCode CreateElasticityMat(ot::DAMG damg,Mat *B);
00026 PetscErrorCode ComputeElasticityMat(ot::DAMG damg,Mat J, Mat B);
00027
00028 PetscErrorCode ElasticityMatMult(Mat, Vec, Vec);
00029 PetscErrorCode ElasticityMatGetDiagonal(Mat, Vec);
00030 PetscErrorCode ElasticityShellMatMult(Mat, Vec, Vec);
00031 PetscErrorCode ElasticityMatDestroy(Mat);
00032
00033 PetscErrorCode ComputeElasticityRHS(ot::DAMG damg,Vec rhs);
00034
00035
00036 void getDofAndNodeSizeForElasticityMat(Mat J, unsigned int & dof, unsigned int & nodeSize);
00037
00038 void computeInvBlockDiagEntriesForElasticityMat(Mat J, double **invBlockDiagEntries);
00039
00040
00041
00042 void getPrivateMatricesForKSP_Shell_Elas(Mat mat,
00043 Mat *AmatPrivate, Mat *PmatPrivate, MatStructure* pFlag);
00044
00045 #endif
00046