Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:53:38

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/field/detail/NotImlementedField.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/Assert.hh"
0010 #include "corecel/Macros.hh"
0011 #include "corecel/Types.hh"
0012 #include "corecel/cont/Array.hh"
0013 #include "celeritas/field/CartMapFieldData.hh"
0014 
0015 namespace celeritas
0016 {
0017 namespace detail
0018 {
0019 //---------------------------------------------------------------------------//
0020 /*!
0021  * Dummy class for cartesian map magnetic field when no backend is available.
0022  */
0023 class NotImplementedField
0024 {
0025   public:
0026     //!@{
0027     //! \name Type aliases
0028     using real_type = float;
0029     using Real3 = Array<celeritas::real_type, 3>;
0030     using FieldParamsRef = NativeCRef<CartMapFieldParamsData>;
0031     //!@}
0032 
0033   public:
0034     // Construct with the shared map data
0035     inline CELER_FUNCTION explicit NotImplementedField(FieldParamsRef const&);
0036 
0037     // Evaluate the magnetic field value for the given position
0038     CELER_FUNCTION
0039     inline Real3 operator()(Real3 const&) const;
0040 };
0041 
0042 CELER_FUNCTION
0043 NotImplementedField::NotImplementedField(FieldParamsRef const&)
0044 {
0045     CELER_NOT_CONFIGURED("covfie");
0046 }
0047 
0048 CELER_FUNCTION auto NotImplementedField::operator()(Real3 const&) const -> Real3
0049 {
0050     CELER_NOT_CONFIGURED("covfie");
0051 }
0052 
0053 //---------------------------------------------------------------------------//
0054 }  // namespace detail
0055 }  // namespace celeritas