Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit dc85616d authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

additional includes

parent 58e24187
#ifndef AMDIS_MATHFUNCTIONS_H
#define AMDIS_MATHFUNCTIONS_H
#include "Global.h"
namespace AMDiS {
//converts signed distance to phasefield
inline double Phi1(double r, double eps) { return 0.5*(1-tanh(3*r/eps)); }
......@@ -17,11 +20,11 @@ namespace AMDiS {
//convert Phi1 to r
inline double Phi1ToR(double p1, double eps) {
return eps/3.0 * atanh( std::max(-1+1.e-14, std::min(1-1.e-14, 1-2*p1)) );
return eps/3.0 * atanh( max(-1+1.e-14, min(1-1.e-14, 1-2*p1)) );
}
//convert Phi2 to r
inline double Phi2ToR(double p2, double eps) {
return eps/3.0 * atanh( std::max(-1+1.e-14, std::min(1-1.e-14, 1+2*p2)) );
return eps/3.0 * atanh( max(-1+1.e-14, min(1-1.e-14, 1+2*p2)) );
}
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment