Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
grudge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Andreas Klöckner
grudge
Commits
1a4d368e
Commit
1a4d368e
authored
4 years ago
by
Alexandru Fikl
Browse files
Options
Downloads
Patches
Plain Diff
add a h_min value as well
parent
40d609d6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!69
DG on Surfaces
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grudge/symbolic/operators.py
+20
-0
20 additions, 0 deletions
grudge/symbolic/operators.py
with
20 additions
and
0 deletions
grudge/symbolic/operators.py
+
20
−
0
View file @
1a4d368e
...
...
@@ -742,6 +742,26 @@ def h_max_from_volume(ambient_dim, dim=None, dd=None):
)
)
**
(
1.0
/
dim
)
def
h_min_from_volume
(
ambient_dim
,
dim
=
None
,
dd
=
None
):
"""
Defines a characteristic length based on the volume of the elements.
This length may not be representative if the elements have very high
aspect ratios.
"""
import
grudge.symbolic.primitives
as
prim
if
dd
is
None
:
dd
=
prim
.
DD_VOLUME
dd
=
prim
.
as_dofdesc
(
dd
)
if
dim
is
None
:
dim
=
ambient_dim
return
NodalMin
(
dd_in
=
dd
)(
ElementwiseSumOperator
(
dd
)(
MassOperator
(
dd_in
=
dd
)(
prim
.
Ones
(
dd
))
)
)
**
(
1.0
/
dim
)
# }}}
# vim: foldmethod=marker
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