Material designed to provide the nearest quadpoint to each node in the element.
More...
#include <PorousFlowNearestQp.h>
|
virtual void | computeQpProperties () override |
|
virtual void | initStatefulProperties (unsigned int n_points) override |
| Correctly sizes nodal materials, then initialises using Material::initStatefulProperties. More...
|
|
virtual void | computeProperties () override |
| Correctly sizes nodal materials, then computes using Material::computeProperties. More...
|
|
void | sizeNodalProperties () |
| Resizes properties to be equal to max(number of nodes, number of quadpoints) 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...
|
|
Material designed to provide the nearest quadpoint to each node in the element.
Definition at line 23 of file PorousFlowNearestQp.h.
◆ PorousFlowNearestQp()
PorousFlowNearestQp::PorousFlowNearestQp |
( |
const InputParameters & |
parameters | ) |
|
Definition at line 25 of file PorousFlowNearestQp.C.
27 _nearest_qp(declareProperty<unsigned>(
"PorousFlow_nearestqp_nodal"))
29 if (getParam<bool>(
"nodal_material") ==
false)
30 paramError(
"nodal_material",
"This must be a nodal material!");
◆ computeProperties()
void PorousFlowMaterial::computeProperties |
( |
| ) |
|
|
overrideprotectedvirtualinherited |
Correctly sizes nodal materials, then computes using Material::computeProperties.
Definition at line 63 of file PorousFlowMaterial.C.
71 for (_qp = 0; _qp < _current_elem->n_nodes(); ++_qp)
72 computeQpProperties();
75 Material::computeProperties();
◆ computeQpProperties()
void PorousFlowNearestQp::computeQpProperties |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ initialSetup()
void PorousFlowMaterial::initialSetup |
( |
| ) |
|
|
overridevirtualinherited |
◆ initStatefulProperties()
void PorousFlowMaterial::initStatefulProperties |
( |
unsigned int |
n_points | ) |
|
|
overrideprotectedvirtualinherited |
Correctly sizes nodal materials, then initialises using Material::initStatefulProperties.
Definition at line 48 of file PorousFlowMaterial.C.
56 Material::initStatefulProperties(_current_elem->n_nodes());
59 Material::initStatefulProperties(n_points);
◆ nearestQP()
unsigned PorousFlowMaterial::nearestQP |
( |
unsigned |
nodenum | ) |
const |
|
protectedinherited |
Find the nearest quadpoint to the node labelled by nodenum in the current element.
- Parameters
-
nodenum | the node number in the current element |
- Returns
- the nearest quadpoint
Definition at line 98 of file PorousFlowMaterial.C.
100 unsigned nearest_qp = 0;
101 Real smallest_dist = std::numeric_limits<Real>::max();
102 for (
unsigned qp = 1; qp < _qrule->n_points(); ++qp)
104 const Real this_dist = (_current_elem->point(nodenum) - _q_point[qp]).norm();
105 if (this_dist < smallest_dist)
108 smallest_dist = this_dist;
Referenced by computeQpProperties().
◆ sizeNodalProperties()
void PorousFlowMaterial::sizeNodalProperties |
( |
| ) |
|
|
protectedinherited |
◆ _dictator
The variable names UserObject for the PorousFlow variables.
Definition at line 71 of file PorousFlowMaterial.h.
◆ _mass_fraction_variable_name
const VariableName PorousFlowMaterial::_mass_fraction_variable_name |
|
protectedinherited |
◆ _nearest_qp
MaterialProperty<unsigned int>& PorousFlowNearestQp::_nearest_qp |
|
protected |
◆ _nodal_material
const bool PorousFlowMaterial::_nodal_material |
|
protectedinherited |
◆ _pressure_variable_name
const VariableName PorousFlowMaterial::_pressure_variable_name |
|
protectedinherited |
Names of variables used to declare/get derivatives in the DerivativeMaterialInterface to ensure consistency.
Definition at line 75 of file PorousFlowMaterial.h.
◆ _saturation_variable_name
const VariableName PorousFlowMaterial::_saturation_variable_name |
|
protectedinherited |
◆ _temperature_variable_name
const VariableName PorousFlowMaterial::_temperature_variable_name |
|
protectedinherited |
The documentation for this class was generated from the following files: