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
bbaf0074
Commit
bbaf0074
authored
14 years ago
by
sjplimp
Browse files
Options
Downloads
Patches
Plain Diff
git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@5060
f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent
4723d046
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/compute_pair.cpp
+16
-1
16 additions, 1 deletion
src/compute_pair.cpp
src/compute_pair.h
+2
-1
2 additions, 1 deletion
src/compute_pair.h
with
18 additions
and
2 deletions
src/compute_pair.cpp
+
16
−
1
View file @
bbaf0074
...
...
@@ -29,7 +29,11 @@ ComputePair::ComputePair(LAMMPS *lmp, int narg, char **arg) :
if
(
narg
!=
4
)
error
->
all
(
"Illegal compute pair command"
);
if
(
igroup
)
error
->
all
(
"Compute pair must use group all"
);
pair
=
force
->
pair_match
(
arg
[
3
],
1
);
int
n
=
strlen
(
arg
[
3
])
+
1
;
pstyle
=
new
char
[
n
];
strcpy
(
pstyle
,
arg
[
3
]);
pair
=
force
->
pair_match
(
pstyle
,
1
);
if
(
!
pair
)
error
->
all
(
"Unrecognized pair style in compute pair command"
);
npair
=
pair
->
nextra
;
if
(
!
npair
)
...
...
@@ -51,12 +55,23 @@ ComputePair::ComputePair(LAMMPS *lmp, int narg, char **arg) :
ComputePair
::~
ComputePair
()
{
delete
[]
pstyle
;
delete
[]
one
;
delete
[]
vector
;
}
/* ---------------------------------------------------------------------- */
void
ComputePair
::
init
()
{
// recheck for pair style in case it has been deleted
pair
=
force
->
pair_match
(
pstyle
,
1
);
if
(
!
pair
)
error
->
all
(
"Unrecognized pair style in compute pair command"
);
}
/* ---------------------------------------------------------------------- */
void
ComputePair
::
compute_vector
()
{
invoked_vector
=
update
->
ntimestep
;
...
...
This diff is collapsed.
Click to expand it.
src/compute_pair.h
+
2
−
1
View file @
bbaf0074
...
...
@@ -28,11 +28,12 @@ class ComputePair : public Compute {
public:
ComputePair
(
class
LAMMPS
*
,
int
,
char
**
);
~
ComputePair
();
void
init
()
{}
void
init
()
;
void
compute_vector
();
private:
int
npair
;
char
*
pstyle
;
class
Pair
*
pair
;
double
*
one
;
};
...
...
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