Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
thopri
PyNEMO
Commits
4efea17c
Commit
4efea17c
authored
5 years ago
by
James Harle
Browse files
Options
Download
Email Patches
Plain Diff
Solving bug with vector quantities (Issue 3, jdha/PyNEMO)
parent
e817b678
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
pynemo/utils/nemo_bdy_lib.py
pynemo/utils/nemo_bdy_lib.py
+7
-4
No files found.
pynemo/utils/nemo_bdy_lib.py
View file @
4efea17c
...
...
@@ -10,13 +10,16 @@ def sub2ind(shap, subx, suby):
ind
=
(
subx
*
shap
[
0
])
+
suby
return
ind
# THIS FUNCTION MAY BE BROKEN
def
rot_rep
(
pxin
,
pyin
,
dummy
,
cd_todo
,
gcos
,
gsin
):
"""rotate function"""
if
cd_todo
.
lower
()
in
[
'en to i'
,
'ij to e'
]
:
if
cd_todo
.
lower
()
==
'en to i'
:
x_var
,
y_var
=
pxin
,
pyin
elif
cd_todo
.
lower
()
in
[
'en to j'
,
'ij to n'
]
:
elif
cd_todo
.
lower
()
==
'en to j'
:
x_var
,
y_var
=
pyin
,
pxin
*-
1
elif
cd_todo
.
lower
()
==
'ij to e'
:
x_var
,
y_var
=
pxin
,
pyin
*-
1
elif
cd_todo
.
lower
()
==
'ij to n'
:
x_var
,
y_var
=
pyin
,
pxin
else
:
raise
SyntaxError
(
'rot_rep cd_todo %s is invalid'
%
cd_todo
)
return
x_var
*
gcos
+
y_var
*
gsin
...
...
@@ -124,4 +127,4 @@ def bdy_transport():
Keyword arguments:
"""
raise
NotImplementedError
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment