MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / LagrangeMP_FE

Method LagrangeMP_FE

SRC/analysis/fe_ele/lagrange/LagrangeMP_FE.cpp:55–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53// CDOF = a1*RDOF1 + a2*RDOF2 + ... + an*RDOFn + beta
54
55LagrangeMP_FE::LagrangeMP_FE(int tag, Domain &theDomain, MP_Constraint &TheMP,
56 DOF_Group &theGroup, double Alpha)
57:FE_Element(tag, 3,(tag, TheMP.getConstrainedDOFs()).Size()+
58 (TheMP.getRetainedDOFs()).Size() +
59 (TheMP.getConstrainedDOFs()).Size()), // *see note 1
60 alpha(Alpha), theMP(&TheMP),
61 theConstrainedNode(0), theRetainedNode(0),
62 theDofGroup(&theGroup), tang(0), resid(0)
63{
64 const Matrix &constraint = theMP->getConstraint();
65 int noRows = constraint.noRows();
66 int noCols = constraint.noCols();
67 int size = 2*noRows+noCols;
68
69 tang = new Matrix(size,size);
70 resid = new Vector(size);
71 if (tang == 0 || resid == 0 || tang->noCols() == 0 || resid->Size() == 0) {
72 opserr << "FATAL LagrangeMP_FE::LagrangeMP_FE() - out of memory\n";
73 exit(-1);
74 }
75 tang->Zero();
76 resid->Zero();
77
78 theRetainedNode = theDomain.getNode(theMP->getNodeRetained());
79 theConstrainedNode = theDomain.getNode(theMP->getNodeConstrained());
80
81 if (theRetainedNode == 0) {
82 opserr << "WARNING LagrangeMP_FE::LagrangeMP_FE()";
83 opserr << "- no asscoiated Retained Node\n";
84 exit(-1);
85 }
86
87 if (theConstrainedNode == 0) {
88 opserr << "WARNING LagrangeMP_FE::LagrangeMP_FE()";
89 opserr << "- no asscoiated Constrained Node\n";
90 exit(-1);
91 }
92
93 if (theMP->isTimeVarying() == false) {
94 this->determineTangent();
95 }
96
97 // set the myDOF_Groups tags indicating the attached id's of the
98 // DOF_Group objects
99 DOF_Group *theConstrainedNodesDOFs = theConstrainedNode->getDOF_GroupPtr();
100 if (theConstrainedNodesDOFs == 0) {
101 opserr << "WARNING LagrangeMP_FE::LagrangeMP_FE()";
102 opserr << " - no DOF_Group with Constrained Node\n";
103 exit(-1);
104 }
105
106 DOF_Group *theRetainedNodesDOFs = theRetainedNode->getDOF_GroupPtr();
107 if (theRetainedNodesDOFs == 0) {
108 opserr << "WARNING LagrangeMP_FE::LagrangeMP_FE()";
109 opserr << " - no DOF_Group with Retained Node\n";
110 exit(-1);
111 }
112

Callers

nothing calls this directly

Calls 13

determineTangentMethod · 0.95
exitFunction · 0.85
getConstrainedDOFsMethod · 0.80
SizeMethod · 0.45
noRowsMethod · 0.45
noColsMethod · 0.45
ZeroMethod · 0.45
getNodeMethod · 0.45
getNodeRetainedMethod · 0.45
getNodeConstrainedMethod · 0.45
isTimeVaryingMethod · 0.45
getDOF_GroupPtrMethod · 0.45

Tested by

no test coverage detected