enable and apply clang-format
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -25,8 +24,7 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeDihedral::ComputeDihedral(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg),
|
||||
emine(nullptr)
|
||||
Compute(lmp, narg, arg), emine(nullptr)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR, "Illegal compute dihedral command");
|
||||
|
||||
@ -38,8 +36,7 @@ ComputeDihedral::ComputeDihedral(LAMMPS *lmp, int narg, char **arg) :
|
||||
// check if dihedral style hybrid exists
|
||||
|
||||
dihedral = dynamic_cast<DihedralHybrid *>(force->dihedral_match("hybrid"));
|
||||
if (!dihedral)
|
||||
error->all(FLERR, "Dihedral style for compute dihedral command is not hybrid");
|
||||
if (!dihedral) error->all(FLERR, "Dihedral style for compute dihedral command is not hybrid");
|
||||
size_vector = nsub = dihedral->nstyles;
|
||||
|
||||
emine = new double[nsub];
|
||||
@ -61,8 +58,7 @@ void ComputeDihedral::init()
|
||||
// recheck dihedral style in case it has been changed
|
||||
|
||||
dihedral = dynamic_cast<DihedralHybrid *>(force->dihedral_match("hybrid"));
|
||||
if (!dihedral)
|
||||
error->all(FLERR, "Dihedral style for compute dihedral command is not hybrid");
|
||||
if (!dihedral) error->all(FLERR, "Dihedral style for compute dihedral command is not hybrid");
|
||||
if (dihedral->nstyles != nsub)
|
||||
error->all(FLERR, "Dihedral style for compute dihedral command has changed");
|
||||
}
|
||||
@ -75,8 +71,7 @@ void ComputeDihedral::compute_vector()
|
||||
if (update->eflag_global != invoked_vector)
|
||||
error->all(FLERR, "Energy was not tallied on needed timestep");
|
||||
|
||||
for (int i = 0; i < nsub; i++)
|
||||
emine[i] = dihedral->styles[i]->energy;
|
||||
for (int i = 0; i < nsub; i++) emine[i] = dihedral->styles[i]->energy;
|
||||
|
||||
MPI_Allreduce(emine, vector, nsub, MPI_DOUBLE, MPI_SUM, world);
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -14,19 +13,18 @@
|
||||
|
||||
#include "compute_improper.h"
|
||||
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "improper.h"
|
||||
#include "improper_hybrid.h"
|
||||
#include "error.h"
|
||||
#include "update.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeImproper::ComputeImproper(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg),
|
||||
emine(nullptr)
|
||||
Compute(lmp, narg, arg), emine(nullptr)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR, "Illegal compute improper command");
|
||||
|
||||
@ -38,8 +36,7 @@ ComputeImproper::ComputeImproper(LAMMPS *lmp, int narg, char **arg) :
|
||||
// check if improper style hybrid exists
|
||||
|
||||
improper = dynamic_cast<ImproperHybrid *>(force->improper_match("hybrid"));
|
||||
if (!improper)
|
||||
error->all(FLERR, "Improper style for compute improper command is not hybrid");
|
||||
if (!improper) error->all(FLERR, "Improper style for compute improper command is not hybrid");
|
||||
size_vector = nsub = improper->nstyles;
|
||||
|
||||
emine = new double[nsub];
|
||||
@ -61,8 +58,7 @@ void ComputeImproper::init()
|
||||
// recheck improper style in case it has been changed
|
||||
|
||||
improper = dynamic_cast<ImproperHybrid *>(force->improper_match("hybrid"));
|
||||
if (!improper)
|
||||
error->all(FLERR, "Improper style for compute improper command is not hybrid");
|
||||
if (!improper) error->all(FLERR, "Improper style for compute improper command is not hybrid");
|
||||
if (improper->nstyles != nsub)
|
||||
error->all(FLERR, "Improper style for compute improper command has changed");
|
||||
}
|
||||
@ -75,8 +71,7 @@ void ComputeImproper::compute_vector()
|
||||
if (update->eflag_global != invoked_vector)
|
||||
error->all(FLERR, "Energy was not tallied on needed timestep");
|
||||
|
||||
for (int i = 0; i < nsub; i++)
|
||||
emine[i] = improper->styles[i]->energy;
|
||||
for (int i = 0; i < nsub; i++) emine[i] = improper->styles[i]->energy;
|
||||
|
||||
MPI_Allreduce(emine, vector, nsub, MPI_DOUBLE, MPI_SUM, world);
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -13,16 +12,16 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_dummy.h"
|
||||
#include <cstring>
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixDummy::FixDummy(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
FixDummy::FixDummy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
{
|
||||
// process optional args
|
||||
// customize here and in setmask() by adding a new keyword from fix.h
|
||||
@ -39,14 +38,22 @@ FixDummy::FixDummy(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
int iarg = 3;
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"initial_integrate") == 0) initial_integrate_flag = 1;
|
||||
else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1;
|
||||
else if (strcmp(arg[iarg],"pre_exchange") == 0) pre_exchange_flag = 1;
|
||||
else if (strcmp(arg[iarg],"pre_neighbor") == 0) pre_neighbor_flag = 1;
|
||||
else if (strcmp(arg[iarg],"pre_force") == 0) pre_force_flag = 1;
|
||||
else if (strcmp(arg[iarg],"post_force") == 0) post_force_flag = 1;
|
||||
else if (strcmp(arg[iarg],"end_of_step") == 0) end_of_step_flag = 1;
|
||||
else error->all(FLERR,"Illegal fix DUMMY command");
|
||||
if (strcmp(arg[iarg], "initial_integrate") == 0)
|
||||
initial_integrate_flag = 1;
|
||||
else if (strcmp(arg[iarg], "final_integrate") == 0)
|
||||
final_integrate_flag = 1;
|
||||
else if (strcmp(arg[iarg], "pre_exchange") == 0)
|
||||
pre_exchange_flag = 1;
|
||||
else if (strcmp(arg[iarg], "pre_neighbor") == 0)
|
||||
pre_neighbor_flag = 1;
|
||||
else if (strcmp(arg[iarg], "pre_force") == 0)
|
||||
pre_force_flag = 1;
|
||||
else if (strcmp(arg[iarg], "post_force") == 0)
|
||||
post_force_flag = 1;
|
||||
else if (strcmp(arg[iarg], "end_of_step") == 0)
|
||||
end_of_step_flag = 1;
|
||||
else
|
||||
error->all(FLERR, "Illegal fix DUMMY command");
|
||||
iarg++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -24,8 +23,7 @@ using namespace FixConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixNVENoforce::FixNVENoforce(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
FixNVENoforce::FixNVENoforce(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR, "Illegal fix nve/noforce command");
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -23,19 +22,15 @@ using namespace FixConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixNVTSphere::FixNVTSphere(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixNHSphere(lmp, narg, arg)
|
||||
FixNVTSphere::FixNVTSphere(LAMMPS *lmp, int narg, char **arg) : FixNHSphere(lmp, narg, arg)
|
||||
{
|
||||
if (!tstat_flag)
|
||||
error->all(FLERR,"Temperature control must be used with fix nvt/sphere");
|
||||
if (pstat_flag)
|
||||
error->all(FLERR,"Pressure control can not be used with fix nvt/sphere");
|
||||
if (!tstat_flag) error->all(FLERR, "Temperature control must be used with fix nvt/sphere");
|
||||
if (pstat_flag) error->all(FLERR, "Pressure control can not be used with fix nvt/sphere");
|
||||
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/sphere",
|
||||
id_temp,group->names[igroup]));
|
||||
modify->add_compute(fmt::format("{} {} temp/sphere", id_temp, group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -21,8 +20,7 @@ using namespace FixConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixWallHarmonic::FixWallHarmonic(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixWall(lmp, narg, arg)
|
||||
FixWallHarmonic::FixWallHarmonic(LAMMPS *lmp, int narg, char **arg) : FixWall(lmp, narg, arg)
|
||||
{
|
||||
dynamic_group_allow = 1;
|
||||
}
|
||||
@ -52,8 +50,10 @@ void FixWallHarmonic::wall_particle(int m, int which, double coord)
|
||||
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
if (side < 0) delta = x[i][dim] - coord;
|
||||
else delta = coord - x[i][dim];
|
||||
if (side < 0)
|
||||
delta = x[i][dim] - coord;
|
||||
else
|
||||
delta = coord - x[i][dim];
|
||||
if (delta >= cutoff[m]) continue;
|
||||
if (delta <= 0.0) {
|
||||
onflag = 1;
|
||||
@ -66,8 +66,10 @@ void FixWallHarmonic::wall_particle(int m, int which, double coord)
|
||||
ewall[m + 1] += fwall;
|
||||
|
||||
if (evflag) {
|
||||
if (side < 0) vn = -fwall*delta;
|
||||
else vn = fwall*delta;
|
||||
if (side < 0)
|
||||
vn = -fwall * delta;
|
||||
else
|
||||
vn = fwall * delta;
|
||||
v_tally(dim, i, vn);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -13,17 +12,17 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_wall_morse.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixWallMorse::FixWallMorse(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixWall(lmp, narg, arg)
|
||||
FixWallMorse::FixWallMorse(LAMMPS *lmp, int narg, char **arg) : FixWall(lmp, narg, arg)
|
||||
{
|
||||
dynamic_group_allow = 1;
|
||||
}
|
||||
@ -62,8 +61,10 @@ void FixWallMorse::wall_particle(int m, int which, double coord)
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
if (side < 0) delta = x[i][dim] - coord;
|
||||
else delta = coord - x[i][dim];
|
||||
if (side < 0)
|
||||
delta = x[i][dim] - coord;
|
||||
else
|
||||
delta = coord - x[i][dim];
|
||||
if (delta >= cutoff[m]) continue;
|
||||
if (delta <= 0.0) {
|
||||
onflag = 1;
|
||||
@ -77,8 +78,10 @@ void FixWallMorse::wall_particle(int m, int which, double coord)
|
||||
ewall[m + 1] += fwall;
|
||||
|
||||
if (evflag) {
|
||||
if (side < 0) vn = -fwall*delta;
|
||||
else vn = fwall*delta;
|
||||
if (side < 0)
|
||||
vn = -fwall * delta;
|
||||
else
|
||||
vn = fwall * delta;
|
||||
v_tally(dim, i, vn);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -85,8 +84,7 @@ void NPairFullBinAtomonly::build(NeighList *list)
|
||||
firstneigh[i] = neighptr;
|
||||
numneigh[i] = n;
|
||||
ipage->vgot(n);
|
||||
if (ipage->status())
|
||||
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
|
||||
if (ipage->status()) error->one(FLERR, "Neighbor list overflow, boost neigh_modify one");
|
||||
}
|
||||
|
||||
list->inum = inum;
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -74,8 +73,7 @@ void NPairHalffullNewtoff::build(NeighList *list)
|
||||
firstneigh[i] = neighptr;
|
||||
numneigh[i] = n;
|
||||
ipage->vgot(n);
|
||||
if (ipage->status())
|
||||
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
|
||||
if (ipage->status()) error->one(FLERR, "Neighbor list overflow, boost neigh_modify one");
|
||||
}
|
||||
|
||||
list->inum = inum;
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -80,8 +79,7 @@ void NPairSkipSize::build(NeighList *list)
|
||||
firstneigh[i] = neighptr;
|
||||
numneigh[i] = n;
|
||||
ipage->vgot(n);
|
||||
if (ipage->status())
|
||||
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
|
||||
if (ipage->status()) error->one(FLERR, "Neighbor list overflow, boost neigh_modify one");
|
||||
}
|
||||
|
||||
list->inum = inum;
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -32,6 +31,5 @@ void NStencilFullBin2d::create()
|
||||
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq)
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
if (bin_distance(i, j, 0) < cutneighmaxsq) stencil[nstencil++] = j * mbinx + i;
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -50,7 +49,6 @@ void NStencilFullMulti2d::create()
|
||||
int n = ncollections;
|
||||
double cutsq;
|
||||
|
||||
|
||||
for (icollection = 0; icollection < n; icollection++) {
|
||||
for (jcollection = 0; jcollection < n; jcollection++) {
|
||||
if (flag_skip_multi[icollection][jcollection]) {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -33,6 +32,5 @@ void NStencilHalfBin2d::create()
|
||||
for (j = 0; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (j > 0 || (j == 0 && i > 0))
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq)
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
if (bin_distance(i, j, 0) < cutneighmaxsq) stencil[nstencil++] = j * mbinx + i;
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -18,8 +17,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NStencilHalfBin2dTri::NStencilHalfBin2dTri(LAMMPS *lmp) :
|
||||
NStencil(lmp) {}
|
||||
NStencilHalfBin2dTri::NStencilHalfBin2dTri(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create stencil based on bin geometry and cutoff
|
||||
@ -33,6 +31,5 @@ void NStencilHalfBin2dTri::create()
|
||||
|
||||
for (j = 0; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq)
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
if (bin_distance(i, j, 0) < cutneighmaxsq) stencil[nstencil++] = j * mbinx + i;
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -18,8 +17,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NStencilHalfBin3dTri::NStencilHalfBin3dTri(LAMMPS *lmp) :
|
||||
NStencil(lmp) {}
|
||||
NStencilHalfBin3dTri::NStencilHalfBin3dTri(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create stencil based on bin geometry and cutoff
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -19,8 +18,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NStencilHalfMultiOld2d::
|
||||
NStencilHalfMultiOld2d(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
NStencilHalfMultiOld2d::NStencilHalfMultiOld2d(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create stencil based on bin geometry and cutoff
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -19,8 +18,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NStencilHalfMultiOld2dTri::
|
||||
NStencilHalfMultiOld2dTri(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
NStencilHalfMultiOld2dTri::NStencilHalfMultiOld2dTri(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create stencil based on bin geometry and cutoff
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -19,8 +18,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NStencilHalfMultiOld3d::
|
||||
NStencilHalfMultiOld3d(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
NStencilHalfMultiOld3d::NStencilHalfMultiOld3d(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create stencil based on bin geometry and cutoff
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -19,8 +18,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NStencilHalfMultiOld3dTri::
|
||||
NStencilHalfMultiOld3dTri(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
NStencilHalfMultiOld3dTri::NStencilHalfMultiOld3dTri(LAMMPS *lmp) : NStencil(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create stencil based on bin geometry and cutoff
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -15,14 +14,13 @@
|
||||
#include "ntopo_bond_all.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "domain.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "memory.h"
|
||||
#include "output.h"
|
||||
#include "thermo.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#include "update.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -58,9 +56,10 @@ void NTopoBondAll::build()
|
||||
if (atom1 == -1) {
|
||||
nmissing++;
|
||||
if (lostbond == Thermo::ERROR)
|
||||
error->one(FLERR,"Bond atoms {} {} missing on "
|
||||
"proc {} at step {}",tag[i],
|
||||
bond_atom[i][m],me,update->ntimestep);
|
||||
error->one(FLERR,
|
||||
"Bond atoms {} {} missing on "
|
||||
"proc {} at step {}",
|
||||
tag[i], bond_atom[i][m], me, update->ntimestep);
|
||||
continue;
|
||||
}
|
||||
atom1 = domain->closest_image(i, atom1);
|
||||
@ -81,6 +80,5 @@ void NTopoBondAll::build()
|
||||
|
||||
int all;
|
||||
MPI_Allreduce(&nmissing, &all, 1, MPI_INT, MPI_SUM, world);
|
||||
if (all && (me == 0))
|
||||
error->warning(FLERR,"Bond atoms missing at step {}",update->ntimestep);
|
||||
if (all && (me == 0)) error->warning(FLERR, "Bond atoms missing at step {}", update->ntimestep);
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -15,14 +14,13 @@
|
||||
#include "ntopo_bond_partial.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "domain.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "memory.h"
|
||||
#include "output.h"
|
||||
#include "thermo.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#include "update.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -59,9 +57,10 @@ void NTopoBondPartial::build()
|
||||
if (atom1 == -1) {
|
||||
nmissing++;
|
||||
if (lostbond == Thermo::ERROR)
|
||||
error->one(FLERR,"Bond atoms {} {} missing on "
|
||||
"proc {} at step {}",tag[i],
|
||||
bond_atom[i][m],me,update->ntimestep);
|
||||
error->one(FLERR,
|
||||
"Bond atoms {} {} missing on "
|
||||
"proc {} at step {}",
|
||||
tag[i], bond_atom[i][m], me, update->ntimestep);
|
||||
continue;
|
||||
}
|
||||
atom1 = domain->closest_image(i, atom1);
|
||||
@ -82,6 +81,5 @@ void NTopoBondPartial::build()
|
||||
|
||||
int all;
|
||||
MPI_Allreduce(&nmissing, &all, 1, MPI_INT, MPI_SUM, world);
|
||||
if (all && (me == 0))
|
||||
error->warning(FLERR,"Bond atoms missing at step {}",update->ntimestep);
|
||||
if (all && (me == 0)) error->warning(FLERR, "Bond atoms missing at step {}", update->ntimestep);
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -64,8 +63,10 @@ void Reader::open_file(const std::string &file)
|
||||
void Reader::close_file()
|
||||
{
|
||||
if (fp == nullptr) return;
|
||||
if (compressed) platform::pclose(fp);
|
||||
else fclose(fp);
|
||||
if (compressed)
|
||||
platform::pclose(fp);
|
||||
else
|
||||
fclose(fp);
|
||||
fp = nullptr;
|
||||
}
|
||||
|
||||
@ -75,6 +76,5 @@ void Reader::close_file()
|
||||
|
||||
void Reader::settings(int narg, char ** /*args*/)
|
||||
{
|
||||
if (narg > 0)
|
||||
error->all(FLERR,"Illegal read_dump command");
|
||||
if (narg > 0) error->all(FLERR, "Illegal read_dump command");
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -61,11 +60,9 @@ void WriteDump::command(int narg, char **arg)
|
||||
// write out one frame and then delete the dump again
|
||||
// set multifile_override for DumpImage so that filename needs no "*"
|
||||
|
||||
if (strcmp(arg[1],"image") == 0)
|
||||
(dynamic_cast<DumpImage *>( dump))->multifile_override = 1;
|
||||
if (strcmp(arg[1], "image") == 0) (dynamic_cast<DumpImage *>(dump))->multifile_override = 1;
|
||||
|
||||
if (strcmp(arg[1],"cfg") == 0)
|
||||
(dynamic_cast<DumpCFG *>( dump))->multifile_override = 1;
|
||||
if (strcmp(arg[1], "cfg") == 0) (dynamic_cast<DumpCFG *>(dump))->multifile_override = 1;
|
||||
|
||||
if ((update->first_update == 0) && (comm->me == 0))
|
||||
error->warning(FLERR, "Calling write_dump before a full system init.");
|
||||
|
||||
Reference in New Issue
Block a user