VTK  9.3.1
vtkMPI4PyCommunicator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkMPI4PyCommunicator_h
15 #define vtkMPI4PyCommunicator_h
16 // This class should only be wrapped for Python. The hierarchy "wrapping" also
17 // needs to see the class for use in the Python wrappers.
18 #if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_HIERARCHY__) || defined(__VTK_WRAP_PYTHON__)
19 
20 #include "vtkPython.h" // For PyObject*; must be first
21 
22 #include "vtkObject.h"
23 #include "vtkParallelMPI4PyModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkMPICommunicator;
27 
28 class VTKPARALLELMPI4PY_EXPORT vtkMPI4PyCommunicator : public vtkObject
29 {
30 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
34  static vtkMPI4PyCommunicator* New();
36 
40  static PyObject* ConvertToPython(vtkMPICommunicator* comm);
41 
45  static vtkMPICommunicator* ConvertToVTK(PyObject* comm);
46 
47 private:
49  void operator=(const vtkMPI4PyCommunicator&) = delete;
50 };
51 
52 VTK_ABI_NAMESPACE_END
53 #endif
54 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Class for creating user defined MPI communicators.
a simple class to control print indentation
Definition: vtkIndent.h:28
Class for bridging MPI4Py with vtkMPICommunicator.
struct _object PyObject
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...