Simpatico  v1.10
EwaldRSpaceAccumulator.cpp
1 
2 #include "EwaldRSpaceAccumulator.h"
3 #include <mcMd/potentials/pair/PairPotential.h>
4 
5 namespace McMd
6 {
7 
8  using namespace Util;
9 
10  /*
11  * Return the r-space energy.
12  */
14  {
15  if (!rSpaceEnergy_.isSet()) {
16  UTIL_CHECK(pairPotentialPtr_);
17  pairPotentialPtr_->computeEnergy();
18  }
19  return rSpaceEnergy_.value();
20  }
21 
22  /*
23  * Return the r-space stress.
24  */
26  {
27  if (!rSpaceStress_.isSet()) {
28  UTIL_CHECK(pairPotentialPtr_);
29  pairPotentialPtr_->computeStress();
30  }
31  return rSpaceStress_.value();
32  }
33 
34 }
Tensor rSpaceStress()
Return the r-space stress (compute if necessary).
double rSpaceEnergy()
Return the r-space energy (compute if necessary).
A Tensor represents a Cartesian tensor.
Definition: Tensor.h:32
Utility classes for scientific computation.
Definition: accumulators.mod:1
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Definition: global.h:68