https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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 _current_side_elem(_assembly.sideElem())
28{
29 if (const auto * const ti = _sys.queryTimeIntegrator(_var.number()); ti && ti->isExplicit())
30 mooseError("HDGKernels do not currently work with explicit time integration. This is because "
31 "the facet Lagrange multiplier variable does not have a time derivative term.");
32
33 const auto coord_system = _mesh.getUniqueCoordSystem();
34 if (coord_system != Moose::COORD_XYZ)
35 mooseError("HDGKernels have not yet been coded to include coordinate system information in its "
36 "residuals/Jacobians");
37}
38
39void
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
virtual void computeJacobianOnSide()=0
HDGKernel(const InputParameters &parameters)
Definition HDGKernel.C:21
virtual void computeResidualOnSide()=0
static InputParameters validParams()
Definition HDGKernel.C:14
virtual void computeResidualAndJacobianOnSide()
Definition HDGKernel.C:40
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System.
MooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
Definition Kernel.h:72
static InputParameters validParams()
Definition Kernel.C:24
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:4306
unsigned int number() const
Get variable number coming from libMesh.
MooseMesh & _mesh
Reference to this Kernel's mesh object.
SystemBase & _sys
Reference to the EquationSystem object.
const TimeIntegrator * queryTimeIntegrator(const unsigned int var_num) const
Retrieve the time integrator that integrates the given variable's equation.
@ COORD_XYZ
Definition MooseTypes.h:865