www.mooseframework.org
NSMomentumInviscidFluxWithGradP.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 "NSKernel.h"
13 #include "NSPressureDerivs.h"
14 
15 // ForwardDeclarations
17 
18 template <>
20 
22 {
23 public:
24  NSMomentumInviscidFluxWithGradP(const InputParameters & parameters);
25 
26 protected:
27  virtual Real computeQpResidual();
28  virtual Real computeQpJacobian();
29  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
30 
31  // Coupled gradients
32  const VariableGradient & _grad_p;
33 
34  // Parameters
35  const unsigned int _component;
36 
37 private:
38  // Computes the Jacobian contribution due to the pressure term,
39  // by summing over the appropriate Hessian row.
40  Real pressureQpJacobianHelper(unsigned var_number);
41 
42  // Single vector to refer to all gradients. We have to store
43  // pointers since you can't have a vector<Foo&>. Initialized in
44  // the ctor.
45  std::vector<const VariableGradient *> _gradU;
46 
47  // An object for computing pressure derivatives.
48  // Constructed via a reference to ourself
50 
51  // Declare ourselves friend to the helper class.
52  template <class U>
53  friend class NSPressureDerivs;
54 };
55 
validParams< NSMomentumInviscidFluxWithGradP >
InputParameters validParams< NSMomentumInviscidFluxWithGradP >()
Definition: NSMomentumInviscidFluxWithGradP.C:18
NSMomentumInviscidFluxWithGradP::_gradU
std::vector< const VariableGradient * > _gradU
Definition: NSMomentumInviscidFluxWithGradP.h:45
NSMomentumInviscidFluxWithGradP
Definition: NSMomentumInviscidFluxWithGradP.h:21
NSPressureDerivs.h
NSMomentumInviscidFluxWithGradP::_pressure_derivs
NSPressureDerivs< NSMomentumInviscidFluxWithGradP > _pressure_derivs
Definition: NSMomentumInviscidFluxWithGradP.h:49
NSMomentumInviscidFluxWithGradP::_grad_p
const VariableGradient & _grad_p
Definition: NSMomentumInviscidFluxWithGradP.h:32
NSMomentumInviscidFluxWithGradP::computeQpResidual
virtual Real computeQpResidual()
Definition: NSMomentumInviscidFluxWithGradP.C:46
NSMomentumInviscidFluxWithGradP::_component
const unsigned int _component
Definition: NSMomentumInviscidFluxWithGradP.h:35
NSMomentumInviscidFluxWithGradP::computeQpJacobian
virtual Real computeQpJacobian()
Definition: NSMomentumInviscidFluxWithGradP.C:60
NSPressureDerivs< NSMomentumInviscidFluxWithGradP >
NSMomentumInviscidFluxWithGradP::NSMomentumInviscidFluxWithGradP
NSMomentumInviscidFluxWithGradP(const InputParameters &parameters)
Definition: NSMomentumInviscidFluxWithGradP.C:28
NSKernel
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
Definition: NSKernel.h:29
NSMomentumInviscidFluxWithGradP::pressureQpJacobianHelper
Real pressureQpJacobianHelper(unsigned var_number)
Definition: NSMomentumInviscidFluxWithGradP.C:147
NSKernel.h
NSMomentumInviscidFluxWithGradP::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: NSMomentumInviscidFluxWithGradP.C:80