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
71f69912
Commit
71f69912
authored
6 years ago
by
Stan Moore
Browse files
Options
Downloads
Patches
Plain Diff
Small tweaks to fix_enforce2d_kokkos
parent
5d133214
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/KOKKOS/fix_enforce2d_kokkos.cpp
+7
-7
7 additions, 7 deletions
src/KOKKOS/fix_enforce2d_kokkos.cpp
src/KOKKOS/fix_enforce2d_kokkos.h
+2
-13
2 additions, 13 deletions
src/KOKKOS/fix_enforce2d_kokkos.h
with
9 additions
and
20 deletions
src/KOKKOS/fix_enforce2d_kokkos.cpp
+
7
−
7
View file @
71f69912
...
...
@@ -34,7 +34,7 @@ FixEnforce2DKokkos<DeviceType>::FixEnforce2DKokkos(LAMMPS *lmp, int narg, char *
execution_space
=
ExecutionSpaceFromDevice
<
DeviceType
>::
space
;
datamask_read
=
V_MASK
|
F_MASK
|
OMEGA_MASK
|
MASK_MASK
|
TORQUE_MASK
|
ANGMOM_MASK
;
// | */ // MASK_MASK;
|
TORQUE_MASK
|
ANGMOM_MASK
;
datamask_modify
=
V_MASK
|
F_MASK
|
OMEGA_MASK
|
TORQUE_MASK
|
ANGMOM_MASK
;
...
...
@@ -52,7 +52,6 @@ template <class DeviceType>
void
FixEnforce2DKokkos
<
DeviceType
>::
post_force
(
int
vflag
)
{
atomKK
->
sync
(
execution_space
,
datamask_read
);
atomKK
->
modified
(
execution_space
,
datamask_modify
);
v
=
atomKK
->
k_v
.
view
<
DeviceType
>
();
f
=
atomKK
->
k_f
.
view
<
DeviceType
>
();
...
...
@@ -120,16 +119,18 @@ void FixEnforce2DKokkos<DeviceType>::post_force(int vflag)
break
;
}
default
:
error
->
all
(
FLERR
,
"
f
lag
_mask
outside of what it should be"
);
error
->
all
(
FLERR
,
"
F
lag
in fix_enforce2d_kokkos
outside of what it should be"
);
}
copymode
=
0
;
// Probably sync here again?
atomKK
->
sync
(
execution_space
,
datamask_read
);
atomKK
->
modified
(
execution_space
,
datamask_modify
);
for
(
int
m
=
0
;
m
<
nfixlist
;
m
++
)
for
(
int
m
=
0
;
m
<
nfixlist
;
m
++
)
{
atomKK
->
sync
(
flist
[
m
]
->
execution_space
,
flist
[
m
]
->
datamask_read
);
flist
[
m
]
->
enforce2d
();
atomKK
->
modified
(
flist
[
m
]
->
execution_space
,
flist
[
m
]
->
datamask_modify
);
}
}
...
...
@@ -138,7 +139,6 @@ template <int omega_flag, int angmom_flag, int torque_flag>
void
FixEnforce2DKokkos
<
DeviceType
>::
post_force_item
(
int
i
)
const
{
if
(
mask
[
i
]
&
groupbit
){
// x(i,2) = 0; // Enforce2d does not set x[2] to zero either... :/
v
(
i
,
2
)
=
0.0
;
f
(
i
,
2
)
=
0.0
;
...
...
This diff is collapsed.
Click to expand it.
src/KOKKOS/fix_enforce2d_kokkos.h
+
2
−
13
View file @
71f69912
...
...
@@ -32,7 +32,6 @@ class FixEnforce2DKokkos : public FixEnforce2D {
public:
FixEnforce2DKokkos
(
class
LAMMPS
*
,
int
,
char
**
);
// ~FixEnforce2DKokkos() {}
// void init();
void
setup
(
int
);
void
post_force
(
int
);
...
...
@@ -78,18 +77,8 @@ struct FixEnforce2DKokkosPostForceFunctor {
/* ERROR/WARNING messages:
E:
Illegal ... command
E:
Flag in fix_enforce2d_kokkos outside of what it should be
Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Cannot use fix enforce2d with 3d simulation
Self-explanatory.
E: Fix enforce2d must be defined after fix %s
UNDOCUMENTED
LAMMPS developer-only error.
*/
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