Skip to content
Snippets Groups Projects
Commit 6418507e authored by Tom Fischer's avatar Tom Fischer Committed by Dmitri Naumov
Browse files

First OGS simulation main program.

parent e3c4560d
No related branches found
No related tags found
No related merge requests found
ADD_EXECUTABLE(ogs
ogs.cpp
)
TARGET_LINK_LIBRARIES(ogs
ApplicationsLib
BaseLib
FileIO
MeshLib
${Boost_LIBRARIES}
)
IF(OGS_BUILD_GUI)
TARGET_LINK_LIBRARIES(ogs QtDataView ${VTK_LIBRARIES} VtkVis)
ENDIF()
/**
* \date 2014-08-04
* \brief Implementation of OpenGeoSys simulation application
*
* \copyright
* Copyright (c) 2012-2014, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include <cstdlib>
// ThirdParty/logog
#include "logog/include/logog.hpp"
// ThirdParty/tclap
#include "ThirdParty/tclap/CmdLine.h"
// BaseLib
#include "BaseLib/LogogSimpleFormatter.h"
// FileIO/XmlIO/Qt
#include "FileIO/XmlIO/Qt/XmlGspInterface.h"
// OGS
#include "Applications/ApplicationsLib/ProjectData.h"
int main(int argc, char *argv[])
{
// logog
LOGOG_INITIALIZE();
BaseLib::LogogSimpleFormatter *fmt(new BaseLib::LogogSimpleFormatter);
logog::Cout *logog_cout(new logog::Cout);
logog_cout->SetFormatter(*fmt);
// Parse CLI arguments.
TCLAP::CmdLine cmd(
"OpenGeoSys simulation application", ' ', "0.1");
TCLAP::ValueArg<std::string> project_arg(
"p", // option tag
"project", // long option tag
"file name of the project", // description
true, // required
"",
"string"); // type of information
cmd.add(project_arg);
cmd.parse(argc, argv);
ProjectData project_data;
FileIO::XmlGspInterface project_reader(project_data);
project_reader.readFile(project_arg.getValue());
delete fmt;
delete logog_cout;
LOGOG_SHUTDOWN();
return 0;
}
......@@ -8,3 +8,8 @@ IF(OGS_BUILD_GUI)
ADD_DEFINITIONS(-DOGS_BUILD_GUI)
ADD_SUBDIRECTORY(DataExplorer)
ENDIF() # OGS_BUILD_GUI
IF(OGS_BUILD_CLI )
ADD_SUBDIRECTORY(CLI)
ENDIF() # OGS_BUILD_CLI
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment