Changeset 4898 for issm/trunk/src/c/objects/Elements/Penta.cpp
- Timestamp:
- 07/30/10 09:00:31 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r4885 r4898 4014 4014 } 4015 4015 /*}}}*/ 4016 /*FUNCTION Penta::GetMatrixInvert {{{1*/4017 void Penta::GetMatrixInvert(double* Ke_invert, double* Ke){4018 /*Inverse a 3 by 3 matrix only */4019 4020 double a,b,c,d,e,f,g,h,i;4021 double det;4022 int calculationdof=3;4023 4024 /*Take the matrix components: */4025 a=*(Ke+calculationdof*0+0);4026 b=*(Ke+calculationdof*0+1);4027 c=*(Ke+calculationdof*0+2);4028 d=*(Ke+calculationdof*1+0);4029 e=*(Ke+calculationdof*1+1);4030 f=*(Ke+calculationdof*1+2);4031 g=*(Ke+calculationdof*2+0);4032 h=*(Ke+calculationdof*2+1);4033 i=*(Ke+calculationdof*2+2);4034 4035 det=a*(e*i-f*h)-b*(d*i-f*g)+c*(d*h-e*g);4036 4037 *(Ke_invert+calculationdof*0+0)=(e*i-f*h)/det;4038 *(Ke_invert+calculationdof*0+1)=(c*h-b*i)/det;4039 *(Ke_invert+calculationdof*0+2)=(b*f-c*e)/det;4040 *(Ke_invert+calculationdof*1+0)=(f*g-d*i)/det;4041 *(Ke_invert+calculationdof*1+1)=(a*i-c*g)/det;4042 *(Ke_invert+calculationdof*1+2)=(c*d-a*f)/det;4043 *(Ke_invert+calculationdof*2+0)=(d*h-e*g)/det;4044 *(Ke_invert+calculationdof*2+1)=(b*g-a*h)/det;4045 *(Ke_invert+calculationdof*2+2)=(a*e-b*d)/det;4046 4047 }4048 /*}}}*/4049 4016 /*FUNCTION Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord) {{{1*/ 4050 4017 void Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord){ … … 5186 5153 5187 5154 /*Inverse the matrix corresponding to bubble part Kbb */ 5188 GetMatrixInvert(&Kbbinv[0][0], &Kbb[0][0]);5155 Matrix3x3Invert(&Kbbinv[0][0], &Kbb[0][0]); 5189 5156 5190 5157 /*Multiply matrices to create the reduce matrix Ke_reduced */ … … 5230 5197 5231 5198 /*Inverse the matrix corresponding to bubble part Kbb */ 5232 GetMatrixInvert(&Kbbinv[0][0], &Kbb[0][0]);5199 Matrix3x3Invert(&Kbbinv[0][0], &Kbb[0][0]); 5233 5200 5234 5201 /*Multiply matrices to create the reduce matrix Ke_reduced */
Note:
See TracChangeset
for help on using the changeset viewer.