linear material law limited to the range 0 - 1

This commit is contained in:
Markus Wolff
2010-06-07 16:07:08 +00:00
committed by Andreas Lauser
parent 6e189635af
commit dd6c3fdb10

View File

@@ -103,7 +103,7 @@ public:
*/
static Scalar krw(const Params &params, Scalar Swe)
{
return Swe;
return std::max(std::min(Swe,1.0),0.0);
};
/*!
@@ -114,7 +114,7 @@ public:
static Scalar krn(const Params &params, Scalar Swe)
{
Scalar Sne = 1 - Swe;
return Sne;
return std::max(std::min(Sne,1.0),0.0);
}
};
}