Line data Source code
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 "Kernel.h" 13 : #include "DerivativeMaterialInterface.h" 14 : #include "SubblockIndexProvider.h" 15 : #include "ADRankTwoTensorForward.h" 16 : #include "ADRankFourTensorForward.h" 17 : #include "UserObject.h" 18 : 19 : class GeneralizedPlaneStrainOffDiag : public DerivativeMaterialInterface<Kernel> 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : 24 : GeneralizedPlaneStrainOffDiag(const InputParameters & parameters); 25 : 26 : protected: 27 945344 : Real computeQpResidual() override { return 0; } 28 : 29 : /** 30 : * These methods are used to compute the off-diagonal jacobian for the coupling 31 : * between scalar variable strain_yy or strain_zz and nonlinear variables displacements and 32 : * temperature. 33 : * disp indicates the coupling is between displacements and strain_yy or strain_zz and 34 : * temp is for temperature and strain_yy or strain_zz 35 : */ 36 : void computeOffDiagJacobianScalar(unsigned int jvar) override; 37 : virtual void computeDispOffDiagJacobianScalar(unsigned int component, unsigned int jvar); 38 : virtual void computeTempOffDiagJacobianScalar(unsigned int jvar); 39 : 40 : /// Base name of the material system that this kernel applies to 41 : const std::string _base_name; 42 : 43 : const MaterialProperty<RankFourTensor> & _Jacobian_mult; 44 : const std::vector<MaterialPropertyName> _eigenstrain_names; 45 : std::vector<const MaterialProperty<RankTwoTensor> *> _deigenstrain_dT; 46 : 47 : /// Variable number of the out-of-plane strain scalar variable 48 : unsigned int _scalar_out_of_plane_strain_var; 49 : 50 : /// A Userobject that carries the subblock ID for all elements 51 : const SubblockIndexProvider * const _subblock_id_provider; 52 : const unsigned int _scalar_var_id; 53 : 54 : MooseVariable * _temp_var; 55 : 56 : const unsigned int _num_disp_var; 57 : std::vector<MooseVariable *> _disp_var; 58 : 59 : /// The direction of the out-of-plane strain 60 : unsigned int _scalar_out_of_plane_strain_direction; 61 : 62 : /// Member variable to avoid constant dense matrix heap allocations 63 : DenseMatrix<Number> _ke_copy; 64 : };