2 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 // + This file is part of enGrid. +
6 // + Copyright 2008,2009 Oliver Gloth +
8 // + enGrid is free software: you can redistribute it and/or modify +
9 // + it under the terms of the GNU General Public License as published by +
10 // + the Free Software Foundation, either version 3 of the License, or +
11 // + (at your option) any later version. +
13 // + enGrid is distributed in the hope that it will be useful, +
14 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 // + GNU General Public License for more details. +
18 // + You should have received a copy of the GNU General Public License +
19 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
21 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 #ifndef __vtkEgGridFilter_h
24 #define __vtkEgGridFilter_h
26 class vtkEgGridFilter
;
28 #include <vtkUnstructuredGridAlgorithm.h>
29 #include <vtkUnstructuredGrid.h>
30 #include <vtkIntArray.h>
31 #include <vtkLongArray.h>
32 #include <vtkDoubleArray.h>
33 #include <vtkCellData.h>
34 #include <vtkCellType.h>
35 #include <vtkCellLinks.h>
36 #include <vtkObjectFactory.h>
42 #include "egvtkobject.h"
44 class vtkEgGridFilter
: public vtkUnstructuredGridAlgorithm
, public EgVtkObject
47 protected: // attributes
49 QSet
<int> m_BoundaryCodes
;
50 vtkUnstructuredGrid
*m_Input
;
51 vtkUnstructuredGrid
*m_Output
;
52 vtkUnstructuredGrid
*m_LastOutput
;
53 unsigned long m_LastRun
;
60 virtual int FillInputPortInformation(int, vtkInformation
* info
);
61 virtual int FillOutputPortInformation(int, vtkInformation
* info
);
62 virtual int RequestData(vtkInformation
*, vtkInformationVector
** inputVector
, vtkInformationVector
* outputVector
);
64 virtual void ExecuteEg() = 0;
67 * Extract boundary elements and nodes with a given set of boundary conditions
68 * @param cells On return, this will contain the indexes of the extracted boundary elements.
69 * @param modes On return, this will contain the indexes of the extracted boundary nodes.
70 * @param grid The grid to operate on.
71 * @param bc A set of the boundary conditions to extract.
73 void ExtractBoundary(QVector
<vtkIdType
> &cells
, QVector
<vtkIdType
> &nodes
, QSet
<int> &bc
, vtkUnstructuredGrid
*grid
);
77 void SetBoundaryCodes(const QSet
<int>& bc
);