https://mooseframework.inl.gov
Loading...
Searching...
No Matches
RayTracingStudyResult.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 "RayTracingStudy.h"
15#include "ParallelRayStudy.h"
16
18
21{
23
24 params.addClassDescription("Gets a result from a RayTracingStudy.");
25
26 params.addRequiredParam<UserObjectName>("study", "The RayTracingStudy to get results from");
27
28 MooseEnum results(
29 "total_rays_started total_processor_crossings max_processor_crossings total_distance");
30 params.addRequiredParam<MooseEnum>("result", results, "The result to use");
31
32 return params;
33}
34
36 : GeneralPostprocessor(parameters),
37 _study(getUserObject<RayTracingStudy>("study")),
38 _result(getParam<MooseEnum>("result"))
39{
40}
41
42Real
44{
45 switch (_result)
46 {
47 case 0:
49 break;
50 case 1:
52 break;
53 case 2:
55 break;
56 case 3:
57 return _study.totalDistance();
58 break;
59 default:
60 mooseError("Unknown result type ", _result, " in ", name());
61 }
62}
registerMooseObject("RayTracingApp", RayTracingStudyResult)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
const std::string & name() const
void mooseError(Args &&... args) const
unsigned long long int totalWorkCompleted() const
Gets the total amount of work completeed across all processors.
virtual Real getValue() const override
const RayTracingStudy & _study
The RayTracingStudy.
static InputParameters validParams()
RayTracingStudyResult(const InputParameters &parameters)
const MooseEnum _result
The chosen result.
Base class for Ray tracing studies that will generate Rays and then propagate all of them to terminat...
unsigned long long int totalProcessorCrossings() const
Total number of processor crossings.
Real totalDistance() const
Total distance traveled by all Rays.
const ParallelRayStudy & parallelRayStudy() const
unsigned int maxProcessorCrossings() const
Max number of processor crossings for all Rays.