Gromacs
2018.7
|
#include "gmxpre.h"
#include "pmetestcommon.h"
#include <cstring>
#include "gromacs/ewald/pme-gather.h"
#include "gromacs/ewald/pme-gpu-internal.h"
#include "gromacs/ewald/pme-grid.h"
#include "gromacs/ewald/pme-internal.h"
#include "gromacs/ewald/pme-solve.h"
#include "gromacs/ewald/pme-spread.h"
#include "gromacs/fft/parallel_3dfft.h"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/math/invertmatrix.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/logger.h"
#include "gromacs/utility/stringutil.h"
#include "testutils/testasserts.h"
Implements common routines for PME tests.
Functions | |
bool | gmx::test::pmeSupportsInputForMode (const t_inputrec *inputRec, CodePath mode) |
Tells if this generally valid PME input is supported for this mode. | |
gmx_uint64_t | gmx::test::getSplineModuliDoublePrecisionUlps (int splineOrder) |
For double precision checks, the recursive interpolation and use of trig functions in make_dft_mod require a lot more flops, and thus opportunity for deviation between implementations. | |
static PmeSafePointer | gmx::test::pmeInitInternal (const t_inputrec *inputRec, CodePath mode, gmx_device_info_t *gpuInfo, size_t atomCount, const Matrix3x3 &box, real ewaldCoeff_q=1.0f, real ewaldCoeff_lj=1.0f) |
PME initialization - internal. | |
PmeSafePointer | gmx::test::pmeInitEmpty (const t_inputrec *inputRec, CodePath mode, gmx_device_info_t *gpuInfo, const Matrix3x3 &box, real ewaldCoeff_q, real ewaldCoeff_lj) |
Simple PME initialization based on input, no atom data. More... | |
PmeSafePointer | gmx::test::pmeInitAtoms (const t_inputrec *inputRec, CodePath mode, gmx_device_info_t *gpuInfo, const CoordinatesVector &coordinates, const ChargesVector &charges, const Matrix3x3 &box) |
PME initialization with atom data. More... | |
static real * | gmx::test::pmeGetRealGridInternal (const gmx_pme_t *pme) |
Getting local PME real grid pointer for test I/O. | |
static void | gmx::test::pmeGetRealGridSizesInternal (const gmx_pme_t *pme, CodePath mode, IVec &gridSize, IVec &paddedGridSize) |
Getting local PME real grid dimensions. | |
static t_complex * | gmx::test::pmeGetComplexGridInternal (const gmx_pme_t *pme) |
Getting local PME complex grid pointer for test I/O. | |
static void | gmx::test::pmeGetComplexGridSizesInternal (const gmx_pme_t *pme, IVec &gridSize, IVec &paddedGridSize) |
Getting local PME complex grid dimensions. | |
template<typename ValueType > | |
static void | gmx::test::pmeGetGridAndSizesInternal (const gmx_pme_t *, CodePath, ValueType *&, IVec &, IVec &) |
Getting the PME grid memory buffer and its sizes - template definition. | |
template<> | |
void | gmx::test::pmeGetGridAndSizesInternal< real > (const gmx_pme_t *pme, CodePath mode, real *&grid, IVec &gridSize, IVec &paddedGridSize) |
Getting the PME real grid memory buffer and its sizes. | |
template<> | |
void | gmx::test::pmeGetGridAndSizesInternal< t_complex > (const gmx_pme_t *pme, CodePath, t_complex *&grid, IVec &gridSize, IVec &paddedGridSize) |
Getting the PME complex grid memory buffer and its sizes. | |
void | gmx::test::pmePerformSplineAndSpread (gmx_pme_t *pme, CodePath mode, bool computeSplines, bool spreadCharges) |
PME spline calculation and charge spreading. More... | |
static real * | gmx::test::pmeGetSplineDataInternal (const gmx_pme_t *pme, PmeSplineDataType type, int dimIndex) |
Getting the internal spline data buffer pointer. | |
void | gmx::test::pmePerformSolve (const gmx_pme_t *pme, CodePath mode, PmeSolveAlgorithm method, real cellVolume, GridOrdering gridOrdering, bool computeEnergyAndVirial) |
PME solving. | |
void | gmx::test::pmePerformGather (gmx_pme_t *pme, CodePath mode, PmeForceOutputHandling inputTreatment, ForcesVector &forces) |
PME force gathering. | |
void | gmx::test::pmeFinalizeTest (const gmx_pme_t *pme, CodePath mode) |
PME test finalization before fetching the outputs. | |
void | gmx::test::pmeSetSplineData (const gmx_pme_t *pme, CodePath mode, const SplineParamsDimVector &splineValues, PmeSplineDataType type, int dimIndex) |
Setting atom spline values/derivatives to be used in spread/gather. More... | |
void | gmx::test::pmeSetGridLineIndices (const gmx_pme_t *pme, CodePath mode, const GridLineIndicesVector &gridLineIndices) |
Setting gridline indices to be used in spread/gather. More... | |
size_t | gmx::test::pmeGetGridPlainIndexInternal (const IVec &index, const IVec &paddedGridSize, GridOrdering gridOrdering) |
Getting plain index into the complex 3d grid. | |
template<typename ValueType > | |
static void | gmx::test::pmeSetGridInternal (const gmx_pme_t *pme, CodePath mode, GridOrdering gridOrdering, const SparseGridValuesInput< ValueType > &gridValues) |
Setting real or complex grid. | |
void | gmx::test::pmeSetRealGrid (const gmx_pme_t *pme, CodePath mode, const SparseRealGridValuesInput &gridValues) |
Setting real grid to be used in gather. | |
void | gmx::test::pmeSetComplexGrid (const gmx_pme_t *pme, CodePath mode, GridOrdering gridOrdering, const SparseComplexGridValuesInput &gridValues) |
Setting complex grid to be used in solve. | |
SplineParamsDimVector | gmx::test::pmeGetSplineData (const gmx_pme_t *pme, CodePath mode, PmeSplineDataType type, int dimIndex) |
Getting the single dimension's spline values or derivatives. | |
GridLineIndicesVector | gmx::test::pmeGetGridlineIndices (const gmx_pme_t *pme, CodePath mode) |
Getting the gridline indices. | |
template<typename ValueType > | |
static SparseGridValuesOutput < ValueType > | gmx::test::pmeGetGridInternal (const gmx_pme_t *pme, CodePath mode, GridOrdering gridOrdering) |
Getting real or complex grid - only non zero values. | |
SparseRealGridValuesOutput | gmx::test::pmeGetRealGrid (const gmx_pme_t *pme, CodePath mode) |
Getting the real grid (spreading output of pmePerformSplineAndSpread()) | |
SparseComplexGridValuesOutput | gmx::test::pmeGetComplexGrid (const gmx_pme_t *pme, CodePath mode, GridOrdering gridOrdering) |
Getting the complex grid output of pmePerformSolve() | |
PmeSolveOutput | gmx::test::pmeGetReciprocalEnergyAndVirial (const gmx_pme_t *pme, CodePath mode, PmeSolveAlgorithm method) |
Getting the reciprocal energy and virial. | |