Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
c00e1666
Commit
c00e1666
authored
May 07, 2013
by
Praetorius, Simon
Browse files
BaseProblems updated and some Warnings removed
parent
5857b717
Changes
2
Hide whitespace changes
Inline
Side-by-side
extensions/Helpers.h
View file @
c00e1666
...
...
@@ -24,6 +24,7 @@
#include
"boost/lexical_cast.hpp"
#include
"boost/date_time/posix_time/posix_time.hpp"
#include
<boost/math/special_functions/fpclassify.hpp>
#include
<boost/math/special_functions/atanh.hpp>
#include
<time.h>
#include
<stdarg.h>
...
...
@@ -68,11 +69,16 @@ namespace Helpers {
template
<
typename
T
>
T
atanh
(
T
x
)
{
#ifndef _WIN32
return
atanh
(
x
);
#else
return
0.5
*
log
((
1.0
+
x
)
/
(
1.0
-
x
));
#endif
T
result
;
try
{
result
=
boost
::
math
::
atanh
(
x
);
}
catch
(...)
{
// domain_error, or overflow_error
if
(
x
>
0.0
)
result
=
10.0
;
else
result
=
-
10.0
;
}
return
result
;
}
// routines for conversion to string
...
...
extensions/kdtree_nanoflann_dof.h
View file @
c00e1666
...
...
@@ -188,13 +188,13 @@ namespace experimental {
{
if
(
kdtreeMap_Dof
.
find
(
feSpace
)
!=
kdtreeMap_Dof
.
end
())
{
if
(
kdtreeMap_Dof
[
feSpace
].
first
!=
feSpace
->
getMesh
()
->
getChangeIndex
())
{
feSpace
->
getMesh
()
->
getDofIndexCoords
(
feSpace
,
kdtreeMap_Dof
[
feSpace
].
second
->
m_data
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
kdtreeMap_Dof
[
feSpace
].
second
->
m_data
);
kdtreeMap_Dof
[
feSpace
].
second
->
reinit
();
kdtreeMap_Dof
[
feSpace
].
first
=
feSpace
->
getMesh
()
->
getChangeIndex
();
}
}
else
{
DOFVector
<
WorldVector
<
double
>
>*
coords
=
new
DOFVector
<
WorldVector
<
double
>
>
(
feSpace
,
"coords"
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
feSpace
,
*
coords
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
*
coords
);
KD_Tree_Dof
*
kdtree
=
new
KD_Tree_Dof
(
Global
::
getGeo
(
WORLD
),
*
coords
);
kdtreeMap_Dof
[
feSpace
]
=
std
::
make_pair
(
feSpace
->
getMesh
()
->
getChangeIndex
(),
kdtree
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment