MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / computeDiff

Method computeDiff

SRC/element/XMUelements/AC3D8HexWithSensitivity.cpp:1037–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1035}
1036
1037int
1038AC3D8HexWithSensitivity::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
1072double
1073AC3D8HexWithSensitivity::Jacobian_det(Matrix Jac)

Callers 5

updateMethod · 0.95
getNodalForcesMethod · 0.95
commitSensitivityMethod · 0.95

Calls 2

computeHMethod · 0.95
SolveMethod · 0.45

Tested by

no test coverage detected