COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
cf3
ui
gui-main.cpp
Go to the documentation of this file.
1
// Copyright (C) 2010-2011 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 <QApplication>
10
11
#include "
common/CF.hpp
"
12
#include "
common/PE/Comm.hpp
"
13
#include "
common/Core.hpp
"
14
#include "
common/Environment.hpp
"
15
#include "
common/NetworkInfo.hpp
"
16
#include "
common/Exception.hpp
"
17
#include "
common/OptionList.hpp
"
18
19
#include "
ui/core/ThreadManager.hpp
"
20
21
#include "
ui/graphics/Application.hpp
"
22
#include "
ui/graphics/MainWindow.hpp
"
23
#include "
ui/graphics/JournalBrowserDialog.hpp
"
24
25
using namespace
cf3::common
;
26
using namespace
cf3::Tools::Shell
;
27
using namespace
cf3::ui::core
;
28
using namespace
cf3::ui::graphics
;
29
30
int
main
(
int
argc,
char
*argv[])
31
{
32
Application
app(argc, argv);
33
int
returnValue;
34
35
JournalBrowserBuilder::instance();
36
37
ThreadManager::instance().tree();
38
39
// initiate the core environment
40
Core::instance
().
environment
().
options
().
set
(
"regist_signal_handlers"
,
false
);
41
Core::instance
().
initiate
(argc, argv);
42
PE::Comm::instance
().
init
(argc,argv);
// this might modify argc and argv
43
44
cf3::common::AssertionManager::instance
().
AssertionThrows
=
true
;
45
cf3::common::AssertionManager::instance
().
AssertionDumps
=
true
;
46
cf3::common::ExceptionManager::instance
().
ExceptionDumps
=
true
;
47
48
// tell CF core that the client is running
49
Core::instance
().
network_info
().
start_client
();
50
51
try
52
{
53
MainWindow
window;
54
window.showMaximized();
55
returnValue = app.exec();
56
}
57
catch
(
Exception
e
)
58
{
59
std::cerr <<
"Application stopped on uncaught exception:"
<< std::endl;
60
std::cerr << e.
what
() << std::endl;
61
returnValue = -1;
62
}
63
64
// tell CF core that the client is about to exit
65
Core::instance
().
network_info
().
stop_client
();
66
67
// terminate the MPI environment
68
69
PE::Comm::instance
().
finalize
();
70
Core::instance
().
terminate
();
71
72
return
returnValue;
73
}
cf3::common::AssertionManager::AssertionThrows
bool AssertionThrows
assertions throw exceptions
Definition:
Assertions.hpp:67
cf3::common::AssertionManager::instance
static AssertionManager & instance()
Gets the instance of the manager.
Definition:
Assertions.cpp:33
cf3::common::Exception
Base class for all Exceptions in CF.
Definition:
Exception.hpp:52
Application.hpp
cf3::ui::core
Basic Classes for client-core library used by coolfluid-client application.
Definition:
CNode.cpp:57
Environment.hpp
cf3::common::AssertionManager::AssertionDumps
bool AssertionDumps
assertions dump backtraces
Definition:
Assertions.hpp:65
cf3::common::NetworkInfo::start_client
void start_client()
Definition:
NetworkInfo.cpp:78
ThreadManager.hpp
cf3::common::ExceptionManager::ExceptionDumps
bool ExceptionDumps
if exception contructor should dump backtrace
Definition:
Exception.hpp:34
JournalBrowserDialog.hpp
cf3::common::Core::terminate
void terminate()
Definition:
Core.cpp:131
cf3::ui::graphics::Application
Definition:
Application.hpp:20
cf3::physics::Consts::e
Real e()
Definition of the Unit charge [C].
Definition:
Consts.hpp:30
cf3::common::NetworkInfo::stop_client
void stop_client()
Definition:
NetworkInfo.cpp:88
cf3::common::Exception::what
const char * what() const
Definition:
Exception.cpp:90
cf3::Tools::Shell
Classes for command line interpreting COOLFluiD.
Definition:
BasicCommands.cpp:36
cf3::common::PE::Comm::finalize
void finalize()
Definition:
Comm.cpp:96
cf3::common::Core::initiate
void initiate(int argc, char **argv)
Definition:
Core.cpp:98
cf3::common::PE::Comm::init
void init(int argc=0, char **args=0)
Definition:
Comm.cpp:80
cf3::common::ExceptionManager::instance
static ExceptionManager & instance()
Gets the instance of the manager.
Definition:
Exception.cpp:34
OptionList.hpp
Exception.hpp
main
int main(int argc, char *argv[])
Definition:
gui-main.cpp:30
cf3::common::Core::environment
common::Environment & environment() const
Definition:
Core.cpp:168
cf3::ui::graphics
Basic Classes for Graphics applications used by CF.
Definition:
AboutCFDialog.cpp:21
NetworkInfo.hpp
Core.hpp
CF.hpp
coolfluid3 header, included almost everywhere
cf3::common::Core::instance
static Core & instance()
Definition:
Core.cpp:37
cf3::common::Component::options
OptionList & options()
Definition:
Component.cpp:856
cf3::common::PE::Comm::instance
static Comm & instance()
Return a reference to the current PE.
Definition:
Comm.cpp:44
cf3::common::OptionList::set
void set(const std::string &pname, const boost::any &val)
Definition:
OptionList.cpp:132
cf3::common
Most basic kernel library.
Definition:
Action.cpp:19
MainWindow.hpp
Comm.hpp
cf3::common::Core::network_info
NetworkInfo & network_info() const
Definition:
Core.cpp:216
cf3::ui::graphics::MainWindow
Client main window.
Definition:
MainWindow.hpp:59
Generated on Sun Jun 14 2015 21:20:15 for COOLFluiD by
1.8.9.1
Send comments to:
COOLFluiD Web Admin