Skip to main content

Common Fluids Format 2024 R1

Simulation

Last update: 16.07.2025
1#ifndef CFFSDK_PROJECT_SIMULATION_H
2#define CFFSDK_PROJECT_SIMULATION_H
3
4#include "Project/LibraryType.hpp"
5#include "Project/Iterator.hpp"
6#include "Project/Run.hpp"
7#include "Project/RunGroup.hpp"
8#include "Project/SimBase.hpp"
9
10namespace ansys {
11namespace Project {
12
13class Metadata;
14
15class ANSYS_PROJECT_DLL Simulation : public SimBase
16{
17public:
18 Simulation(Iterator pIter);
19 virtual ~Simulation() {};
20
21 virtual Error isValid() const;
22
23 // SimBase implements: ok, getName, Meta, Input functions
24 // getCase, setMainDataType
25
26 Iterator getData();
27 Iterator getResult(const std::string& pDataType);
28
29 // Runs
30 Run newRun(std::string pName,Run::RunOutputType pType);
31 Run newRunInFolder(std::string pName,Run::RunOutputType pType,Iterator pFolder);
32 Iterator getRun(const std::string& pName) const;
33 std::vector<std::string> getRuns() const;
34 Error removeRun(const std::string& pName,bool pFlagErase);
35
36 // Run Group
37 RunGroup newRunGroup(std::string pName,Run::RunOutputType pType);
38 RunGroup getRunGroup(const std::string& pName) const;
39 std::vector<std::string> getRunGroups() const;
40 Error removeRunGroup(const std::string& pName,bool pFlagEraseRuns);
41
42 void newLink(const std::string pKey,
43 const Iterator& pIter);
44 Iterator getLink(const std::string pKey);
45 bool hasLink(const std::string pKey);
46
47 static bool isSimulation(const Iterator& pIter);
48
49 void setCurrentRun(Iterator pRun);
50 Iterator getCurrentRun() const;
51protected:
52 std::vector<std::string> getListOfSubclass(const std::string& pSubclass) const;
53};
54
55}
56}
57
58#endif // CFFSDK_PROJECT_SIMULATION_H
The return state / error value of a Project function call.
Definition: Error.hpp:11
Pointer to a project location.
Definition: Iterator.hpp:20
Optional concept - Virtual folder with a list of Run.
Definition: RunGroup.hpp:17
Subfolder of a Simulation, regrouping Output/Result for a step.
Definition: Run.hpp:18
Base class for Run and Simulation - shared functions.
Definition: SimBase.hpp:13
Subfolder of a Project, regrouping input files and Run subfolders.
Definition: Simulation.hpp:16
Definition: API.dox:1

Connect with Ansys