https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MassMatrixDGKernel.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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 "MassMatrixDGKernel.h"
11#include "MassMatrix.h"
12
14
17{
20 "Computes a finite element mass matrix on internal faces meant for use in "
21 "preconditioning schemes which require one");
23 params.addParam<Real>("density", 1, "The density");
24 return params;
25}
26
28 : DGKernel(parameters), _density(getParam<Real>("density")), _hmax(0)
29{
30 if (!isParamValid("matrix_tags") && !isParamValid("extra_matrix_tags"))
31 mooseError("One of 'matrix_tags' or 'extra_matrix_tags' must be provided");
32}
33
34Real
36{
37 mooseAssert(false, "should never be called");
38 return 0;
39}
40
41void
46
47Real
49{
50 Real jac = 0;
51
52 switch (type)
53 {
55 jac = _test[_i][_qp] * _density * _hmax * _phi[_j][_qp];
56 break;
57
58 default:
59 jac = 0;
60 break;
61 }
62
63 return jac;
64}
registerMooseObject("NavierStokesApp", MassMatrixDGKernel)
const Elem *const & _current_side_elem
unsigned int _i
unsigned int _qp
unsigned int _j
static InputParameters validParams()
const VariableTestValue & _test
const VariablePhiValue & _phi
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
This class can be used to compute a mass matrix for facet unknowns, e.g.
void precalculateJacobian() override
virtual Real computeQpJacobian(const Moose::DGJacobianType type) override
virtual Real computeQpResidual(Moose::DGResidualType) override
Real _hmax
Facet characteristic length for correct norm computations.
MassMatrixDGKernel(const InputParameters &parameters)
static InputParameters validParams()
static void setMassMatrixParams(InputParameters &params)
const std::string & type() const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
DGResidualType
DGJacobianType
ElementElement