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
0c1dcfb6
Commit
0c1dcfb6
authored
6 years ago
by
Stan Moore
Browse files
Options
Downloads
Patches
Plain Diff
Favor copymode instead of cleanup_copy
parent
db752329
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/KOKKOS/fix_enforce2d_kokkos.cpp
+2
-9
2 additions, 9 deletions
src/KOKKOS/fix_enforce2d_kokkos.cpp
src/KOKKOS/fix_enforce2d_kokkos.h
+1
-2
1 addition, 2 deletions
src/KOKKOS/fix_enforce2d_kokkos.h
src/fix_enforce2d.cpp
+2
-0
2 additions, 0 deletions
src/fix_enforce2d.cpp
with
5 additions
and
11 deletions
src/KOKKOS/fix_enforce2d_kokkos.cpp
+
2
−
9
View file @
0c1dcfb6
...
...
@@ -77,6 +77,7 @@ void FixEnforce2DKokkos<DeviceType>::post_force(int vflag)
if
(
atomKK
->
angmom_flag
)
flag_mask
|=
2
;
if
(
atomKK
->
torque_flag
)
flag_mask
|=
4
;
copymode
=
1
;
switch
(
flag_mask
){
case
0
:{
FixEnforce2DKokkosPostForceFunctor
<
DeviceType
,
0
,
0
,
0
>
functor
(
this
);
...
...
@@ -121,7 +122,7 @@ void FixEnforce2DKokkos<DeviceType>::post_force(int vflag)
default
:
error
->
all
(
FLERR
,
"flag_mask outside of what it should be"
);
}
copymode
=
0
;
// Probably sync here again?
atomKK
->
sync
(
execution_space
,
datamask_read
);
...
...
@@ -159,14 +160,6 @@ void FixEnforce2DKokkos<DeviceType>::post_force_item( int i ) const
}
template
<
class
DeviceType
>
void
FixEnforce2DKokkos
<
DeviceType
>::
cleanup_copy
()
{
id
=
style
=
NULL
;
vatom
=
NULL
;
}
namespace
LAMMPS_NS
{
template
class
FixEnforce2DKokkos
<
LMPDeviceType
>;
#ifdef KOKKOS_HAVE_CUDA
...
...
This diff is collapsed.
Click to expand it.
src/KOKKOS/fix_enforce2d_kokkos.h
+
1
−
2
View file @
0c1dcfb6
...
...
@@ -33,7 +33,6 @@ class FixEnforce2DKokkos : public FixEnforce2D {
FixEnforce2DKokkos
(
class
LAMMPS
*
,
int
,
char
**
);
// ~FixEnforce2DKokkos() {}
// void init();
void
cleanup_copy
();
void
setup
(
int
);
void
post_force
(
int
);
...
...
@@ -63,7 +62,7 @@ struct FixEnforce2DKokkosPostForceFunctor {
FixEnforce2DKokkos
<
DeviceType
>
c
;
FixEnforce2DKokkosPostForceFunctor
(
FixEnforce2DKokkos
<
DeviceType
>*
c_ptr
)
:
c
(
*
c_ptr
)
{
c
.
cleanup_copy
();
};
c
(
*
c_ptr
)
{};
KOKKOS_INLINE_FUNCTION
void
operator
()(
const
int
i
)
const
{
...
...
This diff is collapsed.
Click to expand it.
src/fix_enforce2d.cpp
+
2
−
0
View file @
0c1dcfb6
...
...
@@ -38,6 +38,8 @@ FixEnforce2D::FixEnforce2D(LAMMPS *lmp, int narg, char **arg) :
FixEnforce2D
::~
FixEnforce2D
()
{
if
(
copymode
)
return
;
delete
[]
flist
;
}
...
...
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