![]() |
|
|||
File indexing completed on 2025-02-22 10:31:19
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2024 UT-Battelle, LLC, and other Celeritas developers. 0003 // See the top-level COPYRIGHT file for details. 0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0005 //---------------------------------------------------------------------------// 0006 //! \file celeritas/em/params/WentzelOKVIParams.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include <memory> 0011 0012 #include "corecel/data/CollectionMirror.hh" 0013 #include "corecel/data/ParamsDataInterface.hh" 0014 #include "celeritas/em/data/WentzelOKVIData.hh" 0015 #include "celeritas/phys/AtomicNumber.hh" 0016 0017 namespace celeritas 0018 { 0019 //---------------------------------------------------------------------------// 0020 class MaterialParams; 0021 struct ImportData; 0022 0023 //---------------------------------------------------------------------------// 0024 /*! 0025 * Construct and store shared Coulomb and multiple scattering data. 0026 * 0027 * This data is used by both the single Coulomb scattering and Wentzel VI 0028 * multiple scattering models. 0029 */ 0030 class WentzelOKVIParams final : public ParamsDataInterface<WentzelOKVIData> 0031 { 0032 public: 0033 //!@{ 0034 //! \name Type aliases 0035 using SPConstMaterials = std::shared_ptr<MaterialParams const>; 0036 //!@} 0037 0038 public: 0039 struct Options 0040 { 0041 //! Use combined single and multiple scattering 0042 bool is_combined{true}; 0043 //! Polar angle limit between single and multiple scattering 0044 real_type polar_angle_limit{constants::pi}; 0045 //! Factor for dynamic computation of angular limit between SS and MSC 0046 real_type angle_limit_factor{1}; 0047 //! User defined screening factor 0048 real_type screening_factor{1}; 0049 //! Nuclear form factor model 0050 NuclearFormFactorType form_factor{NuclearFormFactorType::exponential}; 0051 }; 0052 0053 public: 0054 // Construct if Wentzel VI or Coulomb is present, else return nullptr 0055 static std::shared_ptr<WentzelOKVIParams> 0056 from_import(ImportData const& data, SPConstMaterials materials); 0057 0058 // Construct from material data and options 0059 WentzelOKVIParams(SPConstMaterials materials, Options options); 0060 0061 //! Access Wentzel OK&VI data on the host 0062 HostRef const& host_ref() const final { return data_.host_ref(); } 0063 0064 //! Access Wentzel OK&VI data on the device 0065 DeviceRef const& device_ref() const final { return data_.device_ref(); } 0066 0067 private: 0068 //// TYPES //// 0069 0070 using CoeffMat = MottElementData::MottCoeffMatrix; 0071 0072 //// DATA //// 0073 0074 // Host/device storage and reference 0075 CollectionMirror<WentzelOKVIData> data_; 0076 0077 //// HELPER METHODS //// 0078 0079 // Construct per-element data (loads Mott coefficients) 0080 void build_data(HostVal<WentzelOKVIData>& host_data, 0081 MaterialParams const& materials); 0082 0083 // Retrieve matrix of interpolated Mott electron coefficients 0084 static CoeffMat get_electron_mott_coeffs(AtomicNumber z); 0085 0086 // Retrieve matrix of interpolated Mott positron coefficients 0087 static CoeffMat get_positron_mott_coeffs(AtomicNumber z); 0088 }; 0089 0090 //---------------------------------------------------------------------------// 0091 } // 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 |
![]() ![]() |