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

Method setTrial

SRC/damage/Mehanny.cpp:92–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92int 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
119double

Callers 3

recordMethod · 0.45
OPS_InvokeMaterialObjectFunction · 0.45
OPS_InvokeMaterialObjectFunction · 0.45

Calls 2

processDataMethod · 0.95
SizeMethod · 0.45

Tested by

no test coverage detected