www.mooseframework.org
GeneralizedPlaneStrain.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "GeneralizedPlaneStrain.h"
11 
12 // MOOSE includes
13 #include "Assembly.h"
15 #include "MooseVariableScalar.h"
16 #include "SystemBase.h"
18 #include "InputParameters.h"
19 
20 #include <algorithm>
21 
22 registerMooseObject("SolidMechanicsApp", GeneralizedPlaneStrain);
23 
26 {
28  params.addClassDescription("Generalized Plane Strain Scalar Kernel");
29  params.addRequiredParam<UserObjectName>("generalized_plane_strain",
30  "The name of the GeneralizedPlaneStrainUserObject");
31  params.addParam<unsigned int>(
32  "scalar_out_of_plane_strain_index",
33  "The index number of scalar_out_of_plane_strain this kernel acts on");
34 
35  return params;
36 }
37 
39  : ScalarKernel(parameters),
40  _gps(getUserObject<GeneralizedPlaneStrainUOInterface>("generalized_plane_strain")),
41  _scalar_var_id(isParamValid("scalar_out_of_plane_strain_index")
42  ? getParam<unsigned int>("scalar_out_of_plane_strain_index")
43  : 0)
44 {
45 }
46 
47 void
49 {
51  for (_i = 0; _i < _local_re.size(); ++_i)
54 
56  for (_i = 0; _i < _local_re.size(); ++_i)
59 }
60 
66 void
68 {
70  for (_i = 0; _i < _local_ke.m(); ++_i)
72 
74 }
virtual Real returnJacobian(unsigned int scalar_var_id=0) const =0
void accumulateTaggedLocalResidual()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
unsigned int _i
unsigned int number() const
virtual void computeJacobian() override
method to provide the diagonal jacobian term for scalar variable using value returned from Postproces...
virtual Real returnResidual(unsigned int scalar_var_id=0) const =0
const GeneralizedPlaneStrainUOInterface & _gps
const unsigned int _scalar_var_id
MooseVariableScalar & _var
unsigned int m() const
DenseMatrix< Number > _local_ke
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObject("SolidMechanicsApp", GeneralizedPlaneStrain)
virtual Real returnReferenceResidual(unsigned int scalar_var_id=0) const =0
virtual void computeResidual() override
void accumulateTaggedLocalMatrix()
Interface class for user objects that interface with the generalized plane strain kernel...
Assembly & _assembly
static InputParameters validParams()
DenseVector< Number > _local_re
virtual unsigned int size() const override final
void addClassDescription(const std::string &doc_string)
GeneralizedPlaneStrain(const InputParameters &parameters)
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
void ErrorVector unsigned int
static InputParameters validParams()