VTK  9.2.6
vtkMPI4PyCommunicator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMPI4PyCommunicator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkMPI4PyCommunicator_h
27 #define vtkMPI4PyCommunicator_h
28 // This class should only be wrapped for Python. The hierarchy "wrapping" also
29 // needs to see the class for use in the Python wrappers.
30 #if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_HIERARCHY__) || defined(__VTK_WRAP_PYTHON__)
31 
32 #include "vtkPython.h" // For PyObject*; must be first
33 
34 #include "vtkObject.h"
35 #include "vtkParallelMPI4PyModule.h" // For export macro
36 
37 class vtkMPICommunicator;
38 
39 class VTKPARALLELMPI4PY_EXPORT vtkMPI4PyCommunicator : public vtkObject
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
45  static vtkMPI4PyCommunicator* New();
47 
51  static PyObject* ConvertToPython(vtkMPICommunicator* comm);
52 
56  static vtkMPICommunicator* ConvertToVTK(PyObject* comm);
57 
58 private:
60  void operator=(const vtkMPI4PyCommunicator&) = delete;
61 };
62 
63 #endif
64 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
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:39
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...