Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OGSTools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ogs
OpenGeoSys Tools
OGSTools
Commits
3602753c
Commit
3602753c
authored
1 year ago
by
Florian Zill
Browse files
Options
Downloads
Patches
Plain Diff
[propertylib] small fix for mesh_dependent funcs
parent
b441a1af
No related branches found
No related tags found
1 merge request
!134
MeshSeries aggregation function
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ogstools/propertylib/mesh_dependent.py
+13
-6
13 additions, 6 deletions
ogstools/propertylib/mesh_dependent.py
with
13 additions
and
6 deletions
ogstools/propertylib/mesh_dependent.py
+
13
−
6
View file @
3602753c
...
@@ -48,11 +48,16 @@ def depth(mesh: pv.UnstructuredGrid, use_coords: bool = False) -> np.ndarray:
...
@@ -48,11 +48,16 @@ def depth(mesh: pv.UnstructuredGrid, use_coords: bool = False) -> np.ndarray:
]
]
edge_centers
=
edges
.
cell_centers
().
points
edge_centers
=
edges
.
cell_centers
().
points
adj_cells
=
[
mesh
.
find_closest_cell
(
point
)
for
point
in
edge_centers
]
adj_cells
=
[
mesh
.
find_closest_cell
(
point
)
for
point
in
edge_centers
]
adj_cell_centers
=
mesh
.
extract_cells
(
adj_cells
).
cell_centers
().
points
adj_centers
=
np
.
vstack
(
are_above
=
(
[
edge_centers
[...,
vertical_dim
]
mesh
.
extract_cells
(
adj_cell
).
cell_centers
().
points
>
adj_cell_centers
[...,
vertical_dim
]
for
adj_cell
in
adj_cells
]
)
)
are_above
=
[
edge_center
[
vertical_dim
]
>
adj_center
[
vertical_dim
]
for
edge_center
,
adj_center
in
zip
(
edge_centers
,
adj_centers
)
]
are_non_vertical
=
np
.
asarray
(
edge_horizontal_extent
)
>
1e-12
are_non_vertical
=
np
.
asarray
(
edge_horizontal_extent
)
>
1e-12
top_cells
=
are_above
&
are_non_vertical
top_cells
=
are_above
&
are_non_vertical
top
=
edges
.
extract_cells
(
top_cells
)
top
=
edges
.
extract_cells
(
top_cells
)
...
@@ -110,8 +115,10 @@ def fluid_pressure_criterion(
...
@@ -110,8 +115,10 @@ def fluid_pressure_criterion(
"""
"""
Qty
=
u_reg
.
Quantity
Qty
=
u_reg
.
Quantity
sigma
=
-
Qty
(
mesh
[
mesh_property
.
data_name
],
mesh_property
.
data_unit
)
sigma
=
mesh
[
mesh_property
.
data_name
]
return
p_fluid
(
mesh
)
-
eigenvalues
(
sigma
)[...,
0
]
return
p_fluid
(
mesh
)
-
Qty
(
eigenvalues
(
-
sigma
)[...,
0
],
mesh_property
.
data_unit
)
def
dilatancy_critescu
(
def
dilatancy_critescu
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment