Skip to content
Snippets Groups Projects
Select Git revision
  • 018d22f7bc942015974ec9d3ec3f12cb4846b58c
  • develop default protected
  • feature/variational-hydro
  • origin/stage/bouguettaia
  • feature/gmsh-reader
  • feature/reconstruction
  • save_clemence
  • feature/kinetic-schemes
  • feature/local-dt-fsi
  • feature/composite-scheme-sources
  • feature/composite-scheme-other-fluxes
  • 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
  • master protected
  • 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

Mesh.hpp

Blame
  • Mesh.hpp 1.50 KiB
    #ifndef MESH_HPP
    #define MESH_HPP
    
    #include <algebra/TinyVector.hpp>
    #include <mesh/IMesh.hpp>
    #include <mesh/ItemValue.hpp>
    #include <utils/CSRGraph.hpp>
    
    #include <memory>
    
    template <typename ConnectivityType>
    class Mesh final : public IMesh
    {
     public:
      using Connectivity = ConnectivityType;
    
      static constexpr size_t Dimension = ConnectivityType::Dimension;
      using Rd                          = TinyVector<Dimension>;
    
     private:
      const std::shared_ptr<const Connectivity> m_connectivity;
      NodeValue<const Rd> m_xr;
      NodeValue<Rd> m_mutable_xr;
    
     public:
      PUGS_INLINE
      size_t
      dimension() const
      {
        return Dimension;
      }
    
      PUGS_INLINE
      const Connectivity&
      connectivity() const
      {
        return *m_connectivity;
      }
    
      PUGS_INLINE
      const auto&
      shared_connectivity() const
      {
        return m_connectivity;
      }
    
      PUGS_INLINE
      size_t
      numberOfNodes() const
      {
        return m_connectivity->numberOfNodes();
      }
    
      PUGS_INLINE
      size_t
      numberOfFaces() const
      {
        return m_connectivity->numberOfFaces();
      }
    
      PUGS_INLINE
      size_t
      numberOfCells() const
      {
        return m_connectivity->numberOfCells();
      }
    
      PUGS_INLINE
      const NodeValue<const Rd>&
      xr() const
      {
        return m_xr;
      }
    
      PUGS_INLINE
      NodeValue<Rd>
      mutableXr() const
      {
        return m_mutable_xr;
      }
    
      PUGS_INLINE
      Mesh(const std::shared_ptr<const Connectivity>& connectivity, NodeValue<Rd>& xr)
        : m_connectivity{connectivity}, m_xr{xr}, m_mutable_xr{xr}
      {
        ;
      }
    
      Mesh() = delete;
    
      ~Mesh()
      {
        ;
      }
    };
    
    #endif   // MESH_HPP