| 170 | } |
| 171 | |
| 172 | double |
| 173 | Pressure_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 | |
| 195 | double |
| 196 | Pressure_Constraint::getPdot(int last) |