www.mooseframework.org
Pressure.h
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 #pragma once
11 
12 #include "ADIntegratedBC.h"
13 #include "IntegratedBC.h"
14 #include "MooseTypes.h"
15 
16 #include "MooseTypes.h"
17 #include "libmesh/quadrature_gauss.h"
18 
19 class Function;
20 
25 template <bool is_ad>
26 using PressureParent = typename std::conditional<is_ad, ADIntegratedBC, IntegratedBC>::type;
27 
28 template <bool is_ad>
29 class PressureTempl : public PressureParent<is_ad>
30 {
31 public:
33 
34  PressureTempl(const InputParameters & parameters);
35 
36 protected:
37  virtual void initialSetup() override;
38  virtual GenericReal<is_ad> computeQpResidual() override;
39 
41 
43  unsigned int _component;
44 
46  const unsigned int _ndisp;
47 
49  const Real _factor;
50  const Function * const _function;
53 
55  const Real _alpha;
56 
58  std::vector<unsigned int> _disp_var;
59 
60  const FEBase * const & _fe_side;
61  const std::vector<RealGradient> * _q_dxi;
62  const std::vector<RealGradient> * _q_deta;
63  const std::vector<std::vector<Real>> * _phi_dxi;
64  const std::vector<std::vector<Real>> * _phi_deta;
65  const bool _use_displaced_mesh;
66 
67  // One FE for each thread
68  std::vector<std::unique_ptr<FEBase>> _fe;
69 
70  std::map<unsigned int, unsigned int> _node_map;
71 
74 
87 };
88 
89 class Pressure : public PressureTempl<false>
90 {
91 public:
93 
94 protected:
95  virtual Real computeQpJacobian() override;
96  virtual void precalculateQpJacobian() override;
97  virtual Real computeQpOffDiagJacobian(const unsigned int jvar_num) override;
98  virtual void precalculateQpOffDiagJacobian(const MooseVariableFEBase & jvar) override;
99 
100  Real computeStiffness(const unsigned int coupled_component);
101  Real computeFaceStiffness(const unsigned int local_j, const unsigned int coupled_component);
102 };
103 
const FEBase *const & _fe_side
Definition: Pressure.h:60
const Function *const _function
Definition: Pressure.h:50
Real computeFaceStiffness(const unsigned int local_j, const unsigned int coupled_component)
Definition: Pressure.C:122
std::map< unsigned int, unsigned int > _node_map
Definition: Pressure.h:70
virtual void precalculateQpOffDiagJacobian(const MooseVariableFEBase &jvar) override
Definition: Pressure.C:263
virtual Real computeQpOffDiagJacobian(const unsigned int jvar_num) override
Definition: Pressure.C:199
const unsigned int _ndisp
Number of displacement variables.
Definition: Pressure.h:46
virtual GenericReal< is_ad > computeQpResidual() override
Definition: Pressure.C:101
const Real _alpha
_alpha Parameter for HHT time integration scheme
Definition: Pressure.h:55
const bool _use_displaced_mesh
Definition: Pressure.h:65
std::vector< std::unique_ptr< FEBase > > _fe
Definition: Pressure.h:68
const Real _factor
Pressure value constant factor, function factor, and postprocessor factor.
Definition: Pressure.h:49
std::vector< unsigned int > _disp_var
Variable numbers of coupled displacement variables.
Definition: Pressure.h:58
const std::vector< RealGradient > * _q_dxi
Definition: Pressure.h:61
Real PostprocessorValue
virtual Real computeQpJacobian() override
Definition: Pressure.C:190
PressureTempl< true > ADPressure
Definition: Pressure.h:104
PressureTempl(const InputParameters &parameters)
Definition: Pressure.C:42
const PostprocessorValue *const _postprocessor
Definition: Pressure.h:51
FEGenericBase< Real > FEBase
const std::vector< std::vector< Real > > * _phi_deta
Definition: Pressure.h:64
Real computeStiffness(const unsigned int coupled_component)
Definition: Pressure.C:163
const std::vector< RealGradient > * _q_deta
Definition: Pressure.h:62
const std::vector< std::vector< Real > > * _phi_dxi
Definition: Pressure.h:63
usingTransientInterfaceMembers
Definition: Pressure.h:75
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _component
displacement component to apply the bc to
Definition: Pressure.h:43
CoordinateSystemType
typename std::conditional< is_ad, ADIntegratedBC, IntegratedBC >::type PressureParent
Pressure applies a pressure on a given boundary in the direction defined by component.
Definition: Pressure.h:26
Moose::CoordinateSystemType _coord_type
Coordinate system type.
Definition: Pressure.h:73
typename Moose::GenericType< Real, is_ad > GenericReal
virtual void precalculateQpJacobian() override
Definition: Pressure.C:210
static InputParameters validParams()
Definition: Pressure.C:21
GenericReal< is_ad > computeFactor() const
Definition: Pressure.C:108
virtual void initialSetup() override
Definition: Pressure.C:81