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

Method connect

DEVELOPER/core/Pressure_Constraint.cpp:241–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void
242Pressure_Constraint::connect(int eleId, bool fluid)
243{
244 Domain* theDomain = this->getDomain();
245 if(theDomain == 0) {
246 opserr<<"WARNING: domain has not been set";
247 opserr<<" -- Pressure_Constraint::connect\n";
248 return;
249 }
250
251 Element* theEle = theDomain->getElement(eleId);
252 if(theEle == 0) {
253 opserr<<"WARNING: element "<<eleId<<" does not exist ";
254 opserr<<"-- Pressure_Constraint::connect\n";
255 return;
256 }
257
258 if(fluid) {
259 fluidEleTags.insert(eleId);
260 } else {
261 bool isfluid = false;
262 for(int i=0; i<fluidEleTags.Size(); i++) {
263 if(fluidEleTags(i) == eleId) {
264 isfluid = true;
265 break;
266 }
267 }
268 if(!isfluid) {
269 otherEleTags.insert(eleId);
270 }
271 }
272}
273
274void
275Pressure_Constraint::disconnect(int eleId)

Callers

nothing calls this directly

Calls 4

getDomainMethod · 0.45
getElementMethod · 0.45
insertMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected