Commit 7c39bec9 authored by b.schroeder's avatar b.schroeder

conversion of the cellsize of the FireMesh from int to double

parent a1c6dd8e
......@@ -50,7 +50,7 @@ FireMesh::FireMesh()
_statMesh=false;
}
FireMesh::FireMesh(const double &xmin, const double &ymin, const double &xmax, const double &ymax, const int &cellsize)
FireMesh::FireMesh(const double &xmin, const double &ymin, const double &xmax, const double &ymax, const double &cellsize)
{
SetUpMesh(xmin,ymin,xmax,ymax,cellsize);
//statHeaderRead=false;
......@@ -70,7 +70,7 @@ FireMesh::~FireMesh()
}
void FireMesh::SetUpMesh(const double &xmin, const double &ymin, const double &xmax, const double &ymax, const int &cellsize)
void FireMesh::SetUpMesh(const double &xmin, const double &ymin, const double &xmax, const double &ymax, const double &cellsize)
{
_cellsize=cellsize;
......@@ -187,14 +187,14 @@ void FireMesh::SetKnotValuesFromFile(const std::string &filename)
//{
/// read header
strVec = split(line,',', strVec);
int cellsize = std::stoi(strVec[0]);
double cellsize = std::stod(strVec[0]);
double xmin = std::stod(strVec[2]);
double xmax = std::stod(strVec[3]);
double ymin = std::stod(strVec[4]);
double ymax = std::stod(strVec[5]);
strVec.clear();
//std::cout << xmin << ymin << xmax << ymax << std::endl;
//std::cout << ymin << xmax << ymax << cellsize << std::endl;
SetUpMesh(xmin,ymin,xmax,ymax,cellsize);
//statHeaderRead=true;
......
......@@ -44,11 +44,11 @@ class FireMesh
{
public:
FireMesh();
FireMesh(const double &xmin, const double &ymin, const double &xmax, const double &ymax, const int &cellsize);
FireMesh(const double &xmin, const double &ymin, const double &xmax, const double &ymax, const double &cellsize);
FireMesh(const std::string &filename);
~FireMesh();
void SetUpMesh(const double &xmin, const double &ymin, const double &xmax, const double &ymax, const int &cellsize);
void SetUpMesh(const double &xmin, const double &ymin, const double &xmax, const double &ymax, const double &cellsize);
const Matrix &GetMesh() const;
double GetKnotValue(const double &x, const double &y) const;
......@@ -59,7 +59,7 @@ public:
private:
Matrix _matrix;
int _cellsize;
double _cellsize;
double _xmin;
double _xmax;
double _ymin;
......
......@@ -46,6 +46,7 @@ void SmokeSensor::execute(const Pedestrian * pedestrian, CognitiveMap * cognitiv
double smokeFactor = _FMStorage->get_FireMesh(item->GetCrossing()->GetCentre(),
pedestrian->GetGlobalTime()).GetKnotValue(pedestrian->GetPos().GetX(),
pedestrian->GetPos().GetY());
//double smokeFactor = 1;
//std::cout << smokeFactor << std::endl;
item->SetFactor(smokeFactor,GetName());
//std::cout << item->GetFactor() << std::endl;
......
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