Line data Source code
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 : */ 19 : class MFEMComplexKernel : public MFEMKernel 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : 24 : MFEMComplexKernel(const InputParameters & parameters); 25 : 26 61 : virtual ~MFEMComplexKernel() = default; 27 : 28 61 : virtual mfem::LinearFormIntegrator * getRealLFIntegrator() 29 : { 30 61 : return _real_kernel ? _real_kernel->createLFIntegrator() : nullptr; 31 : } 32 61 : virtual mfem::LinearFormIntegrator * getImagLFIntegrator() 33 : { 34 61 : return _imag_kernel ? _imag_kernel->createLFIntegrator() : nullptr; 35 : } 36 61 : virtual mfem::BilinearFormIntegrator * getRealBFIntegrator() 37 : { 38 61 : return _real_kernel ? _real_kernel->createBFIntegrator() : nullptr; 39 : } 40 61 : virtual mfem::BilinearFormIntegrator * getImagBFIntegrator() 41 : { 42 61 : return _imag_kernel ? _imag_kernel->createBFIntegrator() : nullptr; 43 : } 44 : 45 61 : virtual void setRealKernel(std::shared_ptr<MFEMKernel> kernel) { _real_kernel = kernel; } 46 55 : 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