Gromacs  2025-dev-20241002-88a4191
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
gmx::test::anonymous_namespace{pmesplinespreadtest.cpp} Namespace Reference

Classes

class  SplineAndSpreadTest
 Test fixture for testing both atom spline parameter computation and charge spreading. These 2 stages of PME are tightly coupled in the code. More...
 
class  SplineAndSpreadTestBody
 Test case whose body checks that spline and spread work. More...
 

Typedefs

typedef std::tuple
< std::string, int, IVec,
std::string, int,
SplineAndSpreadOptions
SplineAndSpreadInputParameters
 Convenience typedef of input parameters. More...
 

Enumerations

enum  SplineAndSpreadOptions { SplineOnly, SpreadOnly, SplineAndSpreadUnified, Count }
 PME spline and spread code path being tested.
 

Functions

std::string nameOfTest (const testing::TestParamInfo< SplineAndSpreadInputParameters > &info)
 Help GoogleTest name our test cases. More...
 
const char * enumValueToString (SplineAndSpreadOptions enumValue)
 
std::string fullNameOfTest (const testing::TestParamInfo< SplineAndSpreadInputParameters > &info, const std::string &testName)
 Help GoogleTest name our test cases. More...
 

Variables

std::vector< IVec > const c_inputGridSizes { IVec{ 16, 12, 14 }, IVec{ 19, 17, 11 } }
 A couple of valid inputs for grid sizes.
 
const std::unordered_map
< std::string, TestSystem > 
c_testSystems
 
const auto c_inputBoxNames = ::testing::Values("rect", "tric")
 Moved out from instantiations for readability.
 
const auto c_inputGridNames = ::testing::Values("first", "second")
 Moved out from instantiations for readability.
 
const auto c_inputTestSystemNames = ::testing::Values("1 atom", "2 atoms", "13 atoms")
 Moved out from instantiations for readability.
 

Typedef Documentation

typedef std::tuple<std::string, int, IVec, std::string, int, SplineAndSpreadOptions> gmx::test::anonymous_namespace{pmesplinespreadtest.cpp}::SplineAndSpreadInputParameters

Convenience typedef of input parameters.

Parameters:

  • unit cell box
  • PME interpolation order
  • grid dimensions
  • particle system (coordinates and charges)
  • PME hardware context index
  • spline/spread/fused option

TODO: consider inclusion of local grid offsets/sizes or PME nodes counts to test the PME DD

Function Documentation

std::string gmx::test::anonymous_namespace{pmesplinespreadtest.cpp}::fullNameOfTest ( const testing::TestParamInfo< SplineAndSpreadInputParameters > &  info,
const std::string &  testName 
)

Help GoogleTest name our test cases.

This is intended to work like a custom test-naming function that would be passed as the fourth argument to INSTANTIATE_TEST_SUITE_P, except that we are not using that macro for these tests. All components of SplineAndSpreadInputParameters affect this name.

std::string gmx::test::anonymous_namespace{pmesplinespreadtest.cpp}::nameOfTest ( const testing::TestParamInfo< SplineAndSpreadInputParameters > &  info)

Help GoogleTest name our test cases.

This is intended to work like a custom test-naming function that would be passed as the fourth argument to INSTANTIATE_TEST_SUITE_P, except that we are not using that macro for these tests. Only the components of SplineAndSpreadInputParameters that affect the reference data values affect this name. Hardware context and whether the test targets spline calculation, spreading, or both does not affect this name.