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
8500a197
Commit
8500a197
authored
7 years ago
by
Axel Kohlmeyer
Browse files
Options
Downloads
Patches
Plain Diff
whitespace cleanup
parent
1f17e8eb
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/dump.cpp
+13
-10
13 additions, 10 deletions
src/dump.cpp
src/dump.h
+1
-1
1 addition, 1 deletion
src/dump.h
with
14 additions
and
11 deletions
src/dump.cpp
+
13
−
10
View file @
8500a197
...
...
@@ -80,7 +80,7 @@ Dump::Dump(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
buffer_flag
=
0
;
padflag
=
0
;
pbcflag
=
0
;
maxbuf
=
maxids
=
maxsort
=
maxproc
=
0
;
buf
=
bufsort
=
NULL
;
ids
=
idsort
=
NULL
;
...
...
@@ -166,13 +166,13 @@ Dump::~Dump()
delete
irregular
;
memory
->
destroy
(
sbuf
);
if
(
pbcflag
)
{
memory
->
destroy
(
xpbc
);
memory
->
destroy
(
vpbc
);
memory
->
destroy
(
imagepbc
);
}
if
(
multiproc
)
MPI_Comm_free
(
&
clustercomm
);
// XTC style sets fp to NULL since it closes file in its destructor
...
...
@@ -273,7 +273,7 @@ void Dump::init()
}
// preallocation for PBC copies if requested
if
(
pbcflag
&&
atom
->
nlocal
>
maxpbc
)
pbc_allocate
();
}
...
...
@@ -386,7 +386,7 @@ void Dump::write()
atom
->
image
=
imagepbc
;
domain
->
pbc
();
}
// pack my data into buf
// if sorting on IDs also request ID list from pack()
// sort buf as needed
...
...
@@ -717,7 +717,8 @@ void Dump::sort()
compare two atom IDs
called via merge_sort() in sort() method
------------------------------------------------------------------------- */
int
Dump
::
idcompare
(
const
int
i
,
const
int
j
,
void
*
ptr
)
{
int
Dump
::
idcompare
(
const
int
i
,
const
int
j
,
void
*
ptr
)
{
tagint
*
idsort
=
((
Dump
*
)
ptr
)
->
idsort
;
if
(
idsort
[
i
]
<
idsort
[
j
])
return
-
1
;
else
if
(
idsort
[
i
]
>
idsort
[
j
])
return
1
;
...
...
@@ -730,7 +731,8 @@ int Dump::idcompare(const int i, const int j, void *ptr) {
sort in ASCENDing order
------------------------------------------------------------------------- */
int
Dump
::
bufcompare
(
const
int
i
,
const
int
j
,
void
*
ptr
)
{
int
Dump
::
bufcompare
(
const
int
i
,
const
int
j
,
void
*
ptr
)
{
Dump
*
dptr
=
(
Dump
*
)
ptr
;
double
*
bufsort
=
dptr
->
bufsort
;
const
int
size_one
=
dptr
->
size_one
;
...
...
@@ -738,7 +740,7 @@ int Dump::bufcompare(const int i, const int j, void *ptr) {
const
int
ii
=
i
*
size_one
+
sortcolm1
;
const
int
jj
=
j
*
size_one
+
sortcolm1
;
if
(
bufsort
[
ii
]
<
bufsort
[
jj
])
return
-
1
;
else
if
(
bufsort
[
ii
]
>
bufsort
[
jj
])
return
1
;
else
return
0
;
...
...
@@ -749,7 +751,8 @@ int Dump::bufcompare(const int i, const int j, void *ptr) {
sort in DESCENDing order
------------------------------------------------------------------------- */
int
Dump
::
bufcompare_reverse
(
const
int
i
,
const
int
j
,
void
*
ptr
)
{
int
Dump
::
bufcompare_reverse
(
const
int
i
,
const
int
j
,
void
*
ptr
)
{
Dump
*
dptr
=
(
Dump
*
)
ptr
;
double
*
bufsort
=
dptr
->
bufsort
;
const
int
size_one
=
dptr
->
size_one
;
...
...
@@ -757,7 +760,7 @@ int Dump::bufcompare_reverse(const int i, const int j, void *ptr) {
const
int
ii
=
i
*
size_one
+
sortcolm1
;
const
int
jj
=
j
*
size_one
+
sortcolm1
;
if
(
bufsort
[
ii
]
<
bufsort
[
jj
])
return
1
;
else
if
(
bufsort
[
ii
]
>
bufsort
[
jj
])
return
-
1
;
else
return
0
;
...
...
This diff is collapsed.
Click to expand it.
src/dump.h
+
1
−
1
View file @
8500a197
...
...
@@ -128,7 +128,7 @@ class Dump : protected Pointers {
virtual
int
convert_string
(
int
,
double
*
)
{
return
0
;}
virtual
void
write_data
(
int
,
double
*
)
=
0
;
void
pbc_allocate
();
void
sort
();
static
int
idcompare
(
const
int
,
const
int
,
void
*
);
static
int
bufcompare
(
const
int
,
const
int
,
void
*
);
...
...
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