Merge branch 'master' into prepare-clang-format

# Conflicts:
#	src/MOLECULE/bond_fene.h
#	src/MOLECULE/bond_fene_expand.h
This commit is contained in:
Axel Kohlmeyer
2021-05-11 21:49:48 -04:00
205 changed files with 16072 additions and 8024 deletions

View File

@ -13,13 +13,15 @@
------------------------------------------------------------------------- */
#include "improper.h"
#include "atom.h"
#include "comm.h"
#include "force.h"
#include "suffix.h"
#include "atom_masks.h"
#include "memory.h"
#include "comm.h"
#include "error.h"
#include "force.h"
#include "memory.h"
#include "suffix.h"
#include "update.h"
using namespace LAMMPS_NS;
@ -387,6 +389,27 @@ void Improper::ev_tally(int i1, int i2, int i3, int i4,
/* ---------------------------------------------------------------------- */
void Improper::problem(const char *filename, int lineno,
int i1, int i2, int i3, int i4)
{
const auto x = atom->x;
auto warn = fmt::format("Improper problem: {} {} {} {} {} {}\n",
comm->me, update->ntimestep, atom->tag[i1],
atom->tag[i2], atom->tag[i3], atom->tag[i4]);
warn += fmt::format("WARNING: 1st atom: {} {:.8} {:.8} {:.8}\n",
comm->me,x[i1][0],x[i1][1],x[i1][2]);
warn += fmt::format("WARNING: 2nd atom: {} {:.8} {:.8} {:.8}\n",
comm->me,x[i2][0],x[i2][1],x[i2][2]);
warn += fmt::format("WARNING: 3rd atom: {} {:.8} {:.8} {:.8}\n",
comm->me,x[i3][0],x[i3][1],x[i3][2]);
warn += fmt::format("WARNING: 4th atom: {} {:.8} {:.8} {:.8}",
comm->me,x[i4][0],x[i4][1],x[i4][2]);
error->warning(filename, lineno, warn);
}
/* ---------------------------------------------------------------------- */
double Improper::memory_usage()
{
double bytes = (double)comm->nthreads*maxeatom * sizeof(double);