https://mooseframework.inl.gov
FunctionAuxRayKernelTest.C
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 
11 
12 #include "Function.h"
13 
14 registerMooseObject("RayTracingTestApp", FunctionAuxRayKernelTest);
15 
18 {
19  auto params = AuxRayKernel::validParams();
20  params.addRequiredParam<FunctionName>("function", "The function to use as the value");
21  return params;
22 }
23 
25  : AuxRayKernel(params), _func(getFunction("function"))
26 {
27 }
28 
29 void
31 {
32  const Point midpoint = 0.5 * (_current_segment_start + _current_segment_end);
33  addValue(_func.value(_t, midpoint));
34 }
void addValue(const Real value)
Use to accumulate a value into the corresponding AuxVariable from this AuxRayKernel.
Definition: AuxRayKernel.C:48
FunctionAuxRayKernelTest(const InputParameters &params)
static InputParameters validParams()
Definition: AuxRayKernel.C:16
virtual void onSegment() override
Called on each segment of a Ray.
Test AuxRayKernel that appends a function value on each Ray segment.
static InputParameters validParams()
const Function & _func
Function being used to compute the value to append.
registerMooseObject("RayTracingTestApp", FunctionAuxRayKernelTest)
const Point & _current_segment_end
The end point of the current Ray&#39;s segment.
virtual Real value(Real t, const Point &p) const
const Point & _current_segment_start
The start point of the current Ray&#39;s segment.