Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F88765908
boundary_condition.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Oct 20, 14:10
Size
700 B
Mime Type
text/x-python
Expires
Tue, Oct 22, 14:10 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21803695
Attached To
rAKA akantu
boundary_condition.py
View Options
#!/usr/bin/env python3
""" boundary_condition.py: User defined boundary condition example"""
__author__
=
"Nicolas Richart"
__credits__
=
[
"Nicolas Richart <nicolas.richart@epfl.ch>"
,
]
__copyright__
=
"Copyright (©) 2018-2021 EPFL (Ecole Polytechnique Fédérale"
\
" de Lausanne) Laboratory (LSMS - Laboratoire de Simulation"
\
" en Mécanique des Solides)"
__license__
=
"LGPLv3"
import
math
class
SinBoundary
:
def
__init__
(
self
,
amplitude
,
phase
):
self
.
amplitude
=
amplitude
self
.
phase
=
phase
def
compute
(
self
,
disp
,
coord
,
flags
):
disp
[
1
]
=
-
self
.
amplitude
*
math
.
sin
(
self
.
phase
*
coord
[
1
])
flags
[
1
]
=
True
Event Timeline
Log In to Comment