| 1035 | } |
| 1036 | |
| 1037 | int |
| 1038 | AC3D8HexWithSensitivity::computeDiff(void) |
| 1039 | { |
| 1040 | if (L == 0 || detJ == 0) { |
| 1041 | L = new Matrix*[numGP]; |
| 1042 | detJ = new double[numGP]; |
| 1043 | if (L == 0 || detJ == 0) { |
| 1044 | opserr << "AC3D8HexWithSensitivity::computeDiff - out of memory!\n"; |
| 1045 | return -3; |
| 1046 | } |
| 1047 | |
| 1048 | Matrix Jacobian(3,3); |
| 1049 | |
| 1050 | this->computeH(); |
| 1051 | Matrix NC = getNodalCoords(); |
| 1052 | |
| 1053 | for(int i = 0; i < numGP; i++) { |
| 1054 | L[i] = new Matrix(3, nodes_in_elem); |
| 1055 | if(L[i] == 0) { |
| 1056 | opserr << "AC3D8HexWithSensitivity::computDiff() - out of memory!\n"; |
| 1057 | return -3; |
| 1058 | } |
| 1059 | |
| 1060 | Matrix &dh = *DH[i]; |
| 1061 | Jacobian = dh*NC; |
| 1062 | detJ[i] = Jacobian_det(Jacobian); |
| 1063 | |
| 1064 | // compute [Jac]^-1*[DH] |
| 1065 | Jacobian.Solve(dh, *L[i]); |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | return 0; |
| 1070 | } |
| 1071 | |
| 1072 | double |
| 1073 | AC3D8HexWithSensitivity::Jacobian_det(Matrix Jac) |
no test coverage detected