LCOV - code coverage report
Current view: top level - include/mfem/kernels - MFEMKernel.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 5 5 100.0 %
Date: 2025-08-08 20:01:16 Functions: 5 6 83.3 %
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             : #pragma once
      13             : 
      14             : #include "MFEMGeneralUserObject.h"
      15             : #include "MFEMContainers.h"
      16             : #include "MFEMBlockRestrictable.h"
      17             : 
      18             : /**
      19             :  * Class to construct an MFEM integrator to apply to the equation system.
      20             :  */
      21             : class MFEMKernel : public MFEMGeneralUserObject, public MFEMBlockRestrictable
      22             : {
      23             : public:
      24             :   static InputParameters validParams();
      25             : 
      26             :   MFEMKernel(const InputParameters & parameters);
      27             : 
      28         328 :   virtual ~MFEMKernel() = default;
      29             : 
      30             :   /// Create a new MFEM integrator to apply to the weak form. Ownership managed by the caller.
      31         358 :   virtual mfem::LinearFormIntegrator * createLFIntegrator() { return nullptr; }
      32          43 :   virtual mfem::BilinearFormIntegrator * createBFIntegrator() { return nullptr; }
      33             : 
      34             :   /// Get name of the test variable labelling the weak form this kernel is added to
      35         686 :   const VariableName & getTestVariableName() const { return _test_var_name; }
      36             : 
      37             :   /// Get name of the trial variable (gridfunction) the kernel acts on.
      38             :   /// Defaults to the name of the test variable labelling the weak form.
      39         571 :   virtual const VariableName & getTrialVariableName() const { return _test_var_name; }
      40             : 
      41             : protected:
      42             :   /// Name of (the test variable associated with) the weak form that the kernel is applied to.
      43             :   const VariableName & _test_var_name;
      44             : };
      45             : 
      46             : #endif

Generated by: LCOV version 1.14