@@ -241,15 +241,16 @@ class COutput {
241241
242242 /* ----------------------------- Volume output ----------------------------*/
243243
244- CParallelDataSorter* volumeDataSorter; // !< Volume data sorter
245- CParallelDataSorter* surfaceDataSorter; // !< Surface data sorter
244+ CParallelDataSorter* volumeDataSorter; // !< Volume data sorter.
245+ CParallelDataSorter* volumeDataSorterCompact; // !< Volume data sorter for compact files.
246+ CParallelDataSorter* surfaceDataSorter; // !< Surface data sorter.
246247
247- vector<string> volumeFieldNames; // !< Vector containing the volume field names
248- unsigned short nVolumeFields ; // !< Number of fields in the volume output
248+ vector<string> volumeFieldNames; // !< Vector containing the volume field names.
249+ vector<string> requiredVolumeFieldNames ; // !< Vector containing the minimum required volume field names.
249250
250- string volumeFilename, // !< Volume output filename
251- surfaceFilename, // !< Surface output filename
252- restartFilename; // !< Restart output filename
251+ string volumeFilename, // !< Volume output filename.
252+ surfaceFilename, // !< Surface output filename.
253+ restartFilename; // !< Restart output filename.
253254
254255 /* * \brief Structure to store information for a volume output field.
255256 *
@@ -259,40 +260,48 @@ class COutput {
259260 /* ! \brief The name of the field, i.e. the name that is printed in the file header.*/
260261 string fieldName;
261262 /* ! \brief This value identifies the position of the values of this field at each node in the ::Local_Data array. */
262- short offset;
263+ short offset = -1 ;
264+ /* ! \brief This offset is used for the compact formulation. */
265+ short offsetCompact = -1 ;
263266 /* ! \brief The group this field belongs to. */
264267 string outputGroup;
265- /* ! \brief String containing the description of the field */
268+ /* ! \brief String containing the description of the field. */
266269 string description;
267270 /* ! \brief Default constructor. */
268- VolumeOutputField () {}
271+ VolumeOutputField () = default ;
269272 /* ! \brief Constructor to initialize all members. */
270- VolumeOutputField (string fieldName_, int offset_, string volumeOutputGroup_, string description_):
271- fieldName (std::move(fieldName_)), offset(std::move(offset_)),
272- outputGroup (std::move(volumeOutputGroup_)), description(std::move(description_)){}
273+ VolumeOutputField (string fieldName_, string volumeOutputGroup_, string description_):
274+ fieldName (std::move(fieldName_)),
275+ outputGroup (std::move(volumeOutputGroup_)),
276+ description (std::move(description_)) {}
273277 };
274278
275279 /* ! \brief Associative map to access data stored in the volume output fields by a string identifier. */
276- std::map<string, VolumeOutputField > volumeOutput_Map;
280+ std::map<string, VolumeOutputField > volumeOutput_Map;
277281 /* ! \brief Vector that contains the keys of the ::volumeOutput_Map in the order of their insertion. */
278- std::vector<string> volumeOutput_List;
279-
280- /* ! \brief Vector to cache the positions of the field in the data array */
281- std::vector<short > fieldIndexCache;
282- /* ! \brief Current value of the cache index */
283- unsigned short cachePosition;
284- /* ! \brief Boolean to store whether the field index cache should be build. */
285- bool buildFieldIndexCache;
286- /* ! \brief Vector to cache the positions of the field in the data array */
287- std::vector<short > fieldGetIndexCache;
288- /* ! \brief Current value of the cache index */
289- unsigned short curGetFieldIndex;
282+ std::vector<string> volumeOutput_List;
283+
284+ /* ! \brief Whether the field index caches should be build. */
285+ bool buildFieldIndexCache;
286+
287+ /* ! \brief Vectors to cache the positions of the fields in the data array. */
288+ std::vector<short > fieldIndexCache, fieldIndexCacheCompact;
289+ /* ! \brief Current value of the cache indices. */
290+ unsigned short cachePosition;
291+
292+ /* ! \brief Vector to cache the positions of the field in the data array. */
293+ std::vector<short > fieldGetIndexCache;
294+ /* ! \brief Current value of the cache index. */
295+ unsigned short curGetFieldIndex;
290296
291297 /* ! \brief Requested volume field names in the config file. */
292298 std::vector<string> requestedVolumeFields;
293299 /* ! \brief Number of requested volume field names in the config file. */
294300 unsigned short nRequestedVolumeFields;
295301
302+ /* ! \brief Minimum required volume fields for restart file. */
303+ const std::vector<string> restartVolumeFields = {" COORDINATES" , " SOLUTION" , " SENSITIVITY" , " GRID_VELOCITY" };
304+
296305 /* ----------------------------- Convergence monitoring ----------------------------*/
297306
298307 su2double cauchyValue, /* !< \brief Summed value of the convergence indicator. */
@@ -736,8 +745,9 @@ class COutput {
736745 * \param[in] groupname - The name of the group this field belongs to.
737746 * \param[in] description - Description of the volume field.
738747 */
739- inline void AddVolumeOutput (string name, string field_name, string groupname, string description){
740- volumeOutput_Map[name] = VolumeOutputField (field_name, -1 , groupname, description);
748+ inline void AddVolumeOutput (const string& name, const string& field_name,
749+ const string& group_name, const string& description) {
750+ volumeOutput_Map[name] = VolumeOutputField (field_name, group_name, description);
741751 volumeOutput_List.push_back (name);
742752 }
743753
@@ -959,14 +969,14 @@ class COutput {
959969
960970 /* !
961971 * \brief Sets the turboperformance screen output
962- * \param[in] TurboPerf - Turboperformance class
972+ * \param[in] TurboPerf - Turboperformance class
963973 * \param[in] config - Definition of the particular problem
964974 * \param[in] TimeIter - Index of the current time-step
965975 * \param[in] OuterIter - Index of current outer iteration
966976 * \param[in] InnerIter - Index of current inner iteration
967977 */
968978 inline virtual void SetTurboPerformance_Output (std::shared_ptr<CTurboOutput> TurboPerf, CConfig *config, unsigned long TimeIter, unsigned long OuterIter, unsigned long InnerIter) {}
969-
979+
970980 /* !
971981 * \brief Sets the multizone turboperformacne screen output
972982 * \param[in] TurboStagePerf - Stage turboperformance class
@@ -982,7 +992,7 @@ class COutput {
982992 * \param[in] config - Definition of the particular problem
983993 */
984994 inline virtual void LoadTurboHistoryData (std::shared_ptr<CTurbomachineryStagePerformance> TurboStagePerf, std::shared_ptr<CTurboOutput> TurboPerf, CConfig *config) {}
985-
995+
986996 /* !
987997 * \brief Write the kinematic and thermodynamic variables at each spanwise division
988998 * \param[in] solver - The container hold all solution data
0 commit comments