Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iwr
amdis
Commits
dc85616d
Commit
dc85616d
authored
14 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
additional includes
parent
58e24187
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AMDiS/src/MathFunctions.h
+5
-2
5 additions, 2 deletions
AMDiS/src/MathFunctions.h
with
5 additions
and
2 deletions
AMDiS/src/MathFunctions.h
+
5
−
2
View file @
dc85616d
#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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment