Skip to content

Add CpGrid support for loading unstructured grids from external files#1042

Draft
totto82 wants to merge 1 commit into
OPM:masterfrom
totto82:grid_from_file
Draft

Add CpGrid support for loading unstructured grids from external files#1042
totto82 wants to merge 1 commit into
OPM:masterfrom
totto82:grid_from_file

Conversation

@totto82

@totto82 totto82 commented Jun 19, 2026

Copy link
Copy Markdown
Member

Enable loading Sintef legacy unstructured-grid files into CpGrid via:

  • CpGrid(filename) constructor for direct file loading
  • readUnstructuredGridFile() method for MPI-aware loading
  • CpGridData::processUnstructuredGrid() for format conversion

Add export utility (export_grid) to convert CpGrid back to unstructured format.

Support includes:

  • MPI-parallel file reading (rank 0 reads and broadcasts)
  • Full grid topology conversion (cells, faces, vertices, adjacency)
  • Face axis tagging for K-direction identification
  • Validation of 3D grids, face tags, and cell structure
  • Comprehensive test coverage for both CpGrid and PolyhedralGrid

New files:

  • examples/export_grid.cpp: CpGrid → unstructured format converter
  • Complete test cases for unstructured grid operations

@totto82 totto82 added manual:enhancement This is an enhancement/improvent that needs to be documented in the manual manual:new-feature This is a new feature and should be described in the manual labels Jun 19, 2026
@totto82

totto82 commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

jenkins build this opm-simulators=7189 please

Enable loading Sintef legacy unstructured-grid files into CpGrid via:
- CpGrid(filename) constructor for direct file loading
- readUnstructuredGridFile() method for MPI-aware loading
- CpGridData::processUnstructuredGrid() for format conversion

Add export utility (export_grid) to convert CpGrid back to unstructured format.

Support includes:
- MPI-parallel file reading (rank 0 reads and broadcasts)
- Full grid topology conversion (cells, faces, vertices, adjacency)
- Face axis tagging for K-direction identification
- Validation of 3D grids, face tags, and cell structure
- Comprehensive test coverage for both CpGrid and PolyhedralGrid

New files:
- examples/export_grid.cpp: CpGrid → unstructured format converter
- Complete test cases for unstructured grid operations
@totto82

totto82 commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

jenkins build this opm-simulators=7189 please

1 similar comment
@totto82

totto82 commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

jenkins build this opm-simulators=7189 please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:enhancement This is an enhancement/improvent that needs to be documented in the manual manual:new-feature This is a new feature and should be described in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant