Commit c907cf33 by David Moxey

Fixes post-merge

parent 905e496a
......@@ -37,11 +37,10 @@
#include <string>
using namespace std;
#include <FieldUtils/Interpolator.h>
#include <boost/geometry.hpp>
#include "ProcessInterpPoints.h"
#include <FieldUtils/Interpolator.h>
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
#include <LibUtilities/BasicUtils/Progressbar.hpp>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
......@@ -119,9 +118,9 @@ void ProcessInterpPoints::Process(po::variables_map &vm)
int coordim = m_f->m_fieldPts->GetDim();
int npts = m_f->m_fieldPts->GetNpoints();
std::vector<std::string> fieldNames = m_f->m_fieldPts->GetFieldNames();
for (auto it = fieldNames.begin(); it != fieldNames.end(); ++it)
for (auto &it : fieldNames)
{
m_f->m_fieldPts->RemoveField(*it);
m_f->m_fieldPts->RemoveField(it);
}
Array<OneD, Array<OneD, NekDouble> > pts;
......
......@@ -37,8 +37,6 @@
#include <string>
using namespace std;
#include "ProcessInterpPtsToPts.h"
#include <FieldUtils/Interpolator.h>
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
#include <LibUtilities/BasicUtils/Progressbar.hpp>
......@@ -48,6 +46,8 @@ using namespace std;
#include <boost/lexical_cast.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
#include "ProcessInterpPtsToPts.h"
namespace Nektar
{
namespace FieldUtils
......
......@@ -50,7 +50,7 @@ class ProcessStreamFunction : public ProcessModule
{
public:
/// Creates an instance of this class
static boost::shared_ptr<Module> create(FieldSharedPtr f)
static std::shared_ptr<Module> create(FieldSharedPtr f)
{
return MemoryManager<ProcessStreamFunction>::AllocateSharedPtr(f);
}
......
......@@ -122,13 +122,14 @@ void CsvIO::v_ImportFieldData(const std::string inFile, PtsFieldSharedPtr& ptsFi
boost::erase_first(line, "#");
vector<string> fieldNames;
bool valid = ParseUtils::GenerateOrderedStringVector(line.c_str(), fieldNames);
ASSERTL0(valid, "Unable to process list of fields" + line);
bool valid = ParseUtils::GenerateOrderedStringVector(
line.c_str(), fieldNames);
ASSERTL0(valid, "Unable to process list of fields from line: " + line);
int dim = 0;
for (vector<string>::iterator it = fieldNames.begin(); it != fieldNames.end(); ++it)
for (auto &it : fieldNames)
{
if (*it == "x" || *it == "y" || *it == "z")
if (it == "x" || it == "y" || it == "z")
{
dim++;
}
......@@ -145,13 +146,16 @@ void CsvIO::v_ImportFieldData(const std::string inFile, PtsFieldSharedPtr& ptsFi
{
tok.assign(line);
ASSERTL0(distance(tok.begin(), tok.end()) == totvars, "wrong number of columns: " + line);
ASSERTL0(distance(tok.begin(), tok.end()) == totvars,
"wrong number of columns in line: " + line);
for (Tokenizer::iterator it = tok.begin(); it != tok.end(); ++it)
for (auto &it : tok)
{
try
{
ptsSerial.push_back(boost::lexical_cast<NekDouble>(boost::trim_copy(string(*it))));
ptsSerial.push_back(
boost::lexical_cast<NekDouble>(
boost::trim_copy(string(it))));
}
catch(const boost::bad_lexical_cast &)
{
......
......@@ -39,12 +39,9 @@
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <memory>
#include <LibUtilities/Communication/Comm.h>
#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
......@@ -55,8 +52,6 @@ namespace Nektar
{
namespace LibUtilities
{
using namespace std;
class CsvIO : public PtsIO
{
......@@ -68,15 +63,16 @@ public:
{
}
LIB_UTILITIES_EXPORT void Write(const string &outFile,
LIB_UTILITIES_EXPORT void Write(const std::string &outFile,
const PtsFieldSharedPtr &ptsField,
const bool backup = false);
protected:
LIB_UTILITIES_EXPORT virtual void v_ImportFieldData(const string inFile,
PtsFieldSharedPtr &ptsField);
LIB_UTILITIES_EXPORT virtual void v_ImportFieldData(
const std::string inFile,
PtsFieldSharedPtr &ptsField);
LIB_UTILITIES_EXPORT virtual std::string GetFileEnding() const
{
......@@ -84,7 +80,7 @@ protected:
};
};
typedef boost::shared_ptr<CsvIO> CsvIOSharedPtr;
typedef std::shared_ptr<CsvIO> CsvIOSharedPtr;
}
}
#endif
......@@ -40,7 +40,6 @@
#include <LibUtilities/BasicUtils/VmathArray.hpp>
#include <boost/format.hpp>
#include <boost/function.hpp>
using namespace std;
......@@ -179,9 +178,8 @@ void SessionFunction::Evaluate(std::string pFieldName,
std::string filename =
m_session->GetFunctionFilename(m_name, pFieldName, domain);
if (boost::filesystem::path(filename).extension() == ".pts"
|| boost::filesystem::path(filename).extension() == ".csv"
)
if (boost::filesystem::path(filename).extension() == ".pts" ||
boost::filesystem::path(filename).extension() == ".csv")
{
EvaluatePts(pFieldName, pArray, pTime, domain);
}
......
......@@ -149,7 +149,7 @@ private:
}
};
typedef boost::shared_ptr<SessionFunction> SessionFunctionSharedPtr;
typedef std::shared_ptr<SessionFunction> SessionFunctionSharedPtr;
static SessionFunctionSharedPtr NullSessionFunction;
}
}
......
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 sign in to comment