Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
#include "gmxpre.h"
#include "grid.h"
#include <cassert>
#include <cmath>
#include <cstring>
#include <algorithm>
#include "gromacs/math/functions.h"
#include "gromacs/math/utilities.h"
#include "gromacs/mdtypes/awh_params.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/stringutil.h"
+ Include dependency graph for grid.cpp:

Description

Implements functions in grid.h.

Author
Viveca Lindahl
Berk Hess hess@.nosp@m.kth..nosp@m.se

Functions

void gmx::anonymous_namespace{grid.cpp}::centerPeriodicValueAroundZero (double *x, double period)
 Modify x so that it is periodic in [-period/2, +period/2). More...
 
int gmx::anonymous_namespace{grid.cpp}::indexWithinPeriod (int x, int period)
 If period>0, retrun x so that it is periodic in [0, period), else return x. More...
 
double gmx::anonymous_namespace{grid.cpp}::getIntervalLengthPeriodic (double origin, double end, double period)
 Get the length of the interval (origin, end). More...
 
double gmx::anonymous_namespace{grid.cpp}::getDeviationPeriodic (double x, double x0, double period)
 Get the deviation x - x0. More...
 
double gmx::getDeviationFromPointAlongGridAxis (const Grid &grid, int dimIndex, int pointIndex, double value)
 Get the deviation along one dimension from the given value to a point in the grid. More...
 
void gmx::linearArrayIndexToMultiDim (int indexLinear, int ndim, const awh_ivec numPointsDim, awh_ivec indexMulti)
 Convert a linear array index to a multidimensional one. More...
 
void gmx::linearGridindexToMultiDim (const Grid &grid, int indexLinear, awh_ivec indexMulti)
 Convert a linear grid point index to a multidimensional one. More...
 
int gmx::multiDimArrayIndexToLinear (const awh_ivec indexMulti, int numDim, const awh_ivec numPointsDim)
 Convert multidimensional array index to a linear one. More...
 
int gmx::anonymous_namespace{grid.cpp}::multiDimGridIndexToLinear (const std::vector< GridAxis > &axis, const awh_ivec indexMulti)
 Convert a multidimensional grid point index to a linear one. More...
 
int gmx::multiDimGridIndexToLinear (const Grid &grid, const awh_ivec indexMulti)
 Convert a multidimensional grid point index to a linear one. More...
 
bool gmx::anonymous_namespace{grid.cpp}::stepInMultiDimArray (int numDim, const awh_ivec numPoints, awh_ivec indexDim)
 Take a step in a multidimensional array. More...
 
void gmx::anonymous_namespace{grid.cpp}::gridToSubgridIndex (const Grid &grid, const awh_ivec subgridOrigin, const awh_ivec subgridNpoints, int point, awh_ivec subgridIndex)
 Transforms a grid point index to to the multidimensional index of a subgrid. More...
 
bool gmx::anonymous_namespace{grid.cpp}::subgridToGridIndex (const Grid &grid, const awh_ivec subgridOrigin, const awh_ivec subgridIndex, int *gridIndex)
 Transform a multidimensional subgrid index to a grid point index. More...
 
bool gmx::advancePointInSubgrid (const Grid &grid, const awh_ivec subgridOrigin, const awh_ivec subgridNpoints, int *gridPointIndex)
 Find the next grid point in the sub-part of the grid given a starting point. More...
 
static int gmx::pointDistanceAlongAxis (const GridAxis &axis, double x, double x0)
 Returns the point distance between from value x to value x0 along the given axis. More...
 
static bool gmx::valueIsInGrid (const awh_dvec value, const std::vector< GridAxis > &axis)
 Query if a value is in range of the grid. More...
 
static int gmx::getNearestIndexInGrid (const awh_dvec value, const std::vector< GridAxis > &axis)
 Map a value to the nearest point in the grid. More...
 
void gmx::anonymous_namespace{grid.cpp}::setNeighborsOfGridPoint (int pointIndex, const Grid &grid, std::vector< int > *neighborIndexArray)
 Find and set the neighbors of a grid point. More...
 
void gmx::mapGridToDataGrid (std::vector< int > *gridpointToDatapoint, const double *const *data, int numDataPoints, const std::string &dataFilename, const Grid &grid, const std::string &correctFormatMessage)
 Maps each point in the grid to a point in the data grid. More...