Exemple #1
0
void StatisticsSampler::sample(System &system, ofstream &file)
{
    sampleKineticEnergy(system);
    samplePotentialEnergy(system);
    sampleTemperature(system);
    sampleDensity(system);
    sampleDiffusionConstant(system);
    saveToFile(system, file);
}
void StatisticsSampler::sample(System &system)
{
    // Here you should measure different kinds of statistical properties and save it to a file.
    sampleKineticEnergy(system);
    samplePotentialEnergy(system);
    sampleTemperature(system);
    sampleDensity(system);
    sampleMomentum(system);
    sampleDiffusionConstant(system);
    samplePressure(system);
}
void StatisticsSampler::sample(System *system)
{
    // Here you should measure different kinds of statistical properties and save it to a file.
    CPElapsedTimer::sampling().start();
    sampleKineticEnergy(system);
    samplePotentialEnergy(system);
    sampleTemperature(system);
    sampleDensity(system);
    samplePressure(system);

    if(m_fileHandler) {
        m_fileHandler->writeStatistics(system->currentTime(), m_kineticEnergy, m_potentialEnergy, m_pressure, m_temperature);
    }
    CPElapsedTimer::sampling().stop();
}