lower default update interval to 10ms

This commit is contained in:
Axel Kohlmeyer
2024-07-15 10:28:22 -04:00
parent 1d6959efe6
commit 1fe1aa0683
3 changed files with 6 additions and 5 deletions

View File

@ -571,11 +571,12 @@ General Settings:
size for the text editor and log font of the application can be set. size for the text editor and log font of the application can be set.
- *GUI update interval:* Allows to set the time interval between GUI - *GUI update interval:* Allows to set the time interval between GUI
and data updates during a LAMMPS run in milliseconds. The default is and data updates during a LAMMPS run in milliseconds. The default is
to update the GUI every 100 milliseconds. This is good for most cases. to update the GUI every 10 milliseconds. This is good for most cases.
For LAMMPS runs that run very fast, however, data may be missed and For LAMMPS runs that run *very* fast, however, data may be missed and
through lowering this interval, this can be corrected. However, this through lowering this interval, this can be corrected. However, this
will make the GUI use more resources, which may be a problem on some will make the GUI use more resources, which may be a problem on some
computers with slower CPUs. The default value is 100 milliseconds. computers with slower CPUs and a small number of CPU cores. This
setting may be changed to a value between 1 and 1000 milliseconds.
Accelerators: Accelerators:
^^^^^^^^^^^^^ ^^^^^^^^^^^^^

View File

@ -1088,7 +1088,7 @@ void LammpsGui::do_run(bool use_buffer)
logupdater = new QTimer(this); logupdater = new QTimer(this);
connect(logupdater, &QTimer::timeout, this, &LammpsGui::logupdate); connect(logupdater, &QTimer::timeout, this, &LammpsGui::logupdate);
logupdater->start(settings.value("updfreq", "100").toInt()); logupdater->start(settings.value("updfreq", "10").toInt());
} }
void LammpsGui::render_image() void LammpsGui::render_image()

View File

@ -260,7 +260,7 @@ GeneralTab::GeneralTab(QSettings *_settings, LammpsWrapper *_lammps, QWidget *pa
auto *freqval = new QSpinBox; auto *freqval = new QSpinBox;
freqval->setRange(1, 1000); freqval->setRange(1, 1000);
freqval->setStepType(QAbstractSpinBox::AdaptiveDecimalStepType); freqval->setStepType(QAbstractSpinBox::AdaptiveDecimalStepType);
freqval->setValue(settings->value("updfreq", "100").toInt()); freqval->setValue(settings->value("updfreq", "10").toInt());
freqval->setObjectName("updfreq"); freqval->setObjectName("updfreq");
freqlayout->addWidget(freqlabel); freqlayout->addWidget(freqlabel);
freqlayout->addWidget(freqval); freqlayout->addWidget(freqval);