Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a better error message is Int32 data is not found for GlobalNodeID. #138

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Code/Source/svFSI/vtk_xml_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void store_element_ids(vtkSmartPointer<vtkUnstructuredGrid> vtk_ugrid, mshType&
{
auto elem_ids = vtkIntArray::SafeDownCast(vtk_ugrid->GetCellData()->GetArray(ELEMENT_IDS_NAME.c_str()));
if (elem_ids == nullptr) {
throw std::runtime_error("No '" + ELEMENT_IDS_NAME + "' data found in VTK mesh.");
throw std::runtime_error("No '" + ELEMENT_IDS_NAME + "' data of type Int32 found in VTK mesh.");
}
int num_elem_ids = elem_ids->GetNumberOfTuples();
for (int i = 0; i < num_elem_ids; i++) {
Expand All @@ -331,6 +331,7 @@ void store_element_ids(vtkSmartPointer<vtkPolyData> vtk_polydata, faceType& face
{
auto elem_ids = vtkIntArray::SafeDownCast(vtk_polydata->GetCellData()->GetArray(ELEMENT_IDS_NAME.c_str()));
if (elem_ids == nullptr) {
throw std::runtime_error("No '" + ELEMENT_IDS_NAME + "' data of type Int32 found in VTK mesh.");
return;
}
#ifdef debug_store_element_ids
Expand Down