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

Classes

struct  AtomAndPmeOrderSizedData
 A structure for all the spline data which depends in size both on the PME order and atom count. More...
 
struct  AtomSizedData
 A structure for all the input atom data which depends in size on atom count - including a range of spline data for different PME orders. More...
 
class  PmeGatherTest
 Test fixture. More...
 

Typedefs

typedef std::map< size_t,
AtomSizedData
InputDataByAtomCount
 A range of the test input data sets, uniquely identified by the atom count.
 
typedef std::tuple< Matrix3x3,
int, IVec,
SparseRealGridValuesInput,
PmeForceOutputHandling, size_t > 
GatherInputParameters
 Convenience typedef of the test input parameters - unit cell box, PME interpolation order, grid dimensions, grid values, overwriting/reducing the input forces, atom count. More...
 

Variables

std::vector< Matrix3x3 > const c_sampleBoxes
 A couple of valid inputs for boxes. More...
 
std::vector< IVec > const c_sampleGridSizes { IVec{ 16, 12, 14 }, IVec{ 13, 15, 11 } }
 A couple of valid inputs for grid sizes.
 
std::vector< real > const c_sampleChargesFull
 Random charges. More...
 
std::vector< IVec > const c_sampleGridLineIndicesFull
 All the input atom gridline indices. More...
 
std::vector< real > const c_sampleSplineValuesFull
 A lot of bogus input spline values - should have at list (max PME order = 5) * (DIM = 3) * (total unique atom number in all test cases = 16) values. More...
 
std::vector< real > const c_sampleSplineDerivativesFull
 A lot of bogus input spline derivatives - should have at list (max PME order = 5) * (DIM = 3) * (total unique atom number in all test cases = 16) values. More...
 
std::vector
< SparseRealGridValuesInput >
const 
c_sampleGrids
 2 c_sample grids - only non-zero values have to be listed More...
 
std::vector< RVec > const c_sampleForcesFull
 Input forces for reduction. More...
 
std::vector< int > const pmeOrders { 3, 4, 5 }
 PME orders to test.
 
std::vector< size_t > const atomCounts { 1, 2, 13 }
 Atom counts to test.
 

Typedef Documentation

typedef std::tuple<Matrix3x3, int, IVec, SparseRealGridValuesInput, PmeForceOutputHandling, size_t> gmx::test::anonymous_namespace{pmegathertest.cpp}::GatherInputParameters

Convenience typedef of the test input parameters - unit cell box, PME interpolation order, grid dimensions, grid values, overwriting/reducing the input forces, atom count.

The rest of the atom-related input data - gridline indices, spline theta values, spline dtheta values, atom charges - is looked up in the inputAtomDataSets_ test fixture variable.

Variable Documentation

std::vector<Matrix3x3> const gmx::test::anonymous_namespace{pmegathertest.cpp}::c_sampleBoxes
Initial value:
{
Matrix3x3{ { 8.0F, 0.0F, 0.0F, 0.0F, 3.4F, 0.0F, 0.0F, 0.0F, 2.0F } },
Matrix3x3{ { 7.0F, 0.0F, 0.0F, 0.0F, 4.1F, 0.0F, 3.5F, 2.0F, 12.2F } },
}
std::array< real, 3 *3 > Matrix3x3
TODO: make proper C++ matrix for the whole Gromacs, get rid of this.
Definition: pmetestcommon.h:99

A couple of valid inputs for boxes.

std::vector<real> const gmx::test::anonymous_namespace{pmegathertest.cpp}::c_sampleChargesFull
Initial value:
{ 4.95F, 3.11F, 3.97F, 1.08F, 2.09F, 1.1F,
4.13F, 3.31F, 2.8F, 5.83F, 5.09F, 6.1F,
2.86F, 0.24F, 5.76F, 5.19F, 0.72F }

Random charges.

