13#include "libmesh/quadrature.h"
21 params.
addClassDescription(
"accepts eigenstrains and computes a reduced order eigenstrain for "
22 "consistency in the order of strain and eigenstrains.");
24 "input_eigenstrain_names",
"List of eigenstrains to be applied in this strain calculation");
30 _input_eigenstrain_names(
31 getParam<
std::vector<MaterialPropertyName>>(
"input_eigenstrain_names")),
32 _eigenstrains(_input_eigenstrain_names.size()),
33 _subproblem(*parameters.get<
SubProblem *>(
"_subproblem")),
34 _ncols(1 + _subproblem.
mesh().dimension()),
35 _second_order(_subproblem.
mesh().hasSecondOrderElements()),
41 _x(6, DenseVector<Real>(_ncols)),
43 _adjusted_eigenstrain()
73 for (
unsigned i = 0; i < 6; ++i)
76 for (
unsigned j = 1; j <
_ncols; ++j)
106 for (
unsigned qp = 0; qp <
_qrule->n_points(); ++qp)
122 for (
unsigned qp = 0; qp <
_qrule->n_points(); ++qp)
125 for (
unsigned j = 1; j <
_ncols; ++j)
138 for (
unsigned i = 0; i < 6; ++i)
registerMooseObject("SolidMechanicsApp", ComputeReducedOrderEigenstrain)
ComputeEigenstrainBase is the base class for eigenstrain tensors.
GenericMaterialProperty< RankTwoTensor, is_ad > & _eigenstrain
Stores the current total eigenstrain.
const std::string _base_name
Base name prepended to material property name.
static InputParameters validParams()
void initQpStatefulProperties()
const unsigned _ncols
Number of columns in A matrix (1 plus mesh dimension)
RankTwoTensor _adjusted_eigenstrain
Filled with _vals and subracted from strain.
std::vector< Real > _vals
Vector to hold the adjusted strain as computed with _x.
std::vector< RankTwoTensor > _eigsum
The sum of all eigenstrains at each integration point.
DenseVector< Real > _ATb
Transpose of A times b.
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
ComputeReducedOrderEigenstrain(const InputParameters ¶meters)
void sumEigenstrain()
Add contributions from every eigenstrain at each integration point.
void computeQpEigenstrain()
Compute the eigenstrain and store in _eigenstrain.
std::vector< DenseVector< Real > > _x
The solution vector for each unique component of the adjusted eigenstrain.
void prepareEigenstrain()
Compute either the volume average or linear eigenstrain field in an element.
DenseMatrix< Real > _A
The (num q points x ncols) array for the least squares. Holds 1, xcoor, ycoor, zcoor.
std::vector< DenseVector< Real > > _b
The b array holding the unique eigenstrain components for each integration point.
static InputParameters validParams()
DenseMatrix< Real > _AT
Transpose of A.
std::vector< MaterialPropertyName > _input_eigenstrain_names
const bool _second_order
Whether the mesh is made of second order elements.
const MooseArray< Real > & _coord
virtual void computeProperties() override
const QBase *const & _qrule
const MooseArray< Real > & _JxW
const MooseArray< Point > & _q_point
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method=autodetect)
void vector_mult(DenseVector< T > &dest, const DenseVector< T > &arg) const
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)
void resize(const unsigned int new_m, const unsigned int new_n)
void get_transpose(DenseMatrix< T > &dest) const
virtual void left_multiply(const DenseMatrixBase< T > &M2) override final