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 
12 #include "DenseMatrix.h"
13 #include "ComputeEigenstrainBase.h"
14 #include "RankTwoTensor.h"
15 
16 // libmesh includes
17 #include "libmesh/dense_vector.h"
18 
19 class Assembly;
20 class InputParameters;
21 class MooseObject;
22 class SubProblem;
23 
25 {
26 public:
28 
30 
32  void computeProperties();
33  void computeQpEigenstrain();
34 
35 private:
38 
40  void sumEigenstrain();
41 
43  void prepareEigenstrain();
44 
45  std::vector<MaterialPropertyName> _input_eigenstrain_names;
46  std::vector<const MaterialProperty<RankTwoTensor> *> _eigenstrains;
47 
50  const unsigned _ncols;
52  const bool _second_order;
54  std::vector<RankTwoTensor> _eigsum;
58  std::vector<DenseVector<Real>> _b;
62  DenseVector<Real> _ATb;
64  std::vector<DenseVector<Real>> _x;
66  std::vector<Real> _vals;
69 };
std::vector< RankTwoTensor > _eigsum
The sum of all eigenstrains at each integration point.
const InputParameters & parameters() const
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.
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.