CoupledScalarAux::CoupledScalarAux(const InputParameters & parameters) : AuxKernel(parameters), _lag(getParam<MooseEnum>("lag")), _coupled_val(_lag == 0 ? coupledScalarValue("coupled") : (_lag == 1 ? coupledScalarValueOld("coupled") : coupledScalarValueOlder("coupled"))), _component(getParam<unsigned int>("component")) { if (_component >= coupledScalarOrder("coupled")) mooseError("component is higher than or equal to the scalar variable order"); }
NonlinearPlaneStrain::NonlinearPlaneStrain( SolidModel & solid_model, const std::string & name, const InputParameters & parameters ) :Nonlinear( solid_model, name, parameters ), ScalarCoupleable(parameters), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")), _have_strain_zz(isCoupled("strain_zz")), _strain_zz(_have_strain_zz?coupledValue("strain_zz"):_zero), _have_scalar_strain_zz(isCoupledScalar("scalar_strain_zz")), _scalar_strain_zz(_have_scalar_strain_zz?coupledScalarValue("scalar_strain_zz"):_zero), _grad_disp_x_old(coupledGradientOld("disp_x")), _grad_disp_y_old(coupledGradientOld("disp_y")), _strain_zz_old(_have_strain_zz?coupledValueOld("strain_zz"):_zero), _scalar_strain_zz_old(_have_scalar_strain_zz?coupledScalarValueOld("scalar_strain_zz"):_zero) { }
ComputePlaneIncrementalStrain::ComputePlaneIncrementalStrain(const InputParameters & parameters) : Compute2DIncrementalStrain(parameters), _scalar_out_of_plane_strain_coupled(isCoupledScalar("scalar_out_of_plane_strain")), _scalar_out_of_plane_strain(_scalar_out_of_plane_strain_coupled ? coupledScalarValue("scalar_out_of_plane_strain") : _zero), _scalar_out_of_plane_strain_old(_scalar_out_of_plane_strain_coupled ? coupledScalarValueOld("scalar_out_of_plane_strain") : _zero), _out_of_plane_strain_coupled(isCoupled("out_of_plane_strain")), _out_of_plane_strain(_out_of_plane_strain_coupled ? coupledValue("out_of_plane_strain") : _zero), _out_of_plane_strain_old(_out_of_plane_strain_coupled ? coupledValueOld("out_of_plane_strain") : _zero) { if (_out_of_plane_strain_coupled && _scalar_out_of_plane_strain_coupled) mooseError("Must define only one of out_of_plane_strain or scalar_out_of_plane_strain"); }
ComputeAxisymmetric1DIncrementalStrain::ComputeAxisymmetric1DIncrementalStrain( const InputParameters & parameters) : Compute1DIncrementalStrain(parameters), _disp_old_0(coupledValueOld("displacements", 0)), _subblock_id_provider(isParamValid("subblock_index_provider") ? &getUserObject<SubblockIndexProvider>("subblock_index_provider") : nullptr), _has_out_of_plane_strain(isParamValid("out_of_plane_strain")), _out_of_plane_strain(_has_out_of_plane_strain ? coupledValue("out_of_plane_strain") : _zero), _out_of_plane_strain_old(_has_out_of_plane_strain ? coupledValueOld("out_of_plane_strain") : _zero), _has_scalar_out_of_plane_strain(isParamValid("scalar_out_of_plane_strain")), _nscalar_strains( _has_scalar_out_of_plane_strain ? coupledScalarComponents("scalar_out_of_plane_strain") : 0) { if (_has_out_of_plane_strain && _has_scalar_out_of_plane_strain) mooseError("Must define only one of out_of_plane_strain or scalar_out_of_plane_strain"); if (!_has_out_of_plane_strain && !_has_scalar_out_of_plane_strain) mooseError("Must define either out_of_plane_strain or scalar_out_of_plane_strain"); // in case when the provided scalar_out_of_plane_strain is not a coupled // scalar variable, still set _nscalar_strains = 1 but return its default value 0 if (coupledScalarComponents("scalar_out_of_plane_strain") == 0) _nscalar_strains = 1; if (_has_scalar_out_of_plane_strain) { _scalar_out_of_plane_strain.resize(_nscalar_strains); _scalar_out_of_plane_strain_old.resize(_nscalar_strains); for (unsigned int i = 0; i < _nscalar_strains; ++i) { _scalar_out_of_plane_strain[i] = &coupledScalarValue("scalar_out_of_plane_strain", i); _scalar_out_of_plane_strain_old[i] = &coupledScalarValueOld("scalar_out_of_plane_strain", i); } } }
ComputePlaneFiniteStrain::ComputePlaneFiniteStrain(const InputParameters & parameters) : Compute2DFiniteStrain(parameters), _scalar_strain_zz(isCoupledScalar("scalar_strain_zz") ? coupledScalarValue("scalar_strain_zz") : _zero), _scalar_strain_zz_old(isCoupledScalar("scalar_strain_zz") ? coupledScalarValueOld("scalar_strain_zz") : _zero) { }