AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
autopas::LiveInfo Class Reference

This class is able to gather and store important information for a tuning phase from a container and functor. More...

#include <LiveInfo.h>

Public Types

using InfoType = std::variant< bool, double, size_t, ContainerOption, TraversalOption, LoadEstimatorOption, DataLayoutOption, Newton3Option >
 The type of an info.
 

Public Member Functions

template<class Particle_T , class PairwiseFunctor >
void gather (const autopas::ParticleContainerInterface< Particle_T > &container, const PairwiseFunctor &functor, unsigned int rebuildFrequency)
 Gathers important information from a particle container and functor.
 
const auto & get () const
 Returns a map of all infos.
 
std::string toString () const
 Creates a string containing all live info gathered.
 
std::pair< std::string, std::string > getCSVLine () const
 Generate a csv representation containing all values from the toString() method.
 

Friends

std::ostream & operator<< (std::ostream &out, const LiveInfo &info)
 Stream operator to write the LiveInfo to a stream.
 
std::istream & operator>> (std::istream &in, LiveInfo &info)
 Stream operator to read the LiveInfo in from a stream.
 

Detailed Description

This class is able to gather and store important information for a tuning phase from a container and functor.

Infos are identified by a string. Their type is InfoType.

Member Function Documentation

◆ gather()

template<class Particle_T , class PairwiseFunctor >
void autopas::LiveInfo::gather ( const autopas::ParticleContainerInterface< Particle_T > &  container,
const PairwiseFunctor functor,
unsigned int  rebuildFrequency 
)
inline

Gathers important information from a particle container and functor.

The gathered information should allow to estimate the performance of different configurations.

Currently, it provides:

  • numParticles: The number of particles in the container.
  • numHaloParticles: The number of particles in the container that are outside of the domain.
  • cutoff: The configured cutoff radius.
  • skin: The configured skin radius.
  • domainSizeX: The size of the domain on the x-axis.
  • domainSizeY: The size of the domain on the y-axis.
  • domainSizeZ: The size of the domain on the z-axis.
  • particleSize: The number of bytes one particle in AoS layout needs.
  • particleSizeNeededByFunctor: The number of bytes the information needed by the functor from each particle occupies. Important for the SoA data layout, but irrelevant for the AoS data layout.
  • numCells: The number of cells in the domain if a cell has a side-length equal to the cutoff.
  • numEmptyCells: The number of empty cells in the domain.
  • minParticlesPerCell: The minimum number of particles a cell in the domain contains.
  • maxParticlesPerCell: The maximum number of particles a cell in the domain contains.
  • avgParticlesPerCell: The average number of particles per cell. (Cells are small so we don't expect outliers that make the average useless).
  • estimatedNumNeighborInteractions: Rough estimation of number of neighbor interactions. Assumes that neighboring cells contain roughly the same number of particles. Estimation does not work well if this is not the case.
  • percentParticlesPerCellStdDev: The standard deviation of the number of particles in each cell from the average number of particles per cell, divided by the avgParticlesPerCell. -percentParticlesPerBlurredCellStdDev: The standard deviation of the number of particles in each blurred cell, divided by the average number of particles per blurred cell. A blurred cell is exactly 1/27th of the domain.
  • threadCount: The number of threads that can be used.
  • rebuildFrequency: The current verlet-rebuild-frequency of the simulation.
Template Parameters
Particle_TThe type of particle the container stores.
PairwiseFunctorThe type of functor.
Parameters
containerThe container to gather the infos from.
functorThe functor to gather the infos from.
rebuildFrequencyThe current verlet rebuild frequency that is used in the simulation.

◆ get()

const auto & autopas::LiveInfo::get ( ) const
inline

Returns a map of all infos.

Returns
A map of all infos.

◆ getCSVLine()

std::pair< std::string, std::string > autopas::LiveInfo::getCSVLine ( ) const
inline

Generate a csv representation containing all values from the toString() method.

Since the keys are not necessarily known in advance, this method generates a CSV header and a CSV line.

Returns
A pair of strings in the form of (header, line).

◆ toString()

std::string autopas::LiveInfo::toString ( ) const
inline

Creates a string containing all live info gathered.

Returns
A string containing all live info gathered.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const LiveInfo info 
)
friend

Stream operator to write the LiveInfo to a stream.

Parameters
out
info
Returns

◆ operator>>

std::istream & operator>> ( std::istream &  in,
LiveInfo info 
)
friend

Stream operator to read the LiveInfo in from a stream.

Parameters
in
info
Returns

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