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
d55c7039
Unverified
Commit
d55c7039
authored
6 years ago
by
Steve Plimpton
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #943 from Pakketeretet2/improve-manifoldforce-warning
Improve fix manifoldforce warning
parents
87dcef71
7c9afc1b
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/USER-MANIFOLD/fix_manifoldforce.cpp
+14
-9
14 additions, 9 deletions
src/USER-MANIFOLD/fix_manifoldforce.cpp
src/USER-MANIFOLD/fix_manifoldforce.h
+1
-0
1 addition, 0 deletions
src/USER-MANIFOLD/fix_manifoldforce.h
with
15 additions
and
9 deletions
src/USER-MANIFOLD/fix_manifoldforce.cpp
+
14
−
9
View file @
d55c7039
...
@@ -31,12 +31,12 @@ using namespace user_manifold;
...
@@ -31,12 +31,12 @@ using namespace user_manifold;
// Helper functions for parameters/equal style variables in input script
// Helper functions for parameters/equal style variables in input script
inline
bool
was_var
(
const
char
*
arg
)
static
bool
was_var
(
const
char
*
arg
)
{
{
return
strstr
(
arg
,
"v_"
)
==
arg
;
return
strstr
(
arg
,
"v_"
)
==
arg
;
}
}
inline
bool
str_eq
(
const
char
*
str1
,
const
char
*
str2
)
static
bool
str_eq
(
const
char
*
str1
,
const
char
*
str2
)
{
{
return
strcmp
(
str1
,
str2
)
==
0
;
return
strcmp
(
str1
,
str2
)
==
0
;
}
}
...
@@ -50,13 +50,6 @@ FixManifoldForce::FixManifoldForce(LAMMPS *lmp, int narg, char **arg) :
...
@@ -50,13 +50,6 @@ FixManifoldForce::FixManifoldForce(LAMMPS *lmp, int narg, char **arg) :
MPI_Comm_rank
(
world
,
&
me
);
MPI_Comm_rank
(
world
,
&
me
);
// Check the min-style:
int
good_minner
=
str_eq
(
update
->
minimize_style
,
"hftn"
)
|
str_eq
(
update
->
minimize_style
,
"quickmin"
);
if
(
!
good_minner
){
error
->
warning
(
FLERR
,
"Minimizing with fix manifoldforce without hftn or quickmin is fishy"
);
}
// Command is given as
// Command is given as
// fix <name> <group> manifoldforce manifold_name manifold_args
// fix <name> <group> manifoldforce manifold_name manifold_args
...
@@ -121,6 +114,18 @@ int FixManifoldForce::setmask()
...
@@ -121,6 +114,18 @@ int FixManifoldForce::setmask()
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
void
FixManifoldForce
::
init
()
{
// Check the min-style:
const
bool
is_good_min_style
=
str_eq
(
update
->
minimize_style
,
"hftn"
)
||
str_eq
(
update
->
minimize_style
,
"quickmin"
);
if
(
!
is_good_min_style
)
{
error
->
all
(
FLERR
,
"Fix manifoldforce requires min_style hftn or quickmin"
);
}
}
/* ---------------------------------------------------------------------- */
void
FixManifoldForce
::
setup
(
int
vflag
)
void
FixManifoldForce
::
setup
(
int
vflag
)
{
{
if
(
strstr
(
update
->
integrate_style
,
"verlet"
))
if
(
strstr
(
update
->
integrate_style
,
"verlet"
))
...
...
This diff is collapsed.
Click to expand it.
src/USER-MANIFOLD/fix_manifoldforce.h
+
1
−
0
View file @
d55c7039
...
@@ -51,6 +51,7 @@ class FixManifoldForce : public Fix {
...
@@ -51,6 +51,7 @@ class FixManifoldForce : public Fix {
public:
public:
FixManifoldForce
(
class
LAMMPS
*
,
int
,
char
**
);
FixManifoldForce
(
class
LAMMPS
*
,
int
,
char
**
);
int
setmask
();
int
setmask
();
void
init
();
void
setup
(
int
);
void
setup
(
int
);
void
min_setup
(
int
);
void
min_setup
(
int
);
void
post_force
(
int
);
void
post_force
(
int
);
...
...
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