https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowNearestQp.C
Go to the documentation of this file.
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
13
16{
18 params.set<bool>("nodal_material") = true;
19 params.addPrivateParam<std::string>("pf_material_type", "nearest_qp");
20 params.addClassDescription("Provides the nearest quadpoint to a node in each element");
21 return params;
22}
23
25 : PorousFlowMaterial(parameters),
26 _nearest_qp(declareProperty<unsigned>("PorousFlow_nearestqp_nodal"))
27{
28 if (getParam<bool>("nodal_material") == false)
29 paramError("nodal_material", "This must be a nodal material!");
30}
31
32void
registerMooseObject("PorousFlowApp", PorousFlowNearestQp)
void addPrivateParam(const std::string &name, const T &value)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
unsigned int _qp
void paramError(const std::string &param, Args... args) const
PorousFlowMaterial is the base class for all PorousFlow Materials It allows users to specify that the...
static InputParameters validParams()
unsigned nearestQP(unsigned nodenum) const
Find the nearest quadpoint to the node labelled by nodenum in the current element.
Material designed to provide the nearest quadpoint to each node in the element.
virtual void computeQpProperties() override
PorousFlowNearestQp(const InputParameters &parameters)
static InputParameters validParams()
MaterialProperty< unsigned int > & _nearest_qp
The nearest quadpoint.