std::vector<RVec> const gmx::test::anonymous_namespace{pmegathertest.cpp}::c_sampleForcesFull
Initial value:
{
RVec{ 0.02F, 0.87F, 0.95F }, RVec{ 0.66F, 0.67F, 0.38F }, RVec{ 0.45F, 0.04F, 0.94F },
RVec{ 0.54F, 0.76F, 0.58F }, RVec{ 0.83F, 0.31F, 0.73F }, RVec{ 0.71F, 0.06F, 0.35F },
RVec{ 0.32F, 0.35F, 0.61F }, RVec{ 0.27F, 0.98F, 0.83F }, RVec{ 0.11F, 0.3F, 0.42F },
RVec{ 0.95F, 0.69F, 0.58F }, RVec{ 0.29F, 0.1F, 0.68F }, RVec{ 0.94F, 0.62F, 0.51F },
RVec{ 0.47F, 0.04F, 0.47F }, RVec{ 0.34F, 0.71F, 0.52F }
}
BasicVector< real > RVec
Shorthand for C++ rvec-equivalent type.
Definition: vectypes.h:325

Input forces for reduction.

std::vector<IVec> const gmx::test::anonymous_namespace{pmegathertest.cpp}::c_sampleGridLineIndicesFull
Initial value:
{
IVec{ 4, 2, 6 }, IVec{ 1, 4, 10 }, IVec{ 0, 6, 6 }, IVec{ 0, 1, 4 }, IVec{ 6, 3, 0 },
IVec{ 7, 2, 2 }, IVec{ 8, 3, 1 }, IVec{ 4, 0, 3 }, IVec{ 0, 0, 0 }, IVec{ 8, 5, 8 },
IVec{ 4, 4, 2 }, IVec{ 7, 1, 7 }, IVec{ 8, 5, 5 }, IVec{ 2, 6, 5 }, IVec{ 1, 6, 2 },
IVec{ 7, 1, 8 }, IVec{ 3, 5, 1 },
}
BasicVector< int > IVec
Shorthand for C++ ivec-equivalent type.
Definition: vectypes.h:329

All the input atom gridline indices.

std::vector<SparseRealGridValuesInput> const gmx::test::anonymous_namespace{pmegathertest.cpp}::c_sampleGrids
Initial value:
{ IVec{ 0, 0, 0 }, 3.5F },
{ IVec{ 7, 0, 0 }, -2.5F },
{ IVec{ 3, 5, 7 }, -0.006F },
{ IVec{ 1, 6, 7 }, -2.76F },
{ IVec{ 3, 1, 2 }, 0.6F },
{ IVec{ 6, 2, 4 }, 7.1F },
{ IVec{ 4, 5, 6 }, 4.1F },
{ IVec{ 4, 4, 6 }, -3.7F },
},
{ IVec{ 0, 4, 0 }, 6.F },
{ IVec{ 4, 2, 7 }, 13.76F },
{ IVec{ 0, 6, 7 }, 3.6F },
{ IVec{ 3, 2, 8 }, 0.61F },
{ IVec{ 5, 4, 3 }, 2.1F },
{ IVec{ 2, 5, 10 }, 3.6F },
{ IVec{ 5, 3, 6 }, 2.1F },
{ IVec{ 6, 6, 6 }, 6.1F },
} }
SparseGridValuesInput< real > SparseRealGridValuesInput
Non-zero real grid values.
Definition: pmetestcommon.h:88
BasicVector< int > IVec
Shorthand for C++ ivec-equivalent type.
Definition: vectypes.h:329

2 c_sample grids - only non-zero values have to be listed

