diff --git a/src/tools/SwitchingFunction.cpp b/src/tools/SwitchingFunction.cpp index f3c1b7f308353564acc48a1e9f773f7841d0edee..16bce2b56b20f0d914ad83d0ccbced0d687afd2c 100644 --- a/src/tools/SwitchingFunction.cpp +++ b/src/tools/SwitchingFunction.cpp @@ -138,11 +138,11 @@ Notice that for backward compatibility we allow using `MATHEVAL` instead of `CUS Also notice that if the a `CUSTOM` switching function only depents on even powers of `x` it can be made faster by using `x2` as a variable. For instance \verbatim -{CUSTOM FUNC=1/(1+x2^3) R_0=\f$r_0\f$ D_0=\f$d_0\f$} +{CUSTOM FUNC=1/(1+x2^3) R_0=0.3} \endverbatim is equivalent to \verbatim -{CUSTOM FUNC=1/(1+x^6) R_0=\f$r_0\f$ D_0=\f$d_0\f$} +{CUSTOM FUNC=1/(1+x^6) R_0=0.3} \endverbatim but runs faster. The reason is that there is an expensive square root calculation that can be optimized out.