FEDEM Solver  R8.0
Source code of the dynamics solver
FFpBatchExport.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
13 #ifndef FFP_BATCH_EXPORT_H
14 #define FFP_BATCH_EXPORT_H
15 
16 #include <vector>
17 #include <string>
18 
19 class FFrExtractor;
20 class FFpCurveDef;
21 class FFpGraph;
22 
23 
29 {
31  bool readDataFromFile(const std::string& rpcFile);
32 
33  int repeats = 0;
34  int averages = 0;
35  int framePts = 0;
36  int groupPts = 0;
37 };
38 
39 
45 {
46 public:
49  FFpBatchExport(const std::vector<std::string>& frsFiles);
52 
56  static bool readFrsFiles(std::vector<std::string>& frsFiles,
57  const std::string& modelFile);
58 
61  bool readCurves(const std::string& defFile);
66  bool exportCurves(const std::string& path,
67  const std::string& modelFile, int format);
73  bool exportGraph(const std::string& fName,
74  const std::string& modelFile, int format,
75  const FFpRPC3Data& rpc);
78  bool printPosition(const std::string& fName = "");
79 
80 private:
83  void readPlottingData(FFpGraph& rdbCurves);
84 
86 
87  std::vector<FFpCurveDef*> myCurves;
88 };
89 
90 #endif
Class managing auto-export of curve data for batch executions.
Definition: FFpBatchExport.H:45
bool exportCurves(const std::string &path, const std::string &modelFile, int format)
Exports curves as separate two-column files.
Definition: FFpBatchExport.C:134
FFrExtractor * myExtractor
Extractor object holding the results data.
Definition: FFpBatchExport.H:85
bool readCurves(const std::string &defFile)
Reads the curve definitions from a specified model file.
Definition: FFpBatchExport.C:121
FFpBatchExport(const std::vector< std::string > &frsFiles)
The constructor initializes myExtractor.
Definition: FFpBatchExport.C:57
bool printPosition(const std::string &fName="")
Prints position data for the curve data variables (for debugging).
Definition: FFpBatchExport.C:237
bool exportGraph(const std::string &fName, const std::string &modelFile, int format, const FFpRPC3Data &rpc)
Exports curves as a single multi-column file.
Definition: FFpBatchExport.C:177
static bool readFrsFiles(std::vector< std::string > &frsFiles, const std::string &modelFile)
Reads a list of frs-files with results from specified model file.
Definition: FFpBatchExport.C:73
std::vector< FFpCurveDef * > myCurves
Curve definition container.
Definition: FFpBatchExport.H:87
~FFpBatchExport()
The destructor releases the heap-allocated data objects.
Definition: FFpBatchExport.C:65
void readPlottingData(FFpGraph &rdbCurves)
Reads the curve data to be exported.
Definition: FFpBatchExport.C:207
Definition: FFpCurveDef.H:20
Definition: FFpGraph.H:15
Front-end for the result extraction module.
Definition: FFrExtractor.H:44
Struct holding some meta data parameters of a RPC3-file.
Definition: FFpBatchExport.H:29
int averages
Number of averages.
Definition: FFpBatchExport.H:34
int repeats
Number of repeats.
Definition: FFpBatchExport.H:33
int framePts
Size of data frame.
Definition: FFpBatchExport.H:35
bool readDataFromFile(const std::string &rpcFile)
Parses some meta data from the specified rpcFile.
Definition: FFpRPC3Data.C:18
int groupPts
Size of data group.
Definition: FFpBatchExport.H:36