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

LGR Egrid #4354

Closed
wants to merge 61 commits into from
Closed

LGR Egrid #4354

wants to merge 61 commits into from

Conversation

arturcastiel
Copy link
Contributor

@arturcastiel arturcastiel commented Nov 21, 2024

LGR Egrid

This is an ongoing effort to create the visualization routines for LGR. This PR specifically tackles the extension of the EGRID output files

  1. LgrOutputTest - new tests routines to ensure the EGRID files are consistent with the standard simulator counterpart. The process of retrieving the refinement will take place in opm-grid, therefore we have added routines and tests to this test that simulate obtaining the COORD and ZCORN from the OUTPUT of the standard simulator. OPM initializes EclipseGrid object with this and output the EGRID. After that some fields on the file are tested.

  2. EclipseGrid inialization for LGR consists:
    save_all_lgr_labels
    create_lgr_cells_tree
    initializeLGRObjectIndices
    propagateParentIndicesToLGRChildren
    initializeLGRTreeIndices
    parseGlobalReferenceToChildren

  3. EclipseGrid::init_children_host_cells - maps which refined cells(LGR refined cell) belong to host cells (coarse mesh cells refined). The current approach for solving this uses an algorithm that checks if a point is contained inside a given polyhedron. This is done by using the test point to divide the polyhedron into multiply tetrahedron. If the volume of the sum of these tetrahedron is equal to the volume of the original volume, the point is internal to the polyhedron. Note: Boundary boxes are used to avoid to a precheck and avoid unnecessary computation. Although this implementation is not optimal, it is robust, for general unstructured grids. Next PR will contain a faster algorithm, and this implementation will become a fallback method.

@arturcastiel arturcastiel marked this pull request as ready for review November 26, 2024 13:09
Copy link
Member

@aritorto aritorto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need more time to take a proper look at your PR. I left a few small comments for now. Thanks for your work!

@arturcastiel
Copy link
Contributor Author

@bska I believe I have solved the merged conflicts.

Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The init_children_host_cells() function is a little to complicated for my liking and I'd prefer that it be split up into simpler components to make the logic a little easier to follow. Other than that, I have just minor comments here.

@arturcastiel
Copy link
Contributor Author

arturcastiel commented Dec 13, 2024

jenkins build this please

@arturcastiel
Copy link
Contributor Author

jenkins build this please

@arturcastiel
Copy link
Contributor Author

jenkins build this please

@arturcastiel
Copy link
Contributor Author

@bska

@bska
Copy link
Member

bska commented Dec 17, 2024

jenkins build this please

Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The size of this PR means that it's not really possible to do a full review of the details and its algorithms. I expect that there will be follow-up work to simplify this code. That said, it's starting to look good. With the possible exceptions of a vector that's still passed by value, a couple of parameters that are unused and an unused local variable, this is starting to look ready for merging to me.

@arturcastiel
Copy link
Contributor Author

The size of this PR means that it's not really possible to do a full review of the details and its algorithms. I expect that there will be follow-up work to simplify this code. That said, it's starting to look good. With the possible exceptions of a vector that's still passed by value, a couple of parameters that are unused and an unused local variable, this is starting to look ready for merging to me.

I will merge the local branch I am working right now that divides the huge function into smaller parts. I tried to achieve here a smaller PR.

@arturcastiel
Copy link
Contributor Author

I believe I have solved the merging and rebasing conflicts and everything is ready to be merged.

@arturcastiel
Copy link
Contributor Author

jenkins build this please

daavid00 and others added 14 commits December 20, 2024 10:07
prior to OpenMP 3.0, unsigned loop variables is unsupported.
…ment of the save method for the LGR EclipseGrid - EclipseGrid object and children are initialized from .EGRID file generated on standard simulator
EGrid.hpp seems to contain a bug where get<float>(COORD) cannot catpure the global COORD in EGRIDs, EclipseGrid has been enhaced with functions to output .EGRIDS for LGR - unfinished work - devising a mechanism to define HOSTCE
…tions used in EclipseGrid::init_children_host_cells
@arturcastiel
Copy link
Contributor Author

I have redone the rebase, properly, this time.

@arturcastiel
Copy link
Contributor Author

jenkins build this please

@bska bska closed this in 332a08e Dec 20, 2024
@arturcastiel arturcastiel deleted the lgr-egrid branch February 11, 2025 08:45
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.

5 participants