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 : // Local Includes 13 : #include "RayKernelBase.h" 14 : 15 : // MOOSE includes 16 : #include "MooseVariableFE.h" 17 : #include "MooseVariableInterface.h" 18 : 19 : class AuxiliarySystem; 20 : 21 : class AuxRayKernel : public RayKernelBase, public MooseVariableInterface<Real> 22 : { 23 : public: 24 : AuxRayKernel(const InputParameters & params); 25 : 26 : static InputParameters validParams(); 27 : 28 : virtual void onSegment() override = 0; 29 : 30 : /** 31 : * Use to accumulate a value into the corresponding AuxVariable from this AuxRayKernel 32 : */ 33 : void addValue(const Real value); 34 : 35 : /** 36 : * Gets the variable this AuxRayKernel contributes to. 37 : */ 38 70 : MooseVariableFE<Real> & variable() { return _var; } 39 : 40 : protected: 41 : /// The aux system 42 : AuxiliarySystem & _aux; 43 : 44 : /// The AuxVariable this AuxRayKernel contributes to 45 : MooseVariableFE<Real> & _var; 46 : 47 : private: 48 : /// Spin mutex object for adding values 49 : static Threads::spin_mutex _add_value_mutex; 50 : };