When I look through the source code of ViscousMaterial, I'm confused about some lines about it (line122~139):
Code: Select all
double
ViscousMaterial::getStress(void)
{
double stress = 0.0;
double absRate = fabs(trialRate);
if (absRate > minVel)
stress = C*pow(absRate, Alpha);
else
stress = C*pow(minVel, Alpha);
stress = C*pow(absRate, Alpha);
if (trialRate < 0.0)
return -stress;
else
return stress;
}
I'm a rookie to C++ language and programming, hope someone can help me with it.
Thanks you.