Commit 8698635a authored by mjg226's avatar mjg226
Browse files

Removed Functions and Options file from common folder, as they are differet...

Removed Functions and Options file from common folder, as they are differet for simple,OpenMP and OpenCL.
Could create a seaparte common folder for CPU/GPU implementation difference later.
Corrected the hexagonal and square simple and openm implementations.
Also corrected bug in ESRI_ASCIIGrid.hpp
parent 31d08afe
This diff is collapsed.
/*
Copyright (c) 2013 Centre for Water Systems,
University of Exeter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifndef _CA_OPTIONS_HPP_
#define _CA_OPTIONS_HPP_
//! \file Options.hpp
//! Contains the list of implementation specific Options
//! \author Michele Guidolin, University of Exeter,
//! contact: m.guidolin [at] exeter.ac.uk
//! \date 2012-07
#include"Common.hpp"
namespace CA {
//! Return a list of implementation specific Options
inline Options options()
{
return Options();
}
}
#endif// _CA_BASETYPES_HPP_
/*
Copyright (c) 2016 EAWAG - Swiss Federal Institute of Water Science
Copyright (c) 2016 - Centre for Water Systems,
University of Exeter
- EAWAG - Swiss Federal Institute of Water Science
and Technology
Permission is hereby granted, free of charge, to any person obtaining a copy
......@@ -26,10 +28,14 @@ THE SOFTWARE.
//! \file Functions.hpp
//! Contains the implementation of execute namespace functions, which carry out the kernels
//! \author Luís de Sousa, EAWAG,
//! contact: luis.desousa [at] eawag.ch
//! \date 2016-03
//! \author Michael J Gibson, University of Exeter,
//! contact: m.j.gibson [at] exeter.ac.uk
//! \date 2016-04
// This class is the same of the simple square- 1 level - von neumann implementation
#include"../../../square-cell/vn-neighbours/1-levels/simple/Functions.hpp"
#include"../../../common/Functions.hpp"
/*
Copyright (c) 2016 EAWAG - Swiss Federal Institute of Water Science
Copyright (c) 2016 - Centre for Water Systems,
University of Exeter
- EAWAG - Swiss Federal Institute of Water Science
and Technology
Permission is hereby granted, free of charge, to any person obtaining a copy
......@@ -23,14 +25,18 @@ THE SOFTWARE.
*/
// NOTE: this file doesn't carry the definition, thus that the other options file is.
//! \file Options.hpp
//! Contains the list of implementation specific Options
//! \author Luís de Sousa, EAWAG,
//! contact: luis.desousa [at] eawag.ch
//! \date 2016-03
//! \author Michael J Gibson, University of Exeter,
//! contact: m.j.gibson [at] exeter.ac.uk
//! \date 2016-04
#include"../../../common/Options.hpp"
// This class is the same of the simple square- 1 level - von neumann implementation
#include"../../../square-cell/vn-neighbours/1-levels/simple/Options.hpp"
/*
Copyright (c) 2016 EAWAG - Swiss Federal Institute of Water Science
Copyright (c) 2016 - Centre for Water Systems,
University of Exeter
- EAWAG - Swiss Federal Institute of Water Science
and Technology
Permission is hereby granted, free of charge, to any person obtaining a copy
......@@ -23,13 +25,11 @@ THE SOFTWARE.
*/
#ifndef _CA_FUNCTIONS_HPP_
#define _CA_FUNCTIONS_HPP_
//! \file ca.hpp
//! \file Functions.hpp
//! Contains the classes and methods to make CA functions.
//! \author Luís de Sousa, EAWAG,
//! contact: luis.desousa [at] eawag.ch
//! \date 2016-03
//! \author Michael J Gibson, University of Exeter,
//! contact: m.j.gibson [at] exeter.ac.uk
//! \date 2016-04
#include"../../../common/Functions.hpp"
// This class is the same of the simple implementation
#include"../simple/Functions.hpp"
/*
Copyright (c) 2016 EAWAG - Swiss Federal Institute of Water Science
Copyright (c) 2016 - Centre for Water Systems,
University of Exeter
- EAWAG - Swiss Federal Institute of Water Science
and Technology
Permission is hereby granted, free of charge, to any person obtaining a copy
......@@ -23,13 +25,11 @@ THE SOFTWARE.
*/
#ifndef _CA_OPTIONS_HPP_
#define _CA_OPTIONS_HPP_
//! \file Options.hpp
//! Contains the list of implementation specific Options
//! \author Luís de Sousa, EAWAG,
//! contact: luis.desousa [at] eawag.ch
//! \date 2016-03
//! \author Michael J Gibson, University of Exeter,
//! contact: m.j.gibson [at] exeter.ac.uk
//! \date 2016-04
#include"../../../common/Options.hpp"
// This class is the same of the simple implementation
#include"../simple/Options.hpp"
\ No newline at end of file
......@@ -185,14 +185,14 @@ namespace CA {
//Clock total_timer;
// Add file extension
filename += ".asc";
String _filename = filename + ".asc";
// Open file
std::ofstream onfile(filename.c_str());
std::ofstream onfile(_filename.c_str());
// Check if the file was open.
if (!onfile)
throw std::runtime_error(std::string("Error opening file: " + filename));
throw std::runtime_error(std::string("Error opening file: " + _filename));
// Set manipulators
onfile.unsetf(std::ios::floatfield);
......
/*
Copyright (c) 2016 EAWAG - Swiss Federal Institute of Water Science
Copyright (c) 2016 - Centre for Water Systems,
University of Exeter
- EAWAG - Swiss Federal Institute of Water Science
and Technology
Permission is hereby granted, free of charge, to any person obtaining a copy
......@@ -28,8 +30,23 @@ THE SOFTWARE.
//! \file Options.hpp
//! Contains the list of implementation specific Options
//! \author Luís de Sousa, EAWAG,
//! contact: luis.desousa [at] eawag.ch
//! \date 2016-03
//! \author Michael J Gibson, University of Exeter,
//! contact: m.j.gibson [at] exeter.ac.uk
//! \date 2016-04
#include"../../../common/Options.hpp"
#include"Common.hpp"
namespace CA {
//! Return a list of implementation specific Options
inline Options options()
{
return Options();
}
}
#endif// _CA_BASETYPES_HPP_
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