www.mooseframework.org
XFEMInterface.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef XFEMINTERFACE_H
16 #define XFEMINTERFACE_H
17 
18 #include "ConsoleStreamInterface.h"
19 #include "MooseTypes.h"
20 #include "InputParameters.h"
21 #include "MooseMesh.h"
22 
23 class MooseApp;
24 class AuxiliarySystem;
26 class MaterialData;
27 class FEProblemBase;
28 
29 namespace libMesh
30 {
31 class MeshBase;
32 class QBase;
33 }
34 
41 // ------------------------------------------------------------
42 // XFEMInterface class definition
44 {
45 public:
49  explicit XFEMInterface(const InputParameters & params)
50  : ConsoleStreamInterface(*params.getCheckedPointerParam<MooseApp *>("_moose_app")),
51  _fe_problem(params.getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")),
52  _material_data(nullptr),
53  _bnd_material_data(nullptr),
54  _moose_mesh(nullptr),
55  _moose_displaced_mesh(nullptr),
56  _mesh(nullptr),
57  _displaced_mesh(nullptr)
58  {
59  }
60 
64  virtual ~XFEMInterface() {}
65 
69  void setMesh(MooseMesh * mesh)
70  {
71  _moose_mesh = mesh;
72  _mesh = &mesh->getMesh();
73  }
74 
78  void setDisplacedMesh(MooseMesh * displaced_mesh)
79  {
80  _moose_displaced_mesh = displaced_mesh;
81  _displaced_mesh = &displaced_mesh->getMesh();
82  }
83 
87  void setMaterialData(std::vector<std::shared_ptr<MaterialData>> * material_data)
88  {
89  _material_data = material_data;
90  }
91 
95  void setBoundaryMaterialData(std::vector<std::shared_ptr<MaterialData>> * bnd_material_data)
96  {
97  _bnd_material_data = bnd_material_data;
98  }
99 
103  virtual bool update(Real time, NonlinearSystemBase & nl, AuxiliarySystem & aux) = 0;
104 
108  virtual void initSolution(NonlinearSystemBase & nl, AuxiliarySystem & aux) = 0;
109 
113  virtual bool getXFEMWeights(MooseArray<Real> & weights,
114  const Elem * elem,
115  QBase * qrule,
116  const MooseArray<Point> & q_points) = 0;
117 
118 protected:
120  std::vector<std::shared_ptr<MaterialData>> * _material_data;
121  std::vector<std::shared_ptr<MaterialData>> * _bnd_material_data;
122 
125  MeshBase * _mesh;
126  MeshBase * _displaced_mesh;
127 };
128 
129 #endif // XFEMINTERFACE_H
virtual ~XFEMInterface()
Destructor.
Definition: XFEMInterface.h:64
void setDisplacedMesh(MooseMesh *displaced_mesh)
Set the pointer to the displaced mesh that is modified by XFEM.
Definition: XFEMInterface.h:78
Base class for MOOSE-based applications.
Definition: MooseApp.h:58
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
FEProblemBase * _fe_problem
MooseMesh * _moose_displaced_mesh
NonlinearSystemBase * nl
Nonlinear system to be solved.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
An inteface for the _console for outputting to the Console object.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
std::vector< std::shared_ptr< MaterialData > > * _material_data
std::vector< std::shared_ptr< MaterialData > > * _bnd_material_data
This is the XFEMInterface class.
Definition: XFEMInterface.h:43
MeshBase * _mesh
void setMesh(MooseMesh *mesh)
Set the pointer to the primary mesh that is modified by XFEM.
Definition: XFEMInterface.h:69
MooseMesh * _moose_mesh
void setBoundaryMaterialData(std::vector< std::shared_ptr< MaterialData >> *bnd_material_data)
Set the pointer to the Boundary MaterialData.
Definition: XFEMInterface.h:95
void setMaterialData(std::vector< std::shared_ptr< MaterialData >> *material_data)
Set the pointer to the MaterialData.
Definition: XFEMInterface.h:87
MeshBase * _displaced_mesh
XFEMInterface(const InputParameters &params)
Constructor.
Definition: XFEMInterface.h:49
Proxy for accessing MaterialPropertyStorage.
Definition: MaterialData.h:33
A system that holds auxiliary variables.