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 "MFEMComplexAuxKernel.h" 15 : 16 : /** 17 : * Project \f$ s \vec u \cdot \vec v* \f$ onto a complex scalar MFEM auxvariable. 18 : * 19 : * Notes: 20 : * - The target variable's FE Space must be L2. 21 : * - Currently supports only interior DOFs (no shared/constrained DOFs). 22 : */ 23 : class MFEMComplexInnerProductAux : public MFEMComplexAuxKernel 24 : { 25 : public: 26 : static InputParameters validParams(); 27 : 28 : MFEMComplexInnerProductAux(const InputParameters & parameters); 29 2 : ~MFEMComplexInnerProductAux() override = default; 30 : 31 : void execute() override; 32 : 33 : protected: 34 : /// Scaling factor applied on the resulting field 35 : const std::complex<mfem::real_t> _scale_factor; 36 : 37 : /// Coefficient wrappers 38 : mfem::VectorCoefficient & _u_coef_real; 39 : mfem::VectorCoefficient & _u_coef_imag; 40 : mfem::VectorCoefficient & _v_coef_real; 41 : mfem::VectorCoefficient & _v_coef_imag; 42 : 43 : mfem::InnerProductCoefficient _dot_ur_vr; 44 : mfem::InnerProductCoefficient _dot_ur_vi; 45 : mfem::InnerProductCoefficient _dot_ui_vr; 46 : mfem::InnerProductCoefficient _dot_ui_vi; 47 : 48 : ///Final coefficient that sums the inner product terms 49 : mfem::SumCoefficient _final_coef_real; 50 : mfem::SumCoefficient _final_coef_imag; 51 : }; 52 : 53 : #endif // MOOSE_MFEM_ENABLED