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 scale and sum an arbitrary number of MFEM complex variables into an auxiliary variable. 21 : */ 22 : class MFEMComplexSumAux : public MFEMComplexAuxKernel 23 : { 24 : public: 25 : static InputParameters validParams(); 26 : 27 : MFEMComplexSumAux(const InputParameters & parameters); 28 : 29 2 : virtual ~MFEMComplexSumAux() = default; 30 : 31 : // Computes the auxvariable. 32 : virtual void execute() override; 33 : 34 : protected: 35 : // Names of input MFEMVariables to sum. 36 : const std::vector<VariableName> & _var_names; 37 : // Real scalar factors to multiply the input variables by. 38 : const std::vector<mfem::real_t> _scale_factors_real; 39 : // Imaginary scalar factors to multiply the input variables by. 40 : const std::vector<mfem::real_t> _scale_factors_imag; 41 : /// Pointers to input variable gridfunctions. 42 : std::vector<const mfem::ParComplexGridFunction *> _summed_vars; 43 : }; 44 : 45 : #endif