https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMKernel.h
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#ifdef MOOSE_MFEM_ENABLED
11
12#pragma once
13
14#include "MFEMObject.h"
15#include "MFEMContainers.h"
17
22{
23public:
25
27
28 virtual ~MFEMKernel() = default;
29
31 virtual mfem::LinearFormIntegrator * createLFIntegrator() { return nullptr; }
32
34 virtual mfem::BilinearFormIntegrator * createBFIntegrator() { return nullptr; }
35 virtual mfem::NonlinearFormIntegrator * createNLIntegrator() { return nullptr; }
36
38 const VariableName & getTestVariableName() const { return _test_var_name; }
39
42 virtual const VariableName & getTrialVariableName() const { return _test_var_name; }
43
47 virtual bool isDGKernel() const { return false; }
48
49protected:
51 const VariableName & _test_var_name;
52};
53
54#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Base class for construction of an object that is restricted to a subset of subdomains of the problem ...
Class to construct an MFEM integrator to apply to the equation system.
Definition MFEMKernel.h:22
virtual mfem::NonlinearFormIntegrator * createNLIntegrator()
Definition MFEMKernel.h:35
virtual bool isDGKernel() const
Method to disambiguate whether we have a regular kernel or a DG Kernel.
Definition MFEMKernel.h:47
virtual ~MFEMKernel()=default
const VariableName & getTestVariableName() const
Get name of the test variable labelling the weak form this kernel is added to.
Definition MFEMKernel.h:38
virtual const VariableName & getTrialVariableName() const
Get name of the trial variable (gridfunction) the kernel acts on.
Definition MFEMKernel.h:42
static InputParameters validParams()
Definition MFEMKernel.C:19
virtual mfem::LinearFormIntegrator * createLFIntegrator()
Create MFEM integrator to apply to the RHS of the weak form. Ownership managed by the caller.
Definition MFEMKernel.h:31
virtual mfem::BilinearFormIntegrator * createBFIntegrator()
Create MFEM integrator to apply to the LHS of the weak form. Ownership managed by the caller.
Definition MFEMKernel.h:34
const VariableName & _test_var_name
Name of (the test variable associated with) the weak form that the kernel is applied to.
Definition MFEMKernel.h:51
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
Definition MFEMObject.h:30
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131