https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
SCZMInterfaceKernelBaseTempl< is_ad > Class Template Reference

Base class for AD and non-AD shifted cohesive zone interface kernels. More...

#include <SCZMInterfaceKernelBase.h>

Inheritance diagram for SCZMInterfaceKernelBaseTempl< is_ad >:
[legend]

Public Types

typedef std::vector< int > JvarMap
 

Public Member Functions

 SCZMInterfaceKernelBaseTempl (const InputParameters &parameters)
 
virtual void computeOffDiagJacobian (unsigned int jvar) override
 
unsigned int mapJvarToCvar (unsigned int jvar)
 
int mapJvarToCvar (unsigned int jvar, const JvarMap &jvar_map)
 
bool mapJvarToCvar (unsigned int jvar, unsigned int &cvar)
 
const JvarMap & getJvarMap ()
 
const JvarMap & getParameterJvarMap (std::string parameter_name)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

GenericReal< is_ad > computeQpResidual (Moose::DGResidualType type) override
 
bool perform_shifted () const override
 Whether to apply the shifted integration corrections.
 

Protected Attributes

const std::string _base_name
 Base name of the material system that this kernel applies to.
 
const unsigned int _component
 The displacement component this kernel is operating on (0=x, 1=y, 2=z)
 
const unsigned int _ndisp
 Number of displacement components.
 
const GenericMaterialProperty< RealVectorValue, is_ad > & _traction_global
 Traction in the global frame.
 
const bool _shifted
 True by default; false only when requesting the non-shifted verification baseline.
 
 usingGenericInterfaceKernelMembers
 
const unsigned int _n_args
 

Private Attributes

const std::size_t _jvar_max_size
 
JvarMap _jvar_map
 
std::map< std::string, JvarMap > _jvar_local_map
 

Detailed Description

template<bool is_ad>
class SCZMInterfaceKernelBaseTempl< is_ad >

Base class for AD and non-AD shifted cohesive zone interface kernels.

Definition at line 17 of file SCZMInterfaceKernelBase.h.

Constructor & Destructor Documentation

◆ SCZMInterfaceKernelBaseTempl()

template<bool is_ad>
SCZMInterfaceKernelBaseTempl< is_ad >::SCZMInterfaceKernelBaseTempl ( const InputParameters &  parameters)

Definition at line 39 of file SCZMInterfaceKernelBase.C.

42 _base_name(this->isParamValid("base_name") &&
43 !this->template getParam<std::string>("base_name").empty()
44 ? this->template getParam<std::string>("base_name") + "_"
45 : ""),
46 _component(this->template getParam<unsigned int>("component")),
47 _ndisp(this->coupledComponents("displacements")),
48 _traction_global(this->template getGenericMaterialPropertyByName<RealVectorValue, is_ad>(
49 _base_name + this->template getParam<std::string>("traction_global_name"))),
50 _shifted(!this->template getParam<bool>("no_shifted"))
51{
52 if (_ndisp != this->_mesh.dimension())
53 this->paramError("displacements", "Number of displacements must match problem dimension.");
54
55 if (_ndisp > 3 || _ndisp < 1)
56 this->paramError("displacements",
57 "The SCZM material requires 1, 2, or 3 displacement variables.");
58}
const std::string _base_name
Base name of the material system that this kernel applies to.
const unsigned int _component
The displacement component this kernel is operating on (0=x, 1=y, 2=z)
const GenericMaterialProperty< RealVectorValue, is_ad > & _traction_global
Traction in the global frame.
const bool _shifted
True by default; false only when requesting the non-shifted verification baseline.
const unsigned int _ndisp
Number of displacement components.

Member Function Documentation

◆ computeQpResidual()

template<bool is_ad>
GenericReal< is_ad > SCZMInterfaceKernelBaseTempl< is_ad >::computeQpResidual ( Moose::DGResidualType  type)
overrideprotected

