new filter

This commit is contained in:
CookieKastanie 2022-03-15 11:34:55 +01:00
parent 057ae8100c
commit 3467f8593d
3 changed files with 42 additions and 1 deletions

View File

@ -60,7 +60,9 @@ target_sources(pfe PRIVATE
src/project_surface_points_on_poly.cc src/project_surface_points_on_poly.cc
src/project_surface_points_on_poly.h src/project_surface_points_on_poly.h
src/remove_external_cells_filter.cc src/remove_external_cells_filter.cc
src/remove_external_cells_filter.h) src/remove_external_cells_filter.h
src/relaxation_filter.cc
src/relaxation_filter.h)
target_link_libraries(pfe PRIVATE ${VTK_COMPONENTS}) target_link_libraries(pfe PRIVATE ${VTK_COMPONENTS})

18
src/relaxation_filter.cc Normal file
View File

@ -0,0 +1,18 @@
#include "relaxation_filter.h"
#include <vtkUnstructuredGrid.h>
#include <vtkPointData.h>
#include <vtkCellData.h>
#include <vtkDoubleArray.h>
#include <vtkCellIterator.h>
vtkStandardNewMacro(RelaxationFilter);
vtkTypeBool RelaxationFilter::RequestData(
vtkInformation *request,
vtkInformationVector **inputVector,
vtkInformationVector *outputVector) {
return true;
}

21
src/relaxation_filter.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef RELAXATION_FILTER_H
#define RELAXATION_FILTER_H
#include <vtkUnstructuredGridAlgorithm.h>
#include <vtkIdList.h>
class RelaxationFilter : public vtkUnstructuredGridAlgorithm {
public:
static RelaxationFilter *New();
vtkTypeMacro(RelaxationFilter, vtkUnstructuredGridAlgorithm);
vtkTypeBool RequestData(vtkInformation *request,
vtkInformationVector **inputVector,
vtkInformationVector *outputVector) override;
protected:
~RelaxationFilter() override = default;
};
#endif