// python wrapper for vtkFLUENTReader // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkFLUENTReader.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkFLUENTReader(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkFLUENTReader_ClassNew(); } #ifndef DECLARED_PyvtkMultiBlockDataSetAlgorithm_ClassNew extern "C" { PyObject *PyvtkMultiBlockDataSetAlgorithm_ClassNew(); } #define DECLARED_PyvtkMultiBlockDataSetAlgorithm_ClassNew #endif static const char *PyvtkFLUENTReader_Doc = "vtkFLUENTReader - reads a dataset in Fluent file format\n\n" "Superclass: vtkMultiBlockDataSetAlgorithm\n\n" "vtkFLUENTReader creates an unstructured grid dataset. It reads .cas\n" "and .dat files stored in FLUENT native format.\n\n" "@par Thanks: Thanks to Brian W. Dotson & Terry E. Jordan (Department\n" "of Energy, National Energy Technology Laboratory) & Douglas McCorkle\n" "(Iowa State University) who developed this class. Please address all\n" "comments to Brian Dotson (brian.dotson\n\n" "etl.doe.gov) & Terry Jordan (terry.jordan@sa.netl.doe.gov) & Doug\n" "McCorkle (mccdo@iastate.edu)\n\n" "@sa\n" "vtkGAMBITReader\n\n"; static PyObject * PyvtkFLUENTReader_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkFLUENTReader::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkFLUENTReader::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkFLUENTReader *tempr = vtkFLUENTReader::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkFLUENTReader *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkFLUENTReader::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkFLUENTReader_SetFileName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetFileName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetFileName(temp0); } else { op->vtkFLUENTReader::SetFileName(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFLUENTReader_GetFileName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetFileName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { char *tempr = (ap.IsBound() ? op->GetFileName() : op->vtkFLUENTReader::GetFileName()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_GetNumberOfCells(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfCells"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetNumberOfCells() : op->vtkFLUENTReader::GetNumberOfCells()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_GetNumberOfCellArrays(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfCellArrays"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetNumberOfCellArrays() : op->vtkFLUENTReader::GetNumberOfCellArrays()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_GetCellArrayName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCellArrayName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { const char *tempr = (ap.IsBound() ? op->GetCellArrayName(temp0) : op->vtkFLUENTReader::GetCellArrayName(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_GetCellArrayStatus(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCellArrayStatus"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->GetCellArrayStatus(temp0) : op->vtkFLUENTReader::GetCellArrayStatus(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_SetCellArrayStatus(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetCellArrayStatus"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); char *temp0 = nullptr; int temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { if (ap.IsBound()) { op->SetCellArrayStatus(temp0, temp1); } else { op->vtkFLUENTReader::SetCellArrayStatus(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFLUENTReader_DisableAllCellArrays(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "DisableAllCellArrays"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->DisableAllCellArrays(); } else { op->vtkFLUENTReader::DisableAllCellArrays(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFLUENTReader_EnableAllCellArrays(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "EnableAllCellArrays"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->EnableAllCellArrays(); } else { op->vtkFLUENTReader::EnableAllCellArrays(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFLUENTReader_SetDataByteOrderToBigEndian(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetDataByteOrderToBigEndian"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetDataByteOrderToBigEndian(); } else { op->vtkFLUENTReader::SetDataByteOrderToBigEndian(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFLUENTReader_SetDataByteOrderToLittleEndian(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetDataByteOrderToLittleEndian"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetDataByteOrderToLittleEndian(); } else { op->vtkFLUENTReader::SetDataByteOrderToLittleEndian(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFLUENTReader_GetDataByteOrder(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDataByteOrder"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetDataByteOrder() : op->vtkFLUENTReader::GetDataByteOrder()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFLUENTReader_SetDataByteOrder(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetDataByteOrder"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetDataByteOrder(temp0); } else { op->vtkFLUENTReader::SetDataByteOrder(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFLUENTReader_GetDataByteOrderAsString(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDataByteOrderAsString"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFLUENTReader *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { const char *tempr = (ap.IsBound() ? op->GetDataByteOrderAsString() : op->vtkFLUENTReader::GetDataByteOrderAsString()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkFLUENTReader_Methods[] = { {"IsTypeOf", PyvtkFLUENTReader_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkFLUENTReader_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkFLUENTReader_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkFLUENTReader\nC++: static vtkFLUENTReader *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkFLUENTReader_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkFLUENTReader\nC++: vtkFLUENTReader *NewInstance()\n\n"}, {"SetFileName", PyvtkFLUENTReader_SetFileName, METH_VARARGS, "V.SetFileName(string)\nC++: virtual void SetFileName(const char *_arg)\n\nSpecify the file name of the Fluent case file to read.\n"}, {"GetFileName", PyvtkFLUENTReader_GetFileName, METH_VARARGS, "V.GetFileName() -> string\nC++: virtual char *GetFileName()\n\nSpecify the file name of the Fluent case file to read.\n"}, {"GetNumberOfCells", PyvtkFLUENTReader_GetNumberOfCells, METH_VARARGS, "V.GetNumberOfCells() -> int\nC++: virtual int GetNumberOfCells()\n\nGet the total number of cells. The number of cells is only valid\nafter a successful read of the data file is performed. Initial\nvalue is 0.\n"}, {"GetNumberOfCellArrays", PyvtkFLUENTReader_GetNumberOfCellArrays, METH_VARARGS, "V.GetNumberOfCellArrays() -> int\nC++: int GetNumberOfCellArrays(void)\n\nGet the number of cell arrays available in the input.\n"}, {"GetCellArrayName", PyvtkFLUENTReader_GetCellArrayName, METH_VARARGS, "V.GetCellArrayName(int) -> string\nC++: const char *GetCellArrayName(int index)\n\nGet the name of the cell array with the given index in the\ninput.\n"}, {"GetCellArrayStatus", PyvtkFLUENTReader_GetCellArrayStatus, METH_VARARGS, "V.GetCellArrayStatus(string) -> int\nC++: int GetCellArrayStatus(const char *name)\n\nGet/Set whether the cell array with the given name is to be read.\n"}, {"SetCellArrayStatus", PyvtkFLUENTReader_SetCellArrayStatus, METH_VARARGS, "V.SetCellArrayStatus(string, int)\nC++: void SetCellArrayStatus(const char *name, int status)\n\nGet/Set whether the cell array with the given name is to be read.\n"}, {"DisableAllCellArrays", PyvtkFLUENTReader_DisableAllCellArrays, METH_VARARGS, "V.DisableAllCellArrays()\nC++: void DisableAllCellArrays()\n\nTurn on/off all cell arrays.\n"}, {"EnableAllCellArrays", PyvtkFLUENTReader_EnableAllCellArrays, METH_VARARGS, "V.EnableAllCellArrays()\nC++: void EnableAllCellArrays()\n\nTurn on/off all cell arrays.\n"}, {"SetDataByteOrderToBigEndian", PyvtkFLUENTReader_SetDataByteOrderToBigEndian, METH_VARARGS, "V.SetDataByteOrderToBigEndian()\nC++: void SetDataByteOrderToBigEndian()\n\nThese methods should be used instead of the SwapBytes methods.\nThey indicate the byte ordering of the file you are trying to\nread in. These methods will then either swap or not swap the\nbytes depending on the byte ordering of the machine it is being\nrun on. For example, reading in a BigEndian file on a BigEndian\nmachine will result in no swapping. Trying to read the same file\non a LittleEndian machine will result in swapping. As a quick\nnote most UNIX machines are BigEndian while PC's and VAX tend to\nbe LittleEndian. So if the file you are reading in was generated\non a VAX or PC, SetDataByteOrderToLittleEndian otherwise\nSetDataByteOrderToBigEndian. Not used when reading text files.\n"}, {"SetDataByteOrderToLittleEndian", PyvtkFLUENTReader_SetDataByteOrderToLittleEndian, METH_VARARGS, "V.SetDataByteOrderToLittleEndian()\nC++: void SetDataByteOrderToLittleEndian()\n\nThese methods should be used instead of the SwapBytes methods.\nThey indicate the byte ordering of the file you are trying to\nread in. These methods will then either swap or not swap the\nbytes depending on the byte ordering of the machine it is being\nrun on. For example, reading in a BigEndian file on a BigEndian\nmachine will result in no swapping. Trying to read the same file\non a LittleEndian machine will result in swapping. As a quick\nnote most UNIX machines are BigEndian while PC's and VAX tend to\nbe LittleEndian. So if the file you are reading in was generated\non a VAX or PC, SetDataByteOrderToLittleEndian otherwise\nSetDataByteOrderToBigEndian. Not used when reading text files.\n"}, {"GetDataByteOrder", PyvtkFLUENTReader_GetDataByteOrder, METH_VARARGS, "V.GetDataByteOrder() -> int\nC++: int GetDataByteOrder()\n\nThese methods should be used instead of the SwapBytes methods.\nThey indicate the byte ordering of the file you are trying to\nread in. These methods will then either swap or not swap the\nbytes depending on the byte ordering of the machine it is being\nrun on. For example, reading in a BigEndian file on a BigEndian\nmachine will result in no swapping. Trying to read the same file\non a LittleEndian machine will result in swapping. As a quick\nnote most UNIX machines are BigEndian while PC's and VAX tend to\nbe LittleEndian. So if the file you are reading in was generated\non a VAX or PC, SetDataByteOrderToLittleEndian otherwise\nSetDataByteOrderToBigEndian. Not used when reading text files.\n"}, {"SetDataByteOrder", PyvtkFLUENTReader_SetDataByteOrder, METH_VARARGS, "V.SetDataByteOrder(int)\nC++: void SetDataByteOrder(int)\n\nThese methods should be used instead of the SwapBytes methods.\nThey indicate the byte ordering of the file you are trying to\nread in. These methods will then either swap or not swap the\nbytes depending on the byte ordering of the machine it is being\nrun on. For example, reading in a BigEndian file on a BigEndian\nmachine will result in no swapping. Trying to read the same file\non a LittleEndian machine will result in swapping. As a quick\nnote most UNIX machines are BigEndian while PC's and VAX tend to\nbe LittleEndian. So if the file you are reading in was generated\non a VAX or PC, SetDataByteOrderToLittleEndian otherwise\nSetDataByteOrderToBigEndian. Not used when reading text files.\n"}, {"GetDataByteOrderAsString", PyvtkFLUENTReader_GetDataByteOrderAsString, METH_VARARGS, "V.GetDataByteOrderAsString() -> string\nC++: const char *GetDataByteOrderAsString()\n\nThese methods should be used instead of the SwapBytes methods.\nThey indicate the byte ordering of the file you are trying to\nread in. These methods will then either swap or not swap the\nbytes depending on the byte ordering of the machine it is being\nrun on. For example, reading in a BigEndian file on a BigEndian\nmachine will result in no swapping. Trying to read the same file\non a LittleEndian machine will result in swapping. As a quick\nnote most UNIX machines are BigEndian while PC's and VAX tend to\nbe LittleEndian. So if the file you are reading in was generated\non a VAX or PC, SetDataByteOrderToLittleEndian otherwise\nSetDataByteOrderToBigEndian. Not used when reading text files.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkFLUENTReader_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkIOGeometryPython.vtkFLUENTReader", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkFLUENTReader_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkFLUENTReader_StaticNew() { return vtkFLUENTReader::New(); } PyObject *PyvtkFLUENTReader_ClassNew() { PyVTKClass_Add( &PyvtkFLUENTReader_Type, PyvtkFLUENTReader_Methods, "vtkFLUENTReader", &PyvtkFLUENTReader_StaticNew); PyTypeObject *pytype = &PyvtkFLUENTReader_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkMultiBlockDataSetAlgorithm_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkFLUENTReader( PyObject *dict) { PyObject *o; o = PyvtkFLUENTReader_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkFLUENTReader", o) != 0) { Py_DECREF(o); } }