#include <gromacs/mdtypes/forceoutput.h>
Container for force and virial for algorithms that provide their own virial tensor contribution.
- Note
- The
force_
data member is a reference to an external force buffer.
|
const ArrayRef< RVec > | force_ |
| Force accumulation buffer reference.
|
|
const bool | computeVirial_ |
| True when algorithms are required to provide their virial contribution (for the current force evaluation)
|
|
gmx::ForceWithVirial::ForceWithVirial |
( |
const ArrayRef< RVec > & |
force, |
|
|
const bool |
computeVirial |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
[in] | force | A force buffer that will be used for storing forces |
[in] | computeVirial | True when algorithms are required to provide their virial contribution (for the current force evaluation) |
void gmx::ForceWithVirial::addVirialContribution |
( |
const matrix |
virial | ) |
|
|
inline |
Adds a virial contribution.
- Note
- Can be called with
computeVirial=false
.
-
It is recommended to accumulate the virial contributions of a module internally before calling this method, as that will reduce rounding errors.
- Parameters
-
[in] | virial | The virial contribution to add |
void gmx::ForceWithVirial::addVirialContribution |
( |
const RVec |
virial | ) |
|
|
inline |
Adds a virial diagonal contribution.
- Note
- Can be called with
computeVirial=false
.
-
It is recommended to accumulate the virial contributions of a module internally before calling this method, as that will reduce rounding errors.
- Parameters
-
[in] | virial | The virial contribution to add |
The documentation for this class was generated from the following file: