/// <summary> /// Compute the stiffness matrix /// </summary> public override void ComputeKe() { ComputeD(); J = ComputeJ(); B = ComputeB() / J; GaussLegendreQuadrature glq = new GaussLegendreQuadrature(2); for (int i = 0; i < glq.Xi.Count; i++) { for (int j = 0; j < glq.Xi.Count; j++) { var quad_J = ComputeJ(glq.Xi[i], glq.Xi[j]); var quad_B = ComputeB(glq.Xi[i], glq.Xi[j]).Multiply(1.0 / quad_J); Ke += glq.Weights[i] * glq.Weights[j] * Thickness *quad_B.TransposeThisAndMultiply(D).Multiply(quad_B).Multiply(quad_J); } } }
/// <summary> /// Compute the stiffness matrix /// </summary> public override void ComputeKe() { ComputeD(); GaussLegendreQuadrature glq = new GaussLegendreQuadrature(3); for (int i = 0; i < glq.Xi.Count; i++) { for (int j = 0; j < glq.Xi.Count; j++) { for (int k = 0; k < glq.Xi.Count; k++) { var quad_J = ComputeJ(glq.Xi[i], glq.Xi[j], glq.Xi[k]); var quad_B = ComputeB(quad_J, glq.Xi[i], glq.Xi[j], glq.Xi[k]); Ke += glq.Weights[i] * glq.Weights[j] * glq.Weights[k] * quad_B.TransposeThisAndMultiply(D).Multiply(quad_B).Multiply(quad_J.Determinant()); } } } }