Skip to content

Commit

Permalink
Merge pull request #1513 from akohlmey/user-tally-vs-hybrid
Browse files Browse the repository at this point in the history
Make USER-TALLY compute styles compatible with hybrid pair styles
  • Loading branch information
akohlmey committed Jun 17, 2019
2 parents 5d73b07 + e73b34a commit 2dea4eb
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/USER-TALLY/README
Expand Up @@ -21,7 +21,7 @@ The person who created this package is Axel Kohlmeyer (akohlmey@gmail.com)
at Temple University with a little help and inspiration from
Loris Ercole (SISSA/ISAS Trieste), who contributed compute heat/flux/tally.

Additional contributed compute style for this package are welcome.
Additional contributed compute styles for this package are welcome.
Please contact Axel, if you have questions about the implementation.


5 changes: 5 additions & 0 deletions src/USER-TALLY/compute_force_tally.cpp
Expand Up @@ -85,6 +85,11 @@ void ComputeForceTally::init()

void ComputeForceTally::pair_setup_callback(int, int)
{
// run setup only once per time step.
// we may be called from multiple pair styles

if (did_setup == update->ntimestep) return;

const int ntotal = atom->nlocal + atom->nghost;

// grow per-atom storage, if needed
Expand Down
5 changes: 5 additions & 0 deletions src/USER-TALLY/compute_heat_flux_tally.cpp
Expand Up @@ -87,6 +87,11 @@ void ComputeHeatFluxTally::init()
/* ---------------------------------------------------------------------- */
void ComputeHeatFluxTally::pair_setup_callback(int, int)
{
// run setup only once per time step.
// we may be called from multiple pair styles

if (did_setup == update->ntimestep) return;

const int ntotal = atom->nlocal + atom->nghost;

// grow per-atom storage, if needed
Expand Down
5 changes: 5 additions & 0 deletions src/USER-TALLY/compute_pe_mol_tally.cpp
Expand Up @@ -82,6 +82,11 @@ void ComputePEMolTally::init()

void ComputePEMolTally::pair_setup_callback(int, int)
{
// run setup only once per time step.
// we may be called from multiple pair styles

if (did_setup == update->ntimestep) return;

etotal[0] = etotal[1] = etotal[2] = etotal[3] = 0.0;
did_setup = update->ntimestep;
}
Expand Down
5 changes: 5 additions & 0 deletions src/USER-TALLY/compute_pe_tally.cpp
Expand Up @@ -84,6 +84,11 @@ void ComputePETally::init()

void ComputePETally::pair_setup_callback(int, int)
{
// run setup only once per time step.
// we may be called from multiple pair styles

if (did_setup == update->ntimestep) return;

const int ntotal = atom->nlocal + atom->nghost;

// grow per-atom storage, if needed
Expand Down
5 changes: 5 additions & 0 deletions src/USER-TALLY/compute_stress_tally.cpp
Expand Up @@ -87,6 +87,11 @@ void ComputeStressTally::init()

void ComputeStressTally::pair_setup_callback(int, int)
{
// run setup only once per time step.
// we may be called from multiple pair styles

if (did_setup == update->ntimestep) return;

const int ntotal = atom->nlocal + atom->nghost;

// grow per-atom storage, if needed
Expand Down

0 comments on commit 2dea4eb

Please sign in to comment.