https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
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
43Real
registerMooseObject("XFEMApp", MeshCutLevelSetAux)
SubProblem & _subproblem
const Node *const & _current_node
static InputParameters validParams()
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
virtual Real calculateSignedDistance(Point p) const =0
Calculate the signed distance for a given point relative to the surface.
Calculate level set values for an interface that is defined by a lower-dimensional mesh.
MeshCutLevelSetAux(const InputParameters &parameters)
const InterfaceMeshCutUserObjectBase * _mesh_cut_uo
Pointer to the InterfaceMeshCutUserObject object.
virtual Real computeValue() override
static InputParameters validParams()
void mooseError(Args &&... args) const