https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowPointFluxQuantity.h
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#pragma once
11
12#include "GeneralUserObject.h"
13
22{
23public:
25
27
34 void
35 zero(const std::vector<Real> & xs, const std::vector<Real> & ys, const std::vector<Real> & zs);
36
42 void add(std::size_t i, Real contrib);
43
45 virtual void initialize() override;
46
48 virtual void execute() override;
49
51 virtual void finalize() override;
52
54 const std::vector<Real> & getFluxes() const { return _fluxes; }
55
57 const std::vector<Real> & getX() const { return _xs; }
58 const std::vector<Real> & getY() const { return _ys; }
59 const std::vector<Real> & getZ() const { return _zs; }
61
62protected:
64 std::vector<Real> _fluxes;
65
67 std::vector<Real> _xs;
68 std::vector<Real> _ys;
69 std::vector<Real> _zs;
71};
const InputParameters & parameters() const
Records the instantaneous flux at each Dirac point of a PorousFlow line sink (such as PorousFlowPeace...
const std::vector< Real > & getY() const
std::vector< Real > _fluxes
The flux at each point of the line sink, indexed by Dirac point ID.
void zero(const std::vector< Real > &xs, const std::vector< Real > &ys, const std::vector< Real > &zs)
Resets the flux recorded at every point to zero, and records the current point coordinates.
void add(std::size_t i, Real contrib)
Adds contrib to the flux recorded at point i.
const std::vector< Real > & getFluxes() const
Returns the flux recorded at each point.
virtual void finalize() override
Sums the per-point fluxes over all processors.
std::vector< Real > _xs
Coordinates of each point of the line sink, indexed by Dirac point ID.
const std::vector< Real > & getZ() const
virtual void initialize() override
Does nothing.
virtual void execute() override
Does nothing.
const std::vector< Real > & getX() const
Returns the coordinates of each point.