Restricted style string matching

This commit is contained in:
Aidan Thompson
2022-06-17 17:31:58 -06:00
parent 44436c0eb6
commit 3ff998fdb0
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ ComputeSNAGrid::~ComputeSNAGrid()
void ComputeSNAGrid::init()
{
if ((modify->get_compute_by_style("sna/grid").size() > 1) && (comm->me == 0))
if ((modify->get_compute_by_style("^sna/grid$").size() > 1) && (comm->me == 0))
error->warning(FLERR, "More than one instance of compute sna/grid");
snaptr->init();
}

View File

@ -199,7 +199,7 @@ ComputeSNAGridLocal::~ComputeSNAGridLocal()
void ComputeSNAGridLocal::init()
{
if ((modify->get_compute_by_style("sna/grid/local").size() > 1) && (comm->me == 0))
if ((modify->get_compute_by_style("^sna/grid/local$").size() > 1) && (comm->me == 0))
error->warning(FLERR, "More than one instance of compute sna/grid/local");
snaptr->init();
}