LCOV - code coverage report
Current view: top level - src/mfem/auxkernels - MFEMComplexScalarProjectionAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 13 14 92.9 %
Date: 2026-05-29 20:35:17 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.14