COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
coolfluid-meshdiff.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #include <iostream>
8 
9 #include <boost/program_options.hpp>
10 #include "common/CF.hpp"
11 #include "common/Exception.hpp"
12 #include "common/Log.hpp"
13 #include "common/Core.hpp"
14 
17 
19 
20 using namespace boost::program_options;
21 
22 using namespace cf3;
23 using namespace cf3::common;
24 using namespace cf3::Tools::Shell;
25 using namespace cf3::Tools::MeshDiff;
26 
28 
29 int main(int argc, char * argv[])
30 {
31  Core::instance().initiate(argc, argv);
32 
33  try
34  {
35 
36  // --------------------------------------------------------
37 
38  ExceptionManager::instance().ExceptionOutputs = false;
39  ExceptionManager::instance().ExceptionDumps = true;
40  ExceptionManager::instance().ExceptionAborts = false;
41  AssertionManager::instance().AssertionThrows = true;
42 
43  // Initialize empty commands
44  options_description desc;
45 
46  // Add basic commands to program
47  desc.add(BasicCommands::description());
48  desc.add(Commands::description());
49 
50  // Parse commands that are passed directly on the command line
51  Interpreter shell(desc);
52  shell.interpret(argc,argv);
53 
54  // --------------------------------------------------------
55 
56  }
57  catch(Exception & e)
58  {
59  CFerror << e.what() << CFendl;
60  }
61  catch ( std::exception& ex )
62  {
63  CFerror << "Unhandled exception: " << ex.what() << CFendl;
64  }
65  catch ( ... )
66  {
67  CFerror << "Detected unknown exception" << CFendl;
68  }
69 
70  Core::instance().terminate();
71 
72  return 0;
73 }
Base class for all Exceptions in CF.
Definition: Exception.hpp:52
Command Line and script interpreter.
Definition: Interpreter.hpp:43
#define CFendl
Definition: Log.hpp:109
Real e()
Definition of the Unit charge [C].
Definition: Consts.hpp:30
const char * what() const
Definition: Exception.cpp:90
Classes for command line interpreting COOLFluiD.
Top-level namespace for coolfluid.
Definition: Action.cpp:18
LoadBalance::LoadBalance(const std::string &name) std::string desc
Definition: LoadBalance.cpp:35
coolfluid3 header, included almost everywhere
#define CFerror
Definition: Log.hpp:105
Most basic kernel library.
Definition: Action.cpp:19
int main(int argc, char *argv[])
void interpret(std::istream &input_stream)
Start interpreting an input_stream.
Send comments to:
COOLFluiD Web Admin