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


struct  KernelOptions
 The options for the kernel. More...
struct  KernelInputParameters
 Convenience typedef of the test input parameters. More...
class  NbnxmKernelTest
 Class that sets up and holds a set of N atoms and a full NxM pairlist. More...


enum  EnergyHandling : int { NoEnergies, Energies, ThreeEnergyGroups, Count }
 How the kernel should compute energies. More...


LJCombinationRule chooseLJPmeCombinationRule (const KernelOptions &options)
 Returns the enum value for initializing the LJ PME-grid combination rule for nbxnm_atomdata_t.
< nonbonded_verlet_t
setupNbnxmForBenchInstance (const KernelOptions &options, const TestSystem &system)
 Sets up and returns a Nbnxm object for the given benchmark options and system.
CoulombInteractionType coulombInteractionType (CoulombKernelType coulombKernelType)
 Returns the coulomb interaction type given the Coulomb kernel type.
interaction_const_t setupInteractionConst (const KernelOptions &options)
 Return an interaction constants struct with members used in the benchmark set appropriately.
std::string nameOfTest (const testing::TestParamInfo< KernelInputParameters > &info)
 Help GoogleTest name our test cases. More...
bool isTabulated (const CoulombKernelType coulombKernelType)
std::string makeRefDataFileName ()
 Construct a refdata filename for this test. More...


const EnumerationArray
< EnergyHandling, int > 
sc_numEnergyGroups = { 0, 1, 3 }
 Lookup table for the number of energy groups in use.
const EnumerationArray
< EnergyHandling, const char * > 
 Names for the kinds of energy handling. More...
const EnumerationArray
< CoulombKernelType, const
char * > 
const std::array< const char
*, vdwktNR > 

Enumeration Type Documentation

enum gmx::test::anonymous_namespace{kernel_test.cpp}::EnergyHandling : int

How the kernel should compute energies.

Note that the construction of the test system is currently not general enough to handle more than one case with multiple energy groups.

Function Documentation

std::string gmx::test::anonymous_namespace{kernel_test.cpp}::makeRefDataFileName ( )

Construct a refdata filename for this test.

We want the same reference data to apply to every kernel type that we test. That means we need to store it in a file whose name relates to the name of the test excluding the part related to the kernel type. By default, the reference data filename is set via a call to gmx::TestFileManager::getTestSpecificFileName() that queries GoogleTest and gets a string that includes the return value for nameOfTest(). This code works similarly, but removes the part that relates to kernel type. This logic must match the implementation of nameOfTest() so that it works as intended.

In particular, the name must include a "Coulomb" substring that follows the name of the kernel type, so that this can be removed.

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

Help GoogleTest name our test cases.

If changes are needed here, consider making matching changes in makeRefDataFileName().

Variable Documentation

const EnumerationArray<CoulombKernelType, const char*> gmx::test::anonymous_namespace{kernel_test.cpp}::coulombKernelTypeName
Initial value:
= { "ReactionField",
"EwaldTwin" }
const EnumerationArray<EnergyHandling, const char*> gmx::test::anonymous_namespace{kernel_test.cpp}::sc_energyGroupNames
Initial value:
= { "NoEnergies",
"ThreeEnergyGroups" }

Names for the kinds of energy handling.

const std::array<const char*, vdwktNR> gmx::test::anonymous_namespace{kernel_test.cpp}::vdwKernelTypeName
Initial value:
= { "CutCombGeom", "CutCombLB",
"CutCombNone", "ForceSwitch",
"PotSwitch", "EwaldCombGeom" }