Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79856965
stimulate_shear.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
Wed, Aug 28, 15:29
Size
530 B
Mime Type
text/x-python
Expires
Fri, Aug 30, 15:29 (2 d)
Engine
blob
Format
Raw Data
Handle
20244875
Attached To
rLIBMULTISCALE LibMultiScale
stimulate_shear.py
View Options
#!/usr/bin/env python
import
numpy
as
np
def
compute
(
input
=
None
,
constants
=
None
,
**
kwargs
):
pos
=
input
disp
=
np
.
zeros
(
pos
.
shape
)
disp
[:,
0
]
=
pos
[:,
1
]
*
constants
[
"shearstrain"
]
print
(
"
\n
additional displacement for {0}: sheared by tau = {1}"
.
format
(
"disp"
,
constants
[
"shearstrain"
]))
print
(
" {0:e} <= disp <= {1:e} and {2:e} <= position <= {3:e} "
.
format
(
disp
[:,
0
]
.
min
(),
disp
[:,
0
]
.
max
(),
pos
[:,
1
]
.
min
(),
pos
[:,
1
]
.
max
()))
return
disp
if
__name__
==
"__main__"
:
pass
Event Timeline
Log In to Comment