VTK
9.0.1
Filters
Parallel
vtkExtractUserDefinedPiece.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkExtractUserDefinedPiece.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
=========================================================================*/
15
/*----------------------------------------------------------------------------
16
Copyright (c) Sandia Corporation
17
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18
----------------------------------------------------------------------------*/
19
36
#ifndef vtkExtractUserDefinedPiece_h
37
#define vtkExtractUserDefinedPiece_h
38
39
#include "
vtkExtractUnstructuredGridPiece.h
"
40
#include "vtkFiltersParallelModule.h"
// For export macro
41
42
class
VTKFILTERSPARALLEL_EXPORT
vtkExtractUserDefinedPiece
:
public
vtkExtractUnstructuredGridPiece
43
{
44
public
:
45
vtkTypeMacro(
vtkExtractUserDefinedPiece
,
vtkExtractUnstructuredGridPiece
);
46
static
vtkExtractUserDefinedPiece
*
New
();
47
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
48
49
typedef
int (*UserDefFunc)(
vtkIdType
cellID,
vtkUnstructuredGrid
* grid,
void
* constantData);
50
51
// Set the function used to identify the piece. The function should
52
// return 1 if the cell is in the piece, and 0 otherwise.
53
void
SetPieceFunction
(UserDefFunc func)
54
{
55
this->InPiece = func;
56
this->
Modified
();
57
}
58
59
// Set constant data to be used by the piece identifying function.
60
void
SetConstantData(
void
*
data
,
int
len);
61
62
// Get constant data to be used by the piece identifying function.
63
// Return the length of the data buffer.
64
int
GetConstantData(
void
**
data
);
65
66
// The function should return 1 if the cell
67
// is in the piece, and 0 otherwise.
68
69
protected
:
70
vtkExtractUserDefinedPiece
();
71
~
vtkExtractUserDefinedPiece
()
override
;
72
73
int
RequestData
(
vtkInformation
*,
vtkInformationVector
**,
vtkInformationVector
*)
override
;
74
75
void
ComputeCellTagsWithFunction(
76
vtkIntArray
* tags,
vtkIdList
* pointOwnership,
vtkUnstructuredGrid
* input);
77
78
private
:
79
vtkExtractUserDefinedPiece
(
const
vtkExtractUserDefinedPiece
&) =
delete
;
80
void
operator=(
const
vtkExtractUserDefinedPiece
&) =
delete
;
81
82
void
* ConstantData;
83
int
ConstantDataLen;
84
85
UserDefFunc InPiece;
86
};
87
#endif
vtkIdType
int vtkIdType
Definition:
vtkType.h:338
vtkExtractUserDefinedPiece
Return user specified piece with ghost cells.
Definition:
vtkExtractUserDefinedPiece.h:42
vtkX3D::data
@ data
Definition:
vtkX3D.h:321
vtkInformationVector
Store zero or more vtkInformation instances.
Definition:
vtkInformationVector.h:35
vtkExtractUnstructuredGridPiece::New
static vtkExtractUnstructuredGridPiece * New()
vtkObject::Modified
virtual void Modified()
Update the modification time for this object.
vtkExtractUserDefinedPiece::SetPieceFunction
void SetPieceFunction(UserDefFunc func)
Definition:
vtkExtractUserDefinedPiece.h:53
vtkExtractUnstructuredGridPiece::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtkIntArray
dynamic, self-adjusting array of int
Definition:
vtkIntArray.h:39
vtkExtractUnstructuredGridPiece
Return specified piece, including specified number of ghost levels.
Definition:
vtkExtractUnstructuredGridPiece.h:30
vtkIdList
list of point or cell ids
Definition:
vtkIdList.h:30
vtkExtractUnstructuredGridPiece.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition:
vtkInformation.h:73
vtkExtractUnstructuredGridPiece::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition:
vtkUnstructuredGrid.h:92
Generated on Thu Jun 24 2021 15:17:26 for VTK by
1.8.17