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

Function OPS_EqualDOF_Mixed

DEVELOPER/core/MP_Constraint.cpp:96–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96int OPS_EqualDOF_Mixed()
97{
98 // Check number of arguments
99 if (OPS_GetNumRemainingInputArgs() < 3) {
100 opserr << "WARNING bad command - want: equalDOFmixed RnodeID? CnodeID? numDOF? RDOF1? CDOF1? ... ...";
101 return -1;
102 }
103
104 // Read in the node IDs and the DOF
105 int RnodeID, CnodeID, dofIDR, dofIDC, numDOF;
106 int numdata = 1;
107
108 if (OPS_GetIntInput(&numdata, &RnodeID) < 0) {
109 opserr << "WARNING invalid RnodeID: "
110 << " equalDOF RnodeID? CnodeID? numDOF? RDOF1? CDOF1? ...";
111 return -1;
112 }
113 if (OPS_GetIntInput(&numdata, &CnodeID) < 0) {
114 opserr << "WARNING invalid CnodeID: "
115 << " equalDOF RnodeID? CnodeID? numDOF? RDOF1? CDOF1? ...";
116 return -1;
117 }
118
119 if (OPS_GetIntInput(&numdata, &numDOF) < 0) {
120 opserr << "WARNING invalid numDOF: "
121 << " equalDOF RnodeID? CnodeID? numDOF? RDOF1? CDOF1? ...";
122 return -1;
123 }
124
125 // The number of DOF to be coupled
126 // int numDOF = argc - 3;
127
128 // The constraint matrix ... U_c = C_cr * U_r
129 Matrix Ccr (numDOF, numDOF);
130 Ccr.Zero();
131
132 // The vector containing the retained and constrained DOFs
133 ID rDOF (numDOF);
134 ID cDOF (numDOF);
135
136 // check inputs
137 if (OPS_GetNumRemainingInputArgs() < numDOF*2) {
138 opserr << "WARNING insufficient args - want: equalDOFmixed RnodeID? CnodeID? numDOF? RDOF1? CDOF1? ... ...";
139 return -1;
140 }
141
142 // Read the degrees of freedom which are to be coupled
143 for (int k = 0; k < numDOF; k++) {
144 if (OPS_GetIntInput(&numdata, &dofIDR) < 0) {
145 opserr << "WARNING invalid dofID: "
146 << " equalDOF RnodeID? CnodeID? DOF1? DOF2? ...";
147 return -1;
148 }
149 if (OPS_GetIntInput(&numdata, &dofIDC) < 0) {
150 opserr << "WARNING invalid dofID: "
151 << " equalDOF RnodeID? CnodeID? DOF1? DOF2? ...";
152 return -1;
153 }

Callers

nothing calls this directly

Calls 5

OPS_GetIntInputFunction · 0.70
OPS_GetDomainFunction · 0.70
ZeroMethod · 0.45
addMP_ConstraintMethod · 0.45

Tested by

no test coverage detected