std::vector<real> const gmx::test::anonymous_namespace{pmegathertest.cpp}::c_sampleSplineDerivativesFull
Initial value:
{
0.82F, 0.88F, 0.83F, 0.11F, 0.93F, 0.32F, 0.71F, 0.37F, 0.69F, 0.88F, 0.11F, 0.38F, 0.25F,
0.5F, 0.36F, 0.81F, 0.78F, 0.31F, 0.66F, 0.32F, 0.27F, 0.35F, 0.53F, 0.83F, 0.08F, 0.08F,
0.94F, 0.71F, 0.65F, 0.24F, 0.13F, 0.01F, 0.33F, 0.65F, 0.24F, 0.53F, 0.45F, 0.84F, 0.33F,
0.97F, 0.31F, 0.7F, 0.03F, 0.31F, 0.41F, 0.76F, 0.12F, 0.3F, 0.57F, 0.65F, 0.87F, 0.99F,
0.42F, 0.97F, 0.32F, 0.39F, 0.73F, 0.23F, 0.03F, 0.67F, 0.97F, 0.57F, 0.42F, 0.38F, 0.54F,
0.17F, 0.53F, 0.54F, 0.18F, 0.8F, 0.76F, 0.13F, 0.29F, 0.83F, 0.77F, 0.56F, 0.4F, 0.87F,
0.36F, 0.18F, 0.59F, 0.04F, 0.05F, 0.61F, 0.26F, 0.91F, 0.62F, 0.16F, 0.89F, 0.23F, 0.26F,
0.59F, 0.33F, 0.2F, 0.49F, 0.41F, 0.25F, 0.4F, 0.16F, 0.83F, 0.44F, 0.82F, 0.21F, 0.95F,
0.14F, 0.8F, 0.37F, 0.31F, 0.41F, 0.53F, 0.15F, 0.85F, 0.78F, 0.17F, 0.92F, 0.03F, 0.13F,
0.2F, 0.03F, 0.33F, 0.87F, 0.38F, 0, 0.08F, 0.79F, 0.36F, 0.53F, 0.05F, 0.07F, 0.94F,
0.23F, 0.85F, 0.13F, 0.27F, 0.23F, 0.22F, 0.26F, 0.38F, 0.15F, 0.48F, 0.18F, 0.33F, 0.23F,
0.62F, 0.1F, 0.36F, 0.99F, 0.07F, 0.02F, 0.04F, 0.09F, 0.29F, 0.52F, 0.29F, 0.83F, 0.97F,
0.61F, 0.81F, 0.49F, 0.56F, 0.08F, 0.09F, 0.03F, 0.65F, 0.46F, 0.1F, 0.06F, 0.06F, 0.39F,
0.29F, 0.04F, 0.03F, 0.1F, 0.83F, 0.94F, 0.59F, 0.97F, 0.82F, 0.2F, 0.66F, 0.23F, 0.11F,
0.03F, 0.16F, 0.27F, 0.53F, 0.94F, 0.46F, 0.43F, 0.29F, 0.97F, 0.64F, 0.46F, 0.37F, 0.43F,
0.48F, 0.37F, 0.93F, 0.5F, 0.2F, 0.92F, 0.09F, 0.74F, 0.55F, 0.44F, 0.05F, 0.13F, 0.17F,
0.79F, 0.44F, 0.11F, 0.6F, 0.64F, 0.05F, 0.96F, 0.3F, 0.45F, 0.47F, 0.42F, 0.74F, 0.91F,
0.06F, 0.89F, 0.24F, 0.26F, 0.68F, 0.4F, 0.88F, 0.5F, 0.65F, 0.48F, 0.15F, 0.0F, 0.41F,
0.67F, 0.4F, 0.31F, 0.73F, 0.77F, 0.36F, 0.26F, 0.74F, 0.46F, 0.56F, 0.78F, 0.92F, 0.32F,
0.9F, 0.06F, 0.55F, 0.6F, 0.13F, 0.38F, 0.93F, 0.5F, 0.92F, 0.96F, 0.82F, 0.0F, 0.04F,
0.9F, 0.55F, 0.97F, 1.0F, 0.23F, 0.46F, 0.52F, 0.49F, 0.0F, 0.32F, 0.16F, 0.4F, 0.62F,
0.36F, 0.03F, 0.63F, 0.16F, 0.58F, 0.97F, 0.03F, 0.44F, 0.07F, 0.22F, 0.75F, 0.32F, 0.61F,
0.94F, 0.33F, 0.7F, 0.57F, 0.5F, 0.84F, 0.7F, 0.47F, 0.18F, 0.09F, 0.25F, 0.77F, 0.94F,
0.85F, 0.09F, 0.83F, 0.02F, 0.91F,
}

A lot of bogus input spline derivatives - should have at list (max PME order = 5) * (DIM = 3) * (total unique atom number in all test cases = 16) values.

