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
18216de0
Commit
18216de0
authored
6 years ago
by
Axel Kohlmeyer
Browse files
Options
Downloads
Patches
Plain Diff
correctly check for fixes that maintain their own pressure compute
parent
3cb2291a
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
src/USER-PLUMED/fix_plumed.cpp
+22
-9
22 additions, 9 deletions
src/USER-PLUMED/fix_plumed.cpp
with
22 additions
and
9 deletions
src/USER-PLUMED/fix_plumed.cpp
+
22
−
9
View file @
18216de0
...
@@ -229,16 +229,29 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) :
...
@@ -229,16 +229,29 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) :
delete
[]
newarg
;
delete
[]
newarg
;
int
ipress
=
modify
->
find_compute
(
id_press
);
int
ipress
=
modify
->
find_compute
(
id_press
);
c_press
=
modify
->
compute
[
ipress
];
c_press
=
modify
->
compute
[
ipress
];
// Check if nh type fixes have been called
// See comment in the setup method
for
(
int
i
=
0
;
i
<
modify
->
nfix
;
i
++
)
{
for
(
int
i
=
0
;
i
<
modify
->
nfix
;
i
++
)
{
if
(
strncmp
(
modify
->
fix
[
i
]
->
style
,
"nph"
,
3
)
||
const
char
*
const
check_style
=
modify
->
fix
[
i
]
->
style
;
strncmp
(
modify
->
fix
[
i
]
->
style
,
"nph_sphere"
,
10
)
||
strncmp
(
modify
->
fix
[
i
]
->
style
,
"npt"
,
3
)
||
// There must be only one
strncmp
(
modify
->
fix
[
i
]
->
style
,
"npt_sphere"
,
10
)
)
error
->
all
(
FLERR
,
"Fix plumed must be called before fix_nh derived fixes, "
if
(
strcmp
(
check_style
,
"plumed"
)
==
0
)
"for instance nph and npt fixes"
);
error
->
all
(
FLERR
,
"There must be only one instance of fix plumed"
);
// Avoid conflict with fixes that define internal pressure computes.
// See comment in the setup method
if
((
strncmp
(
check_style
,
"nph"
,
3
)
==
0
)
||
(
strncmp
(
check_style
,
"npt"
,
3
)
==
0
)
||
(
strncmp
(
check_style
,
"rigid/nph"
,
9
)
==
0
)
||
(
strncmp
(
check_style
,
"rigid/npt"
,
9
)
==
0
)
||
(
strncmp
(
check_style
,
"msst"
,
4
)
==
0
)
||
(
strncmp
(
check_style
,
"nphug"
,
5
)
==
0
)
||
(
strncmp
(
check_style
,
"ipi"
,
3
)
==
0
)
||
(
strncmp
(
check_style
,
"press/berendsen"
,
15
)
==
0
)
||
(
strncmp
(
check_style
,
"qbmsst"
,
6
)
==
0
))
error
->
all
(
FLERR
,
"Fix plumed must be defined before any other fixes, "
"that compute pressure internally"
);
}
}
}
}
...
...
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