https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SBMBase< Parent > Class Template Referenceabstract

Template base providing signed-distance and normal-vector utilities for SBM objects. More...

#include <SBMBase.h>

Inheritance diagram for SBMBase< Parent >:
[legend]

Public Member Functions

 SBMBase (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void initialSetup () override
 
virtual bool perform_shifted () const =0
 Whether to apply shifted integration corrections.
 
Real h () const
 Returns the characteristic mesh size, computed as (element_volume)^(1/dim)
 
const RealVectorValue surrogateDistance () const
 Returns the shortest distance vector from the current quadrature point to the true interface.
 
const RealVectorValue trueNormal () const
 Returns the true normal vector at the projected point on the true interface.
 

Protected Attributes

const BoundaryShortestDistanceToSurface * _sbm_distance_uo
 user object for distance and normal calculations
 

Detailed Description

template<typename Parent>
class SBMBase< Parent >

Template base providing signed-distance and normal-vector utilities for SBM objects.

This mixes in with different MOOSE parents (IntegratedBC, InterfaceKernel, ... ) while sharing a single implementation.

Definition at line 26 of file SBMBase.h.

Constructor & Destructor Documentation

◆ SBMBase()

template<typename Parent >
SBMBase< Parent >::SBMBase ( const InputParameters &  parameters)

Definition at line 26 of file SBMBase.C.

27 : Parent(parameters), _sbm_distance_uo(nullptr)
28{
29}
const BoundaryShortestDistanceToSurface * _sbm_distance_uo
user object for distance and normal calculations
Definition SBMBase.h:53

Member Function Documentation

◆ h()

template<typename Parent >
Real SBMBase< Parent >::h ( ) const
protected

Returns the characteristic mesh size, computed as (element_volume)^(1/dim)

Definition at line 48 of file SBMBase.C.

49{
50 return std::pow(this->_current_elem->volume(), 1.0 / this->_mesh.dimension());
51}

◆ initialSetup()

template<typename Parent >
void SBMBase< Parent >::initialSetup ( )
overrideprotectedvirtual

Definition at line 33 of file SBMBase.C.

34{
35 if (perform_shifted())
36 {
37 if (!this->isParamSetByUser("sbm_distance_uo"))
38 mooseError("SBMBase: 'sbm_distance_uo' must be set when using shifted integration.");
39 else
41 &static_cast<Parent &>(*this).template getUserObject<BoundaryShortestDistanceToSurface>(
42 "sbm_distance_uo");
43 }
44}
void mooseError(Args &&... args)
virtual bool perform_shifted() const =0
Whether to apply shifted integration corrections.

◆ perform_shifted()

template<typename Parent >
virtual bool SBMBase< Parent >::perform_shifted ( ) const
protectedpure virtual

Whether to apply shifted integration corrections.

Shifted integration is the intended SBM mode. A derived class may return false to retain the same formulation without its shifted corrections as a verification or comparison baseline.

◆ surrogateDistance()

template<typename Parent >
const RealVectorValue SBMBase< Parent >::surrogateDistance ( ) const
protected

Returns the shortest distance vector from the current quadrature point to the true interface.

Definition at line 55 of file SBMBase.C.

56{
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);
59}
const RealVectorValue & surrogateDistance(const ElemSide &elem_side, unsigned int qp) const
Provides query interfaces for distance vector.

◆ trueNormal()

template<typename Parent >
const RealVectorValue SBMBase< Parent >::trueNormal ( ) const
protected

Returns the true normal vector at the projected point on the true interface.

Definition at line 63 of file SBMBase.C.

64{
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);
67}
const RealVectorValue & trueNormal(const ElemSide &elem_side, unsigned int qp) const
Provides query interfaces for normal vector.

◆ validParams()

template<typename Parent >
InputParameters SBMBase< Parent >::validParams ( )
static

Definition at line 15 of file SBMBase.C.

16{
17 InputParameters params = Parent::validParams();
18 params.addParam<UserObjectName>(
19 "sbm_distance_uo",
20 "UserObject that provides signed distance and normal vector calculations.");
21
22 return params;
23}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)

Referenced by SCZMInterfaceKernelBaseTempl< is_ad >::validParams().

Member Data Documentation

◆ _sbm_distance_uo

template<typename Parent >
const BoundaryShortestDistanceToSurface* SBMBase< Parent >::_sbm_distance_uo
protected

user object for distance and normal calculations

Definition at line 53 of file SBMBase.h.


The documentation for this class was generated from the following files: