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
Merge requests
!31
Valian/linear elasticity
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Valian/linear elasticity
valian/linear_elasticity
into
main
Overview
0
Commits
6
Pipelines
3
Changes
6
Open
Ilia Valian
requested to merge
valian/linear_elasticity
into
main
8 months ago
Overview
0
Commits
6
Pipelines
3
Changes
6
Expand
0
0
Merge request reports
Compare
main
version 1
0f68e738
8 months ago
main (base)
and
latest version
latest version
d1c00b7f
6 commits,
7 months ago
version 1
0f68e738
5 commits,
8 months ago
6 files
+
2193
−
2047
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
hog/recipes/integrands/volume/elasticity.py
0 → 100644
+
47
−
0
Options
# HyTeG Operator Generator
# Copyright (C) 2024 HyTeG Team
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from
hog.recipes.common
import
*
import
sympy
as
sp
def
integrand
(
*
,
jac_a_inv
,
jac_a_abs_det
,
jac_b_inv
,
jac_b_abs_det
,
grad_u
,
grad_v
,
k
,
tabulate
,
**
_
,
):
grad_u_chain
=
jac_b_inv
.
T
*
tabulate
(
jac_a_inv
.
T
*
grad_u
)
grad_v_chain
=
jac_b_inv
.
T
*
tabulate
(
jac_a_inv
.
T
*
grad_v
)
def
symm_grad
(
w
):
return
0.5
*
(
w
+
w
.
T
)
symm_grad_u
=
symm_grad
(
grad_u_chain
)
sigma_u
=
k
[
"
lambda
"
]
*
grad_u_chain
.
trace
()
*
sp
.
eye
(
grad_u_chain
.
shape
[
0
])
+
k
[
"
mu
"
]
*
2
*
symm_grad_u
symm_grad_v
=
symm_grad
(
grad_v_chain
)
return
(
double_contraction
(
sigma_u
,
symm_grad_v
)
*
tabulate
(
jac_a_abs_det
)
*
jac_b_abs_det
)
Loading