|
|
|||
File indexing completed on 2026-10-29 09:13:52
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 geocel/detail/LengthQuantities.hh 0006 //! \brief Length unit types and quantity aliases for geometry interop 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include "corecel/math/ArrayQuantity.hh" // IWYU pragma: export 0011 #include "corecel/math/Quantity.hh" // IWYU pragma: export 0012 0013 #include "LengthUnits.hh" 0014 0015 namespace celeritas 0016 { 0017 namespace lengthunits 0018 { 0019 //---------------------------------------------------------------------------// 0020 //!@{ 0021 //! \name Length unit types 0022 0023 //! Centimeter length (CGS/Gaussian units) 0024 struct Centimeter 0025 { 0026 static CELER_CONSTEXPR_FUNCTION Constant value() 0027 { 0028 return lengthunits::centimeter; 0029 } 0030 static char const* label() { return "cm"; } 0031 }; 0032 0033 //! Millimeter length (CLHEP units) 0034 struct Millimeter 0035 { 0036 static CELER_CONSTEXPR_FUNCTION Constant value() 0037 { 0038 return lengthunits::millimeter; 0039 } 0040 static char const* label() { return "mm"; } 0041 }; 0042 0043 //!@} 0044 0045 //---------------------------------------------------------------------------// 0046 //!@{ 0047 //! \name Length quantity aliases 0048 0049 using CmLength = RealQuantity<Centimeter>; 0050 using ClhepLength = Quantity<Millimeter, double>; 0051 0052 //!@} 0053 //---------------------------------------------------------------------------// 0054 } // namespace lengthunits 0055 } // 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 |
|