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 : #include "MFEMComplexVectorProjectionAux.h" 13 : 14 : registerMooseObject("MooseApp", MFEMComplexVectorProjectionAux); 15 : 16 : InputParameters 17 2102 : MFEMComplexVectorProjectionAux::validParams() 18 : { 19 2102 : InputParameters params = MFEMComplexAuxKernel::validParams(); 20 4204 : params.addClassDescription( 21 : "Projects a a real and imaginary vector coefficient onto a complex vector MFEM auxvariable."); 22 8408 : params.addRequiredParam<MFEMVectorCoefficientName>( 23 : "vector_coefficient_real", "Name of the real part of the vector coefficient to project."); 24 6306 : params.addRequiredParam<MFEMVectorCoefficientName>( 25 : "vector_coefficient_imag", 26 : "Name of the imaginary part of the vector coefficient to project."); 27 2102 : return params; 28 0 : } 29 : 30 2 : MFEMComplexVectorProjectionAux::MFEMComplexVectorProjectionAux(const InputParameters & parameters) 31 : : MFEMComplexAuxKernel(parameters), 32 2 : _vec_coef_real(getVectorCoefficient("vector_coefficient_real")), 33 6 : _vec_coef_imag(getVectorCoefficient("vector_coefficient_imag")) 34 : { 35 2 : } 36 : 37 : void 38 2 : MFEMComplexVectorProjectionAux::execute() 39 : { 40 2 : _result_var.ProjectCoefficient(_vec_coef_real, _vec_coef_imag); 41 2 : } 42 : 43 : #endif