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

Function OPS_HomogeneousBC_Y

DEVELOPER/core/SP_Constraint.cpp:145–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145int OPS_HomogeneousBC_Y()
146{
147 Domain* theDomain = OPS_GetDomain();
148 if(theDomain == 0) {
149 opserr<<"WARNING: domain is not defined\n";
150 return -1;
151 }
152 if(OPS_GetNumRemainingInputArgs() < 1) {
153 opserr<<"insufficient number of args\n";
154 return -1;
155 }
156
157 // get the yCrd of nodes to be constrained
158 double yLoc;
159 int numdata = 1;
160 if (OPS_GetDoubleInput(&numdata, &yLoc) < 0) {
161 opserr << "WARNING invalid yLoc\n";
162 return -1;
163 }
164
165 // read in the fixities
166 ID fixity(0,3);
167 while (OPS_GetNumRemainingInputArgs() > 0) {
168 int fix;
169 if (OPS_GetIntInput(&numdata, &fix) < 0) {
170 // back one arg
171 OPS_ResetCurrentInputArg(-1);
172 break;
173 }
174 fixity[fixity.Size()] = fix;
175 }
176
177 // set the tolerance, the allowable difference in nodal coordinate and
178 // what the value user specified to see if node is constrained or not
179 double tol = 1e-10;
180 if (OPS_GetNumRemainingInputArgs() > 1) {
181 const char* arg = OPS_GetString();
182 if (strcmp(arg, "-tol") == 0) {
183 if (OPS_GetDoubleInput(&numdata, &tol) < 0) {
184 opserr << "WARNING invalid tol\n";
185 return -1;
186 }
187 }
188 }
189
190 theDomain->addSP_Constraint(1, yLoc, fixity, tol);
191
192 return 0;
193}
194
195int OPS_HomogeneousBC_Z()
196{

Callers

nothing calls this directly

Calls 8

OPS_GetDomainFunction · 0.70
OPS_GetDoubleInputFunction · 0.70
OPS_GetIntInputFunction · 0.70
OPS_ResetCurrentInputArgFunction · 0.70
OPS_GetStringFunction · 0.70
SizeMethod · 0.45
addSP_ConstraintMethod · 0.45

Tested by

no test coverage detected