public int mergeJacobianOfPosition(ShoNS.Array.SparseDoubleArray jacob, int num) { for (int i = 0; i < nIntPoint; i++) { var grad = intP[i].N; for (int j = 0; j < nNode; j++) { jacob[num + i, index[j]] = grad[2, j * 3 + 2]; } } return(num + nIntPoint); }
public int mergeJacobian(ShoNS.Array.SparseDoubleArray jacobian, int i) { for (int j = 0; j < nBIntPoint; j++) { for (int k = 0; k < 2; k++) { var grad = bIntP[j].getGradientOfBoundaryCondition(k); for (int f = 0; f < nNode; f++) { jacobian[i + j * 2 + k, index[f]] = grad[f]; } } } return(i + nBIntPoint * 2); }
public void mergeHessian(ShoNS.Array.SparseDoubleArray _hess) { for (int i = 0; i < nNode; i++) { for (int j = 0; j < __DIM; j++) { for (int k = 0; k < nNode; k++) { for (int l = 0; l < __DIM; l++) { _hess[this.index[i] * __DIM + j, this.index[k] * __DIM + l] += this.hess[i * __DIM + j, k *__DIM + l]; } } } } }