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 "GeneralPostprocessor.h" 13 : 14 : /** 15 : * Compute the value of a variable at a specified location. 16 : * 17 : * Warning: This postprocessor may result in undefined behavior if utilized with 18 : * non-continuous elements and the point being located lies on an element boundary. 19 : */ 20 : class PointValue : public GeneralPostprocessor 21 : { 22 : public: 23 : static InputParameters validParams(); 24 : 25 : PointValue(const InputParameters & parameters); 26 : 27 1917 : virtual void initialize() override {} 28 : virtual void execute() override; 29 1913 : virtual void finalize() override {} 30 : virtual Real getValue() const override; 31 : 32 : protected: 33 : /// The variable number of the variable we are operating on 34 : const unsigned int _var_number; 35 : 36 : /// A reference to the system containing the variable 37 : const libMesh::System & _system; 38 : 39 : /// The point to locate 40 : const Point & _point; 41 : 42 : /// The value of the variable at the desired location 43 : Real _value; 44 : };