Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F71625686
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
Fri, Jul 12, 07:25
Size
530 B
Mime Type
text/x-python
Expires
Sun, Jul 14, 07:25 (2 d)
Engine
blob
Format
Raw Data
Handle
18963695
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