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 208 : PorousFlowNearestQp::validParams() 16 : { 17 208 : InputParameters params = PorousFlowMaterial::validParams(); 18 208 : params.set<bool>("nodal_material") = true; 19 416 : params.addPrivateParam<std::string>("pf_material_type", "nearest_qp"); 20 208 : params.addClassDescription("Provides the nearest quadpoint to a node in each element"); 21 208 : return params; 22 0 : } 23 : 24 165 : PorousFlowNearestQp::PorousFlowNearestQp(const InputParameters & parameters) 25 : : PorousFlowMaterial(parameters), 26 165 : _nearest_qp(declareProperty<unsigned>("PorousFlow_nearestqp_nodal")) 27 : { 28 330 : if (getParam<bool>("nodal_material") == false) 29 0 : paramError("nodal_material", "This must be a nodal material!"); 30 165 : } 31 : 32 : void 33 7420 : PorousFlowNearestQp::computeQpProperties() 34 : { 35 7420 : _nearest_qp[_qp] = nearestQP(_qp); 36 7420 : }