-
Couldn't load subscription status.
- Fork 0
refactor: Move GeosBlockExtractor from geos-posp to geos-mesh #142
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
e7447e4
89c8f0c
f9b2e3f
bcf5d59
889f59a
22abd05
a524d2d
063ee86
e577e07
445711f
7d79d28
e5835d0
57c29e2
c81193d
c22e876
70b9358
6a922d3
14ea06c
757732f
323b315
4fbe721
354dae9
e782d7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,19 +13,19 @@ | |||||||||||||||||
| from vtkmodules.vtkFiltersExtraction import vtkExtractBlock | ||||||||||||||||||
|
|
||||||||||||||||||
| __doc__ = """ | ||||||||||||||||||
| GeosBlockExtractor is a vtk filter that allows to extract from an output Geos multiBlockDataSet | ||||||||||||||||||
| all the blocks in a multiBlockDataSet of a Geos domain with its index. | ||||||||||||||||||
| GeosBlockExtractor is a vtk filter that allows to extract blocks from the ElementRegions from a GEOS output multiBlockDataset mesh. | ||||||||||||||||||
|
|
||||||||||||||||||
| There is tree domains: | ||||||||||||||||||
| 0: all the blocks referring to volume, | ||||||||||||||||||
| 1: all the blocks referring to faults, | ||||||||||||||||||
| 2: all the blocks referring to wells, | ||||||||||||||||||
| The three ElementRegions are: | ||||||||||||||||||
| 0: CellElementRegion, | ||||||||||||||||||
| 1: SurfaceElementRegion, | ||||||||||||||||||
| 2: WellElementRegion, | ||||||||||||||||||
|
||||||||||||||||||
| The three ElementRegions are: | |
| 0: CellElementRegion, | |
| 1: SurfaceElementRegion, | |
| 2: WellElementRegion, | |
| The three ElementRegions are: | |
| 0: Volumes ( labeled `CellElementRegion` in the mesh ) | |
| 1: Faults ( labeled `SurfaceElementRegion` ) | |
| 2: Wells ( labeled `WellElementRegion` ) |
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.
An enum for that would make it clearer
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 use the one already existing
Outdated
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.
| CellElementRegion is automatically extracted, by defaults SurfaceElementRegion and SurfaceElementRegion are empty multiBlockDataSet. | |
| CellElementRegion is automatically extracted, by defaults SurfaceElementRegion and WellElementRegion are empty multiBlockDataSet. |
Outdated
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.
This I think is an enum and eventhough should be class var and not instance var :)
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.
It is indeed an enum and it is already defined in GeosOutputsConstants. I don't need to rewrite it.
Outdated
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.
| def AddGeosElementRegionsBlockIndex( self, elementRegionId: int ) -> None: | |
| def AddGeosElementRegionsBlockIndex( self: Self, elementRegionId: int ) -> None: |
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.
Can the setters actually check that the elements from the multiblock passed in arg are of the right type ? something following this logic
cell_type = cell.GetCellType()
# Use vtkCellTypes to get dimension
dimension = vtk.vtkCellTypes.GetDimension(cell_type)
if dimension == 3:
print("This is a volume cell.")
elif dimension == 2:
print("This is a surface cell.")
elif dimension == 1:
print("This is a line cell.")
else:
print("Unknown or unsupported cell typ
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.
Good idear. I have implemented a new function to get the dimension of the cells of the mesh and I test this dimension in the setters. It also test taht the mesh is a vtm
Outdated
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.
should it be accessible outside of the class ? If not then decorate it with @property
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.
It needs to be accessible outside of the class to get the result of the extraction
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.