Geometry.cpp 1.06 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#include <SpatialDomains/Geometry.h>
#include <NekPyConfig.hpp>

using namespace Nektar;
using namespace Nektar::SpatialDomains;

// Thin wrapper for ContainsPoint
bool Geometry_ContainsPoint(GeometrySharedPtr geom,
                            const Array<OneD, const NekDouble>& gloCoord)
{
    return geom->ContainsPoint(gloCoord);
}

void Geometry_GenGeomFactors(GeometrySharedPtr geom)
{
    GeomFactorsSharedPtr geomFactors = geom->GetGeomFactors();
}

void export_Geometry()
{
    py::class_<Geometry,
               std::shared_ptr<Geometry>,
               boost::noncopyable>(
                   "Geometry", py::no_init)

        .def("GetCoordim",     &Geometry::GetCoordim)
        .def("GetGlobalID",    &Geometry::GetGlobalID)
        .def("FillGeom",       &Geometry::FillGeom)
        .def("GetXmap",        &Geometry::GetXmap)
        .def("GenGeomFactors", &Geometry_GenGeomFactors)
        .def("ContainsPoint",  &Geometry_ContainsPoint)
        .def("GetCoeffs",      &Geometry::GetCoeffs,
             py::return_value_policy<py::copy_const_reference>())
        ;
}