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