www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ADComputeElasticityTensorBase< compute_stage > Class Template Referenceabstract

ADComputeElasticityTensorBase is a the base class for computing elasticity tensors. More...

#include <ADComputeElasticityTensorBase.h>

Inheritance diagram for ADComputeElasticityTensorBase< compute_stage >:
[legend]

Public Member Functions

 ADComputeElasticityTensorBase (const InputParameters &parameters)
 
bool hasGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpProperties ()
 
virtual void computeQpElasticityTensor ()=0
 
 ADMaterialProperty (RankFourTensor) &_elasticity_tensor
 
void issueGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 
void revokeGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Protected Attributes

const std::string _base_name
 
std::string _elasticity_tensor_name
 
const Function *const _prefactor_function
 prefactor function to multiply the elasticity tensor with More...
 
 usingMaterialMembers
 

Private Attributes

std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
 

Detailed Description

template<ComputeStage compute_stage>
class ADComputeElasticityTensorBase< compute_stage >

ADComputeElasticityTensorBase is a the base class for computing elasticity tensors.

Definition at line 24 of file ADComputeElasticityTensorBase.h.

Constructor & Destructor Documentation

◆ ADComputeElasticityTensorBase()

template<ComputeStage compute_stage>
ADComputeElasticityTensorBase< compute_stage >::ADComputeElasticityTensorBase ( const InputParameters &  parameters)

Definition at line 31 of file ADComputeElasticityTensorBase.C.

33  : ADMaterial<compute_stage>(parameters),
34  GuaranteeProvider(this),
35  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
36  _elasticity_tensor_name(_base_name + "elasticity_tensor"),
37  _elasticity_tensor(declareADProperty<RankFourTensor>(_elasticity_tensor_name)),
38  _prefactor_function(isParamValid("elasticity_tensor_prefactor")
39  ? &getFunction("elasticity_tensor_prefactor")
40  : nullptr)
41 {
42 }

Member Function Documentation

◆ ADMaterialProperty()

template<ComputeStage compute_stage>
ADComputeElasticityTensorBase< compute_stage >::ADMaterialProperty ( RankFourTensor  ) &
protected

◆ computeQpElasticityTensor()

template<ComputeStage compute_stage>
virtual void ADComputeElasticityTensorBase< compute_stage >::computeQpElasticityTensor ( )
protectedpure virtual

◆ computeQpProperties()

template<ComputeStage compute_stage>
void ADComputeElasticityTensorBase< compute_stage >::computeQpProperties ( )
protectedvirtual

Definition at line 46 of file ADComputeElasticityTensorBase.C.

47 {
49 
50  // Multiply by prefactor
52  _elasticity_tensor[_qp] *= _prefactor_function->value(_t, _q_point[_qp]);
53 }

◆ hasGuarantee()

bool GuaranteeProvider::hasGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
inherited

Definition at line 16 of file GuaranteeProvider.C.

17 {
18  auto it = _guarantees.find(prop_name);
19  if (it == _guarantees.end())
20  return false;
21 
22  auto it2 = it->second.find(guarantee);
23  return it2 != it->second.end();
24 }

◆ issueGuarantee()

void GuaranteeProvider::issueGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

◆ revokeGuarantee()

void GuaranteeProvider::revokeGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

Definition at line 34 of file GuaranteeProvider.C.

35 {
36  auto it = _guarantees.find(prop_name);
37  if (it != _guarantees.end())
38  it->second.erase(guarantee);
39 }

Referenced by ComputeElasticityTensorCP::ComputeElasticityTensorCP().

◆ validParams()

template<ComputeStage compute_stage>
InputParameters ADComputeElasticityTensorBase< compute_stage >::validParams ( )
static

Definition at line 17 of file ADComputeElasticityTensorBase.C.

18 {
19  InputParameters params = ADMaterial<compute_stage>::validParams();
20  params.addParam<FunctionName>(
21  "elasticity_tensor_prefactor",
22  "Optional function to use as a scalar prefactor on the elasticity tensor.");
23  params.addParam<std::string>(
24  "base_name",
25  "Optional parameter that allows the user to define multiple mechanics "
26  "material systems on the same block, i.e. for multiple phases");
27  return params;
28 }

Referenced by ADComputeVariableIsotropicElasticityTensor< compute_stage >::validParams().

Member Data Documentation

◆ _base_name

template<ComputeStage compute_stage>
const std::string ADComputeElasticityTensorBase< compute_stage >::_base_name
protected

Definition at line 48 of file ADComputeElasticityTensorBase.h.

◆ _elasticity_tensor_name

template<ComputeStage compute_stage>
std::string ADComputeElasticityTensorBase< compute_stage >::_elasticity_tensor_name
protected

◆ _guarantees

std::map<MaterialPropertyName, std::set<Guarantee> > GuaranteeProvider::_guarantees
privateinherited

◆ _prefactor_function

template<ComputeStage compute_stage>
const Function* const ADComputeElasticityTensorBase< compute_stage >::_prefactor_function
protected

prefactor function to multiply the elasticity tensor with

Definition at line 54 of file ADComputeElasticityTensorBase.h.

◆ usingMaterialMembers

template<ComputeStage compute_stage>
ADComputeElasticityTensorBase< compute_stage >::usingMaterialMembers
protected

Definition at line 56 of file ADComputeElasticityTensorBase.h.


The documentation for this class was generated from the following files:
ADComputeElasticityTensorBase::_base_name
const std::string _base_name
Definition: ADComputeElasticityTensorBase.h:48
GuaranteeProvider::_guarantees
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
Definition: GuaranteeProvider.h:37
GuaranteeProvider::GuaranteeProvider
GuaranteeProvider(const MooseObject *moose_object)
Definition: GuaranteeProvider.C:13
ADComputeElasticityTensorBase::_elasticity_tensor_name
std::string _elasticity_tensor_name
Definition: ADComputeElasticityTensorBase.h:49
validParams
InputParameters validParams()
ADComputeElasticityTensorBase::computeQpElasticityTensor
virtual void computeQpElasticityTensor()=0
ADComputeElasticityTensorBase::_prefactor_function
const Function *const _prefactor_function
prefactor function to multiply the elasticity tensor with
Definition: ADComputeElasticityTensorBase.h:54