Gromacs  2023-rc1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions | Variables
gmx::test::anonymous_namespace{pmesolvetest.cpp} Namespace Reference

Classes

class  SolveTest
 Test fixture. More...
 
class  SolveTestBody
 Test case whose body checks that spline and spread work. More...
 

Typedefs

typedef std::tuple
< std::string, IVec,
std::string, double, double,
double, PmeSolveAlgorithm,
GridOrdering, bool, int > 
SolveInputParameters
 Convenience typedef of the test input parameters. More...
 

Functions

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

Variables

std::vector< IVec > const c_inputGridSizes { IVec{ 16, 12, 28 }, IVec{ 9, 7, 23 } }
 A couple of valid inputs for grid sizes.
 
const std::map< std::string,
SparseComplexGridValuesInput
c_inputGridValues
 Two input complex grids - only non-zero values have to be listed. More...
 
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_inputEpsilon_r = ::testing::Values(1.2)
 Moved out from instantiations for readability.
 
const auto c_inputEwaldCoeff_q = ::testing::Values(2.0)
 Moved out from instantiations for readability.
 
const auto c_inputEwaldCoeff_lj = ::testing::Values(0.7)
 Moved out from instantiations for readability.
 
const auto c_inputMethods = ::testing::Values(PmeSolveAlgorithm::Coulomb, PmeSolveAlgorithm::LennardJones)
 Moved out from instantiations for readability.
 
const auto c_gridOrderings = ::testing::Values(GridOrdering::XYZ, GridOrdering::YZX)
 Moved out from instantiations for readability.
 

Typedef Documentation

typedef std::tuple<std::string, IVec, std::string, double, double, double, PmeSolveAlgorithm, GridOrdering, bool, int> gmx::test::anonymous_namespace{pmesolvetest.cpp}::SolveInputParameters

Convenience typedef of the test input parameters.

Parameters:

  • unit cell box
  • complex grid dimensions
  • complex grid values
  • electrostatic constant epsilon_r
  • Ewald splitting parameter ewaldcoeff_q
  • Ewald splitting parameter ewaldcoeff_lj
  • solver type
  • grid ordering
  • whether to compute energy and virial
  • PME hardware context index

Output: transformed local grid (Fourier space); optionally reciprocal energy and virial matrix. TODO: Implement and test Lorentz-Berthelot

Function Documentation

std::string gmx::test::anonymous_namespace{pmesolvetest.cpp}::fullNameOfTest ( const testing::TestParamInfo< SolveInputParameters > &  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 SolveInputParameters affect this name.

std::string gmx::test::anonymous_namespace{pmesolvetest.cpp}::nameOfTest ( const testing::TestParamInfo< SolveInputParameters > &  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 SolveInputParameters that affect the reference data values affect this name. Hardware context, grid ordering, and whether this test targets energy&virial computation do not affect this name.

Variable Documentation

const std::map<std::string, SparseComplexGridValuesInput> gmx::test::anonymous_namespace{pmesolvetest.cpp}::c_inputGridValues
Initial value:
= {
{ "first",
{ IVec{ 0, 0, 0 }, t_complex{ 3.5F, 6.7F } },
{ IVec{ 7, 0, 0 }, t_complex{ -2.5F, -0.7F } },
{ IVec{ 3, 5, 7 }, t_complex{ -0.006F, 1e-8F } },
{ IVec{ 3, 1, 2 }, t_complex{ 0.6F, 7.9F } },
{ IVec{ 6, 2, 4 }, t_complex{ 30.1F, 2.45F } },
} },
{ "second",
{ IVec{ 0, 4, 0 }, t_complex{ 0.0F, 0.3F } },
{ IVec{ 4, 2, 7 }, t_complex{ 13.76F, -40.0F } },
{ IVec{ 0, 6, 7 }, t_complex{ 3.6F, 0.0F } },
{ IVec{ 2, 5, 10 }, t_complex{ 3.6F, 10.65F } },
} },
}
BasicVector< int > IVec
Shorthand for C++ ivec-equivalent type.
Definition: vectypes.h:341
SparseGridValuesInput< t_complex > SparseComplexGridValuesInput
Non-zero complex grid values.
Definition: pmetestcommon.h:105

Two input complex grids - only non-zero values have to be listed.