Skip to content

Commit

Permalink
#16: add vtk_init to all created targets; add load array when not giv…
Browse files Browse the repository at this point in the history
…en as QOI
  • Loading branch information
cwschilly committed Apr 9, 2024
1 parent 744065a commit f4022b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@ foreach(APP_FULL ${PROJECT_APPS})
PUBLIC
${VT_TV_LIBRARY_NS}
)

vtk_module_autoinit(
TARGETS ${APP}
MODULES ${VTK_LIBRARIES}
)

endforeach()
7 changes: 6 additions & 1 deletion src/vt-tv/render/render.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ Render::Render(

double Render::computeMaxObjectVolume_() {
double ov_max = this->info_.getMaxVolume();
this->object_volume_max_ = ov_max;
return ov_max;
}

Expand Down Expand Up @@ -470,6 +469,9 @@ vtkNew<vtkPolyData> Render::createObjectMesh_(PhaseType phase) {
}
q_arr->SetTuple1(point_index, oq);
b_arr->SetTuple1(point_index, migratable);
if (this->object_qoi_ != "load") {
l_arr->SetTuple1(point_index, objectWork.getLoad());
}

auto objSent = objectWork.getSent();
for (auto [k, v] : objSent) {
Expand Down Expand Up @@ -527,6 +529,9 @@ vtkNew<vtkPolyData> Render::createObjectMesh_(PhaseType phase) {
pd_mesh->SetLines(lines);
pd_mesh->GetPointData()->SetScalars(q_arr);
pd_mesh->GetPointData()->AddArray(b_arr);
if (this->object_qoi_ != "load") {
pd_mesh->GetPointData()->AddArray(l_arr);
}
pd_mesh->GetCellData()->SetScalars(lineValuesArray);

fmt::print("----- Finished creating object mesh -----\n");
Expand Down

0 comments on commit f4022b0

Please sign in to comment.