Definition at line 62 of file SCZMInterfaceKernelBase.C.

63{
64 auto residual = _traction_global[this->_qp](_component);
65
66 switch (type)
67 {
68 case Moose::Element:
69 residual *= -this->_test[this->_i][this->_qp];
70 break;
71
72 case Moose::Neighbor:
73 residual *= this->_test_neighbor[this->_i][this->_qp];
74 break;
75 }
76
77 return residual;
78}

Referenced by SCZMInterfaceKernelSmallStrainTempl< is_ad >::computeQpResidual().

◆ perform_shifted()

template<bool is_ad>
bool SCZMInterfaceKernelBaseTempl< is_ad >::perform_shifted ( ) const
inlineoverrideprotected

Whether to apply the shifted integration corrections.

Shifted integration is the default and intended mode for SBM simulations. It can be disabled only to provide a non-shifted baseline with the same interface kernel and cohesive-zone model, which isolates the effect of the shifted correction terms for verification and comparison.

Definition at line 33 of file SCZMInterfaceKernelBase.h.

33{ return _shifted; }

◆ validParams()

template<bool is_ad>
InputParameters SCZMInterfaceKernelBaseTempl< is_ad >::validParams ( )
static

Definition at line 14 of file SCZMInterfaceKernelBase.C.

15{
17
18 params.addRequiredParam<unsigned int>("component",
19 "The component of the displacement vector this kernel is "
20 "working on: component == 0 => X, 1 => Y, 2 => Z");
21 params.suppressParameter<bool>("use_displaced_mesh");
22 params.addRequiredCoupledVar("displacements", "The string containing displacement variables");
23 params.addParam<std::string>("base_name", "Material property base name");
24 params.addParam<std::string>("traction_global_name",
25 "traction_global",
26 "Name of the traction material property (global frame)");
27 params.addParam<bool>(
28 "no_shifted",
29 false,
30 "Disable the shifted integration corrections while retaining the same interface kernel and "
31 "cohesive-zone model. Shifted integration is enabled by default and is the intended SBM "
32 "mode; disable it only to isolate the effect of the correction terms for verification and "
33 "comparison.");
34
35 return params;
36}
void suppressParameter(const std::string &name)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
Definition SBMBase.C:15

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

Member Data Documentation

◆ _base_name

template<bool is_ad>
const std::string SCZMInterfaceKernelBaseTempl< is_ad >::_base_name
protected

Base name of the material system that this kernel applies to.

Definition at line 36 of file SCZMInterfaceKernelBase.h.

Referenced by SCZMInterfaceKernelSmallStrainTempl< is_ad >::SCZMInterfaceKernelSmallStrainTempl().

◆ _component

template<bool is_ad>
const unsigned int SCZMInterfaceKernelBaseTempl< is_ad >::_component
protected

The displacement component this kernel is operating on (0=x, 1=y, 2=z)

Definition at line 39 of file SCZMInterfaceKernelBase.h.

◆ _ndisp

template<bool is_ad>
const unsigned int SCZMInterfaceKernelBaseTempl< is_ad >::_ndisp
protected

◆ _shifted

template<bool is_ad>
const bool SCZMInterfaceKernelBaseTempl< is_ad >::_shifted
protected

True by default; false only when requesting the non-shifted verification baseline.

Definition at line 48 of file SCZMInterfaceKernelBase.h.

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

◆ _traction_global

template<bool is_ad>
const GenericMaterialProperty<RealVectorValue, is_ad>& SCZMInterfaceKernelBaseTempl< is_ad >::_traction_global
protected

Traction in the global frame.

Definition at line 45 of file SCZMInterfaceKernelBase.h.

◆ usingGenericInterfaceKernelMembers

template<bool is_ad>
SCZMInterfaceKernelBaseTempl< is_ad >::usingGenericInterfaceKernelMembers
protected

Definition at line 50 of file SCZMInterfaceKernelBase.h.


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