https://mooseframework.inl.gov
MFEMComplexKernel.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 "MFEMKernel.h"
15 
16 /*
17 Class to construct an MFEM integrator to apply to the equation system.
18 */
20 {
21 public:
23 
25 
26  virtual ~MFEMComplexKernel() = default;
27 
28  virtual mfem::LinearFormIntegrator * getRealLFIntegrator()
29  {
30  return _real_kernel ? _real_kernel->createLFIntegrator() : nullptr;
31  }
32  virtual mfem::LinearFormIntegrator * getImagLFIntegrator()
33  {
34  return _imag_kernel ? _imag_kernel->createLFIntegrator() : nullptr;
35  }
36  virtual mfem::BilinearFormIntegrator * getRealBFIntegrator()
37  {
38  return _real_kernel ? _real_kernel->createBFIntegrator() : nullptr;
39  }
40  virtual mfem::BilinearFormIntegrator * getImagBFIntegrator()
41  {
42  return _imag_kernel ? _imag_kernel->createBFIntegrator() : nullptr;
43  }
44 
45  virtual void setRealKernel(std::shared_ptr<MFEMKernel> kernel) { _real_kernel = kernel; }
46  virtual void setImagKernel(std::shared_ptr<MFEMKernel> kernel) { _imag_kernel = kernel; }
47 
48  std::shared_ptr<MFEMKernel> _real_kernel{nullptr};
49  std::shared_ptr<MFEMKernel> _imag_kernel{nullptr};
50 };
51 
52 #endif
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual mfem::LinearFormIntegrator * getRealLFIntegrator()
virtual mfem::BilinearFormIntegrator * getImagBFIntegrator()
virtual mfem::LinearFormIntegrator * getImagLFIntegrator()
virtual ~MFEMComplexKernel()=default
virtual mfem::BilinearFormIntegrator * getRealBFIntegrator()
virtual void setImagKernel(std::shared_ptr< MFEMKernel > kernel)
MFEMComplexKernel(const InputParameters &parameters)
static InputParameters validParams()
virtual void setRealKernel(std::shared_ptr< MFEMKernel > kernel)
std::shared_ptr< MFEMKernel > _imag_kernel
Class to construct an MFEM integrator to apply to the equation system.
Definition: MFEMKernel.h:21
std::shared_ptr< MFEMKernel > _real_kernel