Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
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
Container Registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
multiscale
lammps
Commits
91be47a0
Commit
91be47a0
authored
8 years ago
by
Richard Berger
Browse files
Options
Downloads
Patches
Plain Diff
Revert type checking commit from July
0aebb2eabea6ae3f5365951335ac3d698ab9ad9e
parent
ab92529b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/lammps.py
+5
-8
5 additions, 8 deletions
python/lammps.py
with
5 additions
and
8 deletions
python/lammps.py
+
5
−
8
View file @
91be47a0
...
@@ -133,14 +133,11 @@ class lammps(object):
...
@@ -133,14 +133,11 @@ class lammps(object):
# self.lmp = self.lib.lammps_open_no_mpi(0,None)
# self.lmp = self.lib.lammps_open_no_mpi(0,None)
else
:
else
:
if
isinstance
(
ptr
,
lammps
):
self
.
opened
=
0
# magic to convert ptr to ctypes ptr
# magic to convert ptr to ctypes ptr
pythonapi
.
PyCObject_AsVoidPtr
.
restype
=
c_void_p
pythonapi
.
PyCObject_AsVoidPtr
.
restype
=
c_void_p
pythonapi
.
PyCObject_AsVoidPtr
.
argtypes
=
[
py_object
]
pythonapi
.
PyCObject_AsVoidPtr
.
argtypes
=
[
py_object
]
self
.
lmp
=
c_void_p
(
pythonapi
.
PyCObject_AsVoidPtr
(
ptr
))
self
.
lmp
=
c_void_p
(
pythonapi
.
PyCObject_AsVoidPtr
(
ptr
))
else
:
self
.
lmp
=
None
raise
TypeError
(
'
Unsupported type passed as
"
ptr
"'
)
def
__del__
(
self
):
def
__del__
(
self
):
if
self
.
lmp
and
self
.
opened
:
self
.
lib
.
lammps_close
(
self
.
lmp
)
if
self
.
lmp
and
self
.
opened
:
self
.
lib
.
lammps_close
(
self
.
lmp
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment