|
|
|||
File indexing completed on 2026-11-07 10:11:39
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/surface/model/SmearRoughnessData.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/Macros.hh" 0010 #include "corecel/data/Collection.hh" 0011 #include "celeritas/Types.hh" 0012 #include "celeritas/optical/surface/SurfaceModel.hh" 0013 0014 namespace celeritas 0015 { 0016 namespace optical 0017 { 0018 //---------------------------------------------------------------------------// 0019 /*! 0020 * Storage for uniform smear roughness model data. 0021 */ 0022 template<Ownership W, MemSpace M> 0023 struct SmearRoughnessData 0024 { 0025 //!@{ 0026 //! \name Type aliases 0027 template<class T> 0028 using SurfaceItems = Collection<T, W, M, SubModelId>; 0029 //!@} 0030 0031 //// DATA ///// 0032 0033 SurfaceItems<real_type> roughness; 0034 0035 //// METHODS //// 0036 0037 //! True if assigned 0038 explicit CELER_FUNCTION operator bool() const 0039 { 0040 return !roughness.empty(); 0041 } 0042 0043 //! Assign from another set of data 0044 template<Ownership W2, MemSpace M2> 0045 SmearRoughnessData<W, M>& operator=(SmearRoughnessData<W2, M2> const& other) 0046 { 0047 CELER_EXPECT(other); 0048 0049 roughness = other.roughness; 0050 0051 return *this; 0052 } 0053 }; 0054 0055 //---------------------------------------------------------------------------// 0056 } // namespace optical 0057 } // 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 |
|