https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MooseMain.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseInit.h"
13#include "MooseApp.h"
14
15class InputParameters;
16
17namespace Moose
18{
19
23std::unique_ptr<MooseApp>
24createMooseApp(const std::string & default_app_type, int argc, char * argv[]);
25
29template <typename DefaultAppType>
30int
31main(int argc, char * argv[])
32{
33 MooseInit init(argc, argv);
34
35 DefaultAppType::registerApps();
36
37 const auto default_app_type = MooseUtils::prettyCppType<DefaultAppType>();
38
39 auto app = createMooseApp(default_app_type, argc, argv);
40
41 app->run();
42
43 return app->exitCode();
44}
45}
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Initialization object for any MOOSE-based application.
Definition MooseInit.h:24
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
std::unique_ptr< MooseApp > createMooseApp(const std::string &default_app_type, int argc, char *argv[])
Create a MooseApp from command-line arguments.
Definition MooseMain.C:27
int main()