https://mooseframework.inl.gov
MassFluxPenaltyIPHDG.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 "HDGKernel.h"
13 
14 /*
15  * Imposes a singular perturbation on the component momentum equations penalizing discontinuities in
16  * mass flux. Similar to \p MassFluxPenalty except it does not couple interior degrees of freedom on
17  * neighboring elements, which makes this class useful in tandem with hybridized discretizations
18  * because it supports static condensation
19  */
21 {
22 public:
24 
26 
27  virtual void computeResidual() override {}
28  virtual void computeJacobian() override {}
29  virtual void computeOffDiagJacobian(unsigned int) override {}
30  virtual void computeResidualOnSide() override;
31  virtual void computeJacobianOnSide() override;
32 
33 protected:
35 
48  const unsigned short _comp;
49  const Real _gamma;
50 
51  std::vector<Real> _residuals;
52  std::vector<ADReal> _ad_residuals;
53 
54 private:
60  template <typename T>
61  void computeOnSideHelper(std::vector<T> & residuals,
62  const MooseArray<std::vector<Real>> & test,
63  Real sign);
64 };
const ADVariableValue & _vel_x_face
std::vector< Real > _residuals
const unsigned short _comp
const MooseArray< std::vector< Real > > & _vel_x_face_phi
const MooseVariableField< Real > & _vel_y_face_var
const InputParameters & parameters() const
const ADVariableValue & _vel_x
static InputParameters validParams()
virtual void computeResidualOnSide() override
DualNumber< Real, DNDerivativeType, true > ADReal
virtual void computeJacobian() override
const MooseVariableField< Real > & _vel_y_var
virtual void computeOffDiagJacobian(unsigned int) override
virtual void computeJacobianOnSide() override
std::vector< ADReal > _ad_residuals
const MooseVariableField< Real > & _vel_x_var
const MooseArray< std::vector< Real > > & _vel_x_phi
const MooseArray< std::vector< Real > > & _vel_y_phi
const MooseArray< std::vector< Real > > & _vel_y_face_phi
virtual void computeResidual() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADVariableValue & _vel_y
MassFluxPenaltyIPHDG(const InputParameters &parameters)
void computeOnSideHelper(std::vector< T > &residuals, const MooseArray< std::vector< Real >> &test, Real sign)
Helper method to reduce code duplication, this will multiply quadrature point residuals corresponding...
const ADVariableValue & _vel_y_face
const MooseVariableField< Real > & _vel_x_face_var