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

3D mesh to grid conversion #2704

Merged
merged 6 commits into from Dec 4, 2019
Merged

3D mesh to grid conversion #2704

merged 6 commits into from Dec 4, 2019

Conversation

@rinkk
Copy link
Member

rinkk commented Oct 23, 2019

Samples a 3D mesh into a hex-grid of userdefined resolution.

  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
Copy link
Member

TomFischer left a comment

  • Small things in the code
  • documentation for the tool is missing
  • clang format
vtkSmartPointer<vtkUnstructuredGrid> mesh = reader->GetOutput();

double bounds[6];
mesh->GetBounds(bounds);

This comment has been minimized.

Copy link
@endJunction

endJunction Oct 25, 2019

Member
Suggested change
mesh->GetBounds(bounds);
double* const bounds = mesh->GetBounds();

This comment has been minimized.

Copy link
@rinkk

rinkk Nov 14, 2019

Author Member

✔️

This comment has been minimized.

Copy link
@endJunction

endJunction Nov 15, 2019

Member

why omitting the const?

@rinkk rinkk force-pushed the rinkk:vtu2grid branch from 33d2de2 to 210e1c5 Nov 14, 2019
vtkSmartPointer<vtkCellData> const cell_data = mesh->GetCellData();
for (int i = 0; i < cell_data->GetNumberOfArrays(); ++i)
{
std::string const name = cell_data->GetArrayName(i);

This comment has been minimized.

Copy link
@endJunction

endJunction Nov 15, 2019

Member

minor: The copy of the array's name is probably not needed...

mapArray<int, vtkSmartPointer<vtkIntArray>>(*grid, int_arr, name);
continue;
}
WARN("Ignoring array '%s'...", name.c_str());

This comment has been minimized.

Copy link
@endJunction

endJunction Nov 15, 2019

Member

I'd also mention the reason, so it can be improved, e.g. "Ignoring array... Handling of type xx not implemented."

Copy link
Member

endJunction left a comment

Looks good.
Minor suggestions.
Not sure about the documentation status mentioned in one of the above comments.

@endJunction endJunction force-pushed the ufz:master branch from 26414a0 to 564340b Nov 27, 2019
@endJunction endJunction force-pushed the rinkk:vtu2grid branch from 210e1c5 to 0179740 Nov 30, 2019
rinkk and others added 3 commits Dec 3, 2019
@TomFischer TomFischer merged commit 56a25ec into ufz:master Dec 4, 2019
3 checks passed
3 checks passed
continuous-integration/jenkins/pr-merge This commit looks good
Details
deploy/netlify Deploy preview ready!
Details
ufz.ogs #20191204.1 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.