18 params.
addParam<std::string>(
"base_name",
"Material property base name");
19 params.
addParam<MaterialPropertyName>(
"homogenization_gradient_name",
20 "homogenization_gradient",
21 "Name of the constant gradient field");
25 "Type of each constraint: strain, stress, or none. The types are specified in the " 26 "column-major order, and there must be 9 entries in total.");
28 "targets",
"Functions giving the targets to hit for constraint types that are not none.");
30 "Scalar field defining the 1st component of" 33 "Scalar field defining the other components of" 41 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
42 _macro_gradient(coupledScalarValue(
"macro_gradient")),
43 _macro_gradientA(coupledScalarValue(
"macro_gradientA")),
44 _homogenization_contribution(
45 declareProperty<
RankTwoTensor>(_base_name +
"homogenization_gradient_name"))
48 auto types = getParam<MultiMooseEnum>(
"constraint_types");
50 mooseError(
"Number of constraint types must equal dim * dim. ", types.size(),
" are provided.");
53 const std::vector<FunctionName> & fnames = getParam<std::vector<FunctionName>>(
"targets");
56 unsigned int fcount = 0;
74 unsigned int count = 0;
75 for (
auto && indices :
_cmap)
77 auto && [i,
j] = indices.first;
82 unsigned int r_ind = count - 1;
ConstraintType
Constraint type: stress/PK stress or strain/deformation gradient.
static constexpr std::size_t dim
Calculate the tensor corresponding to homogenization gradient.
const VariableValue & _macro_gradientA
ScalarVariable with 1st component of the field.
virtual void computeQpProperties() override
const VariableValue & _macro_gradient
ScalarVariable with the field.
static InputParameters validParams()
Real f(Real x)
Test function for Brents method.
ComputeHomogenizedLagrangianStrainA(const InputParameters ¶meters)
HomogenizationB::ConstraintMap _cmap
Constraint map.
const Function & getFunctionByName(const FunctionName &name) const
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
static InputParameters validParams()
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
registerMooseObject("SolidMechanicsTestApp", ComputeHomogenizedLagrangianStrainA)
const MultiMooseEnum constraintType("strain stress none")
Moose constraint type, for input.
MaterialProperty< RankTwoTensor > & _homogenization_contribution
Unwrapped into a tensor.