Back to home page

EIC code displayed by LXR

 
 

    


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/GaussianRoughnessData.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 Gaussian roughness model data.
0021  */
0022 template<Ownership W, MemSpace M>
0023 struct GaussianRoughnessData
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> sigma_alpha;
0034 
0035     //// METHODS ////
0036 
0037     //! True if assigned
0038     explicit CELER_FUNCTION operator bool() const
0039     {
0040         return !sigma_alpha.empty();
0041     }
0042 
0043     //! Assign from another set of data
0044     template<Ownership W2, MemSpace M2>
0045     GaussianRoughnessData<W, M>& operator=(
0046         GaussianRoughnessData<W2, M2> const& other)
0047     {
0048         CELER_EXPECT(other);
0049 
0050         sigma_alpha = other.sigma_alpha;
0051 
0052         return *this;
0053     }
0054 };
0055 
0056 //---------------------------------------------------------------------------//
0057 }  // namespace optical
0058 }  // namespace celeritas