Commit d5795006 authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

vtu reader is gcc-4.7 compatible now

parent d3764c3c
......@@ -104,6 +104,30 @@ namespace AMDiS {
}
};
inline void valueVector2type(std::vector<double> p, double& value)
{
if (p.size() == 0)
throw(std::runtime_error("Not enough data for assignment!\n"));
value = p[0];
}
inline void valueVector2type(std::vector<double> p, WorldVector<double>& value)
{
if (p.size() != Global::getGeo(WORLD))
throw(std::runtime_error("Not enough data for assignment!\n"));
for (int i = 0; i < Global::getGeo(WORLD); i++)
value[i] = p[i];
}
inline void valueVector2type(std::vector<double> p, std::vector<double>& value)
{
if (p.size() == 0)
throw(std::runtime_error("Not enough data for assignment!\n"));
for (int i = 0; i < p.size(); i++)
value.push_back(p[i]);
}
inline void string2pointList(std::string& input, std::vector<WorldVector<double> >& pointList)
{
......@@ -199,30 +223,6 @@ namespace AMDiS {
}
}
inline void valueVector2type(std::vector<double> p, double& value)
{
if (p.size() == 0)
throw(std::runtime_error("Not enough data for assignment!\n"));
value = p[0];
}
inline void valueVector2type(std::vector<double> p, WorldVector<double>& value)
{
if (p.size() != Global::getGeo(WORLD))
throw(std::runtime_error("Not enough data for assignment!\n"));
for (int i = 0; i < Global::getGeo(WORLD); i++)
value[i] = p[i];
}
inline void valueVector2type(std::vector<double> p, std::vector<double>& value)
{
if (p.size() == 0)
throw(std::runtime_error("Not enough data for assignment!\n"));
for (int i = 0; i < p.size(); i++)
value.push_back(p[i]);
}
// find point in mesh using KD-tree structure
inline size_t getNearestIndex(experimental::KD_Tree& tree, WorldVector<double>& x)
{
......
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