www.mooseframework.org
XFEMApp.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #include "XFEMApp.h"
9 #include "SolidMechanicsApp.h"
10 #include "TensorMechanicsApp.h"
11 #include "Moose.h"
12 #include "AppFactory.h"
13 #include "MooseSyntax.h"
14 
15 #include "XFEMVolFracAux.h"
16 #include "XFEMCutPlaneAux.h"
17 #include "XFEMMarkerAux.h"
18 #include "XFEMMarkerUserObject.h"
21 #include "XFEMAction.h"
23 #include "XFEMPressure.h"
27 
28 #include "GeometricCutUserObject.h"
31 #include "CircleCutUserObject.h"
32 #include "EllipseCutUserObject.h"
33 #include "RectangleCutUserObject.h"
34 
35 template <>
36 InputParameters
38 {
39  InputParameters params = validParams<MooseApp>();
40  return params;
41 }
42 XFEMApp::XFEMApp(const InputParameters & parameters) : MooseApp(parameters)
43 {
44  srand(processor_id());
45 
46  Moose::registerObjects(_factory);
48  XFEMApp::registerObjects(_factory);
49 
50  Moose::associateSyntax(_syntax, _action_factory);
51  XFEMApp::associateSyntaxDepends(_syntax, _action_factory);
52  XFEMApp::associateSyntax(_syntax, _action_factory);
53 }
54 
56 
57 // External entry point for dynamic application loading
58 extern "C" void
60 {
62 }
63 void
65 {
66  registerApp(XFEMApp);
67 }
68 
69 void
71 {
74 }
75 
76 // External entry point for dynamic object registration
77 extern "C" void
78 XFEMApp__registerObjects(Factory & factory)
79 {
80  XFEMApp::registerObjects(factory);
81 }
82 void
83 XFEMApp::registerObjects(Factory & factory)
84 {
85  // AuxKernels
86  registerAux(XFEMVolFracAux);
87  registerAux(XFEMCutPlaneAux);
88  registerAux(XFEMMarkerAux);
89 
90  // Constraints
91  registerConstraint(XFEMSingleVariableConstraint);
92 
93  // UserObjects
94  registerUserObject(XFEMMarkerUserObject);
95  registerUserObject(XFEMMaterialTensorMarkerUserObject);
96  registerUserObject(XFEMRankTwoTensorMarkerUserObject);
97 
98  // Geometric Cut User Objects
99  registerUserObject(LineSegmentCutUserObject);
100  registerUserObject(LineSegmentCutSetUserObject);
101  registerUserObject(CircleCutUserObject);
102  registerUserObject(EllipseCutUserObject);
103  registerUserObject(RectangleCutUserObject);
104 
105  // DiracKernels
106  registerDiracKernel(XFEMPressure);
107 
108  // Kernels
110 
111  // Materials
112  registerMaterial(ComputeCrackTipEnrichmentSmallStrain);
113 
114  // BC's
115  registerBoundaryCondition(CrackTipEnrichmentCutOffBC);
116 }
117 
118 void
119 XFEMApp::associateSyntaxDepends(Syntax & syntax, ActionFactory & action_factory)
120 {
121  SolidMechanicsApp::associateSyntax(syntax, action_factory);
122  TensorMechanicsApp::associateSyntax(syntax, action_factory);
123 }
124 
125 // External entry point for dynamic syntax association
126 extern "C" void
127 XFEMApp__associateSyntax(Syntax & syntax, ActionFactory & action_factory)
128 {
129  XFEMApp::associateSyntax(syntax, action_factory);
130 }
131 void
132 XFEMApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
133 {
134  registerTask("setup_xfem", false);
135  registerAction(XFEMAction, "setup_xfem");
136  syntax.addDependency("setup_xfem", "setup_adaptivity");
137  registerAction(XFEMAction, "add_aux_variable");
138  registerAction(XFEMAction, "add_aux_kernel");
139  registerAction(XFEMAction, "add_variable");
140  registerAction(XFEMAction, "add_kernel");
141  registerAction(XFEMAction, "add_bc");
142 
143  registerSyntax("XFEMAction", "XFEM");
144 }
static void registerApps()
Definition: XFEMApp.C:64
static void associateSyntaxDepends(Syntax &syntax, ActionFactory &action_factory)
Definition: XFEMApp.C:119
void XFEMApp__registerApps()
Definition: XFEMApp.C:59
XFEMApp(const InputParameters &parameters)
Definition: XFEMApp.C:42
static void registerObjects(Factory &factory)
static void registerObjectDepends(Factory &factory)
Definition: XFEMApp.C:70
Coupled auxiliary value.
static void registerObjects(Factory &factory)
Coupled auxiliary value.
static void registerObjects(Factory &factory)
Definition: XFEMApp.C:83
virtual ~XFEMApp()
Definition: XFEMApp.C:55
InputParameters validParams< XFEMApp >()
Definition: XFEMApp.C:37
CrackTipEnrichmentStressDivergenceTensors implements the residual and jacobian for enrichement displa...
static void associateSyntax(Syntax &syntax, ActionFactory &action_factory)
Coupled auxiliary value.
static void associateSyntax(Syntax &syntax, ActionFactory &action_factory)
CrackTipEnrichmentCutOffBC is used in XFEM Crack Tip Enrichment to fix DOFs to zero for those nodes w...
ComputeCrackTipEnrichmentSmallStrain calculates the sum of standard strain and enrichement strain...
static void associateSyntax(Syntax &syntax, ActionFactory &action_factory)
Definition: XFEMApp.C:132
void XFEMApp__associateSyntax(Syntax &syntax, ActionFactory &action_factory)
Definition: XFEMApp.C:127
void XFEMApp__registerObjects(Factory &factory)
Definition: XFEMApp.C:78