https://mooseframework.inl.gov
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 
15 class InputParameters;
16 
17 namespace Moose
18 {
19 
23 std::shared_ptr<MooseApp>
24 createMooseApp(const std::string & default_app_type, int argc, char * argv[]);
25 
29 template <typename DefaultAppType>
30 int
31 main(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 }
std::shared_ptr< MooseApp > createMooseApp(const std::string &default_app_type, int argc, char *argv[])
Create a MooseApp from command-line arguments.
Definition: MooseMain.C:27
Initialization object for any MOOSE-based application.
Definition: MooseInit.h:23
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void init(triangulateio &t)
int main(int argc, char *argv[])
Initialize, create and run a MooseApp.
Definition: MooseMain.h:31
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...