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 "MFEMIntegratedBC.h" 15 : 16 : class MFEMComplexIntegratedBC : public MFEMBoundaryCondition 17 : { 18 : public: 19 : static InputParameters validParams(); 20 : 21 : MFEMComplexIntegratedBC(const InputParameters & parameters); 22 16 : virtual ~MFEMComplexIntegratedBC() = default; 23 : 24 4 : virtual mfem::LinearFormIntegrator * getRealLFIntegrator() 25 : { 26 4 : return _real_bc->createLFIntegrator(); 27 : } 28 4 : virtual mfem::LinearFormIntegrator * getImagLFIntegrator() 29 : { 30 4 : return _imag_bc->createLFIntegrator(); 31 : } 32 4 : virtual mfem::BilinearFormIntegrator * getRealBFIntegrator() 33 : { 34 4 : return _real_bc->createBFIntegrator(); 35 : } 36 4 : virtual mfem::BilinearFormIntegrator * getImagBFIntegrator() 37 : { 38 4 : return _imag_bc->createBFIntegrator(); 39 : } 40 : 41 4 : virtual void setRealBC(std::shared_ptr<MFEMIntegratedBC> bc) { _real_bc = bc; } 42 4 : virtual void setImagBC(std::shared_ptr<MFEMIntegratedBC> bc) { _imag_bc = bc; } 43 : 44 : /// Get name of the trial variable (gridfunction) the bc acts on. 45 : /// Defaults to the name of the test variable labelling the weak form. 46 12 : virtual const std::string & getTrialVariableName() const { return _test_var_name; } 47 : 48 : protected: 49 : std::shared_ptr<MFEMIntegratedBC> _real_bc{nullptr}; 50 : std::shared_ptr<MFEMIntegratedBC> _imag_bc{nullptr}; 51 : }; 52 : 53 : #endif