ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
p3m_interpolation_cache Class Reference

Cache for interpolation weights. More...

#include <interpolation.hpp>

Public Member Functions

auto size () const
 Number of points in the cache.
 
auto cao () const
 Charge assignment order the weights are for.
 
template<int cao>
void store (const InterpolationWeights< cao > &w)
 Push back weights for one point.
 
template<int cao>
InterpolationWeights< caoload (std::size_t i) const
 Load entry from the cache.
 
void reset (int cao)
 Reset the cache.
 

Detailed Description

Cache for interpolation weights.

This is a storage container for interpolation weights of type InterpolationWeights.

Definition at line 55 of file interpolation.hpp.

Member Function Documentation

◆ cao()

auto p3m_interpolation_cache::cao ( ) const
inline

Charge assignment order the weights are for.

Returns
The charge assignment order.

Definition at line 73 of file interpolation.hpp.

Referenced by load(), reset(), and store().

◆ load()

template<int cao>
InterpolationWeights< cao > p3m_interpolation_cache::load ( std::size_t  i) const
inline

Load entry from the cache.

This loads an entry at an index from the cache, the entries are indexed by the order they were stored.

Template Parameters
caoInterpolation order has to match the order set at last call to p3m_interpolation_cache::reset.
Parameters
iIndex of the entry to load.
Returns
i-it interpolation weights.

Definition at line 103 of file interpolation.hpp.

References Utils::Array< T, N >::begin(), cao(), InterpolationWeights< cao >::ind, size(), InterpolationWeights< cao >::w_x, InterpolationWeights< cao >::w_y, and InterpolationWeights< cao >::w_z.

◆ reset()

void p3m_interpolation_cache::reset ( int  cao)
inline

Reset the cache.

Parameters
caoInterpolation order.

Definition at line 125 of file interpolation.hpp.

References cao().

◆ size()

auto p3m_interpolation_cache::size ( ) const
inline

Number of points in the cache.

Returns
Number of points currently in the cache.

Definition at line 67 of file interpolation.hpp.

Referenced by load().

◆ store()

template<int cao>
void p3m_interpolation_cache::store ( const InterpolationWeights< cao > &  w)
inline

Push back weights for one point.

Template Parameters
caoInterpolation order has to match the order set at last call to p3m_interpolation_cache::reset.
Parameters
wInterpolation weights to store.

Definition at line 82 of file interpolation.hpp.

References cao(), InterpolationWeights< cao >::ind, InterpolationWeights< cao >::w_x, InterpolationWeights< cao >::w_y, and InterpolationWeights< cao >::w_z.

Referenced by anonymous_namespace{p3m.cpp}::AssignCharge< cao >::operator()().


The documentation for this class was generated from the following file: