adapt all users of FixStore to use FixStoreGlobal or FixStorePeratom

This commit is contained in:
Axel Kohlmeyer
2022-08-04 11:33:14 -04:00
parent 63fc9fcc62
commit 6c32058728
35 changed files with 203 additions and 214 deletions

View File

@ -20,7 +20,7 @@
#include "domain.h"
#include "error.h"
#include "fix.h"
#include "fix_store.h"
#include "fix_store_peratom.h"
#include "group.h"
#include "input.h"
#include "memory.h"
@ -2000,16 +2000,16 @@ int DumpCustom::modify_param(int narg, char **arg)
thresh_value[nthresh] = utils::numeric(FLERR,arg[3],false,lmp);
thresh_last[nthresh] = -1;
} else {
thresh_fix = (FixStore **)
memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStore *),"dump:thresh_fix");
thresh_fix = (FixStorePeratom **)
memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStorePeratom *),"dump:thresh_fix");
thresh_fixID = (char **)
memory->srealloc(thresh_fixID,(nthreshlast+1)*sizeof(char *),"dump:thresh_fixID");
memory->grow(thresh_first,(nthreshlast+1),"dump:thresh_first");
std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast);
thresh_fixID[nthreshlast] = utils::strdup(threshid);
threshid += fmt::format(" {} STORE peratom 1 1", group->names[igroup]);
thresh_fix[nthreshlast] = dynamic_cast<FixStore *>( modify->add_fix(threshid));
threshid += fmt::format(" {} STORE/PERATOM 1 1", group->names[igroup]);
thresh_fix[nthreshlast] = dynamic_cast<FixStorePeratom *>(modify->add_fix(threshid));
thresh_last[nthreshlast] = nthreshlast;
thresh_first[nthreshlast] = 1;