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
10
11/* ===============================================================================================================================
12 This file is part of CoastalME, the Coastal Modelling Environment.
13
14 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.
15
16 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.
17
18 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.
19===============================================================================================================================*/
20#include <clocale>
21
22#include "simulation.h"
23
24// #include <fenv.h> // Include this to check for first appearance in NaN when debugging (comment out, otherwise)
25
26//===============================================================================================================================
28//===============================================================================================================================
29int main(int argc, char const* argv[])
30{
31 // This is to check for first appearance of NaN when debugging (comment out, otherwise)
32 // #ifdef __APPLE__
33 // #else
34 // feenableexcept(FE_INVALID | FE_OVERFLOW);
35 // #endif
36
37 // Enable the use of UTF-8 symbols in CoastalME output
38 setlocale(LC_ALL, "en_GB.UTF-8");
39
40 // Create a CSimulation object
41 CSimulation* pSimulation = new CSimulation;
42
43 // Run the simulation and then check how it ends
44 int const nRtn = pSimulation->nDoSimulation(argc, argv);
45 pSimulation->DoSimulationEnd(nRtn);
46
47 // Get rid of the CSimulation object and close files
48 delete pSimulation;
49
50 // Go back to the OS
51 return nRtn;
52}
This class runs CoastalME simulations.
Definition simulation.h:69
void DoSimulationEnd(int const)
Carries out end-of-simulation tidying (error messages etc.)
Definition utils.cpp:2344
int nDoSimulation(int, char const *[])
Runs the simulation.
int main(int argc, char const *argv[])
CoastalME's main function.
Definition cme.cpp:29
Contains CSimulation definitions.