std::vector<real> const gmx::test::anonymous_namespace{pmegathertest.cpp}::c_sampleSplineValuesFull
Initial value:
{
0.12F, 0.81F, 0.29F, 0.22F, 0.13F, 0.19F, 0.12F, 0.8F, 0.44F, 0.38F, 0.32F, 0.36F, 0.27F,
0.11F, 0.17F, 0.94F, 0.07F, 0.9F, 0.98F, 0.96F, 0.07F, 0.94F, 0.77F, 0.24F, 0.84F, 0.16F,
0.77F, 0.57F, 0.52F, 0.27F, 0.39F, 0.45F, 0.6F, 0.59F, 0.44F, 0.91F, 0.97F, 0.43F, 0.24F,
0.52F, 0.73F, 0.55F, 0.99F, 0.39F, 0.97F, 0.35F, 0.1F, 0.68F, 0.19F, 0.1F, 0.77F, 0.2F,
0.43F, 0.69F, 0.76F, 0.32F, 0.31F, 0.94F, 0.53F, 0.6F, 0.93F, 0.57F, 0.94F, 0.88F, 0.75F,
0.77F, 0.91F, 0.72F, 0.07F, 0.78F, 0.09F, 0.02F, 0.48F, 0.97F, 0.89F, 0.39F, 0.48F, 0.19F,
0.02F, 0.92F, 0.8F, 0.41F, 0.53F, 0.32F, 0.38F, 0.58F, 0.36F, 0.46F, 0.92F, 0.91F, 0.01F,
0.86F, 0.54F, 0.86F, 0.94F, 0.37F, 0.35F, 0.81F, 0.89F, 0.48F, 0.34F, 0.18F, 0.11F, 0.02F,
0.87F, 0.95F, 0.66F, 0.67F, 0.38F, 0.45F, 0.04F, 0.94F, 0.54F, 0.76F, 0.58F, 0.83F, 0.31F,
0.73F, 0.71F, 0.06F, 0.35F, 0.32F, 0.35F, 0.61F, 0.27F, 0.98F, 0.83F, 0.11F, 0.3F, 0.42F,
0.95F, 0.69F, 0.58F, 0.29F, 0.1F, 0.68F, 0.94F, 0.62F, 0.51F, 0.47F, 0.04F, 0.47F, 0.34F,
0.71F, 0.52F, 0.19F, 0.69F, 0.5F, 0.59F, 0.05F, 0.74F, 0.11F, 0.4F, 0.81F, 0.24F, 0.53F,
0.71F, 0.07F, 0.17F, 0.41F, 0.23F, 0.78F, 0.27F, 0.1F, 0.71F, 0.36F, 0.67F, 0.6F, 0.94F,
0.69F, 0.19F, 0.58F, 0.68F, 0.5F, 0.62F, 0.38F, 0.29F, 0.44F, 0.04F, 0.89F, 0.0F, 0.76F,
0.22F, 0.16F, 0.08F, 0.62F, 0.51F, 0.62F, 0.83F, 0.72F, 0.96F, 0.99F, 0.4F, 0.79F, 0.83F,
0.21F, 0.43F, 0.32F, 0.44F, 0.72F, 0.21F, 0.4F, 0.93F, 0.07F, 0.11F, 0.41F, 0.24F, 0.04F,
0.36F, 0.15F, 0.92F, 0.08F, 0.99F, 0.35F, 0.42F, 0.7F, 0.17F, 0.39F, 0.69F, 0.0F, 0.86F,
0.89F, 0.59F, 0.81F, 0.77F, 0.15F, 0.89F, 0.17F, 0.76F, 0.67F, 0.58F, 0.78F, 0.26F, 0.19F,
0.69F, 0.18F, 0.46F, 0.6F, 0.69F, 0.23F, 0.34F, 0.3F, 0.64F, 0.34F, 0.6F, 0.99F, 0.69F,
0.57F, 0.75F, 0.07F, 0.36F, 0.75F, 0.81F, 0.8F, 0.42F, 0.09F, 0.94F, 0.66F, 0.35F, 0.67F,
0.34F, 0.66F, 0.02F, 0.47F, 0.78F, 0.21F, 0.02F, 0.18F, 0.42F, 0.2F, 0.46F, 0.34F, 0.4F,
0.46F, 0.96F, 0.86F, 0.25F, 0.25F, 0.22F, 0.37F, 0.59F, 0.19F, 0.45F, 0.61F, 0.04F, 0.71F,
0.77F, 0.51F, 0.77F, 0.15F, 0.78F, 0.36F, 0.62F, 0.24F, 0.86F, 0.2F, 0.77F, 0.08F, 0.09F,
0.3F, 0.0F, 0.6F, 0.99F, 0.69F,
}

A lot of bogus input spline values - should have at list (max PME order = 5) * (DIM = 3) * (total unique atom number in all test cases = 16) values.