00001 /*************************************************************************************************** 00002 ***** Copyright (C) 2005 John Schneiderman <JohnMS@member.fsf.org> ***** 00003 ***** ***** 00004 ***** This program is free software; you can redistribute it and/or modify ***** 00005 ***** it under the terms of the GNU General Public License as published by ***** 00006 ***** the Free Software Foundation; either version 2 of the License, or ***** 00007 ***** (at your option) any later version. ***** 00008 ***** ***** 00009 ***** This program is distributed in the hope that it will be useful, ***** 00010 ***** but WITHOUT ANY WARRANTY; without even the implied warranty of ***** 00011 ***** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ***** 00012 ***** GNU General Public License for more details. ***** 00013 ***** ***** 00014 ***** You should have received a copy of the GNU General Public License ***** 00015 ***** along with this program; if not, write to the Free Software ***** 00016 ***** Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ***** 00017 ***************************************************************************************************/ 00018 #include "basesimulation.h" 00019 #include "configurationdatabase.h" 00020 00021 BaseSimulation::BaseSimulation(const ConfigurationDatabase &conf): m_kineticEnergyHistogram(conf), m_potentialEnergyHistogram(conf), m_radialDistributionFunction(conf), m_radialDensityHistogram(conf) 00022 { 00023 m_runSteps = 0, m_printInterval = 0, m_stepStart = 0.0, m_changeInStep = 0.0; 00024 } 00025 00026 int BaseSimulation::runSteps() const 00027 { 00028 return m_runSteps; 00029 } 00030 00031 int BaseSimulation::printInterval() const 00032 { 00033 return m_printInterval; 00034 } 00035 00036 double BaseSimulation::changeInStep() const 00037 { 00038 return m_changeInStep; 00039 } 00040 00041 void BaseSimulation::setRunSteps(int steps) 00042 { 00043 m_runSteps = steps; 00044 } 00045 00046 void BaseSimulation::setPrintInterval(int interval) 00047 { 00048 m_printInterval = interval; 00049 } 00050 00051 void BaseSimulation::setChangeInStep(double change) 00052 { 00053 m_changeInStep = change; 00054 } 00055 00056 void BaseSimulation::clear() 00057 { 00058 m_runSteps = 0, m_printInterval = 0, m_stepStart = 0.0, m_changeInStep = 0.0; 00059 m_potentialEnergyHistogram.clear(); 00060 m_kineticEnergyHistogram.clear(); 00061 m_radialDistributionFunction.clear(); 00062 m_radialDensityHistogram.clear(); 00063 }