| 48 | #include <DOF_Group.h> |
| 49 | |
| 50 | LagrangeSP_FE::LagrangeSP_FE(int tag, Domain &theDomain, SP_Constraint &TheSP, |
| 51 | DOF_Group &theGroup, double Alpha) |
| 52 | :FE_Element(tag, 2,2), |
| 53 | alpha(Alpha), tang(0), resid(0), theSP(&TheSP), theDofGroup(&theGroup) |
| 54 | { |
| 55 | // create a Matrix and a Vector for the tangent and residual |
| 56 | tang = new Matrix(2,2); |
| 57 | resid = new Vector(2); |
| 58 | if ((tang == 0) || (tang->noCols() == 0) || (resid == 0) || |
| 59 | (resid->Size() == 0)) { |
| 60 | opserr << "WARNING LagrangeSP_FE::LagrangeSP_FE()"; |
| 61 | opserr << "- ran out of memory\n"; |
| 62 | exit(-1); |
| 63 | } |
| 64 | |
| 65 | // zero the Matrix and Vector |
| 66 | resid->Zero(); |
| 67 | tang->Zero(); |
| 68 | |
| 69 | theNode = theDomain.getNode(theSP->getNodeTag()); |
| 70 | if (theNode == 0) { |
| 71 | opserr << "WARNING LagrangeSP_FE::LagrangeSP_FE()"; |
| 72 | opserr << "- no asscoiated Node\n"; |
| 73 | exit(-1); |
| 74 | } |
| 75 | |
| 76 | // set the tangent |
| 77 | (*tang)(0,1) = alpha; |
| 78 | (*tang)(1,0) = alpha; |
| 79 | |
| 80 | // set the myDOF_Groups tags indicating the attached id's of the |
| 81 | // DOF_Group objects |
| 82 | DOF_Group *theNodesDOFs = theNode->getDOF_GroupPtr(); |
| 83 | if (theNodesDOFs == 0) { |
| 84 | opserr << "WARNING LagrangeSP_FE::LagrangeSP_FE()"; |
| 85 | opserr << " - no DOF_Group with Constrained Node\n"; |
| 86 | exit(-1); |
| 87 | } |
| 88 | |
| 89 | myDOF_Groups(0) = theNodesDOFs->getTag(); |
| 90 | myDOF_Groups(1) = theDofGroup->getTag(); |
| 91 | } |
| 92 | |
| 93 | LagrangeSP_FE::~LagrangeSP_FE() |
| 94 | { |
nothing calls this directly
no test coverage detected