Skip to content

Split up 2d and 3d flexible geometry#569

Merged
ecomodeller merged 35 commits intomainfrom
geometry3d
Jun 8, 2023
Merged

Split up 2d and 3d flexible geometry#569
ecomodeller merged 35 commits intomainfrom
geometry3d

Conversation

@ecomodeller
Copy link
Copy Markdown
Member

No description provided.

@ecomodeller
Copy link
Copy Markdown
Member Author

A 3d geometry is still fairly complex,, but that is expected, but a 2d geometry is now easier to understand.

@ecomodeller ecomodeller marked this pull request as ready for review May 2, 2023 20:16
@ecomodeller
Copy link
Copy Markdown
Member Author

ecomodeller commented May 3, 2023

Current state of FM geometries

classDiagram

  class _Geometry{
+projection
}

class _GeometryFM{
+node_coordinates
+element_table
}

class GeometryFM2D{
+interp2d()
+get_element_area()
}

class _GeometryFMLayered{
- _n_layers
- _n_sigma
+ to_2d_geometry()
}

class GeometryFM3D{
+ plot()
+ boundary_polylines()
+ find_index()
}

class GeometryFMVerticalProfile{
+plot()
+ find_index()
}
  _Geometry <|-- GeometryFMPointSpectrum
  _Geometry <|-- _GeometryFM
  _GeometryFM <|-- GeometryFM2D
  GeometryFM2D   <|--  _GeometryFMSpectrum
  _GeometryFMSpectrum <|-- GeometryFMAreaSpectrum
  _GeometryFMSpectrum <|-- GeometryFMLineSpectrum
  _GeometryFM <|-- _GeometryFMLayered
  _GeometryFMLayered <|-- GeometryFM3D
  _GeometryFMLayered <|-- GeometryFMVerticalProfile
  GeometryFM3D <|-- GeometryFMVerticalColumn
Loading

Not entirely sure what the GeometryFMVerticalColumn does 🤔

@ecomodeller ecomodeller requested a review from jsmariegaard May 4, 2023 05:06
@ecomodeller
Copy link
Copy Markdown
Member Author

ecomodeller commented May 15, 2023

It is possible to subset with a polygon, but the definition if an element is part of the area or not is not yet possible.

Currently an element is selected if the element center is inside the polygon. I would like to be able to select elements which are either entirely within the polygon or has any part that intersects with the polygon.
image

dss = ds.sel(area=polygon) # no option on how

image

@ecomodeller ecomodeller merged commit ebb6bf1 into main Jun 8, 2023
@ecomodeller ecomodeller deleted the geometry3d branch June 8, 2023 05:10
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