LCOV - code coverage report
Current view: top level - src/materials - PorousFlowNearestQp.C (source / functions) Hit Total Coverage
Test: idaholab/moose porous_flow: #32971 (54bef8) with base c6cf66 Lines: 13 15 86.7 %
Date: 2026-05-29 20:38:56 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             : #include "PorousFlowNearestQp.h"
      11             : 
      12             : registerMooseObject("PorousFlowApp", PorousFlowNearestQp);
      13             : 
      14             : InputParameters
      15         120 : PorousFlowNearestQp::validParams()
      16             : {
      17         120 :   InputParameters params = PorousFlowMaterial::validParams();
      18         120 :   params.set<bool>("nodal_material") = true;
      19         240 :   params.addPrivateParam<std::string>("pf_material_type", "nearest_qp");
      20         120 :   params.addClassDescription("Provides the nearest quadpoint to a node in each element");
      21         120 :   return params;
      22           0 : }
      23             : 
      24          93 : PorousFlowNearestQp::PorousFlowNearestQp(const InputParameters & parameters)
      25             :   : PorousFlowMaterial(parameters),
      26          93 :     _nearest_qp(declareProperty<unsigned>("PorousFlow_nearestqp_nodal"))
      27             : {
      28         186 :   if (getParam<bool>("nodal_material") == false)
      29           0 :     paramError("nodal_material", "This must be a nodal material!");
      30          93 : }
      31             : 
      32             : void
      33        5606 : PorousFlowNearestQp::computeQpProperties()
      34             : {
      35        5606 :   _nearest_qp[_qp] = nearestQP(_qp);
      36        5606 : }

Generated by: LCOV version 1.14