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 "ElementUserObject.h" 13 : 14 : // Forward Declarations 15 : 16 : /** 17 : * This Userobject is the base class of Userobjects that generate one 18 : * random number per timestep and quadrature point in a way that the integral 19 : * over all random numbers is zero. This can be used for a concentration fluctuation 20 : * kernel such as ConservedLangevinNoise, that keeps the total concenration constant. 21 : * 22 : * \see ConservedUniformNoise 23 : * \see ConservedNormalNoise 24 : */ 25 : class ConservedNoiseInterface : public ElementUserObject 26 : { 27 : public: 28 : ConservedNoiseInterface(const InputParameters & parameters); 29 42 : virtual ~ConservedNoiseInterface() {} 30 : 31 : virtual Real getQpValue(dof_id_type element_id, unsigned int qp) const = 0; 32 : 33 : protected: 34 : virtual Real getQpRandom() = 0; 35 : 36 : Real _integral; 37 : Real _volume; 38 : Real _offset; 39 : 40 : unsigned int _qp; 41 : };