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

MeshDataManager.hpp

Blame
    • Stéphane Del Pino's avatar
      fb8866f9
      Add DiamondDualConnectivityManager and DiamondDualMeshManager · fb8866f9
      Stéphane Del Pino authored
      These mechanisms are designed to manage diamond meshes/connectivities
      
      The main idea is that the diamond mesh is stored as long as its
      primary mesh lives, and can be retrieved easily.
      
      The same mechanism is defined for diamond mesh connectivities. Thus in
      a moving grid context, the only required calculations will be the
      definition of the diamond mesh's vertices coordinates.
      
      Recall that diamond meshes are just meshes so all meshes'
      functionality apply to them.
      fb8866f9
      History
      Add DiamondDualConnectivityManager and DiamondDualMeshManager
      Stéphane Del Pino authored
      These mechanisms are designed to manage diamond meshes/connectivities
      
      The main idea is that the diamond mesh is stored as long as its
      primary mesh lives, and can be retrieved easily.
      
      The same mechanism is defined for diamond mesh connectivities. Thus in
      a moving grid context, the only required calculations will be the
      definition of the diamond mesh's vertices coordinates.
      
      Recall that diamond meshes are just meshes so all meshes'
      functionality apply to them.
    MeshDataManager.hpp 1.05 KiB
    #ifndef MESH_DATA_MANAGER_HPP
    #define MESH_DATA_MANAGER_HPP
    
    #include <mesh/IMeshData.hpp>
    #include <utils/PugsAssert.hpp>
    #include <utils/PugsMacros.hpp>
    
    #include <memory>
    #include <unordered_map>
    
    class IMesh;
    
    template <size_t>
    class Connectivity;
    
    template <typename ConnectivityType>
    class Mesh;
    
    template <size_t Dimension>
    class MeshData;
    
    class MeshDataManager
    {
     private:
      std::unordered_map<const IMesh*, std::shared_ptr<IMeshData>> m_mesh_mesh_data_map;
    
      static MeshDataManager* m_instance;
    
      MeshDataManager(const MeshDataManager&) = delete;
      MeshDataManager(MeshDataManager&&)      = delete;
    
      MeshDataManager()  = default;
      ~MeshDataManager() = default;
    
     public:
      static void create();
      static void destroy();
    
      PUGS_INLINE
      static MeshDataManager&
      instance()
      {
        Assert(m_instance != nullptr, "MeshDataManager was not created!");
        return *m_instance;
      }
    
      void deleteMeshData(const IMesh*);
    
      template <size_t Dimension>
      MeshData<Dimension>& getMeshData(const Mesh<Connectivity<Dimension>>&);
    };
    
    #endif   // MESH_DATA_MANAGER_HPP