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 " 38 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
39 _macro_gradient(coupledScalarValue(
"macro_gradient")),
40 _homogenization_contribution(
41 declareProperty<
RankTwoTensor>(_base_name +
"homogenization_gradient_name"))
44 auto types = getParam<MultiMooseEnum>(
"constraint_types");
46 mooseError(
"Number of constraint types must equal dim * dim. ", types.size(),
" are provided.");
49 const std::vector<FunctionName> & fnames = getParam<std::vector<FunctionName>>(
"targets");
52 unsigned int fcount = 0;
70 unsigned int count = 0;
71 for (
auto && indices :
_cmap)
73 auto && [i,
j] = indices.first;
registerMooseObject("SolidMechanicsTestApp", ComputeHomogenizedLagrangianStrainS)
const VariableValue & _macro_gradient
ScalarVariable with the field.
virtual void computeQpProperties() override
static constexpr std::size_t dim
static InputParameters validParams()
static InputParameters validParams()
ConstraintType
Constraint type: stress/PK stress or strain/deformation gradient.
Real f(Real x)
Test function for Brents method.
HomogenizationM::ConstraintMap _cmap
Constraint map.
const Function & getFunctionByName(const FunctionName &name) const
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
const MultiMooseEnum constraintType("strain stress none")
Moose constraint type, for input.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MaterialProperty< RankTwoTensor > & _homogenization_contribution
Unwrapped into a tensor.
Calculate the tensor corresponding to homogenization gradient.
ComputeHomogenizedLagrangianStrainS(const InputParameters ¶meters)