-
Notifications
You must be signed in to change notification settings - Fork 114
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
Grid Utility Functions for Unstructured Grid Conversion into CPG format #4451
base: master
Are you sure you want to change the base?
Conversation
jenkins build this please |
jenkins build this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that these are utility functions, but I think we should spend some more time on this before we merge them. In particular, it's not clear to me what guides the choice of input and output data structures here and vector<array<>>
isn't what I usually reach for first personally. It might be the correct choice here, but then I'd like to see some more justification.
Other than that, there are minor issues regarding const
objects and making too many copies, but those are secondary and can be fixed quickly.
…sed routines, sanitation of unused headers
Grid Utility Functions for Unstructured Grid Conversion into CPG format
Summary
This pull request introduces a set of utility functions in the
GridUtil
namespace to facilitate unstructured grid indexing and conversion from an unstructured mesh representation to a corner-point grid (CPG) format. The key functions include:pillar_to_flat_array(pillar)
: Flattens a pillar-based coordinate representation into a linear array.convertUnsToCPG(coord_uns, element, nx, ny, nz)
: Converts an unstructured mesh into a corner-point grid representation, generatingcoord_cpg
andzcorn_cpg
arrays.Changes Introduced
convertUnsToCPG
, which processes an unstructured mesh into a corner-point grid representation by:zcorn
indices and assembling the final arrays.Motivation
This implementation is necessary to convert the LGR refined coordinates given in a Unstructured Grid structured into CPG structure as required by the OUTPUT file format.