38 vtkInformationVector **inputVector,
39 vtkInformationVector *outputVector) {
41 const auto domain = vtkDataSet::GetData(inputVector[0]);
42 auto output = vtkDataSet::GetData(outputVector);
45 if(triangulation ==
nullptr) {
46 this->
printErr(
"Triangulation is NULL");
59 switch(OutputFieldType) {
60 case FieldType::FLOAT:
64 case FieldType::DOUBLE:
69 this->
printErr(
"Unknown field type");
73 if(eigenFunctions ==
nullptr) {
74 this->
printErr(
"vtkDataArray allocation problem");
78 const auto vertexNumber = triangulation->getNumberOfVertices();
80 eigenFunctions->SetNumberOfComponents(EigenNumber);
81 eigenFunctions->SetNumberOfTuples(vertexNumber);
82 eigenFunctions->SetName(OutputFieldName.data());
84 if(ComputeStatistics) {
85 stats->SetName(
"Statistics");
86 const int statsComp = 4;
87 stats->SetNumberOfComponents(statsComp);
88 stats->SetNumberOfTuples(vertexNumber);
89 stats->SetComponentName(0,
"Min");
90 stats->SetComponentName(1,
"Max");
91 stats->SetComponentName(2,
"Sum");
92 stats->SetComponentName(3,
"EigenMagnitude");
95 switch(OutputFieldType) {
96 case FieldType::FLOAT:
97 res += this->execute<float>(
100 EigenNumber, ComputeStatistics,
103 case FieldType::DOUBLE:
104 res += this->execute<double>(
107 EigenNumber, ComputeStatistics,
115 this->
printErr(
"EigenField execute error code " + std::to_string(res));
120 output->ShallowCopy(domain);
121 output->GetPointData()->AddArray(eigenFunctions);
123 if(ComputeStatistics) {
124 output->GetPointData()->AddArray(stats);