Nektar++
Loading...
Searching...
No Matches
Functions
Geometry.cpp File Reference
#include <SpatialDomains/Geometry.h>
#include <SpatialDomains/Geometry1D.h>
#include <SpatialDomains/Geometry2D.h>
#include <LibUtilities/Python/BasicUtils/SharedArray.hpp>
#include <LibUtilities/Python/NekPyConfig.hpp>
#include <SpatialDomains/Python/SpatialDomains.h>

Go to the source code of this file.

Functions

bool Geometry_ContainsPoint (Geometry *geom, const Array< OneD, const NekDouble > &gloCoord)
 
void Geometry_GenGeomFactors (Geometry *geom)
 
bool Geometry_IsValid (Geometry *geom)
 
void export_Geometry (py::module &m)
 

Function Documentation

◆ export_Geometry()

void export_Geometry ( py::module &  m)

Definition at line 64 of file Python/Geometry.cpp.

65{
66 py::classh<Geometry>(m, "Geometry")
67 .def("GetCoordim", &Geometry::GetCoordim)
68 .def("GetGlobalID", &Geometry::GetGlobalID)
69 .def("SetGlobalID", &Geometry::SetGlobalID)
70
71 .def("Setup", &Geometry::Setup)
72 .def("FillGeom", &Geometry::FillGeom)
73 .def("GenGeomFactors", &Geometry_GenGeomFactors)
74 .def("IsValid", &Geometry_IsValid)
75
76 .def("ContainsPoint", &Geometry_ContainsPoint)
77
78 .def("GetVertex", &Geometry::GetVertex,
79 py::return_value_policy::reference)
80 .def("GetEdge", &Geometry::GetEdge, py::return_value_policy::reference)
81 .def("GetFace", &Geometry::GetFace, py::return_value_policy::reference)
82 .def("GetVid", &Geometry::GetVid)
83 .def("GetEid", &Geometry::GetEid)
84 .def("GetFid", &Geometry::GetFid)
85 .def("GetTid", &Geometry::GetTid)
86
87 .def("GetNumVerts", &Geometry::GetNumVerts)
88 .def("GetNumEdges", &Geometry::GetNumEdges)
89 .def("GetNumFaces", &Geometry::GetNumFaces)
90 .def("GetShapeDim", &Geometry::GetShapeDim)
91 .def("GetShapeType", &Geometry::GetShapeType)
92 .def("GetEorient", &Geometry::GetEorient)
93 .def("GetForient", &Geometry::GetForient)
94
95 .def("GetXmap", &Geometry::GetXmap)
96 .def("GetCoeffs", &Geometry::GetCoeffs);
97}
bool Geometry_ContainsPoint(Geometry *geom, const Array< OneD, const NekDouble > &gloCoord)
void Geometry_GenGeomFactors(Geometry *geom)
bool Geometry_IsValid(Geometry *geom)
LibUtilities::ShapeType GetShapeType(void)
Get the geometric shape type of this object.
Definition Geometry.h:314
void SetGlobalID(int globalid)
Set the ID of this object.
Definition Geometry.h:330
int GetNumFaces() const
Get the number of faces of this object.
Definition Geometry.h:419
int GetShapeDim() const
Get the object's shape dimension.
Definition Geometry.h:430
int GetVid(int i) const
Returns global id of vertex i of this object.
Definition Geometry.h:353
const Array< OneD, const NekDouble > & GetCoeffs(const int i) const
Return the coefficients of the transformation Geometry::m_xmap in coordinate direction i.
Definition Geometry.h:448
int GetGlobalID(void) const
Get the ID of this object.
Definition Geometry.h:322
PointGeom * GetVertex(int i) const
Returns vertex i of this object.
Definition Geometry.h:361
int GetCoordim() const
Return the coordinate dimension of this object (i.e. the dimension of the space in which this object ...
Definition Geometry.h:279
int GetFid(int i) const
Get the ID of face i of this object.
Definition Geometry.cpp:118
void FillGeom()
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements.
Definition Geometry.h:460
StdRegions::StdExpansionSharedPtr GetXmap() const
Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standar...
Definition Geometry.h:439
int GetNumEdges() const
Get the number of edges of this object.
Definition Geometry.h:411
int GetNumVerts() const
Get the number of vertices of this object.
Definition Geometry.h:403
Geometry1D * GetEdge(int i) const
Returns edge i of this object.
Definition Geometry.h:369
Geometry2D * GetFace(int i) const
Returns face i of this object.
Definition Geometry.h:377
StdRegions::Orientation GetEorient(const int i) const
Returns the orientation of edge i with respect to the ordering of edges in the standard element.
Definition Geometry.h:386
int GetTid(int i) const
Get the ID of trace i of this object.
Definition Geometry.h:341
int GetEid(int i) const
Get the ID of edge i of this object.
Definition Geometry.cpp:110
StdRegions::Orientation GetForient(const int i) const
Returns the orientation of face i with respect to the ordering of faces in the standard element.
Definition Geometry.h:395

References Nektar::SpatialDomains::Geometry::FillGeom(), Geometry_ContainsPoint(), Geometry_GenGeomFactors(), Geometry_IsValid(), Nektar::SpatialDomains::Geometry::GetCoeffs(), Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::SpatialDomains::Geometry::GetEdge(), Nektar::SpatialDomains::Geometry::GetEid(), Nektar::SpatialDomains::Geometry::GetEorient(), Nektar::SpatialDomains::Geometry::GetFace(), Nektar::SpatialDomains::Geometry::GetFid(), Nektar::SpatialDomains::Geometry::GetForient(), Nektar::SpatialDomains::Geometry::GetGlobalID(), Nektar::SpatialDomains::Geometry::GetNumEdges(), Nektar::SpatialDomains::Geometry::GetNumFaces(), Nektar::SpatialDomains::Geometry::GetNumVerts(), Nektar::SpatialDomains::Geometry::GetShapeDim(), Nektar::SpatialDomains::Geometry::GetShapeType(), Nektar::SpatialDomains::Geometry::GetTid(), Nektar::SpatialDomains::Geometry::GetVertex(), Nektar::SpatialDomains::Geometry::GetVid(), Nektar::SpatialDomains::Geometry::GetXmap(), Nektar::SpatialDomains::Geometry::SetGlobalID(), and Nektar::SpatialDomains::Geometry::Setup().

Referenced by PYBIND11_MODULE().

◆ Geometry_ContainsPoint()

bool Geometry_ContainsPoint ( Geometry geom,
const Array< OneD, const NekDouble > &  gloCoord 
)

Definition at line 47 of file Python/Geometry.cpp.

49{
50 return geom->ContainsPoint(gloCoord);
51}
bool ContainsPoint(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0)
Determine whether an element contains a particular Cartesian coordinate .
Definition Geometry.h:471

References Nektar::SpatialDomains::Geometry::ContainsPoint().

Referenced by export_Geometry().

◆ Geometry_GenGeomFactors()

void Geometry_GenGeomFactors ( Geometry geom)

Definition at line 53 of file Python/Geometry.cpp.

54{
55 GeomFactorsSharedPtr geomFactors = geom->GetGeomFactors();
56}
GeomFactorsSharedPtr GetGeomFactors()
Get the geometric factors for this object, generating them if required.
Definition Geometry.h:297
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
Definition GeomFactors.h:58

References Nektar::SpatialDomains::Geometry::GetGeomFactors().

Referenced by export_Geometry().

◆ Geometry_IsValid()

bool Geometry_IsValid ( Geometry geom)

Definition at line 58 of file Python/Geometry.cpp.

59{
60 GeomFactorsSharedPtr geomFactors = geom->GetGeomFactors();
61 return geomFactors->IsValid();
62}

References Nektar::SpatialDomains::Geometry::GetGeomFactors().

Referenced by export_Geometry().