Nektar++
Functions
Python/Zones.cpp File Reference
#include <LibUtilities/Python/NekPyConfig.hpp>
#include <SpatialDomains/Movement/Zones.h>
#include <boost/python/suite/indexing/map_indexing_suite.hpp>

Go to the source code of this file.

Functions

ZoneRotateShPtr ZoneRotate_Init (int id, int domainID, const CompositeMap &domain, const int coordDim, const NekPoint< NekDouble > &origin, const DNekVec &axis, LibUtilities::EquationSharedPtr &angularVelEqn)
 
ZoneTranslateShPtr ZoneTranslate_Init (int id, int domainID, const CompositeMap &domain, const int coordDim, const Array< OneD, LibUtilities::EquationSharedPtr > &velocityEqns, const Array< OneD, LibUtilities::EquationSharedPtr > &displacementEqns)
 
ZoneFixedShPtr ZoneFixed_Init (int id, int domainID, const CompositeMap &domain, const int coordDim)
 
void export_Zones ()
 

Function Documentation

◆ export_Zones()

void export_Zones ( )

Definition at line 67 of file Python/Zones.cpp.

68{
70
71 py::class_<ZoneBase, std::shared_ptr<ZoneBase>, boost::noncopyable>(
72 "ZoneBase", py::no_init)
73 .def("GetMovementType", &ZoneBase::GetMovementType)
74 .def("GetDomain", &ZoneBase::GetDomain)
75 .def("GetId", &ZoneBase::GetId,
76 py::return_value_policy<py::copy_non_const_reference>())
77 .def("GetDomainID", &ZoneBase::GetDomainID,
78 py::return_value_policy<py::copy_non_const_reference>())
79 .def("Move", &ZoneBase::Move)
80 .def("GetElements", &ZoneBase::GetElements,
81 py::return_internal_reference<>())
82 .def("GetMoved", &ZoneBase::GetMoved,
83 py::return_value_policy<py::copy_non_const_reference>())
84 .def("ClearBoundingBoxes", &ZoneBase::ClearBoundingBoxes);
85
86 py::class_<ZoneRotate, py::bases<ZoneBase>, std::shared_ptr<ZoneRotate>>(
87 "ZoneRotate", py::no_init)
88 .def("__init__", py::make_constructor(&ZoneRotate_Init))
89 .def("GetAngualrVel", &ZoneRotate::GetAngularVel)
90 .def("GetOrigin", &ZoneRotate::GetOrigin,
91 py::return_value_policy<py::copy_const_reference>())
92 .def("GetAxis", &ZoneRotate::GetAxis,
93 py::return_value_policy<py::copy_const_reference>())
94 .def("GetAngularVelEqn", &ZoneRotate::GetAngularVelEqn);
95
96 py::class_<ZoneTranslate, py::bases<ZoneBase>,
97 std::shared_ptr<ZoneTranslate>>("ZoneTranslate", py::no_init)
98 .def("__init__", py::make_constructor(&ZoneTranslate_Init))
99 .def("GetVelocityEquation", &ZoneTranslate::GetVelocityEquation)
100 .def("GetDisplacementEqn", &ZoneTranslate::GetDisplacementEquation);
101
102 py::class_<ZoneFixed, py::bases<ZoneBase>, std::shared_ptr<ZoneFixed>>(
103 "ZoneFixed", py::no_init)
104 .def("__init__", py::make_constructor(&ZoneFixed_Init));
105}
#define NEKPY_WRAP_ENUM_STRING(ENUMNAME, MAPNAME)
Definition: NekPyConfig.hpp:80
ZoneRotateShPtr ZoneRotate_Init(int id, int domainID, const CompositeMap &domain, const int coordDim, const NekPoint< NekDouble > &origin, const DNekVec &axis, LibUtilities::EquationSharedPtr &angularVelEqn)
ZoneFixedShPtr ZoneFixed_Init(int id, int domainID, const CompositeMap &domain, const int coordDim)
ZoneTranslateShPtr ZoneTranslate_Init(int id, int domainID, const CompositeMap &domain, const int coordDim, const Array< OneD, LibUtilities::EquationSharedPtr > &velocityEqns, const Array< OneD, LibUtilities::EquationSharedPtr > &displacementEqns)
MovementType
Enum of zone movement type.
Definition: Zones.h:47
const std::string MovementTypeStr[]
Map of zone movement type to movement type string.
Definition: Zones.h:56

References Nektar::SpatialDomains::MovementTypeStr, NEKPY_WRAP_ENUM_STRING, ZoneFixed_Init(), ZoneRotate_Init(), and ZoneTranslate_Init().

Referenced by BOOST_PYTHON_MODULE().

◆ ZoneFixed_Init()

ZoneFixedShPtr ZoneFixed_Init ( int  id,
int  domainID,
const CompositeMap domain,
const int  coordDim 
)

Definition at line 61 of file Python/Zones.cpp.

63{
64 return std::make_shared<ZoneFixed>(id, domainID, domain, coordDim);
65}

Referenced by export_Zones().

◆ ZoneRotate_Init()

ZoneRotateShPtr ZoneRotate_Init ( int  id,
int  domainID,
const CompositeMap domain,
const int  coordDim,
const NekPoint< NekDouble > &  origin,
const DNekVec axis,
LibUtilities::EquationSharedPtr angularVelEqn 
)

Definition at line 42 of file Python/Zones.cpp.

47{
48 return std::make_shared<ZoneRotate>(id, domainID, domain, coordDim, origin,
49 axis, angularVelEqn);
50}
const NekPoint< NekDouble > origin

References Nektar::MovementTests::axis, and Nektar::MovementTests::origin.

Referenced by export_Zones().

◆ ZoneTranslate_Init()

ZoneTranslateShPtr ZoneTranslate_Init ( int  id,
int  domainID,
const CompositeMap domain,
const int  coordDim,
const Array< OneD, LibUtilities::EquationSharedPtr > &  velocityEqns,
const Array< OneD, LibUtilities::EquationSharedPtr > &  displacementEqns 
)

Definition at line 52 of file Python/Zones.cpp.

56{
57 return std::make_shared<ZoneTranslate>(id, domainID, domain, coordDim,
58 velocityEqns, displacementEqns);
59}

Referenced by export_Zones().