Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
podlesny
dune-tectonic
Commits
8f4667c7
Commit
8f4667c7
authored
Mar 11, 2012
by
Elias Pipping
Committed by
Elias Pipping
Mar 11, 2012
Browse files
Options
Downloads
Patches
Plain Diff
Use std::exp() instead of exp()
parent
d457f3e0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/compute_state.cc
+3
-3
3 additions, 3 deletions
src/compute_state.cc
src/one-body-sample.cc
+6
-6
6 additions, 6 deletions
src/one-body-sample.cc
with
9 additions
and
9 deletions
src/compute_state.cc
+
3
−
3
View file @
8f4667c7
...
@@ -17,11 +17,11 @@ class DecayingExponential {
...
@@ -17,11 +17,11 @@ class DecayingExponential {
typedef
Dune
::
FieldVector
<
double
,
1
>
VectorType
;
typedef
Dune
::
FieldVector
<
double
,
1
>
VectorType
;
typedef
Dune
::
FieldMatrix
<
double
,
1
,
1
>
MatrixType
;
typedef
Dune
::
FieldMatrix
<
double
,
1
,
1
>
MatrixType
;
double
operator
()(
VectorType
const
&
u
)
const
{
return
exp
(
-
u
[
0
]);
}
double
operator
()(
VectorType
const
&
u
)
const
{
return
std
::
exp
(
-
u
[
0
]);
}
void
directionalSubDiff
(
VectorType
const
&
u
,
VectorType
const
&
v
,
void
directionalSubDiff
(
VectorType
const
&
u
,
VectorType
const
&
v
,
Interval
<
double
>
&
D
)
const
{
Interval
<
double
>
&
D
)
const
{
D
[
0
]
=
D
[
1
]
=
v
[
0
]
*
(
-
exp
(
-
u
[
0
]));
D
[
0
]
=
D
[
1
]
=
v
[
0
]
*
(
-
std
::
exp
(
-
u
[
0
]));
}
}
void
directionalDomain
(
VectorType
const
&
,
VectorType
const
&
,
void
directionalDomain
(
VectorType
const
&
,
VectorType
const
&
,
...
@@ -43,7 +43,7 @@ double compute_state_update_bisection(double h, double unorm, double L,
...
@@ -43,7 +43,7 @@ double compute_state_update_bisection(double h, double unorm, double L,
double
compute_state_update_lambert
(
double
h
,
double
unorm
,
double
L
,
double
compute_state_update_lambert
(
double
h
,
double
unorm
,
double
L
,
double
old_state
)
{
double
old_state
)
{
double
const
rhs
=
unorm
/
L
-
old_state
;
double
const
rhs
=
unorm
/
L
-
old_state
;
return
LambertW
(
0
,
h
*
exp
(
rhs
))
-
rhs
;
return
LambertW
(
0
,
h
*
std
::
exp
(
rhs
))
-
rhs
;
}
}
double
compute_state_update_lambert_gsl
(
double
h
,
double
unorm
,
double
L
,
double
compute_state_update_lambert_gsl
(
double
h
,
double
unorm
,
double
L
,
...
...
This diff is collapsed.
Click to expand it.
src/one-body-sample.cc
+
6
−
6
View file @
8f4667c7
...
@@ -353,17 +353,17 @@ int main(int argc, char *argv[]) {
...
@@ -353,17 +353,17 @@ int main(int argc, char *argv[]) {
double
ret1
=
double
ret1
=
compute_state_update_bisection
(
h
,
unorm
,
L
,
s4_old
[
i
][
0
]);
compute_state_update_bisection
(
h
,
unorm
,
L
,
s4_old
[
i
][
0
]);
assert
(
std
::
abs
(
1.0
/
h
*
ret1
-
(
s4_old
[
i
]
-
unorm
/
L
)
/
h
-
assert
(
std
::
abs
(
1.0
/
h
*
ret1
-
(
s4_old
[
i
]
-
unorm
/
L
)
/
h
-
exp
(
-
ret1
))
<
1e-10
);
std
::
exp
(
-
ret1
))
<
1e-10
);
double
ret2
=
double
ret2
=
compute_state_update_lambert
(
h
,
unorm
,
L
,
s4_old
[
i
][
0
]);
compute_state_update_lambert
(
h
,
unorm
,
L
,
s4_old
[
i
][
0
]);
assert
(
std
::
abs
(
1.0
/
h
*
ret2
-
(
s4_old
[
i
]
-
unorm
/
L
)
/
h
-
assert
(
std
::
abs
(
1.0
/
h
*
ret2
-
(
s4_old
[
i
]
-
unorm
/
L
)
/
h
-
exp
(
-
ret2
))
<
1e-10
);
std
::
exp
(
-
ret2
))
<
1e-10
);
double
ret3
=
double
ret3
=
compute_state_update_lambert_gsl
(
h
,
unorm
,
L
,
s4_old
[
i
][
0
]);
compute_state_update_lambert_gsl
(
h
,
unorm
,
L
,
s4_old
[
i
][
0
]);
assert
(
std
::
abs
(
1.0
/
h
*
ret3
-
(
s4_old
[
i
]
-
unorm
/
L
)
/
h
-
assert
(
std
::
abs
(
1.0
/
h
*
ret3
-
(
s4_old
[
i
]
-
unorm
/
L
)
/
h
-
exp
(
-
ret3
))
<
1e-10
);
std
::
exp
(
-
ret3
))
<
1e-10
);
assert
(
std
::
abs
(
ret1
-
ret2
)
<
1e-14
);
assert
(
std
::
abs
(
ret1
-
ret2
)
<
1e-14
);
assert
(
std
::
abs
(
ret1
-
ret3
)
<
1e-14
);
assert
(
std
::
abs
(
ret1
-
ret3
)
<
1e-14
);
...
@@ -426,17 +426,17 @@ int main(int argc, char *argv[]) {
...
@@ -426,17 +426,17 @@ int main(int argc, char *argv[]) {
double
ret1
=
double
ret1
=
compute_state_update_bisection
(
h
,
unorm
,
L
,
s5_old
[
i
][
0
]);
compute_state_update_bisection
(
h
,
unorm
,
L
,
s5_old
[
i
][
0
]);
assert
(
std
::
abs
(
1.0
/
h
*
ret1
-
(
s5_old
[
i
]
-
unorm
/
L
)
/
h
-
assert
(
std
::
abs
(
1.0
/
h
*
ret1
-
(
s5_old
[
i
]
-
unorm
/
L
)
/
h
-
exp
(
-
ret1
))
<
1e-12
);
std
::
exp
(
-
ret1
))
<
1e-12
);
double
ret2
=
double
ret2
=
compute_state_update_lambert
(
h
,
unorm
,
L
,
s5_old
[
i
][
0
]);
compute_state_update_lambert
(
h
,
unorm
,
L
,
s5_old
[
i
][
0
]);
assert
(
std
::
abs
(
1.0
/
h
*
ret2
-
(
s5_old
[
i
]
-
unorm
/
L
)
/
h
-
assert
(
std
::
abs
(
1.0
/
h
*
ret2
-
(
s5_old
[
i
]
-
unorm
/
L
)
/
h
-
exp
(
-
ret2
))
<
1e-12
);
std
::
exp
(
-
ret2
))
<
1e-12
);
double
ret3
=
double
ret3
=
compute_state_update_lambert_gsl
(
h
,
unorm
,
L
,
s4_old
[
i
][
0
]);
compute_state_update_lambert_gsl
(
h
,
unorm
,
L
,
s4_old
[
i
][
0
]);
assert
(
std
::
abs
(
1.0
/
h
*
ret3
-
(
s4_old
[
i
]
-
unorm
/
L
)
/
h
-
assert
(
std
::
abs
(
1.0
/
h
*
ret3
-
(
s4_old
[
i
]
-
unorm
/
L
)
/
h
-
exp
(
-
ret3
))
<
1e-10
);
std
::
exp
(
-
ret3
))
<
1e-10
);
assert
(
std
::
abs
(
ret1
-
ret2
)
<
1e-14
);
assert
(
std
::
abs
(
ret1
-
ret2
)
<
1e-14
);
assert
(
std
::
abs
(
ret1
-
ret3
)
<
1e-14
);
assert
(
std
::
abs
(
ret1
-
ret3
)
<
1e-14
);
...
...
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