https://mooseframework.inl.gov
CZMRealVectorCartesianComponent.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
16 {
18  params.addClassDescription("Access a component of a RealVectorValue defined on a cohesive zone");
19  params.addRequiredParam<std::string>("real_vector_value", "The vector material name");
20  params.addRequiredParam<MaterialPropertyName>(
21  "property_name", "Name of the material property computed by this model");
22  params.addRequiredRangeCheckedParam<unsigned int>(
23  "index", "index >= 0 & index <= 2", "The vector component output (0, 1, 2)");
24  params.addParam<std::string>("base_name", "Material property base name");
25  return params;
26 }
27 
29  : InterfaceMaterial(parameters),
30  _base_name(isParamValid("base_name") && !getParam<std::string>("base_name").empty()
31  ? getParam<std::string>("base_name") + "_"
32  : ""),
33  _property(declarePropertyByName<Real>(getParam<MaterialPropertyName>("property_name"))),
34  _vector(getMaterialPropertyByName<RealVectorValue>(_base_name +
35  getParam<std::string>("real_vector_value"))),
36  _index(getParam<unsigned int>("index"))
37 {
38 }
39 
40 void
42 {
44 }
MaterialProperty< Real > & _property
the property created by this material
const MaterialProperty< RealVectorValue > & _vector
the vector material property
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, 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()
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
const unsigned int _index
the component of vector we want to extract
registerMooseObject("SolidMechanicsApp", CZMRealVectorCartesianComponent)
CZMRealVectorCartesianComponent(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This interface material class extract a cartesiona component from a vector materail property defined ...
void addClassDescription(const std::string &doc_string)
void ErrorVector unsigned int