Skip to content
Snippets Groups Projects
Select Git revision
  • c9d357071e3a9be7d9e5d3bcd915673687bb23b5
  • develop default protected
  • feature/advection
  • feature/composite-scheme-other-fluxes
  • origin/stage/bouguettaia
  • save_clemence
  • feature/local-dt-fsi
  • feature/variational-hydro
  • feature/gmsh-reader
  • feature/reconstruction
  • feature/kinetic-schemes
  • feature/composite-scheme-sources
  • feature/serraille
  • feature/composite-scheme
  • hyperplastic
  • feature/polynomials
  • feature/gks
  • feature/implicit-solver-o2
  • feature/coupling_module
  • feature/implicit-solver
  • feature/merge-local-dt-fsi
  • v0.5.0 protected
  • v0.4.1 protected
  • v0.4.0 protected
  • v0.3.0 protected
  • v0.2.0 protected
  • v0.1.0 protected
  • Kidder
  • v0.0.4 protected
  • v0.0.3 protected
  • v0.0.2 protected
  • v0 protected
  • v0.0.1 protected
33 results

PugsTraits.hpp

Blame
  • PugsTraits.hpp 1.29 KiB
    #ifndef PUGS_TRAITS_HPP
    #define PUGS_TRAITS_HPP
    
    #include <cstddef>
    #include <memory>
    #include <type_traits>
    #include <vector>
    
    template <size_t N, typename T>
    class TinyVector;
    template <size_t N, typename T>
    class TinyMatrix;
    
    // Traits is_trivially_castable
    
    template <typename T>
    inline constexpr bool is_trivially_castable = std::is_trivial_v<T>;
    
    template <size_t N, typename T>
    inline constexpr bool is_trivially_castable<TinyVector<N, T>> = is_trivially_castable<T>;
    template <size_t N, typename T>
    inline constexpr bool is_trivially_castable<const TinyVector<N, T>> = is_trivially_castable<T>;
    
    template <size_t N, typename T>
    inline constexpr bool is_trivially_castable<TinyMatrix<N, T>> = is_trivially_castable<T>;
    template <size_t N, typename T>
    inline constexpr bool is_trivially_castable<const TinyMatrix<N, T>> = is_trivially_castable<T>;
    
    // Traits is_false
    
    template <typename T>
    inline constexpr bool is_false_v = false;
    
    // Traits is_shared_ptr
    
    template <typename T>
    inline constexpr bool is_shared_ptr_v = false;
    
    template <typename T>
    inline constexpr bool is_shared_ptr_v<std::shared_ptr<T>> = true;
    
    // Traits is_vector
    
    template <typename T>
    inline constexpr bool is_vector_v = false;
    
    template <typename T>
    inline constexpr bool is_vector_v<std::vector<T>> = true;
    
    #endif   // PUGS_TRAITS_HPP