public override void Assemble(ref MatrixSparseLinkedList K, Matrix_Jagged Ke) { int Ip, Iq; int NNPE = ElementNodes.Length; for (int p = 0; p < NNPE; p++) { Node_ND_Unknowns_VectorField Unknown_p = (Node_ND_Unknowns_VectorField)ElementNodes[p].Unknowns; int NDFp = Unknown_p.UnknownDoFs.Length; for (int i = 0; i < NDFp; i++) { Ip = Unknown_p.UnknownDoFs[i]; for (int q = 0; q < NNPE; q++) { Node_ND_Unknowns_VectorField Unknown_q = (Node_ND_Unknowns_VectorField)ElementNodes[q].Unknowns; int NDFq = Unknown_q.UnknownDoFs.Length; for (int j = 0; j < NDFq; j++) { Iq = Unknown_q.UnknownDoFs[j]; K.AddToMatrixElement(Ip, Iq, Ke.Values[NNPE * p + i][NNPE * q + j]); } } } } }
public override void Assemble(ref MatrixSparseLinkedList K, Matrix_Jagged Ke) { int Ip, Iq; int NNPE = ElementNodes.Length; for (int p = 0; p < NNPE; p++) { Node_ND_Unknowns_ScalarField TheUnknowns_p = (Node_ND_Unknowns_ScalarField)ElementNodes[p].Unknowns; Ip = TheUnknowns_p.UnknownDoF; for (int q = 0; q < NNPE; q++) { Node_ND_Unknowns_ScalarField TheUnknowns_q = (Node_ND_Unknowns_ScalarField)ElementNodes[q].Unknowns; Iq = TheUnknowns_q.UnknownDoF; K.AddToMatrixElement(Ip, Iq, Ke.Values[p][q]); } } }
public override void Assemble(ref MatrixSparseLinkedList K, Matrix_Jagged Ke) { int Ip, Iq, I1p, I1pi, I1, I2q, I2qk, I2; int NNPE = ElementNodes.Length; int NumberOFPhysics, TotalDoFPerNode; int[] DofPerPhysics; int[] StartIndexPerPhysics = Get_StartIndexForEachPhysics(out NumberOFPhysics, out TotalDoFPerNode, out DofPerPhysics); for (int p = 0; p < NNPE; p++) { Node_ND_Unknowns_MultiPhysics Unknowns_p = (Node_ND_Unknowns_MultiPhysics)ElementNodes[p].Unknowns; I1p = TotalDoFPerNode * p; for (int i = 0; i < NumberOFPhysics; i++) { I1pi = I1p + StartIndexPerPhysics[i]; for (int j = 0; j < DofPerPhysics[i]; j++) { I1 = I1pi + j; Ip = Unknowns_p.UnknownDoFs[PhysicsUsed[i]][j]; for (int q = 0; q < NNPE; q++) { Node_ND_Unknowns_MultiPhysics Unknowns_q = (Node_ND_Unknowns_MultiPhysics)ElementNodes[q].Unknowns; I2q = TotalDoFPerNode * q; for (int k = 0; k < NumberOFPhysics; k++) { I2qk = I2q + StartIndexPerPhysics[k]; for (int l = 0; l < DofPerPhysics[k]; l++) { I2 = I2qk + l; Iq = Unknowns_q.UnknownDoFs[PhysicsUsed[k]][l]; K.AddToMatrixElement(Ip, Iq, Ke.Values[I1][I2]); } } } } } } }