13template <
typename Parent>
20 "UserObject that provides signed distance and normal vector calculations.");
25template <
typename Parent>
27 : Parent(parameters), _sbm_distance_uo(nullptr)
31template <
typename Parent>
35 if (perform_shifted())
37 if (!this->isParamSetByUser(
"sbm_distance_uo"))
38 mooseError(
"SBMBase: 'sbm_distance_uo' must be set when using shifted integration.");
41 &
static_cast<Parent &
>(*this).template getUserObject<BoundaryShortestDistanceToSurface>(
46template <
typename Parent>
50 return std::pow(this->_current_elem->volume(), 1.0 / this->_mesh.dimension());
53template <
typename Parent>
57 const auto elem_side = std::make_pair(this->_current_elem->id(), this->_current_side);
58 return _sbm_distance_uo->surrogateDistance(elem_side, this->_qp);
61template <
typename Parent>
65 const auto elem_side = std::make_pair(this->_current_elem->id(), this->_current_side);
66 return _sbm_distance_uo->trueNormal(elem_side, this->_qp);
void mooseError(Args &&... args)
Template base providing signed-distance and normal-vector utilities for SBM objects.
SBMBase(const InputParameters ¶meters)
static InputParameters validParams()
Real h() const
Returns the characteristic mesh size, computed as (element_volume)^(1/dim)
virtual void initialSetup() override
const RealVectorValue trueNormal() const
Returns the true normal vector at the projected point on the true interface.
const RealVectorValue surrogateDistance() const
Returns the shortest distance vector from the current quadrature point to the true interface.