Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hyteg
hog
Commits
550ed255
Commit
550ed255
authored
10 months ago
by
Daniel Bauer
Browse files
Options
Downloads
Patches
Plain Diff
fix nonlinear diffusion forms
parent
9112002c
No related branches found
No related tags found
1 merge request
!25
Fix nonlinear diffusion forms
Pipeline
#68481
passed with warnings
10 months ago
Stage: test
Stage: integration
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
generate_all_operators.py
+1
-1
1 addition, 1 deletion
generate_all_operators.py
hog/forms.py
+4
-4
4 additions, 4 deletions
hog/forms.py
with
5 additions
and
5 deletions
generate_all_operators.py
+
1
−
1
View file @
550ed255
...
...
@@ -619,7 +619,7 @@ def all_operators(
type_descriptor
=
type_descriptor
,
geometries
=
list
(
geometries
),
opts
=
opts
,
blending
=
blending
))
ops
.
append
(
OperatorInfo
(
"
P1
"
,
"
NonlinearDiffusionNewtonGalerkin
"
,
TrialSpace
(
P1
),
TestSpace
(
P1
),
form
=
partial
(
nonlinear_diffusion_newton_galerkin
,
coefficient_function_space
=
P1
,
only
N
ewton
G
alerkin
P
art
OfF
orm
=
False
),
coefficient_function_space
=
P1
,
only
_n
ewton
_g
alerkin
_p
art
_of_f
orm
=
False
),
type_descriptor
=
type_descriptor
,
geometries
=
list
(
geometries
),
opts
=
opts
,
blending
=
blending
))
ops
.
append
(
OperatorInfo
(
"
P1Vector
"
,
"
Diffusion
"
,
TrialSpace
(
P1Vector
),
TestSpace
(
P1Vector
),
...
...
This diff is collapsed.
Click to expand it.
hog/forms.py
+
4
−
4
View file @
550ed255
...
...
@@ -212,7 +212,7 @@ Note: :math:`a(c) = 1/8 + u^2` is currently hard-coded and the form is intended
tabulate
,
**
_
,
):
a
=
sp
.
Matrix
([
sp
.
Rational
(
1
,
8
)
])
+
k
[
0
]
*
k
[
0
]
a
=
sp
.
Rational
(
1
,
8
)
+
k
[
"
u
"
]
*
k
[
"
u
"
]
return
a
*
tabulate
(
double_contraction
(
jac_a_inv
.
T
*
grad_u
,
...
...
@@ -279,8 +279,8 @@ Note: :math:`a(k) = 1/8 + k^2` is currently hard-coded and the form is intended
tabulate
,
**
_
,
):
a
=
sp
.
Matrix
([
sp
.
Rational
(
1
,
8
)
])
+
k
[
0
]
*
k
[
0
]
a_prime
=
2
*
k
[
0
]
a
=
sp
.
Rational
(
1
,
8
)
+
k
[
"
k
"
]
*
k
[
"
k
"
]
a_prime
=
2
*
k
[
"
k
"
]
diffusion_term
=
a
*
tabulate
(
dot
(
jac_a_inv
.
T
*
grad_u
,
jac_a_inv
.
T
*
grad_v
)
*
jac_a_abs_det
...
...
@@ -289,7 +289,7 @@ Note: :math:`a(k) = 1/8 + k^2` is currently hard-coded and the form is intended
newton_galerkin_term
=
(
a_prime
*
u
*
dot
(
jac_a_inv
.
T
*
grad_k
,
tabulate
(
jac_a_inv
.
T
*
grad_v
))
*
dot
(
jac_a_inv
.
T
*
grad_k
[
"
k
"
]
,
tabulate
(
jac_a_inv
.
T
*
grad_v
))
*
tabulate
(
jac_a_abs_det
)
)
...
...
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