Skip to content
Snippets Groups Projects
MeshGraph.cpp 1.14 KiB
Newer Older
#include <SpatialDomains/MeshGraph.h>
#include <boost/python.hpp>

using namespace Nektar;
using namespace Nektar::SpatialDomains;
using namespace boost::python;

/// MeshGraph::Read overloaded method selector
//static boost::shared_ptr<MeshGraph> (*MeshGraph_Read)  (
//    const LibUtilities::SessionReaderSharedPtr&) = &MeshGraph::Read;

/*
 * @brief Lightweight wrapper around MeshGraph::Read to avoid wrapping
 * DomainRange struct.
 */
MeshGraphSharedPtr MeshGraph_Read(
    const LibUtilities::SessionReaderSharedPtr &session)
{
    return MeshGraph::Read(session);
}

/// MeshGraph::Read overloaded method selector
static boost::shared_ptr<MeshGraph> (*MeshGraph_Read_2)(
    const std::string&, bool) = &MeshGraph::Read;

/**
 * @brief MeshGraph exports.
 */
void export_MeshGraph()
{
    class_<MeshGraph,
           boost::shared_ptr<MeshGraph> >(
               "MeshGraph", init<>())

        .def(init<int, int>())
        .def(init<LibUtilities::SessionReaderSharedPtr >())

        .def("Read", MeshGraph_Read)
        .def("Read", MeshGraph_Read_2)
        .staticmethod("Read")

        .def("GetMeshDimension", &MeshGraph::GetMeshDimension)
        ;
}