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 "libmesh/ignore_warnings.h" 15 : #include "mfem/miniapps/common/pfem_extras.hpp" 16 : #include "libmesh/restore_warnings.h" 17 : #include "MFEMComplexAuxKernel.h" 18 : 19 : /** 20 : * Class to set an H(div) auxvariable to be the curl of an H(curl) vector variable. 21 : */ 22 : class MFEMComplexCurlAux : public MFEMComplexAuxKernel 23 : { 24 : public: 25 : static InputParameters validParams(); 26 : 27 : MFEMComplexCurlAux(const InputParameters & parameters); 28 : 29 2 : virtual ~MFEMComplexCurlAux() = default; 30 : 31 : /// Computes the auxvariable. 32 : virtual void execute() override; 33 : 34 : // Updates curl operator. 35 : virtual void update() override; 36 : 37 : protected: 38 : /// Name of source MFEMComplexVariable to take the curl of. 39 : const VariableName _source_var_name; 40 : /// Reference to source gridfunction. 41 : mfem::ParComplexGridFunction & _source_var; 42 : /// Scalar factor to multiply the result by. 43 : const std::complex<mfem::real_t> _scale_factor; 44 : /// Curl operator 45 : mfem::common::ParDiscreteCurlOperator _curl; 46 : }; 47 : 48 : #endif