CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
cme.cpp
Go to the documentation of this file.
1
12
13/* ===============================================================================================================================
14
15 This file is part of CoastalME, the Coastal Modelling Environment.
16
17 CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23===============================================================================================================================*/
24#include <clocale>
25
26// #include "cme.h"
27#include "simulation.h"
28
29// #include <fenv.h> // Include this to check for first appearance in NaN when debugging (comment out, otherwise)
30
31//===============================================================================================================================
33//===============================================================================================================================
34int main(int argc, char const* argv[])
35{
36 // This is to check for first appearance of NaN when debugging (comment out, otherwise)
37 // #ifdef __APPLE__
38 // #else
39 // feenableexcept(FE_INVALID | FE_OVERFLOW);
40 // #endif
41
42 // Enable the use of UTF-8 symbols in CoastalME output
43 setlocale(LC_ALL, "en_GB.UTF-8");
44
45 // Create a CSimulation object
46 CSimulation* pSimulation = new CSimulation;
47
48 // Run the simulation and then check how it ends
49 int const nRtn = pSimulation->nDoSimulation(argc, argv);
50 pSimulation->DoSimulationEnd(nRtn);
51
52 // Get rid of the CSimulation object and close files
53 delete pSimulation;
54
55 // Go back to the OS
56 return nRtn;
57}
This class runs CoastalME simulations.
Definition simulation.h:79
void DoSimulationEnd(int const)
Carries out end-of-simulation tidying (error messages etc.)
Definition utils.cpp:2219
int nDoSimulation(int, char const *[])
Runs the simulation.
int main(int argc, char const *argv[])
CoastalME's main function.
Definition cme.cpp:34
Contains CSimulation definitions.