https://mooseframework.inl.gov
ComputeReducedOrderEigenstrain.h
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 
10 #pragma once
11 #include "DenseMatrix.h"
12 #include "ComputeEigenstrainBase.h"
13 #include "RankTwoTensor.h"
14 
15 // libmesh includes
16 #include "libmesh/dense_vector.h"
17 
18 class Assembly;
19 class InputParameters;
20 class MooseObject;
21 class SubProblem;
22 
24 {
25 public:
27 
29 
31  void computeProperties();
32  void computeQpEigenstrain();
33 
34 private:
37 
39  void sumEigenstrain();
40 
42  void prepareEigenstrain();
43 
44  std::vector<MaterialPropertyName> _input_eigenstrain_names;
45  std::vector<const MaterialProperty<RankTwoTensor> *> _eigenstrains;
46 
49  const unsigned _ncols;
51  const bool _second_order;
53  std::vector<RankTwoTensor> _eigsum;
57  std::vector<DenseVector<Real>> _b;
61  DenseVector<Real> _ATb;
63  std::vector<DenseVector<Real>> _x;
65  std::vector<Real> _vals;
68 };
std::vector< RankTwoTensor > _eigsum
The sum of all eigenstrains at each integration point.
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.
DenseVector< Real > _ATb
Transpose of A times b.
ComputeReducedOrderEigenstrain(const InputParameters &parameters)
ComputeEigenstrainBase is the base class for eigenstrain tensors.
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.
const InputParameters & parameters() const
std::vector< Real > _vals
Vector to hold the adjusted strain as computed with _x.
std::vector< MaterialPropertyName > _input_eigenstrain_names
void computeQpEigenstrain()
Compute the eigenstrain and store in _eigenstrain.