www.mooseframework.org
XFEMApp.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "XFEMApp.h"
11 #include "XFEMAppTypes.h"
12 #include "SolidMechanicsApp.h"
13 #include "TensorMechanicsApp.h"
14 #include "Moose.h"
15 #include "AppFactory.h"
16 #include "MooseSyntax.h"
17 
18 template <>
19 InputParameters
21 {
22  InputParameters params = validParams<MooseApp>();
23  return params;
24 }
25 registerKnownLabel("XFEMApp");
26 
27 XFEMApp::XFEMApp(const InputParameters & parameters) : MooseApp(parameters)
28 {
29  srand(processor_id());
30  XFEMApp::registerAll(_factory, _action_factory, _syntax);
31 }
32 
34 
35 static void
36 associateSyntaxInner(Syntax & syntax, ActionFactory & /*action_factory*/)
37 {
38  registerTask("setup_xfem", false);
39  syntax.addDependency("setup_xfem", "setup_adaptivity");
40  registerSyntax("XFEMAction", "XFEM");
41 }
42 
43 void
44 XFEMApp::registerAll(Factory & f, ActionFactory & af, Syntax & s)
45 {
46  Registry::registerObjectsTo(f, {"XFEMApp"});
47  Registry::registerActionsTo(af, {"XFEMApp"});
48  associateSyntaxInner(s, af);
49 
52 
53  auto & factory = f; // for registerExecFlags macro
54  registerExecFlag(EXEC_XFEM_MARK);
55 }
56 
57 void
59 {
60  registerApp(XFEMApp);
61 }
62 
63 void
65 {
66  mooseDeprecated("use registerAll instead of registerObjectsDepends");
69 }
70 
71 void
72 XFEMApp::registerObjects(Factory & factory)
73 {
74  mooseDeprecated("use registerAll instead of registerObjects");
75  Registry::registerObjectsTo(factory, {"XFEMApp"});
76 }
77 
78 void
79 XFEMApp::associateSyntaxDepends(Syntax & syntax, ActionFactory & action_factory)
80 {
81  mooseDeprecated("use registerAll instead of associateSyntaxDepends");
82  SolidMechanicsApp::associateSyntax(syntax, action_factory);
83  TensorMechanicsApp::associateSyntax(syntax, action_factory);
84 }
85 
86 void
87 XFEMApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
88 {
89  mooseDeprecated("use registerAll instead of associateSyntax");
90  Registry::registerActionsTo(action_factory, {"XFEMApp"});
91  associateSyntaxInner(syntax, action_factory);
92 }
93 
94 void
95 XFEMApp::registerExecFlags(Factory & factory)
96 {
97  mooseDeprecated("use registerAll instead of registerExecFlags");
98  registerExecFlag(EXEC_XFEM_MARK);
99 }
100 
101 extern "C" void
102 XFEMApp__registerAll(Factory & f, ActionFactory & af, Syntax & s)
103 {
104  XFEMApp::registerAll(f, af, s);
105 }
106 extern "C" void
108 {
110 }
registerKnownLabel("XFEMApp")
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
static void registerApps()
Definition: XFEMApp.C:58
static void associateSyntaxDepends(Syntax &syntax, ActionFactory &action_factory)
Definition: XFEMApp.C:79
void XFEMApp__registerApps()
Definition: XFEMApp.C:107
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
XFEMApp(const InputParameters &parameters)
Definition: XFEMApp.C:27
static void registerObjects(Factory &factory)
static void registerObjectDepends(Factory &factory)
Definition: XFEMApp.C:64
static void registerObjects(Factory &factory)
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
Definition: XFEMApp.C:44
static void registerObjects(Factory &factory)
Definition: XFEMApp.C:72
void XFEMApp__registerAll(Factory &f, ActionFactory &af, Syntax &s)
Definition: XFEMApp.C:102
virtual ~XFEMApp()
Definition: XFEMApp.C:33
static void registerExecFlags(Factory &factory)
Definition: XFEMApp.C:95
InputParameters validParams< XFEMApp >()
Definition: XFEMApp.C:20
const ExecFlagType EXEC_XFEM_MARK
Exec flag used to execute MooseObjects while elements are being marked for cutting by XFEM...
static void associateSyntax(Syntax &syntax, ActionFactory &action_factory)
static void associateSyntax(Syntax &syntax, ActionFactory &action_factory)
static void associateSyntaxInner(Syntax &syntax, ActionFactory &)
Definition: XFEMApp.C:36
static void associateSyntax(Syntax &syntax, ActionFactory &action_factory)
Definition: XFEMApp.C:87