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 "Compute2DSmallStrain.h" 13 : #include "SubblockIndexProvider.h" 14 : 15 : /** 16 : * ComputePlaneSmallStrain defines small strains under generalized 17 : * plane strain and plane stress assumptions, where the out of plane strain 18 : * can be uniformly or non-uniformly zero or nonzero. 19 : */ 20 : class ComputePlaneSmallStrain : public Compute2DSmallStrain 21 : { 22 : public: 23 : static InputParameters validParams(); 24 : 25 : ComputePlaneSmallStrain(const InputParameters & parameters); 26 : 27 : protected: 28 : virtual Real computeOutOfPlaneStrain(); 29 : 30 : /// gets its subblock index for current element 31 197088 : unsigned int getCurrentSubblockIndex() const 32 : { 33 197088 : return _subblock_id_provider ? _subblock_id_provider->getSubblockIndex(*_current_elem) : 0; 34 : }; 35 : 36 : /// A Userobject that carries the subblock ID for all elements 37 : const SubblockIndexProvider * const _subblock_id_provider; 38 : 39 : private: 40 : /// Whether out-of-plane strain scalar variables are coupled 41 : const bool _scalar_out_of_plane_strain_coupled; 42 : 43 : /// Whether an out-of-plane strain variable is coupled 44 : const bool _out_of_plane_strain_coupled; 45 : 46 : /// The out-of-plane strain variable 47 : const VariableValue & _out_of_plane_strain; 48 : 49 : /// The out-of-plane strain scalar variables 50 : std::vector<const VariableValue *> _scalar_out_of_plane_strain; 51 : };