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

Method getPressure

DEVELOPER/core/Pressure_Constraint.cpp:172–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172double
173Pressure_Constraint::getPressure(int last)
174{
175 if (pval != 0) {
176 return pval[0];
177 }
178
179 Domain* theDomain = this->getDomain();
180 if(theDomain == 0) {
181 opserr<<"WARNING: domain has not been set";
182 opserr<<" -- Pressure_Constraint::getPressureNode\n";
183 return 0;
184 }
185 Node* pNode = theDomain->getNode(pTag);
186 if(pNode == 0) return 0.0;
187 const Vector& vel = pNode->getVel();
188 if(last == 1) {
189 if(vel.Size()==0) return 0.0;
190 return vel(0);
191 }
192 return 0.0;
193}
194
195double
196Pressure_Constraint::getPdot(int last)

Callers

nothing calls this directly

Calls 4

getDomainMethod · 0.45
getNodeMethod · 0.45
getVelMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected