Line data Source code
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 "SpatialUserObjectFunctor.h" 13 : #include "SideIntegralVariableUserObject.h" 14 : #include "LayeredBase.h" 15 : 16 : /** 17 : * This layered user object computes the change in cross sectional area 18 : * of a flow channel 19 : */ 20 : class LayeredFlowAreaChange : public SpatialUserObjectFunctor<SideIntegralUserObject>, 21 : public LayeredBase 22 : { 23 : public: 24 : LayeredFlowAreaChange(const InputParameters & parameters); 25 : 26 : /** 27 : * Given a Point return the integral value associated with the layer that point falls in. 28 : * 29 : * @param p The point to look for in the layers. 30 : */ 31 4428 : virtual Real spatialValue(const Point & p) const override { return integralValue(p); } 32 : 33 : virtual void initialize() override; 34 : virtual void execute() override; 35 : virtual void finalize() override; 36 : virtual void threadJoin(const UserObject & y) override; 37 : virtual Real computeIntegral() override; 38 : 39 : protected: 40 : virtual Real computeQpIntegral() override; 41 : 42 : /// the problem dimension 43 : unsigned int _dim; 44 : 45 : /// the displacement vectors 46 : std::vector<const VariableValue *> _disp; 47 : 48 : public: 49 : static InputParameters validParams(); 50 : };