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 std::vector< NekDouble > &velocity)
 
ZonePrescribeShPtr ZonePrescribe_Init (int id, int domainID, const CompositeMap &domain, const int coordDim, LibUtilities::EquationSharedPtr xDeform, LibUtilities::EquationSharedPtr yDeform, LibUtilities::EquationSharedPtr zDeform)
 
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 78 of file Python/Zones.cpp.

79{
81
82 py::class_<ZoneBase, std::shared_ptr<ZoneBase>, boost::noncopyable>(
83 "ZoneBase", py::no_init)
84 .def("GetMovementType", &ZoneBase::GetMovementType)
85 .def("GetDomain", &ZoneBase::GetDomain)
86 .def("GetId", &ZoneBase::GetId,
87 py::return_value_policy<py::copy_non_const_reference>())
88 .def("GetDomainID", &ZoneBase::GetDomainID,
89 py::return_value_policy<py::copy_non_const_reference>())
90 .def("Move", &ZoneBase::Move)
91 .def("GetElements", &ZoneBase::GetElements,
92 py::return_internal_reference<>())
93 .def("GetMoved", &ZoneBase::GetMoved,
94 py::return_value_policy<py::copy_non_const_reference>())
95 .def("ClearBoundingBoxes", &ZoneBase::ClearBoundingBoxes);
96
97 py::class_<ZoneRotate, py::bases<ZoneBase>, std::shared_ptr<ZoneRotate>>(
98 "ZoneRotate", py::no_init)
99 .def("__init__", py::make_constructor(&ZoneRotate_Init))
100 .def("GetAngualrVel", &ZoneRotate::GetAngularVel)
101 .def("GetOrigin", &ZoneRotate::GetOrigin,
102 py::return_value_policy<py::copy_const_reference>())
103 .def("GetAxis", &ZoneRotate::GetAxis,
104 py::return_value_policy<py::copy_const_reference>())
105 .def("GetAngularVelEqn", &ZoneRotate::GetAngularVelEqn);
106
107 py::class_<ZoneTranslate, py::bases<ZoneBase>,
108 std::shared_ptr<ZoneTranslate>>("ZoneTranslate", py::no_init)
109 .def("__init__", py::make_constructor(&ZoneTranslate_Init))
110 .def("GetVel", &ZoneTranslate::GetVel);
111
112 py::class_<ZonePrescribe, py::bases<ZoneBase>,
113 std::shared_ptr<ZonePrescribe>>("ZonePrescribe", py::no_init)
114 .def("__init__", py::make_constructor(&ZonePrescribe_Init))
115 .def("GetXDeform", &ZonePrescribe::GetXDeform)
116 .def("GetYDeform", &ZonePrescribe::GetYDeform)
117 .def("GetZDeform", &ZonePrescribe::GetZDeform)
118 .def("GetXDeformEquation", &ZonePrescribe::GetXDeformEquation)
119 .def("GetYDeformEquation", &ZonePrescribe::GetYDeformEquation)
120 .def("GetZDeformEquation", &ZonePrescribe::GetZDeformEquation);
121
122 py::class_<ZoneFixed, py::bases<ZoneBase>, std::shared_ptr<ZoneFixed>>(
123 "ZoneFixed", py::no_init)
124 .def("__init__", py::make_constructor(&ZoneFixed_Init));
125}
#define NEKPY_WRAP_ENUM_STRING(ENUMNAME, MAPNAME)
Definition: NekPyConfig.hpp:78
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 std::vector< NekDouble > &velocity)
ZoneFixedShPtr ZoneFixed_Init(int id, int domainID, const CompositeMap &domain, const int coordDim)
ZonePrescribeShPtr ZonePrescribe_Init(int id, int domainID, const CompositeMap &domain, const int coordDim, LibUtilities::EquationSharedPtr xDeform, LibUtilities::EquationSharedPtr yDeform, LibUtilities::EquationSharedPtr zDeform)
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:57

References Nektar::SpatialDomains::MovementTypeStr, NEKPY_WRAP_ENUM_STRING, ZoneFixed_Init(), ZonePrescribe_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 72 of file Python/Zones.cpp.

74{
75 return std::make_shared<ZoneFixed>(id, domainID, domain, coordDim);
76}

Referenced by export_Zones().

◆ ZonePrescribe_Init()

ZonePrescribeShPtr ZonePrescribe_Init ( int  id,
int  domainID,
const CompositeMap domain,
const int  coordDim,
LibUtilities::EquationSharedPtr  xDeform,
LibUtilities::EquationSharedPtr  yDeform,
LibUtilities::EquationSharedPtr  zDeform 
)

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

67{
68 return std::make_shared<ZonePrescribe>(id, domainID, domain, coordDim,
69 xDeform, yDeform, zDeform);
70}

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 std::vector< NekDouble > &  velocity 
)

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

56{
57 return std::make_shared<ZoneTranslate>(id, domainID, domain, coordDim,
58 velocity);
59}
const std::vector< NekDouble > velocity

References Nektar::MovementTests::velocity.

Referenced by export_Zones().