1#ifndef included_AMP_Mesh_MeshFactory
2#define included_AMP_Mesh_MeshFactory
4#include "AMP/utils/FactoryStrategy.hpp"
21 return std::make_unique<MESH>( params );
26 return std::make_unique<MESH>( fid, manager );
38 return singletonInstance;
42 static std::shared_ptr<Mesh>
create( std::shared_ptr<MeshParameters> parameters );
52 FactoryStrategy<Mesh, std::shared_ptr<MeshParameters>>::registerFactory(
53 name, createMeshFromParams<MESH> );
54 FactoryStrategy<Mesh, int64_t, AMP::IO::RestartManager *>::registerFactory(
55 name, createMeshFromRestart<MESH> );
Class to manage reading/writing restart data.
static MeshFactory & getFactory()
get a singleton instance of the factory
static void registerMesh(const std::string &name)
Register a mesh with the factory.
static std::shared_ptr< Mesh > create(std::shared_ptr< MeshParameters > parameters)
Create the mesh from the parameters.
static std::shared_ptr< Mesh > create(int64_t fid, AMP::IO::RestartManager *manager)
Create the mesh from the restart file.
std::unique_ptr< MESH > createMeshFromParams(std::shared_ptr< MeshParameters > params)
std::unique_ptr< MESH > createMeshFromRestart(int64_t fid, AMP::IO::RestartManager *manager)