implemented method to access individual variables from an XML section
[engrid-github.git] / src / libengrid / vtkEgGridFilter.h
blob903c6f249fc3ed596c7d1bf640f34fbcfdf110b9
1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // + +
3 // + This file is part of enGrid. +
4 // + +
5 // + Copyright 2008-2014 enGits GmbH +
6 // + +
7 // + enGrid is free software: you can redistribute it and/or modify +
8 // + it under the terms of the GNU General Public License as published by +
9 // + the Free Software Foundation, either version 3 of the License, or +
10 // + (at your option) any later version. +
11 // + +
12 // + enGrid is distributed in the hope that it will be useful, +
13 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
14 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
15 // + GNU General Public License for more details. +
16 // + +
17 // + You should have received a copy of the GNU General Public License +
18 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
19 // + +
20 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21 #ifndef __vtkEgGridFilter_h
22 #define __vtkEgGridFilter_h
24 class vtkEgGridFilter;
26 #include <vtkUnstructuredGridAlgorithm.h>
27 #include <vtkUnstructuredGrid.h>
28 #include <vtkIntArray.h>
29 #include <vtkLongArray.h>
30 #include <vtkDoubleArray.h>
31 #include <vtkCellData.h>
32 #include <vtkCellType.h>
33 #include <vtkCellLinks.h>
34 #include <vtkObjectFactory.h>
36 #include <QSet>
37 #include <QVector>
39 #include "engrid.h"
40 #include "egvtkobject.h"
42 class vtkEgGridFilter : public vtkUnstructuredGridAlgorithm, public EgVtkObject
45 protected: // attributes
47 QSet<int> m_BoundaryCodes;
48 vtkUnstructuredGrid *m_Input;
49 vtkUnstructuredGrid *m_Output;
50 vtkUnstructuredGrid *m_LastOutput;
51 unsigned long m_LastRun;
53 protected: // methods
55 vtkEgGridFilter();
56 ~vtkEgGridFilter();
58 virtual int FillInputPortInformation(int, vtkInformation* info);
59 virtual int FillOutputPortInformation(int, vtkInformation* info);
60 virtual int RequestData(vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector);
62 virtual void ExecuteEg() = 0;
64 /**
65 * Extract boundary elements and nodes with a given set of boundary conditions
66 * @param cells On return, this will contain the indexes of the extracted boundary elements.
67 * @param modes On return, this will contain the indexes of the extracted boundary nodes.
68 * @param grid The grid to operate on.
69 * @param bc A set of the boundary conditions to extract.
71 void ExtractBoundary(QVector<vtkIdType> &cells, QVector<vtkIdType> &nodes, QSet<int> &bc, vtkUnstructuredGrid *grid);
73 public: // methods
75 void SetBoundaryCodes(const QSet<int>& bc);
79 #endif