https://mooseframework.inl.gov
RepeatableRayStudyBase.h
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 #pragma once
11 
12 #include "RayTracingStudy.h"
13 
14 // Local includes
15 #include "ClaimRays.h"
16 
23 {
24 public:
26 
28 
29 protected:
30  virtual void meshChanged() override;
31  virtual void generateRays() override;
32 
41  virtual void defineRays() = 0;
42 
44  std::vector<std::shared_ptr<Ray>> & _rays;
45 
50 
55 
56 private:
57  void claimRaysInternal();
58  void defineRaysInternal();
59 
67  void verifyReplicatedRays();
68 
70  std::vector<std::shared_ptr<Ray>> & _local_rays;
71 
74 
77 };
virtual void generateRays() override
Subclasses should override this to determine how to generate Rays.
bool & _should_claim_rays
Whether or not we should call claimRays() on the next generateRays() (restartable) ...
const bool _define_rays_replicated
Whether or not the Rays filled into _rays are replicated across all processors.
virtual void meshChanged() override
bool & _should_define_rays
Whether or not we should call defineRays() on the next generateRays() Can be set to true in derived c...
RepeatableRayStudyBase(const InputParameters &parameters)
std::vector< std::shared_ptr< Ray > > & _local_rays
Storage for all of the Rays this processor is responsible for (restartable)
Helper object for claiming Rays.
Definition: ClaimRays.h:34
void verifyReplicatedRays()
Verifies that the Rays in _rays are replicated across processors.
std::vector< std::shared_ptr< Ray > > & _rays
Vector of Rays that the user will fill into in defineRays() (restartable)
const InputParameters & parameters() const
ClaimRays _claim_rays
The object used to claim Rays.
const bool _claim_after_define_rays
Whether or not Rays need to be claimed after defineRays()
static InputParameters validParams()
A RayTracingStudy that generates and traces Rays repeatedly that a user defines only once...
virtual void defineRays()=0
Entry point for the user to create Rays.
Base class for Ray tracing studies that will generate Rays and then propagate all of them to terminat...