https://mooseframework.inl.gov
LotsOfRaysExpectedDistance.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 
10 // MOOSE includes
12 
13 // Local includes
14 #include "LotsOfRaysRayStudy.h"
15 
17 
20 {
22 
23  params.addRequiredParam<UserObjectName>(
24  "lots_of_rays_study", "The LotsOfRaysRayStudy to get the expected distance from");
25 
26  return params;
27 }
28 
30  : GeneralPostprocessor(parameters),
31  _study(getUserObject<LotsOfRaysRayStudy>("lots_of_rays_study"))
32 {
34  mooseError(type(),
35  " '",
36  name(),
37  ": The LotsOfRaysRayStudy '",
38  _study.name(),
39  "' does not have compute_expected_distance = true");
40 }
41 
42 Real
44 {
45  return _study.expectedDistance();
46 }
bool hasExpectedDistance() const
Whether or not the expected distance is being computed.
virtual Real getValue() const override
virtual const std::string & name() const
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
const std::string & type() const
registerMooseObject("RayTracingTestApp", LotsOfRaysExpectedDistance)
Real expectedDistance() const
Get the expected total distance Rays should travel.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void mooseError(Args &&... args) const
A RayTracingStudy used for generating a lot of rays for testing purposes.
LotsOfRaysExpectedDistance(const InputParameters &parameters)
const LotsOfRaysRayStudy & _study
The LotsOfRaysRayStudy.