Loading include/SimulationController.h +1 −1 Original line number Diff line number Diff line Loading @@ -70,8 +70,8 @@ public: void initConcentrationNumMoleculesExport() const; void initReactionsCountExport() const; void exportConcentrationNumMolecules(double _reactionTime) const; void exportReactionsCount(double _reactionTime) const; void exportPolymers(std::string _prefixFilename, double _reactionTime, bool _binaryExport, bool _writeHeader); protected: void exportComplete(time_t _timerStart, TerminationConditions _terminationConditions) const; Loading src/SimulationController.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -443,5 +443,23 @@ double SimulationController::getVolume() { void SimulationController::updateSolidsContent(double _solidsContent) { currentState->setSolidsContent(_solidsContent); } void SimulationController::exportPolymers(std::string _prefixFilename, double _reactionTime, bool _binaryExport, bool _writeHeader) { for (const auto& species : currentModel->getSpecies()) { if (species.isPolymer) { if (_binaryExport) { kMC->exportPolymerSpecies(species.id, simulationParameter.outputdir + "/" + _prefixFilename + species.name + "." + to_string(_reactionTime), FileTypePolymerSpecies::Binary, currentModel); } else { kMC->exportPolymerSpecies(species.id, simulationParameter.outputdir + "/" + _prefixFilename + species.name + "." + to_string(_reactionTime), FileTypePolymerSpecies::CLD, currentModel); } } } if (_binaryExport) { kMC->exportPolymersBinary(simulationParameter.outputdir + "/" + _prefixFilename + "Polymers." + to_string(_reactionTime), currentModel, 0, _writeHeader); } else { kMC->exportPolymersCLD(simulationParameter.outputdir + "/" + "Polymers." + to_string(_reactionTime), currentModel); } } } // namespace Loading
include/SimulationController.h +1 −1 Original line number Diff line number Diff line Loading @@ -70,8 +70,8 @@ public: void initConcentrationNumMoleculesExport() const; void initReactionsCountExport() const; void exportConcentrationNumMolecules(double _reactionTime) const; void exportReactionsCount(double _reactionTime) const; void exportPolymers(std::string _prefixFilename, double _reactionTime, bool _binaryExport, bool _writeHeader); protected: void exportComplete(time_t _timerStart, TerminationConditions _terminationConditions) const; Loading
src/SimulationController.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -443,5 +443,23 @@ double SimulationController::getVolume() { void SimulationController::updateSolidsContent(double _solidsContent) { currentState->setSolidsContent(_solidsContent); } void SimulationController::exportPolymers(std::string _prefixFilename, double _reactionTime, bool _binaryExport, bool _writeHeader) { for (const auto& species : currentModel->getSpecies()) { if (species.isPolymer) { if (_binaryExport) { kMC->exportPolymerSpecies(species.id, simulationParameter.outputdir + "/" + _prefixFilename + species.name + "." + to_string(_reactionTime), FileTypePolymerSpecies::Binary, currentModel); } else { kMC->exportPolymerSpecies(species.id, simulationParameter.outputdir + "/" + _prefixFilename + species.name + "." + to_string(_reactionTime), FileTypePolymerSpecies::CLD, currentModel); } } } if (_binaryExport) { kMC->exportPolymersBinary(simulationParameter.outputdir + "/" + _prefixFilename + "Polymers." + to_string(_reactionTime), currentModel, 0, _writeHeader); } else { kMC->exportPolymersCLD(simulationParameter.outputdir + "/" + "Polymers." + to_string(_reactionTime), currentModel); } } } // namespace