|
|
virtual | ~GmSaveResultsRule () |
| | Destructor.
|
| |
| virtual GmResultsRuleType | type () const |
| | Returns the result rule type.
|
| |
| virtual void | print (const GmLogCategory &logger, GmLogLevel level) const |
| | Prints the rule description to the appointed logger / level.
|
| |
| virtual bool | run (const GmLogCategory &logger) |
| | Saves the data specified by the associated data sets to the specified output file.
|
| |
|
virtual | ~GmResultsRule () |
| | Destructor.
|
| |
|
QString | id () const |
| | Returns the result rule name.
|
| |
|
QString | description () const |
| | Returns the result rule description.
|
| |
|
const QVector< GmResultsDataSet * > & | dataSets () const |
| | Returns the list of data sets acted upon by this rule.
|
| |
|
const QVector< GmResultsTimeSet * > & | timeSets () const |
| | Returns the list of time sets defining when this rule should be acted upon.
|
| |
|
bool | hasTimeSet () const |
| | Returns true if this rule is associated with a time set.
|
| |
|
|
| Q_DISABLE_COPY (GmSaveResultsRule) |
| |
|
| GmSaveResultsRule (QString id, QString description, const QVector< GmResultsDataSet * > &dataSets, const QVector< GmResultsTimeSet * > &timeSets, QString outputFile, const QVariantMap &formatOptions, bool trackObj, const GmSimulationData *simData) |
| | Constructor.
|
| |
| bool | fileIOInit (const GmLogCategory &logger) |
| | Prepares the output file to be written using data srcs from the associated data sets. File saving is done with the GmFileIO class.
|
| |
|
bool | fileIOSave (const GmLogCategory &logger) |
| | Saves the current data to the previously prepared output file using the GmFileIO class. Uses the time attribute as the current time. No mesh changing is supported.
|
| |
|
template<class T > |
| void | fileIOCheckAndAddDataSrcs (const GmResultsDataSet *dset, GmResultsDataSrcType type, QString typeStr, QSet< QString > &idSet, QVector< const T * > &data, QStringList &groups, bool &tryGroups, bool warn, const GmLogCategory &logger) |
| | Helper function useed by fileIOInit() to check the data srcs of the given type from the given data set and add them to the given data vector.
|
| |
|
bool | simpleInit (const GmLogCategory &logger) |
| | Prepares the output file to be written using the simple file format.
|
| |
|
bool | simpleSave (const GmLogCategory &logger) |
| | Saves current data to the output file using the simple file format.
|
| |
|
void | simpleWriteReportData (const GmResultsDataSet *dataSet) |
| |
|
void | simpleWriteHistoryEvalSetHeader (const GmResultsDataSet *dataSet) |
| |
|
void | simpleWriteHistoryEvalSetData (const GmResultsDataSet *dataSet) |
| |
|
|
QString | _outputFileName |
| | The output file, stored with translated paths.
|
| |
|
QVariantMap | _formatOptions |
| | Table with options specific to the type of saved file.
|
| |
|
ReadyState | _fileState |
| | Flag with the output file state.
|
| |
|
GmFileIO * | _fileIo |
| | The file IO handle for savig operation using a GmFileIO object.
|
| |
|
bool | _fileIoSingleTime |
| | Flag stating that the output file should support a single result set.
|
| |
|
bool | _fileIoCloseOnTimeSetEnd |
| | "Regression test" flag stating that the file should be closed after the time set last save time. Needed for file comparison at the orchestration.
|
| |
|
std::fstream | _simpleFile |
| | The output file for saving operation using the "simple" model.
|
| |
|
GmSimpleSaveFormat | _simpleFormat |
| | The saved format for the output file when using the "simple" model.
|
| |
|
bool | _simpleWriteHeader |
| | Controls whether the header should be printed or not for the HISTORY format.
|
| |
|
QString | _simpleSep |
| | The column separator for HISTORY format.
|
| |
|
|
| GmResultsRule (QString id, QString description, const QVector< GmResultsDataSet * > &dataSets, const QVector< GmResultsTimeSet * > &timeSets, bool trackObj, const GmSimulationData *simData) |
| | Constructor. The rule does NOT own the data sets and time sets.
|
| |
|
static bool | fillCommonFields (const GmResultsData *data, LuaTable &tab, const GmLogCategory &logger, QString &id, QString &description, QVector< GmResultsDataSet * > &dataSets, QVector< GmResultsTimeSet * > &timeSets, bool &trackObj) |
| | Helper function for the loadFromTable functions from derived classes. Parses the common fields for every result rule from the given Lua table. The logger is used to emmit messages during rule parsing. The data object is used to find data sets and time sets on the results data object.
|
| |
|
QString | _id |
| | The save rule id (name)
|
| |
|
QString | _description |
| | A description of the save rule.
|
| |
|
QVector< GmResultsDataSet * > | _dataSets |
| | The list of associated data sets.
|
| |
|
QVector< GmResultsTimeSet * > | _timeSets |
| | The list of associated time sets.
|
| |
|
const GmSimulationData * | _simData |
| | The simulation data object.
|
| |
|
int | _itemId |
| | The run progress item id for result rules of this kind (subclass: save rules, print rules or monitor rules)
|
| |
|
int | _objItemId |
| | The run progress item for this object if the user requested to monitor the time for this specific result rule.
|
| |
A results rule saving the associated data sets to a file.
| bool GmSaveResultsRule::fileIOInit |
( |
const GmLogCategory & | logger | ) |
|
|
private |
Prepares the output file to be written using data srcs from the associated data sets. File saving is done with the GmFileIO class.
If we have multiple data sets, we must make sure that they are sharing the same mesh. For each data set, if it contains eval sets, they will be ignored unless the eval set is a cell group. At present, either the full mesh or a cell group will be always considered. If multiple eval sets reference different cell groups, the groups will be ignored. If one eval set references a set of groups but the others reference the whole mesh, the set of groups will be used. If a data src appears in multiple data sets, only its first appearence will be considered. Attribute data sets are ignored. User transformations applied to data srcs are ignored.