www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ComputeElasticityTensorBase Class Referenceabstract

ComputeElasticityTensorBase the base class for computing elasticity tensors. More...

#include <ComputeElasticityTensorBase.h>

Inheritance diagram for ComputeElasticityTensorBase:
[legend]

Public Member Functions

 ComputeElasticityTensorBase (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
 
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
 
MaterialProperty< RankFourTensor > & _elasticity_tensor
 
MaterialProperty< Real > & _effective_stiffness
 
const Function *const _prefactor_function
 prefactor function to multiply the elasticity tensor with More...
 

Private Attributes

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

Detailed Description

ComputeElasticityTensorBase the base class for computing elasticity tensors.

Definition at line 25 of file ComputeElasticityTensorBase.h.

Constructor & Destructor Documentation

◆ ComputeElasticityTensorBase()

ComputeElasticityTensorBase::ComputeElasticityTensorBase ( const InputParameters &  parameters)

Definition at line 29 of file ComputeElasticityTensorBase.C.

30  : DerivativeMaterialInterface<Material>(parameters),
31  GuaranteeProvider(this),
32  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
33  _elasticity_tensor_name(_base_name + "elasticity_tensor"),
34  _elasticity_tensor(declareProperty<RankFourTensor>(_elasticity_tensor_name)),
35  _effective_stiffness(declareProperty<Real>(_base_name + "effective_stiffness")),
36  _prefactor_function(isParamValid("elasticity_tensor_prefactor")
37  ? &getFunction("elasticity_tensor_prefactor")
38  : nullptr)
39 {
40 }

Member Function Documentation

◆ computeQpElasticityTensor()

virtual void ComputeElasticityTensorBase::computeQpElasticityTensor ( )
protectedpure virtual

◆ computeQpProperties()

void ComputeElasticityTensorBase::computeQpProperties ( )
protectedvirtual

Definition at line 43 of file ComputeElasticityTensorBase.C.

44 {
45  _effective_stiffness[_qp] = 0; // Currently overriden by ComputeIsotropicElasticityTensor
47 
48  // Multiply by prefactor
50  {
51  _elasticity_tensor[_qp] *= _prefactor_function->value(_t, _q_point[_qp]);
52  _effective_stiffness[_qp] *= std::sqrt(_prefactor_function->value(_t, _q_point[_qp]));
53  }
54 }

◆ 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()

InputParameters ComputeElasticityTensorBase::validParams ( )
static

Definition at line 16 of file ComputeElasticityTensorBase.C.

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

Referenced by ComputeCosseratElasticityTensor::validParams(), ComputeIsotropicElasticityTensor::validParams(), ComputeRotatedElasticityTensorBase::validParams(), ComputeVariableIsotropicElasticityTensor::validParams(), ComputeLayeredCosseratElasticityTensor::validParams(), and LinearViscoelasticityBase::validParams().

Member Data Documentation

◆ _base_name

const std::string ComputeElasticityTensorBase::_base_name
protected

◆ _effective_stiffness

MaterialProperty<Real>& ComputeElasticityTensorBase::_effective_stiffness
protected

◆ _elasticity_tensor

MaterialProperty<RankFourTensor>& ComputeElasticityTensorBase::_elasticity_tensor
protected

◆ _elasticity_tensor_name

std::string ComputeElasticityTensorBase::_elasticity_tensor_name
protected

◆ _guarantees

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

◆ _prefactor_function

const Function* const ComputeElasticityTensorBase::_prefactor_function
protected

prefactor function to multiply the elasticity tensor with

Definition at line 44 of file ComputeElasticityTensorBase.h.

Referenced by ComputeLayeredCosseratElasticityTensor::computeQpElasticityTensor(), and computeQpProperties().


The documentation for this class was generated from the following files:
ComputeElasticityTensorBase::_effective_stiffness
MaterialProperty< Real > & _effective_stiffness
Definition: ComputeElasticityTensorBase.h:41
GuaranteeProvider::_guarantees
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
Definition: GuaranteeProvider.h:37
GuaranteeProvider::GuaranteeProvider
GuaranteeProvider(const MooseObject *moose_object)
Definition: GuaranteeProvider.C:13
ComputeElasticityTensorBase::computeQpElasticityTensor
virtual void computeQpElasticityTensor()=0
validParams
InputParameters validParams()
ComputeElasticityTensorBase::_elasticity_tensor
MaterialProperty< RankFourTensor > & _elasticity_tensor
Definition: ComputeElasticityTensorBase.h:40
ComputeElasticityTensorBase::_elasticity_tensor_name
std::string _elasticity_tensor_name
Definition: ComputeElasticityTensorBase.h:38
ComputeElasticityTensorBase::_base_name
const std::string _base_name
Definition: ComputeElasticityTensorBase.h:37
ComputeElasticityTensorBase::_prefactor_function
const Function *const _prefactor_function
prefactor function to multiply the elasticity tensor with
Definition: ComputeElasticityTensorBase.h:44