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 "simulation.h"
27
28// #include <fenv.h> // Include this to check for first appearance in NaN when debugging (comment out, otherwise)
29
30//===============================================================================================================================
32//===============================================================================================================================
33int main(int argc, char const* argv[])
34{
35 // This is to check for first appearance of NaN when debugging (comment out, otherwise)
36 // #ifdef __APPLE__
37 // #else
38 // feenableexcept(FE_INVALID | FE_OVERFLOW);
39 // #endif
40
41 // Enable the use of UTF-8 symbols in CoastalME output
42 setlocale(LC_ALL, "en_GB.UTF-8");
43
44 // Create a CSimulation object
45 CSimulation* pSimulation = new CSimulation;
46
47 // Run the simulation and then check how it ends
48 int const nRtn = pSimulation->nDoSimulation(argc, argv);
49 pSimulation->DoSimulationEnd(nRtn);
50
51 // Get rid of the CSimulation object and close files
52 delete pSimulation;
53
54 // Go back to the OS
55 return nRtn;
56}
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:2227
int nDoSimulation(int, char const *[])
Runs the simulation.
int main(int argc, char const *argv[])
CoastalME's main function.
Definition cme.cpp:33
Contains CSimulation definitions.