www.mooseframework.org
ComputeReducedOrderEigenstrain.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 #include "RankTwoTensor.h"
10 
11 // libmesh includes
12 #include "libmesh/dense_matrix.h"
13 #include "libmesh/dense_vector.h"
14 
15 class Assembly;
16 class InputParameters;
17 class MooseObject;
18 class SubProblem;
19 
21 {
22 public:
23  ComputeReducedOrderEigenstrain(const InputParameters & parameters);
24 
26  void computeProperties();
27  void computeQpEigenstrain();
28 
29 private:
31  void applyEigenstrain(MaterialProperty<RankTwoTensor> & strain);
32 
34  void sumEigenstrain();
35 
37  void prepareEigenstrain();
38 
39  std::vector<MaterialPropertyName> _input_eigenstrain_names;
40  std::vector<const MaterialProperty<RankTwoTensor> *> _eigenstrains;
41  std::vector<const MaterialProperty<RankTwoTensor> *> _eigenstrains_old;
42 
43  SubProblem & _subproblem;
45  const unsigned _ncols;
47  const bool _second_order;
49  std::vector<RankTwoTensor> _eigsum;
51  DenseMatrix<Real> _A;
53  std::vector<DenseVector<Real>> _b;
55  DenseMatrix<Real> _AT;
57  DenseVector<Real> _ATb;
59  std::vector<DenseVector<Real>> _x;
61  std::vector<Real> _vals;
63  RankTwoTensor _adjusted_eigenstrain;
64 };
65 
66 template <>
std::vector< RankTwoTensor > _eigsum
The sum of all eigenstrains at each integration point.
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains_old
void prepareEigenstrain()
Compute either the volume average or linear eigenstrain field in an element.
RankTwoTensor _adjusted_eigenstrain
Filled with _vals and subracted from strain.
const unsigned _ncols
Number of columns in A matrix (1 plus mesh dimension)
std::vector< DenseVector< Real > > _b
The b array holding the unique eigenstrain components for each integration point. ...
DenseMatrix< Real > _A
The (num q points x ncols) array for the least squares. Holds 1, xcoor, ycoor, zcoor.
InputParameters validParams< ComputeReducedOrderEigenstrain >()
DenseVector< Real > _ATb
Transpose of A times b.
ComputeReducedOrderEigenstrain(const InputParameters &parameters)
const bool _second_order
Whether the mesh is made of second order elements.
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
void sumEigenstrain()
Add contributions from every eigenstrain at each integration point.
std::vector< DenseVector< Real > > _x
The solution vector for each unique component of the adjusted eigenstrain.
void applyEigenstrain(MaterialProperty< RankTwoTensor > &strain)
Subtract adjusted eigenstrain from strain.
DenseMatrix< Real > _AT
Transpose of A.
std::vector< Real > _vals
Vector to hold the adjusted strain as computed with _x.
ComputeEigenstrainBase is the base class for eigenstrain tensors.
std::vector< MaterialPropertyName > _input_eigenstrain_names
void computeQpEigenstrain()
Compute the eigenstrain and store in _eigenstrain.