Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
gmx::test::TrajectoryComparison Class Reference

#include <programs/mdrun/tests/trajectorycomparison.h>

+ Collaboration diagram for gmx::test::TrajectoryComparison:


Function object to compare the fields of the two frames for equality given the matchSettings_ and tolerances_.

The two frames are required to have valid and matching values for time and step. According to matchSettings_, box, position coordinates, velocities and/or forces will be compared between frames, using the tolerances_. Comparisons will only occur when both frames have the requisite data, and will be expected to be equal within the matching component of tolerances_. If a comparison fails, a GoogleTest expectation failure will be given. If a comparison is required by matchSettings_ but cannot be done because either (or both) frames lack the requisite data, descriptive expectation failures will be given.

Public Member Functions

 TrajectoryComparison (const TrajectoryFrameMatchSettings &matchSettings, const TrajectoryTolerances &tolerances)
void operator() (const TrajectoryFrame &reference, const TrajectoryFrame &test) const
 Compare reference with test given the matchSettings_ within tolerances_.

Public Attributes

TrajectoryFrameMatchSettings matchSettings_
 Specifies expected behavior in comparisons.
TrajectoryTolerances tolerances_
 Trajectory fields to match with given tolerances.

Static Public Attributes

static const TrajectoryTolerances s_defaultTrajectoryTolerances
 Defaults for trajectory comparisons. More...

Member Data Documentation

const TrajectoryTolerances gmx::test::TrajectoryComparison::s_defaultTrajectoryTolerances
Initial value:
relativeToleranceAsFloatingPoint(1.0, 1.0e-3),
relativeToleranceAsFloatingPoint(100.0, GMX_DOUBLE ? 1.0e-7 : 5.0e-5)

Defaults for trajectory comparisons.

The documentation for this class was generated from the following files: