|
|
|||
File indexing completed on 2026-11-07 10:11:41
0001 //------------------------------- -*- C++ -*- -------------------------------// 0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details 0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0004 //---------------------------------------------------------------------------// 0005 //! \file celeritas/optical/SimParams.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/Types.hh" 0010 #include "corecel/data/ParamsDataInterface.hh" 0011 #include "corecel/data/ParamsDataStore.hh" 0012 #include "corecel/math/NumericLimits.hh" 0013 #include "celeritas/inp/Tracking.hh" 0014 0015 #include "SimData.hh" 0016 0017 namespace celeritas 0018 { 0019 namespace optical 0020 { 0021 //---------------------------------------------------------------------------// 0022 /*! 0023 * Manage persistent simulation data. 0024 */ 0025 class SimParams final : public ParamsDataInterface<SimParamsData> 0026 { 0027 public: 0028 // Construct with simulation input data 0029 explicit SimParams(inp::OpticalTrackingLimits const&); 0030 0031 //! Access data on host 0032 HostRef const& host_ref() const final { return data_.host_ref(); } 0033 0034 //! Access data on device 0035 DeviceRef const& device_ref() const final { return data_.device_ref(); } 0036 0037 //! Maximum step iterations before aborting 0038 size_type max_step_iters() const 0039 { 0040 return this->host_ref().max_step_iters; 0041 } 0042 0043 private: 0044 // Host/device storage and reference 0045 ParamsDataStore<SimParamsData> data_; 0046 }; 0047 0048 //---------------------------------------------------------------------------// 0049 } // namespace optical 0050 } // namespace celeritas
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|