Line data Source code
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 "ParallelStudy.h" 13 : 14 : // Local includes 15 : #include "Ray.h" 16 : 17 : // Forward declarations 18 : class RayTracingStudy; 19 : class TraceRay; 20 : 21 : class ParallelRayStudy : public ParallelStudy<std::shared_ptr<Ray>, Ray> 22 : { 23 : public: 24 : ParallelRayStudy(RayTracingStudy & study, 25 : const std::vector<std::shared_ptr<TraceRay>> & threaded_trace_ray); 26 : 27 : /** 28 : * Get the RayTracingStudy associated with this ParallelRayStudy. 29 : */ 30 : ///@{ 31 1275174 : RayTracingStudy & rayTracingStudy() { return _ray_tracing_study; } 32 1275174 : const RayTracingStudy & rayTracingStudy() const { return _ray_tracing_study; } 33 : ///@} 34 : 35 : protected: 36 : void executeWork(const std::shared_ptr<Ray> & ray, const THREAD_ID tid) override; 37 : void moveWorkError(const MoveWorkError error, const std::shared_ptr<Ray> * ray) const override; 38 : void postReceiveParallelData(const parallel_data_iterator begin, 39 : const parallel_data_iterator end) override; 40 : bool workIsComplete(const std::shared_ptr<Ray> & ray) override; 41 : void postExecuteChunk(const work_iterator begin, const work_iterator end) override; 42 : 43 : /// The RayTracingStudy 44 : RayTracingStudy & _ray_tracing_study; 45 : /// The TraceRay objects that do the tracing for each thread 46 : const std::vector<std::shared_ptr<TraceRay>> & _threaded_trace_ray; 47 : };