Commit c00e1666 authored by Praetorius, Simon's avatar Praetorius, Simon

BaseProblems updated and some Warnings removed

parent 5857b717
......@@ -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
......
......@@ -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);
......
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