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 "MFEMComplexScalarDirichletBC.h" 13 : 14 : registerMooseObject("MooseApp", MFEMComplexScalarDirichletBC); 15 : 16 : InputParameters 17 2218 : MFEMComplexScalarDirichletBC::validParams() 18 : { 19 2218 : InputParameters params = MFEMComplexEssentialBC::validParams(); 20 4436 : params.addClassDescription("Applies a Dirichlet condition to a scalar variable."); 21 8872 : params.addParam<MFEMScalarCoefficientName>( 22 : "coefficient_real", 23 : "0.", 24 : "The coefficient setting the real part of the values on the essential boundary"); 25 6654 : params.addParam<MFEMScalarCoefficientName>( 26 : "coefficient_imag", 27 : "0.", 28 : "The coefficient setting the imaginary part of the values on the essential boundary"); 29 : 30 2218 : return params; 31 0 : } 32 : 33 60 : MFEMComplexScalarDirichletBC::MFEMComplexScalarDirichletBC(const InputParameters & parameters) 34 : : MFEMComplexEssentialBC(parameters), 35 60 : _coef_real(getScalarCoefficient("coefficient_real")), 36 180 : _coef_imag(getScalarCoefficient("coefficient_imag")) 37 : { 38 60 : } 39 : 40 : void 41 60 : MFEMComplexScalarDirichletBC::ApplyBC(mfem::ParComplexGridFunction & gridfunc) 42 : { 43 60 : gridfunc.ProjectBdrCoefficient(_coef_real, _coef_imag, getBoundaryMarkers()); 44 60 : } 45 : 46 : #endif