https://mooseframework.inl.gov
Loading...
Searching...
No Matches
XFEMVolFracAux.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 "XFEMVolFracAux.h"
11
12#include "XFEM.h"
13
15
18{
21 "Computes the volume fraction of the physical material in each partial element.");
22 return params;
23}
24
26{
27 if (isNodal())
28 mooseError("XFEMVolFracAux must be run on an element variable");
29 FEProblemBase * fe_problem = dynamic_cast<FEProblemBase *>(&_subproblem);
30 if (fe_problem == nullptr)
31 mooseError("Problem casting _subproblem to FEProblemBase in XFEMVolFracAux");
32 _xfem = MooseSharedNamespace::dynamic_pointer_cast<XFEM>(fe_problem->getXFEM());
33 if (_xfem == nullptr)
34 mooseError("Problem casting to XFEM in XFEMVolFracAux");
35}
36
37Real
39{
40 return _xfem->getPhysicalVolumeFraction(_current_elem);
41}
registerMooseObject("XFEMApp", XFEMVolFracAux)
SubProblem & _subproblem
const Elem *const & _current_elem
static InputParameters validParams()
std::shared_ptr< XFEMInterface > getXFEM()
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const
Coupled auxiliary value.
std::shared_ptr< XFEM > _xfem
static InputParameters validParams()
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
virtual Real computeValue()
XFEMVolFracAux(const InputParameters &parameters)