inline void AbstractTimeDependentSimulation::doStepping() {
  while (time_ < maxTime_ && steps_ < maxNumberOfSteps_) {
    stepping();
    ++steps_;
    time_ += dt_;
    if (steps_ % recordFrequency_ == 0)
      recordResult();
  }
  report();
}
Пример #2
0
Data DebugSession::debugResume(const Data& data) {
	std::lock_guard<std::recursive_mutex> lock(_mutex);

	stepping(false);

	Data replyData;
	replyData.compound["status"] = Data("success", Data::VERBATIM);

	_resumeCond.notify_one();
	return replyData;
}
Пример #3
0
Data DebugSession::debugPause(const Data& data) {
	std::lock_guard<std::recursive_mutex> lock(_mutex);

	_skipTo = Breakpoint();
	stepping(true);

	Data replyData;
	replyData.compound["status"] = Data("success", Data::VERBATIM);

	return replyData;
}
Пример #4
0
Data DebugSession::debugStep(const Data& data) {
	std::lock_guard<std::recursive_mutex> lock(_mutex);

	stepping(true);
	_resumeCond.notify_one();

	Data replyData;
	if (_interpreter) {
		// register ourself as a monitor
		if (!_isRunning) {
			_isRunning = true;
			_interpreterThread = new std::thread(DebugSession::run, this);

		}

		replyData.compound["status"] = Data("success", Data::VERBATIM);
	} else {
		replyData.compound["status"] = Data("failure", Data::VERBATIM);
	}
	return replyData;
}