https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ParallelRayStudy.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 "ParallelStudy.h"
13
14// Local includes
15#include "Ray.h"
16
17// Forward declarations
18class RayTracingStudy;
19class TraceRay;
20
21class ParallelRayStudy : public ParallelStudy<std::shared_ptr<Ray>, Ray>
22{
23public:
25 const std::vector<std::shared_ptr<TraceRay>> & threaded_trace_ray);
26
34
35protected:
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;
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
46 const std::vector<std::shared_ptr<TraceRay>> & _threaded_trace_ray;
47};
unsigned int THREAD_ID
RayTracingStudy & _ray_tracing_study
The RayTracingStudy.
void postExecuteChunk(const work_iterator begin, const work_iterator end) override
bool workIsComplete(const std::shared_ptr< Ray > &ray) override
Can be overridden to denote if a piece of work is not complete yet.
RayTracingStudy & rayTracingStudy()
Get the RayTracingStudy associated with this ParallelRayStudy.
void moveWorkError(const MoveWorkError error, const std::shared_ptr< Ray > *ray) const override
const RayTracingStudy & rayTracingStudy() const
const std::vector< std::shared_ptr< TraceRay > > & _threaded_trace_ray
The TraceRay objects that do the tracing for each thread.
void postReceiveParallelData(const parallel_data_iterator begin, const parallel_data_iterator end) override
void executeWork(const std::shared_ptr< Ray > &ray, const THREAD_ID tid) override
Pure virtual to be overridden that executes a single object of work on a given thread.
MooseUtils::Buffer< std::shared_ptr< Ray > >::iterator work_iterator
MoveWorkError
Enum for providing useful errors during work addition in moveWorkError().
MooseUtils::Buffer< std::shared_ptr< Ray > >::iterator parallel_data_iterator
Base class for Ray tracing studies that will generate Rays and then propagate all of them to terminat...
Traces Rays through the mesh on a single processor.
Definition TraceRay.h:47