LCOV - code coverage report
Current view: top level - src/mfem/ics - MFEMVectorIC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 11 12 91.7 %
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 "MFEMVectorIC.h"
      13             : #include "MFEMProblem.h"
      14             : 
      15             : registerMooseObject("MooseApp", MFEMVectorIC);
      16             : 
      17             : InputParameters
      18        2802 : MFEMVectorIC::validParams()
      19             : {
      20        2802 :   auto params = MFEMInitialCondition::validParams();
      21        5604 :   params.addClassDescription("Sets the initial values of an MFEM vector variable from a "
      22             :                              "user-specified vector coefficient.");
      23        8406 :   params.addRequiredParam<MFEMVectorCoefficientName>("vector_coefficient",
      24             :                                                      "The vector coefficient");
      25        2802 :   return params;
      26           0 : }
      27             : 
      28         352 : MFEMVectorIC::MFEMVectorIC(const InputParameters & params) : MFEMInitialCondition(params) {}
      29             : 
      30             : void
      31         352 : MFEMVectorIC::execute()
      32             : {
      33         704 :   auto & coeff = getVectorCoefficient("vector_coefficient");
      34         704 :   auto grid_function = getMFEMProblem().getGridFunction(getParam<VariableName>("variable"));
      35         352 :   grid_function->ProjectCoefficient(coeff);
      36         352 : }
      37             : 
      38             : #endif

Generated by: LCOV version 1.14