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