https://mooseframework.inl.gov
MeshCutLevelSetAux.C
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 #include "MeshCutLevelSetAux.h"
12 
14 
17 {
19  params.addClassDescription(
20  "Calculates signed distance from interface defined by InterfaceMeshCutUserObject.");
21  params.addParam<UserObjectName>(
22  "mesh_cut_user_object",
23  "Name of InterfaceMeshCutUserObject that gives cut mesh information.");
24  return params;
25 }
26 
28 {
29  if (!isNodal())
30  mooseError("MeshCutLevelSetAux: Aux variable must be nodal variable.");
31 
32  FEProblemBase * fe_problem = dynamic_cast<FEProblemBase *>(&_subproblem);
33 
34  const UserObject * uo =
35  &(fe_problem->getUserObjectBase(getParam<UserObjectName>("mesh_cut_user_object")));
36 
37  if (dynamic_cast<const InterfaceMeshCutUserObjectBase *>(uo) == nullptr)
38  mooseError("Failed to cast UserObject to InterfaceMeshCutUserObjectBase in MeshCutLevelSetAux");
39 
40  _mesh_cut_uo = dynamic_cast<const InterfaceMeshCutUserObjectBase *>(uo);
41 }
42 
43 Real
45 {
47 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
Calculate level set values for an interface that is defined by a lower-dimensional mesh...
const Node *const & _current_node
registerMooseObject("XFEMApp", MeshCutLevelSetAux)
MeshCutLevelSetAux(const InputParameters &parameters)
virtual Real computeValue() override
virtual Real calculateSignedDistance(Point p) const =0
Calculate the signed distance for a given point relative to the surface.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
SubProblem & _subproblem
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
static InputParameters validParams()
const InterfaceMeshCutUserObjectBase * _mesh_cut_uo
Pointer to the InterfaceMeshCutUserObject object.