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 
21 HDGKernel::HDGKernel(const InputParameters & parameters) : Kernel(parameters)
22 {
23  if (const auto * const ti = _sys.queryTimeIntegrator(_var.number()); ti && ti->isExplicit())
24  mooseError("HDGKernels do not currently work with explicit time integration. This is because "
25  "the facet Lagrange multiplier variable does not have a time derivative term.");
26 
27  const auto coord_system = _mesh.getUniqueCoordSystem();
28  if (coord_system != Moose::COORD_XYZ)
29  mooseError("HDGKernels have not yet been coded to include coordinate system information in its "
30  "residuals/Jacobians");
31 }
32 
33 void
35 {
36  mooseError("not implemented");
37 }
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:4154
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:34
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...
Definition: Kernel.h:15
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const TimeIntegrator * queryTimeIntegrator(const unsigned int var_num) const
Retrieve the time integrator that integrates the given variable's equation.
Definition: SystemBase.C:1640
static InputParameters validParams()
Definition: HDGKernel.C:14