whitespace; versionadded tags

This commit is contained in:
Karl Hammond
2022-12-04 00:27:48 -06:00
parent f381a78c46
commit 162f2f9384
2 changed files with 52 additions and 41 deletions

View File

@ -1567,6 +1567,8 @@ Procedures Bound to the :f:type:`lammps` Derived Type
Gather the named per-atom, per-atom fix, per-atom compute, or fix Gather the named per-atom, per-atom fix, per-atom compute, or fix
property/atom-based entities from all processes, unordered. property/atom-based entities from all processes, unordered.
.. versionadded:: TBD
This subroutine gathers data for all atoms and stores them in a This subroutine gathers data for all atoms and stores them in a
one-dimensional allocatable array. The data will be a one-dimensional allocatable array. The data will be a
concatenation of chunks from each processor's owned atoms, in whatever order concatenation of chunks from each processor's owned atoms, in whatever order
@ -1611,6 +1613,8 @@ Procedures Bound to the :f:type:`lammps` Derived Type
Gather the named per-atom, per-atom fix, per-atom compute, or fix Gather the named per-atom, per-atom fix, per-atom compute, or fix
property/atom-based entities from all processes for a subset of atoms. property/atom-based entities from all processes for a subset of atoms.
.. versionadded:: TBD
This subroutine gathers data for the requested atom IDs and stores them in a This subroutine gathers data for the requested atom IDs and stores them in a
one-dimensional allocatable array. The data will be ordered by atom ID, but one-dimensional allocatable array. The data will be ordered by atom ID, but
there is no requirement that the IDs be consecutive. If you wish to return a there is no requirement that the IDs be consecutive. If you wish to return a

View File

@ -220,14 +220,13 @@ TEST_F(LAMMPS_gather_scatter, gather_bonds)
#else #else
EXPECT_EQ(f_lammps_test_gather_bonds_small(), 1); EXPECT_EQ(f_lammps_test_gather_bonds_small(), 1);
#endif #endif
}; };
TEST_F(LAMMPS_gather_scatter, gather_compute) TEST_F(LAMMPS_gather_scatter, gather_compute)
{ {
#ifdef LAMMPS_BIGBIG #ifdef LAMMPS_BIGBIG
GTEST_SKIP() GTEST_SKIP();
#endif #else
f_lammps_setup_gather_scatter(); f_lammps_setup_gather_scatter();
lammps_command(lmp, "run 0"); lammps_command(lmp, "run 0");
int natoms = lmp->atom->natoms; int natoms = lmp->atom->natoms;
@ -236,13 +235,14 @@ TEST_F(LAMMPS_gather_scatter, gather_compute)
LMP_TYPE_VECTOR); LMP_TYPE_VECTOR);
for (int i = 0; i < natoms; i++) for (int i = 0; i < natoms; i++)
EXPECT_DOUBLE_EQ(f_lammps_gather_pe_atom(tag[i]), pe[i]); EXPECT_DOUBLE_EQ(f_lammps_gather_pe_atom(tag[i]), pe[i]);
#endif
}; };
TEST_F(LAMMPS_gather_scatter, gather_compute_concat) TEST_F(LAMMPS_gather_scatter, gather_compute_concat)
{ {
#ifdef LAMMPS_BIGBIG #ifdef LAMMPS_BIGBIG
GTEST_SKIP() GTEST_SKIP();
#endif #else
f_lammps_setup_gather_scatter(); f_lammps_setup_gather_scatter();
lammps_command(lmp, "run 0"); lammps_command(lmp, "run 0");
int natoms = lmp->atom->natoms; int natoms = lmp->atom->natoms;
@ -251,10 +251,14 @@ TEST_F(LAMMPS_gather_scatter, gather_compute_concat)
LMP_TYPE_VECTOR); LMP_TYPE_VECTOR);
for (int i = 0; i < natoms; i++) for (int i = 0; i < natoms; i++)
EXPECT_DOUBLE_EQ(f_lammps_gather_pe_atom(tag[i]), pe[i]); EXPECT_DOUBLE_EQ(f_lammps_gather_pe_atom(tag[i]), pe[i]);
#endif
}; };
TEST_F(LAMMPS_gather_scatter, gather_compute_subset) TEST_F(LAMMPS_gather_scatter, gather_compute_subset)
{ {
#ifdef LAMMPS_BIGBIG
GTEST_SKIP();
#else
f_lammps_setup_gather_scatter(); f_lammps_setup_gather_scatter();
lammps_command(lmp, "run 0"); lammps_command(lmp, "run 0");
int ids[2] = {3, 1}; int ids[2] = {3, 1};
@ -273,13 +277,14 @@ TEST_F(LAMMPS_gather_scatter, gather_compute_subset)
f_lammps_gather_pe_atom_subset(ids, ftn_pe); f_lammps_gather_pe_atom_subset(ids, ftn_pe);
EXPECT_DOUBLE_EQ(ftn_pe[0], pe[0]); EXPECT_DOUBLE_EQ(ftn_pe[0], pe[0]);
EXPECT_DOUBLE_EQ(ftn_pe[1], pe[1]); EXPECT_DOUBLE_EQ(ftn_pe[1], pe[1]);
#endif
}; };
TEST_F(LAMMPS_gather_scatter, scatter_compute) TEST_F(LAMMPS_gather_scatter, scatter_compute)
{ {
#ifdef LAMMPS_BIGBIG #ifdef LAMMPS_BIGBIG
GTEST_SKIP(); GTEST_SKIP();
#endif #else
f_lammps_setup_gather_scatter(); f_lammps_setup_gather_scatter();
int natoms = lmp->atom->natoms; int natoms = lmp->atom->natoms;
double *pe = new double[natoms]; double *pe = new double[natoms];
@ -298,13 +303,14 @@ TEST_F(LAMMPS_gather_scatter, scatter_compute)
EXPECT_DOUBLE_EQ(pe[2], old_pe[0]); EXPECT_DOUBLE_EQ(pe[2], old_pe[0]);
delete[] old_pe; delete[] old_pe;
delete[] pe; delete[] pe;
#endif
}; };
TEST_F(LAMMPS_gather_scatter, scatter_subset_compute) TEST_F(LAMMPS_gather_scatter, scatter_subset_compute)
{ {
#ifdef LAMMPS_BIGBIG #ifdef LAMMPS_BIGBIG
GTEST_SKIP(); GTEST_SKIP();
#endif #else
f_lammps_setup_gather_scatter(); f_lammps_setup_gather_scatter();
int natoms = lmp->atom->natoms; int natoms = lmp->atom->natoms;
double *pe = new double[natoms]; double *pe = new double[natoms];
@ -323,4 +329,5 @@ TEST_F(LAMMPS_gather_scatter, scatter_subset_compute)
EXPECT_DOUBLE_EQ(pe[2], old_pe[0]); EXPECT_DOUBLE_EQ(pe[2], old_pe[0]);
delete[] old_pe; delete[] old_pe;
delete[] pe; delete[] pe;
#endif
}; };