| 90 | |
| 91 | |
| 92 | int Mehanny::setTrial (const Vector & trialVector ) |
| 93 | { |
| 94 | if ( trialVector.Size() != 3 ) { |
| 95 | opserr << "WARNING: Mehanny::setTrial Wrong vector size for trial data" << endln; |
| 96 | return -1; |
| 97 | } |
| 98 | |
| 99 | double TrialDefo = trialVector(0); |
| 100 | double TrialForce = trialVector(1); |
| 101 | double TrialKU = trialVector(2); |
| 102 | |
| 103 | double TrialScalar = 0.0; |
| 104 | |
| 105 | // calculate the plastic deformation once the unloading stiffness is defined as non zero |
| 106 | if ( TrialKU != 0.0 ) |
| 107 | { |
| 108 | TrialScalar = TrialDefo - TrialForce/TrialKU; |
| 109 | } else { |
| 110 | |
| 111 | // use the elastic deformation instead |
| 112 | TrialScalar = TrialDefo; |
| 113 | } |
| 114 | |
| 115 | return this->processData( TrialScalar ); |
| 116 | } |
| 117 | |
| 118 | |
| 119 | double |
no test coverage detected