/* $Id: elements1mc.cc,v 1.2 1996/10/11 15:15:17 bzferdma Exp $ (C)opyright 1996 by Konrad-Zuse-Center, Berlin All rights reserved. Part of the Kaskade distribution */ #include "elements1mc.h" #include "numerics.h" #include "triang.h" #include "materials.h" #include "integ.h" //------------------------------------------------------------------------- MCLine:: MCLine(Material* material0, int nComp0) : Line(), nComp(nComp0), noOfNodes(nComp0*NoOfBaseNodes()), Node(NoOfBaseNodes(),nComp0) { // -- fill array Node which defines local node numbers: int n, comp, node=0; const int nbnodes = NoOfBaseNodes(); for (n=1; n<=nbnodes; ++n) for (comp=1; comp<=nComp; ++comp) Node(n,comp) = ++node; // -- the usual initialization: material = material0; basicInit(); setShapeFunctionsAtIPs(nComp); compConstantMatrices(); setPatterns(); } //------------------------------------------------------------------------- HQuadMCLine:: HQuadMCLine (Material* material0, int nComp0) : HQuadLine(), nComp(nComp0), noOfNodes(nComp0*NoOfBaseNodes()), Node(NoOfBaseNodes(),nComp0) { // -- fill array Node which defines local node numbers: int n, comp, node=0; const int nbnodes = NoOfBaseNodes(); for (n=1; n<=nbnodes; ++n) for (comp=1; comp<=nComp; ++comp) Node(n,comp) = ++node; // -- the usual initialization: material = material0; basicInit(); setShapeFunctionsAtIPs(nComp); compConstantMatrices(); setPatterns(); } //------------------------------------------------------------------------- void HQuadMCLine:: setPatterns() { int i, j, comp1, comp2, node1, node2; StdElement::setPatterns(); const int nbnodes = NoOfBaseNodes(); // -- set the assembly pattern for DLY: DLYPattern = new Matrix(NoOfNodes(),NoOfNodes()); FORALL_ROWS(*DLYPattern,i) FORALL_COLUMNS(*DLYPattern,j) (*DLYPattern)(i,j) = False; for (comp1=1; comp1<=nComp; ++comp1) for (comp2=1; comp2<=nComp; ++comp2) { for (i=3; i<=nbnodes; ++i) { node1 = Node(i,comp1); (*DLYPattern)(node1,node1) = True; for (j=1; j<=2; ++j) { node2 = Node(j,comp2); (*DLYPattern)(node1,node2) = True; } } } }