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

Computes the side integral of a flux entry from a BoundaryFluxBase user object. More...

#include <BoundaryFluxPostprocessor.h>

Inheritance diagram for BoundaryFluxPostprocessor:
[legend]

Public Member Functions

 BoundaryFluxPostprocessor (const InputParameters &parameters)
 
virtual Real computeQpIntegral () override
 

Protected Attributes

const BoundaryFluxBase_boundary_flux_uo
 Boundary flux user object. More...
 
const unsigned int & _flux_index
 Index within flux vector to query. More...
 
const bool _provided_normal
 Did the user request to override the boundary normal? More...
 
const unsigned int _n_components
 Number of components in the solution vector used to compute the flux. More...
 
std::vector< const VariableValue * > _U
 Variables to pass to boundary flux user object, in the correct order. More...
 

Detailed Description

Computes the side integral of a flux entry from a BoundaryFluxBase user object.

Definition at line 24 of file BoundaryFluxPostprocessor.h.

Constructor & Destructor Documentation

◆ BoundaryFluxPostprocessor()

BoundaryFluxPostprocessor::BoundaryFluxPostprocessor ( const InputParameters &  parameters)

Definition at line 33 of file BoundaryFluxPostprocessor.C.

34  : SideIntegralPostprocessor(parameters),
35 
36  _boundary_flux_uo(getUserObject<BoundaryFluxBase>("boundary_flux_uo")),
37  _flux_index(getParam<unsigned int>("flux_index")),
38  _provided_normal(isParamValid("normal")),
39  _n_components(coupledComponents("variables"))
40 {
41  for (unsigned int i = 0; i < _n_components; i++)
42  _U.push_back(&coupledValue("variables", i));
43 }
std::vector< const VariableValue * > _U
Variables to pass to boundary flux user object, in the correct order.
const BoundaryFluxBase & _boundary_flux_uo
Boundary flux user object.
const unsigned int & _flux_index
Index within flux vector to query.
const bool _provided_normal
Did the user request to override the boundary normal?
const unsigned int _n_components
Number of components in the solution vector used to compute the flux.

Member Function Documentation

◆ computeQpIntegral()

Real BoundaryFluxPostprocessor::computeQpIntegral ( )
overridevirtual

Definition at line 46 of file BoundaryFluxPostprocessor.C.

47 {
48  std::vector<Real> U(_n_components);
49  for (unsigned int i = 0; i < _n_components; i++)
50  U[i] = (*_U[i])[_qp];
51 
52  const Point & normal = _provided_normal ? getParam<Point>("normal") : _normals[_qp];
53 
54  const auto & flux = _boundary_flux_uo.getFlux(_current_side, _current_elem->id(), U, normal);
55  return flux[_flux_index];
56 }
virtual const std::vector< Real > & getFlux(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave) const
Get the boundary flux vector.
std::vector< const VariableValue * > _U
Variables to pass to boundary flux user object, in the correct order.
const BoundaryFluxBase & _boundary_flux_uo
Boundary flux user object.
const unsigned int & _flux_index
Index within flux vector to query.
const bool _provided_normal
Did the user request to override the boundary normal?
const unsigned int _n_components
Number of components in the solution vector used to compute the flux.

Member Data Documentation

◆ _boundary_flux_uo

const BoundaryFluxBase& BoundaryFluxPostprocessor::_boundary_flux_uo
protected

Boundary flux user object.

Definition at line 33 of file BoundaryFluxPostprocessor.h.

Referenced by computeQpIntegral().

◆ _flux_index

const unsigned int& BoundaryFluxPostprocessor::_flux_index
protected

Index within flux vector to query.

Definition at line 36 of file BoundaryFluxPostprocessor.h.

Referenced by computeQpIntegral().

◆ _n_components

const unsigned int BoundaryFluxPostprocessor::_n_components
protected

Number of components in the solution vector used to compute the flux.

Definition at line 42 of file BoundaryFluxPostprocessor.h.

Referenced by BoundaryFluxPostprocessor(), and computeQpIntegral().

◆ _provided_normal

const bool BoundaryFluxPostprocessor::_provided_normal
protected

Did the user request to override the boundary normal?

Definition at line 39 of file BoundaryFluxPostprocessor.h.

Referenced by computeQpIntegral().

◆ _U

std::vector<const VariableValue *> BoundaryFluxPostprocessor::_U
protected

Variables to pass to boundary flux user object, in the correct order.

Definition at line 45 of file BoundaryFluxPostprocessor.h.

Referenced by BoundaryFluxPostprocessor(), and computeQpIntegral().


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