https://mooseframework.inl.gov
HomogenizationConstraint.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 "ElementUserObject.h"
13 
14 // Helpers common to the whole homogenization system
15 namespace Homogenization
16 {
18 const MultiMooseEnum constraintType("strain stress none");
20 enum class ConstraintType
21 {
22  Strain,
23  Stress,
24  None
25 };
26 typedef std::map<std::pair<unsigned int, unsigned int>, std::pair<ConstraintType, const Function *>>
28 }
29 
39 {
40 public:
42 
44 
45  virtual void initialize() override;
46  virtual void execute() override;
47  virtual void threadJoin(const UserObject & y) override;
48  virtual void finalize() override;
49 
50  virtual const RankTwoTensor & getResidual() const { return _residual; }
51  virtual const RankFourTensor & getJacobian() const { return _jacobian; }
52  virtual const Homogenization::ConstraintMap & getConstraintMap() const { return _cmap; }
53 
54 protected:
59 
60 protected:
62  const bool _large_kinematics;
63 
65  const std::string _base_name;
66 
73 
76 
77 private:
79  unsigned int _qp;
80 
85 };
std::map< std::pair< unsigned int, unsigned int >, std::pair< ConstraintType, const Function * > > ConstraintMap
virtual RankTwoTensor computeResidual()
Total residual assembled as a rank two tensor.
virtual void initialize() override
RankTwoTensor _residual
The assembled tensor residual.
virtual void threadJoin(const UserObject &y) override
const std::vector< double > y
const MaterialProperty< RankTwoTensor > & _F
Deformation gradient.
RankFourTensor _jacobian
The assembled tensor jacobian.
Computes ${V}(X_{ij}-{X}_{ij})dV$.
static InputParameters validParams()
unsigned int _qp
Used to loop through quadrature points.
virtual void finalize() override
ConstraintType
Constraint type: stress/PK stress or strain/deformation gradient.
virtual void execute() override
const InputParameters & parameters() const
virtual const RankTwoTensor & getResidual() const
const MultiMooseEnum constraintType("strain stress none")
Moose constraint type, for input.
Homogenization::ConstraintMap _cmap
Type of each constraint (stress or strain) for each component.
const std::string _base_name
Prepend to the material properties.
virtual RankFourTensor computeJacobian()
Total Jacobian assembled as a rank two tensor.
const MaterialProperty< RankFourTensor > & _pk1_jacobian
PK derivative.
const MaterialProperty< RankTwoTensor > & _pk1_stress
1st PK (or small) stress
virtual const Homogenization::ConstraintMap & getConstraintMap() const
const bool _large_kinematics
If true use large displacement kinematics.
virtual const RankFourTensor & getJacobian() const
HomogenizationConstraint(const InputParameters &parameters)