#include <HistogramOnGrid.h>
Public Member Functions | |
HistogramOnGrid (const vesselbase::VesselOptions &da) | |
void | setBounds (const std::vector< std::string > &smin, const std::vector< std::string > &smax, const std::vector< unsigned > &nbins, const std::vector< double > &spacing) |
Set the minimum and maximum of the grid. More... | |
void | calculate (const unsigned ¤t, MultiValue &myvals, std::vector< double > &buffer, std::vector< unsigned > &der_list) const |
Copy data from the action into the grid. More... | |
void | finish (const std::vector< double > &buffer) |
Finish the calculation. More... | |
virtual void | accumulate (const unsigned &ipoint, const double &weight, const double &dens, const std::vector< double > &der, std::vector< double > &buffer) const |
virtual void | accumulateForce (const unsigned &ipoint, const double &weight, const std::vector< double > &der, std::vector< double > &intforce) const |
unsigned | getNumberOfBufferPoints () const |
Get the number of points needed in the buffer. More... | |
KernelFunctions * | getKernelAndNeighbors (std::vector< double > &point, unsigned &num_neigh, std::vector< unsigned > &neighbors) const |
std::vector< Value * > | getVectorOfValues () const |
void | addOneKernelEachTimeOnly () |
virtual void | getFinalForces (const std::vector< double > &buffer, std::vector< double > &finalForces) |
This retrieves the final force. More... | |
bool | noDiscreteKernels () const |
double | getFibonacciCutoff () const |
Get the cutoff to use for the Fibonacci spheres. More... | |
unsigned | getIndex (const std::vector< unsigned > &indices) const |
Flatten the grid and get the grid index for a point. More... | |
void | setNoDerivatives () |
Remove the derivatives. More... | |
std::string | getType () const |
Get the type of grid we are using. More... | |
void | setupFibonacciGrid (const unsigned &np) |
Setup the grid if it is a fibonacci grid on the surface of a sphere. More... | |
std::string | description () |
Get a description of the grid to output to the log. More... | |
void | convertIndexToIndices (const unsigned &index, const std::vector< unsigned > &nnbin, std::vector< unsigned > &indices) const |
Convert an index into indices. More... | |
void | getIndices (const unsigned &index, std::vector< unsigned > &indices) const |
Get the indices fof a point. More... | |
void | getIndices (const std::vector< double > &point, std::vector< unsigned > &indices) const |
Get the indices of a particular point. More... | |
void | setGridElement (const unsigned &, const unsigned &, const double &) |
Operations on one of the elements of grid point i. More... | |
void | setGridElement (const std::vector< unsigned > &, const unsigned &, const double &) |
void | addToGridElement (const unsigned &ipoint, const unsigned &jelement, const double &value) |
Add data to an element of the grid. More... | |
double | getGridElement (const std::vector< unsigned > &, const unsigned &) const |
Operations on one of the elements of grid point specified by vector. More... | |
virtual double | getGridElement (const unsigned &, const unsigned &) const |
Get the value of the ith grid element. More... | |
virtual void | resize () |
Set the size of the buffer equal to nper*npoints. More... | |
unsigned | getNumberOfPoints () const |
Get the number of points in the grid. More... | |
void | getGridPointCoordinates (const unsigned &, std::vector< double > &) const |
Get the coordinates for a point in the grid. More... | |
void | getGridPointCoordinates (const unsigned &, std::vector< unsigned > &, std::vector< double > &) const |
unsigned | getDimension () const |
Get the dimensionality of the function. More... | |
virtual unsigned | getNumberOfComponents () const |
Get the number of components in the vector stored on each grid point. More... | |
bool | isPeriodic (const unsigned &i) const |
Is the grid periodic in the ith direction. More... | |
unsigned | getNumberOfQuantities () const |
Get the number of quantities we have stored at each grid point. More... | |
std::vector< unsigned > | getNbin () const |
Get the number of grid points for each dimension. More... | |
std::string | getComponentName (const unsigned &i) const |
Get the name of the ith component. More... | |
std::vector< std::string > | getMin () const |
Get the vector containing the minimum value of the grid in each dimension. More... | |
std::vector< std::string > | getMax () const |
Get the vector containing the maximum value of the grid in each dimension. More... | |
const std::vector< unsigned > & | getStride () const |
Get the stride (the distance between the grid points of an index) More... | |
double | getCellVolume () const |
Return the volume of one of the grid cells. More... | |
void | getNeighbors (const std::vector< double > &pp, const std::vector< unsigned > &nneigh, unsigned &num_neighbours, std::vector< unsigned > &neighbors) const |
Get the set of points neighouring a particular location in space. More... | |
void | getNeighbors (const std::vector< unsigned > &indices, const std::vector< unsigned > &nneigh, unsigned &num_neighbors, std::vector< unsigned > &neighbors) const |
Get the neighbors for a set of indices of a point. More... | |
void | getSplineNeighbors (const unsigned &mybox, std::vector< unsigned > &mysneigh) const |
Get the points neighboring a particular spline point. More... | |
const std::vector< double > & | getGridSpacing () const |
Get the spacing between grid points. More... | |
double | getGridExtent (const unsigned &i) const |
Get the extent of the grid in one of the axis. More... | |
void | setCubeUnits (const double &units) |
This ensures that Gaussian cube fies are in correct units. More... | |
double | getCubeUnits () const |
This ensures that Gaussian cube files are in correct units. More... | |
std::string | getInputString () const |
Return a string containing the input to the grid so we can clone it. More... | |
bool | noDerivatives () const |
Does this have derivatives. More... | |
double | getValueAndDerivatives (const std::vector< double > &x, const unsigned &ind, std::vector< double > &der) const |
Get the value and derivatives at a particular location using spline interpolation. More... | |
void | activateThesePoints (const std::vector< bool > &to_activate) |
Deactivate all the grid points. More... | |
bool | inactive (const unsigned &ip) const |
Is this point active. More... | |
void | setForce (const std::vector< double > &inforces) |
Apply the forces. More... | |
bool | wasForced () const |
Was a force added to the grid. More... | |
bool | applyForce (std::vector< double > &fforces) |
And retrieve the forces. More... | |
bool | wasreset () const |
Was the grid cleared on the last step. More... | |
virtual void | clear () |
Clear all the data stored on the grid. More... | |
virtual void | reset () |
Reset the grid so that it is cleared at start of next time it is calculated. More... | |
void | setNorm (const double &snorm) |
Functions for dealing with normalisation constant. More... | |
double | getNorm () const |
std::string | getName () const |
Return the name. More... | |
std::string | getLabel () const |
Return the label. More... | |
void | checkRead () |
Check that readin was fine. More... | |
virtual void | setBufferStart (unsigned &start) |
Set the start of the buffer. More... | |
virtual void | prepare () |
Do something before the loop. More... | |
virtual MultiValue & | transformDerivatives (const unsigned ¤t, MultiValue &myvals, MultiValue &bvals) |
This is replaced in bridges so we can transform the derivatives. More... | |
Static Public Member Functions | |
static void | registerKeywords (Keywords &keys) |
static std::string | transformName (const std::string &name) |
Convert the name to the label of the component. More... | |
Public Attributes | |
double | von_misses_norm |
double | von_misses_concentration |
Log & | log |
Reference to the log on which to output details. More... | |
Protected Member Functions | |
unsigned | getIndex (const std::vector< double > &p) const |
Convert a point in space the the correspoinding grid point. More... | |
unsigned | getFibonacciIndex (const std::vector< double > &p) const |
Get the index of the closest point on the fibonacci sphere. More... | |
void | getFlatGridCoordinates (const unsigned &ipoint, std::vector< unsigned > &tindices, std::vector< double > &x) const |
Get the flat grid coordinates. More... | |
void | getFibonacciCoordinates (const unsigned &ipoint, std::vector< double > &x) const |
Get the coordinates on the Fibonacci grid. More... | |
void | setDataSize (const unsigned &size) |
Set the size of the data vector. More... | |
void | setDataElement (const unsigned &myelem, const double &value) |
Set an element of the data array. More... | |
void | addDataElement (const unsigned &myelem, const double &value) |
Add some value to an element of the data array. More... | |
double | getDataElement (const unsigned &myelem) const |
Get the value of one of the data element. More... | |
bool | noAverage () const |
Are we averaging the data. More... | |
int | getNumericalLabel () const |
Return the numerical label. More... | |
void | error (const std::string &errmsg) |
Report an error. More... | |
template<class T > | |
void | parse (const std::string &key, T &t) |
Parse something from the input. More... | |
template<class T > | |
void | parseVector (const std::string &key, std::vector< T > &t) |
Parse one keyword as std::vector. More... | |
void | parseFlag (const std::string &key, bool &t) |
Parse one keyword as boolean flag. More... | |
std::string | getAllInput () |
This returns the whole input line (it is used for less_than/more_than/between) More... | |
ActionWithVessel * | getAction () const |
Return a pointer to the action we are working in. More... | |
double | getTolerance () const |
Return the value of the tolerance. More... | |
double | getNLTolerance () const |
Return the value of the neighbor list tolerance. More... | |
unsigned | getSizeOfBuffer () const |
Return the size of the buffer. More... | |
void | resizeBuffer (const unsigned &n) |
Set the size of the data buffer. More... | |
Protected Attributes | |
bool | discrete |
bool | wasforced |
Is forced. More... | |
std::vector< double > | forces |
Forces acting on grid elements. More... | |
bool | noderiv |
Do we have derivatives. More... | |
std::vector< std::string > | arg_names |
The names of the various columns in the grid file. More... | |
unsigned | nper |
The number of pieces of information we are storing for each point in the grid. More... | |
std::vector< bool > | pbc |
Is this direction periodic. More... | |
std::vector< std::string > | str_min |
The minimum and maximum in the grid stored as strings. More... | |
std::vector< std::string > | str_max |
std::vector< double > | dx |
The spacing between grid points. More... | |
unsigned | dimension |
The dimensionality of the grid. More... | |
std::vector< bool > | active |
Which grid points are we actively accumulating. More... | |
unsigned | bufstart |
The start of this Vessel's buffer in buffer in the underlying ActionWithVessel. More... | |
Communicator & | comm |
A copy of the communicator. More... | |
Private Attributes | |
unsigned | neigh_tot |
bool | addOneKernelAtATime |
std::string | kerneltype |
std::vector< double > | bandwidths |
std::vector< unsigned > | nneigh |
|
explicit |
|
virtual |
Reimplemented in PLMD::gridtools::AverageOnGrid.
|
virtual |
Reimplemented in PLMD::gridtools::AverageOnGrid.
|
inherited |
Deactivate all the grid points.
|
inlineprotectedinherited |
Add some value to an element of the data array.
|
inline |
|
inherited |
Add data to an element of the grid.
|
virtualinherited |
And retrieve the forces.
Reimplemented from PLMD::vesselbase::AveragingVessel.
|
virtual |
Copy data from the action into the grid.
Reimplemented from PLMD::gridtools::GridVessel.
|
inherited |
Check that readin was fine.
|
virtualinherited |
Clear all the data stored on the grid.
|
inherited |
Convert an index into indices.
|
virtualinherited |
Get a description of the grid to output to the log.
Implements PLMD::vesselbase::Vessel.
|
protectedinherited |
Report an error.
|
virtual |
Finish the calculation.
Reimplemented from PLMD::gridtools::GridVessel.
|
inlineprotectedinherited |
Return a pointer to the action we are working in.
|
protectedinherited |
This returns the whole input line (it is used for less_than/more_than/between)
|
inlineinherited |
Return the volume of one of the grid cells.
|
inlineinherited |
Get the name of the ith component.
|
inherited |
This ensures that Gaussian cube files are in correct units.
|
inlineprotectedinherited |
Get the value of one of the data element.
|
inlineinherited |
Get the dimensionality of the function.
|
protectedinherited |
Get the coordinates on the Fibonacci grid.
|
virtual |
Get the cutoff to use for the Fibonacci spheres.
Reimplemented from PLMD::gridtools::GridVessel.
|
protectedinherited |
Get the index of the closest point on the fibonacci sphere.
|
virtual |
This retrieves the final force.
Reimplemented from PLMD::gridtools::GridVessel.
Reimplemented in PLMD::gridtools::AverageOnGrid.
|
protectedinherited |
Get the flat grid coordinates.
|
inherited |
Operations on one of the elements of grid point specified by vector.
|
virtualinherited |
Get the value of the ith grid element.
Reimplemented in PLMD::gridtools::AverageOnGrid.
|
inlineinherited |
Get the extent of the grid in one of the axis.
|
inherited |
Get the coordinates for a point in the grid.
|
inherited |
|
inlineinherited |
Get the spacing between grid points.
|
protectedinherited |
Convert a point in space the the correspoinding grid point.
|
inherited |
Flatten the grid and get the grid index for a point.
|
inherited |
Get the indices fof a point.
|
inherited |
Get the indices of a particular point.
|
inherited |
Return a string containing the input to the grid so we can clone it.
KernelFunctions * PLMD::gridtools::HistogramOnGrid::getKernelAndNeighbors | ( | std::vector< double > & | point, |
unsigned & | num_neigh, | ||
std::vector< unsigned > & | neighbors | ||
) | const |
|
inherited |
Return the label.
|
inherited |
Get the vector containing the maximum value of the grid in each dimension.
|
inherited |
Get the vector containing the minimum value of the grid in each dimension.
|
inherited |
Return the name.
|
inherited |
Get the number of grid points for each dimension.
|
inherited |
Get the set of points neighouring a particular location in space.
|
inherited |
Get the neighbors for a set of indices of a point.
|
inlineprotectedinherited |
Return the value of the neighbor list tolerance.
|
inlineinherited |
|
inlinevirtual |
Get the number of points needed in the buffer.
Reimplemented from PLMD::gridtools::GridVessel.
|
inlinevirtualinherited |
Get the number of components in the vector stored on each grid point.
Reimplemented in PLMD::gridtools::AverageOnGrid.
|
inlineinherited |
Get the number of points in the grid.
|
inlineinherited |
Get the number of quantities we have stored at each grid point.
|
inlineprotectedinherited |
Return the numerical label.
|
inlineprotectedinherited |
Return the size of the buffer.
|
inherited |
Get the points neighboring a particular spline point.
|
inlineinherited |
Get the stride (the distance between the grid points of an index)
|
inlineprotectedinherited |
Return the value of the tolerance.
|
inlineinherited |
Get the type of grid we are using.
|
inherited |
Get the value and derivatives at a particular location using spline interpolation.
std::vector< Value * > PLMD::gridtools::HistogramOnGrid::getVectorOfValues | ( | ) | const |
|
inlineinherited |
Is this point active.
|
inlineinherited |
Is the grid periodic in the ith direction.
|
inlineprotectedinherited |
Are we averaging the data.
|
inlineinherited |
Does this have derivatives.
bool PLMD::gridtools::HistogramOnGrid::noDiscreteKernels | ( | ) | const |
|
protectedinherited |
Parse something from the input.
|
protectedinherited |
Parse one keyword as boolean flag.
|
protectedinherited |
Parse one keyword as std::vector.
|
inlinevirtualinherited |
Do something before the loop.
Reimplemented in PLMD::vesselbase::BridgeVessel, and PLMD::mapping::SpathVessel.
|
static |
|
virtualinherited |
Reset the grid so that it is cleared at start of next time it is calculated.
|
virtualinherited |
Set the size of the buffer equal to nper*npoints.
Implements PLMD::vesselbase::Vessel.
|
inlineprotectedinherited |
Set the size of the data buffer.
|
virtual |
Set the minimum and maximum of the grid.
Reimplemented from PLMD::gridtools::GridVessel.
|
inlinevirtualinherited |
Set the start of the buffer.
Reimplemented in PLMD::vesselbase::BridgeVessel.
|
inherited |
This ensures that Gaussian cube fies are in correct units.
|
inlineprotectedinherited |
Set an element of the data array.
|
protectedinherited |
Set the size of the data vector.
|
inherited |
Apply the forces.
|
inherited |
Operations on one of the elements of grid point i.
|
inherited |
|
inherited |
Remove the derivatives.
|
inlineinherited |
Functions for dealing with normalisation constant.
|
inherited |
Setup the grid if it is a fibonacci grid on the surface of a sphere.
|
inlinevirtualinherited |
This is replaced in bridges so we can transform the derivatives.
Reimplemented in PLMD::vesselbase::BridgeVessel.
|
staticinherited |
Convert the name to the label of the component.
|
inherited |
Was a force added to the grid.
|
inherited |
Was the grid cleared on the last step.
|
protectedinherited |
Which grid points are we actively accumulating.
|
private |
|
protectedinherited |
The names of the various columns in the grid file.
|
private |
|
protectedinherited |
The start of this Vessel's buffer in buffer in the underlying ActionWithVessel.
|
protectedinherited |
A copy of the communicator.
|
protectedinherited |
The dimensionality of the grid.
|
protected |
|
protectedinherited |
The spacing between grid points.
|
protectedinherited |
Forces acting on grid elements.
|
private |
|
inherited |
Reference to the log on which to output details.
|
private |
|
private |
|
protectedinherited |
Do we have derivatives.
|
protectedinherited |
The number of pieces of information we are storing for each point in the grid.
|
protectedinherited |
Is this direction periodic.
|
protectedinherited |
|
protectedinherited |
The minimum and maximum in the grid stored as strings.
double PLMD::gridtools::HistogramOnGrid::von_misses_concentration |
double PLMD::gridtools::HistogramOnGrid::von_misses_norm |
|
protectedinherited |
Is forced.
Hosted by GitHub | 1.8.14 |