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

Grid Utility Functions for Unstructured Grid Conversion into CPG format #4451

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

arturcastiel
Copy link
Contributor

@arturcastiel arturcastiel commented Jan 30, 2025

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, generating coord_cpg and zcorn_cpg arrays.

Changes Introduced

  • Introduced convertUnsToCPG, which processes an unstructured mesh into a corner-point grid representation by:
    • Extracting pillar coordinates.
    • Mapping mesh elements to pillar-based coordinates.
    • Computing 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.

@arturcastiel arturcastiel changed the title Lgr unstocpg Grid Utility Functions for Unstructured Grid Conversion into CPG format Jan 30, 2025
@arturcastiel
Copy link
Contributor Author

jenkins build this please

@arturcastiel
Copy link
Contributor Author

jenkins build this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant