Gromacs
2026.0-dev-20250214-7b4ebd1
|
Classes | |
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... | |
Enumerations | |
enum | EnergyHandling : int { NoEnergies, Energies, ThreeEnergyGroups, Count } |
How the kernel should compute energies. More... | |
Functions | |
LJCombinationRule | chooseLJPmeCombinationRule (const KernelOptions &options) |
Returns the enum value for initializing the LJ PME-grid combination rule for nbxnm_atomdata_t. | |
std::unique_ptr < 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... | |
Variables | |
const EnumerationArray < EnergyHandling, int > | sc_numEnergyGroups = { 0, 1, 3 } |
Lookup table for the number of energy groups in use. | |
const EnumerationArray < EnergyHandling, const char * > | sc_energyGroupNames |
Names for the kinds of energy handling. More... | |
const EnumerationArray < CoulombKernelType, const char * > | coulombKernelTypeName |
const std::array< const char *, vdwktNR > | vdwKernelTypeName |
|
strong |
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.
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().
const EnumerationArray<CoulombKernelType, const char*> gmx::test::anonymous_namespace{kernel_test.cpp}::coulombKernelTypeName |
const EnumerationArray<EnergyHandling, const char*> gmx::test::anonymous_namespace{kernel_test.cpp}::sc_energyGroupNames |
Names for the kinds of energy handling.
const std::array<const char*, vdwktNR> gmx::test::anonymous_namespace{kernel_test.cpp}::vdwKernelTypeName |