https://mooseframework.inl.gov
HDGKernel.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 "HDGKernel.h"
11 #include "TimeIntegrator.h"
12 
15 {
17  params.registerBase("HDGKernel");
18  return params;
19 }
20 
22  : Kernel(parameters),
23  _qrule_face(_assembly.qRuleFace()),
24  _q_point_face(_assembly.qPointsFace()),
25  _JxW_face(_assembly.JxWFace()),
26  _normals(_assembly.normals())
27 {
28  if (const auto * const ti = _sys.queryTimeIntegrator(_var.number()); ti && ti->isExplicit())
29  mooseError("HDGKernels do not currently work with explicit time integration. This is because "
30  "the facet Lagrange multiplier variable does not have a time derivative term.");
31 
32  const auto coord_system = _mesh.getUniqueCoordSystem();
33  if (coord_system != Moose::COORD_XYZ)
34  mooseError("HDGKernels have not yet been coded to include coordinate system information in its "
35  "residuals/Jacobians");
36 }
37 
38 void
40 {
41  mooseError("not implemented");
42 }
MooseMesh & _mesh
Reference to this Kernel's mesh object.
HDGKernel(const InputParameters &parameters)
Definition: HDGKernel.C:21
static InputParameters validParams()
Definition: Kernel.C:24
MooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
Definition: Kernel.h:72
unsigned int number() const
Get variable number coming from libMesh.
Moose::CoordinateSystemType getUniqueCoordSystem() const
Get the coordinate system from the mesh, it must be the same in all subdomains otherwise this will er...
Definition: MooseMesh.C:4185
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual bool isExplicit() const
Returns whether the explicit solvers are used.
virtual void computeResidualAndJacobianOnSide()
Definition: HDGKernel.C:39
SystemBase & _sys
Reference to the EquationSystem object.
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System...
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
Definition: Kernel.h:15
const TimeIntegrator * queryTimeIntegrator(const unsigned int var_num) const
Retrieve the time integrator that integrates the given variable's equation.
Definition: SystemBase.C:1665
static InputParameters validParams()
Definition: HDGKernel.C:14