www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PorousFlowMaterial Class Reference

#include <PorousFlowMaterial.h>

Inheritance diagram for PorousFlowMaterial:
[legend]

Public Member Functions

 PorousFlowMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void initStatefulProperties (unsigned int n_points) override
 
virtual void computeProperties () override
 
void sizeNodalProperty (const std::string &prop_name)
 Makes property with name prop_name to be size equal to the number of nodes in the current element. More...
 
void sizeAllSuppliedProperties ()
 Makes all supplied properties for this material to be size equal to the number of nodes in the current element. More...
 
unsigned nearestQP (unsigned nodenum) const
 Find the nearest quadpoint to the node labelled by nodenum in the current element. More...
 

Protected Attributes

const bool _nodal_material
 whether the derived class holds nodal values More...
 
const PorousFlowDictator_dictator
 The variable names UserObject for the PorousFlow variables. More...
 

Detailed Description

Definition at line 21 of file PorousFlowMaterial.h.

Constructor & Destructor Documentation

PorousFlowMaterial::PorousFlowMaterial ( const InputParameters &  parameters)

Definition at line 26 of file PorousFlowMaterial.C.

27  : Material(parameters),
28  _nodal_material(getParam<bool>("at_nodes")),
29  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator"))
30 {
31 }
const bool _nodal_material
whether the derived class holds nodal values
const PorousFlowDictator & _dictator
The variable names UserObject for the PorousFlow variables.

Member Function Documentation

void PorousFlowMaterial::computeProperties ( )
overrideprotectedvirtual

Definition at line 46 of file PorousFlowMaterial.C.

47 {
48  if (_nodal_material)
49  {
51  for (_qp = 0; _qp < _current_elem->n_nodes(); ++_qp)
52  computeQpProperties();
53  }
54  else
55  Material::computeProperties();
56 }
void sizeAllSuppliedProperties()
Makes all supplied properties for this material to be size equal to the number of nodes in the curren...
const bool _nodal_material
whether the derived class holds nodal values
void PorousFlowMaterial::initStatefulProperties ( unsigned int  n_points)
overrideprotectedvirtual

Definition at line 34 of file PorousFlowMaterial.C.

35 {
36  if (_nodal_material)
37  {
39  Material::initStatefulProperties(_current_elem->n_nodes());
40  }
41  else
42  Material::initStatefulProperties(n_points);
43 }
void sizeAllSuppliedProperties()
Makes all supplied properties for this material to be size equal to the number of nodes in the curren...
const bool _nodal_material
whether the derived class holds nodal values
unsigned PorousFlowMaterial::nearestQP ( unsigned  nodenum) const
protected

Find the nearest quadpoint to the node labelled by nodenum in the current element.

Parameters
nodenumthe node number in the current element
Returns
the nearest quadpoint

Definition at line 77 of file PorousFlowMaterial.C.

Referenced by PorousFlowNearestQp::computeQpProperties().

78 {
79  unsigned nearest_qp = 0;
80  Real smallest_dist = std::numeric_limits<Real>::max();
81  for (unsigned qp = 1; qp < _qrule->n_points(); ++qp)
82  {
83  const Real this_dist = (_current_elem->point(nodenum) - _q_point[qp]).size();
84  if (this_dist < smallest_dist)
85  {
86  nearest_qp = qp;
87  smallest_dist = this_dist;
88  }
89  }
90  return nearest_qp;
91 }
void PorousFlowMaterial::sizeAllSuppliedProperties ( )
protected

Makes all supplied properties for this material to be size equal to the number of nodes in the current element.

Definition at line 70 of file PorousFlowMaterial.C.

Referenced by computeProperties(), and initStatefulProperties().

71 {
72  for (auto prop_name : getSuppliedItems())
73  sizeNodalProperty(prop_name);
74 }
void sizeNodalProperty(const std::string &prop_name)
Makes property with name prop_name to be size equal to the number of nodes in the current element...
void PorousFlowMaterial::sizeNodalProperty ( const std::string &  prop_name)
protected

Makes property with name prop_name to be size equal to the number of nodes in the current element.

Definition at line 59 of file PorousFlowMaterial.C.

Referenced by sizeAllSuppliedProperties().

60 {
61  mooseAssert(_material_data->getMaterialPropertyStorage().hasProperty(prop_name),
62  "PorousFlowMaterial can not find nodal property " << prop_name);
63  const unsigned prop_id =
64  _material_data->getMaterialPropertyStorage().retrievePropertyId(prop_name);
65  // _material_data->props() returns MaterialProperties, which is a std::vector of PropertyValue.
66  _material_data->props()[prop_id]->resize(_current_elem->n_nodes());
67 }

Member Data Documentation

const PorousFlowDictator& PorousFlowMaterial::_dictator
protected

The variable names UserObject for the PorousFlow variables.

Definition at line 34 of file PorousFlowMaterial.h.

const bool PorousFlowMaterial::_nodal_material
protected

whether the derived class holds nodal values

Definition at line 31 of file PorousFlowMaterial.h.

Referenced by computeProperties(), and initStatefulProperties().


The documentation for this class was generated from the following files: