ansys::Project::Output Class Reference
Last update: 24.03.2026Subfolder of a Run, regrouping Results for a step. More...
#include "Output.hpp"

Public Member Functions | |
| Output (Iterator pIter) | |
| Constructor from Iterator. More... | |
| virtual | ~Output () |
| bool | ok () const |
| Indicates if the Iterator is valid and of correct subclass. More... | |
| virtual Error | isValid () const |
| Returns error with message if invalid. More... | |
| bool | operator== (const Output &pObj) const |
| bool | operator!= (const Output &pObj) const |
| void | setCase (Iterator pIter) |
| Assign the case used/shared by results of this output, as link. More... | |
| Iterator | getCase () const |
| Return the case link, if any. More... | |
| Iterator | getInputByType (const std::string &pType) const |
| Search the metadata links for the specified file type. More... | |
| Iterator | newResult (const URL &pFileLocation, const std::string &pName, const std::string &pType, const std::string &pSubtype) |
| Create a Result object in the current Output folder. More... | |
| std::vector< Iterator > | getResultIterators (const std::string &pType, const std::string &pSubtype) const |
| Return the list of results in the current Output, as a vector of Iterator. More... | |
| std::vector< Result > | getResults (const std::string &pType, const std::string &pSubtype) const |
| Return the list of results in the current Output, as a vector of Result. More... | |
| Iterator | getData () |
| Returns the main data file for this Output. More... | |
| Iterator | getResult (const std::string &pDataType) |
| Returns the enclosed Result with the specified subtype. More... | |
| virtual bool | hasValue (const std::string &pVar, bool pFlagInherited) const |
| Search the metadata (local and inherited) for the specified key. More... | |
| Iterator | getValueIter (const std::string &pVar) const |
| Search the metadata (local and inherited) for the specified metadata link and return the value as an iterator. More... | |
| virtual std::string | getValue (const std::string &pVar, bool pFlagInherited) const |
| Search the metadata (local and inherited) for the specified key and return the value as string. More... | |
| virtual int | getValueInt (const std::string &pVar, bool pFlagInherited) const |
| Search the metadata (local and inherited) for the specified key and return the value as integer. More... | |
| virtual double | getValueDouble (const std::string &pVar, bool pFlagInherited) const |
| Search the metadata (local and inherited) for the specified key and return the value as double. More... | |
| virtual MetaVariableType | getValueType (const std::string &pVar, bool pFlagInherited) const |
| Search the metadata (local and inherited) for the specified key and return the its data type. More... | |
| virtual void | setValue (const std::string &pVar, const std::string &pValue) |
| Sets the local metadata to the specified key/value. More... | |
| virtual void | setValueInt (const std::string &pVar, int pValue) |
| Sets the local metadata to the specified key/value. More... | |
| virtual void | setValueDouble (const std::string &pVar, double pValue) |
| Sets the local metadata to the specified key/value. More... | |
| void | setValue (const std::string &pVar, int pValue) |
| void | setValue (const std::string &pVar, double pValue) |
| void | setTransparent (bool pHide) |
| Set the Output visible or invisible (transparent) in the project viewer. More... | |
| Iterator | getIterator () const |
| Returns the Iterator for this Output. More... | |
| operator Iterator () const | |
| void | setRunStatus (RunStatus pStatus) |
| Set the RunStatus state for this Output. More... | |
| RunStatus | getRunStatus () const |
| Returns the RunStatus state for this Output. See setRunStatus() More... | |
Public Member Functions inherited from ansys::Project::RunOutputAttr | |
| virtual | ~RunOutputAttr () |
| std::vector< std::string > | getValues (const std::vector< std::string > &pVars, bool pFlagInherited) const |
| Returns the values for a list of variables. More... | |
| int | getIndex () const |
| Returns the output index (incremental id in a run) - always available. More... | |
| int | getSolverIteration () const |
| Returns the number of solver iterations (if available) More... | |
| double | getTime () const |
| Returns the transient time value (if available) More... | |
| void | setIndex (int pValue) |
| Changes the specified variable. More... | |
| void | setSolverIteration (int pValue) |
| Changes the specified variable. More... | |
| void | setTime (double pValue) |
| Changes the specified variable. More... | |
| double | getCrankAngle () const |
| Returns the specified variable (if available) More... | |
| void | setCrankAngle (double pValue) |
| Changes the specified variable. More... | |
| int | getCaseId () const |
| Returns the specified variable (if available) More... | |
| int | getInputSettingsId () const |
| Returns the specified variable (if available) More... | |
| int | getDomainTransformationId () const |
| Returns the specified variable (if available) More... | |
| int | getPhysicsId () const |
| Returns the specified variable (if available) More... | |
| int | getOutputSettingsId () const |
| Returns the specified variable (if available) More... | |
| int | getMeshId () const |
| Returns the specified variable (if available) More... | |
| int | getTopologyId () const |
| Returns the specified variable (if available) More... | |
| int | getConnectivityId () const |
| Returns the specified variable (if available) More... | |
| int | getCoordinatesId () const |
| Returns the specified variable (if available) More... | |
| int | getLocationId () const |
| Returns the specified variable (if available) More... | |
| void | setCaseId (int pValue) |
| Changes the specified variable. More... | |
| void | setInputSettingsId (int pValue) |
| Changes the specified variable. More... | |
| void | setDomainTransformationId (int pValue) |
| Changes the specified variable. More... | |
| void | setPhysicsId (int pValue) |
| Changes the specified variable. More... | |
| void | setOutputSettingsId (int pValue) |
| Changes the specified variable. More... | |
| void | setMeshId (int pValue) |
| Changes the specified variable. More... | |
| void | setTopologyId (int pValue) |
| Changes the specified variable. More... | |
| void | setConnectivityId (int pValue) |
| Changes the specified variable. More... | |
| void | setCoordinatesId (int pValue) |
| Changes the specified variable. More... | |
| void | setLocationId (int pValue) |
| Changes the specified variable. More... | |
| Iterator | getFirstIteratorForCurrentCaseId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrentPhysicsId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrentInputSettingsId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrentDomainTransformationId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrentMeshId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrentTopologyId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrentConnectivityId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrentCoordinatesId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrentLocationId () const |
| See getFirstIterator(const std::string&) More... | |
| Iterator | getFirstIteratorForCurrent (const std::string &pVar) const |
| Return the first entry in the current Run, with same variable value. More... | |
Protected Attributes | |
| Iterator | aIter |
Additional Inherited Members | |
Static Public Attributes inherited from ansys::Project::RunOutputAttr | |
| static const std::string | sVarTime |
| static const std::string | sVarSolverIteration |
| static const std::string | sVarIndex |
| static const std::string | sVarCrankAngle |
| static const std::string | sVarCaseId |
| static const std::string | sVarInputSettingsId |
| static const std::string | sVarDomainTransformationId |
| static const std::string | sVarPhysicsId |
| static const std::string | sVarOutputSettingsId |
| static const std::string | sVarMeshId |
| static const std::string | sVarTopologyId |
| static const std::string | sVarConnectivityId |
| static const std::string | sVarCoordinatesId |
| static const std::string | sVarLocationId |
Detailed Description
Subfolder of a Run, regrouping Results for a step.
In a Run, one or multiple Output are to be created, to store the results. Depending of the Run type (transient, parametric, steady...) the Output will have Metatada assigned accordinly (time step, variable value, iteration, etc.)
Subclass of Iterator, can be constructed from an Iterator, the Output is ok() only if the provided iterator is of the appropriate subclass.
Iterator it = prj.get("/Sim1/Run1/out1/");
Output out(it);
out.ok()
The Output regroups a set of Results in a subfolder (can be project-only and not a true folder in the storage filesystem) Metadata attributes assigned to the Output will be inherited by all underlying Results.
Sample workflow, for transient
Output o = run.newOutput("")
o.setTime(0.);
o.newResult("out.00000001.dat","","Result","fluent-dat");
o = run.newOutput("")
o.setTime(0.1);
o.newResult("out.00000002.dat","","Result","fluent-dat");
Constructor & Destructor Documentation
◆ Output()
| ansys::Project::Output::Output | ( | Iterator | pIter | ) |
◆ ~Output()
|
inlinevirtual |
Member Function Documentation
◆ getCase()
| Iterator ansys::Project::Output::getCase | ( | ) | const |
Return the case link, if any.
If not defined at this level, the parent Run or Simulation are searched for such a Case link.
◆ getData()
| Iterator ansys::Project::Output::getData | ( | ) |
Returns the main data file for this Output.
The main data file is registered at the Run or Simulation level, as the SimBase::setMainDataType(const std::string&), the Output folder is searched for a Result matching this type.
◆ getInputByType()
| Iterator ansys::Project::Output::getInputByType | ( | const std::string & | pType | ) | const |
Search the metadata links for the specified file type.
Links are stored in Output as metadata, in Simulation and Run they are stored as an Input/ subfolder entry
◆ getIterator()
|
virtual |
Returns the Iterator for this Output.
Implements ansys::Project::RunOutputAttr.
◆ getResult()
| Iterator ansys::Project::Output::getResult | ( | const std::string & | pDataType | ) |
Returns the enclosed Result with the specified subtype.
◆ getResultIterators()
| std::vector< Iterator > ansys::Project::Output::getResultIterators | ( | const std::string & | pType, |
| const std::string & | pSubtype | ||
| ) | const |
◆ getResults()
| std::vector< Result > ansys::Project::Output::getResults | ( | const std::string & | pType, |
| const std::string & | pSubtype | ||
| ) | const |
◆ getRunStatus()
| RunStatus ansys::Project::Output::getRunStatus | ( | ) | const |
Returns the RunStatus state for this Output. See setRunStatus()
◆ getValue()
|
virtual |
Search the metadata (local and inherited) for the specified key and return the value as string.
- Parameters
-
pFlagInherited : If true, the parent Run/Simulation are searched for the metadata entry, if not defined locally
Implements ansys::Project::RunOutputAttr.
◆ getValueDouble()
|
virtual |
Search the metadata (local and inherited) for the specified key and return the value as double.
- Parameters
-
pFlagInherited : If true, the parent Run/Simulation are searched for the metadata entry, if not defined locally
Implements ansys::Project::RunOutputAttr.
◆ getValueInt()
|
virtual |
Search the metadata (local and inherited) for the specified key and return the value as integer.
- Parameters
-
pFlagInherited : If true, the parent Run/Simulation are searched for the metadata entry, if not defined locally
Implements ansys::Project::RunOutputAttr.
◆ getValueIter()
| Iterator ansys::Project::Output::getValueIter | ( | const std::string & | pVar | ) | const |
Search the metadata (local and inherited) for the specified metadata link and return the value as an iterator.
- Parameters
-
pFlagInherited : If true, the parent Run/Simulation are searched for the metadata entry, if not defined locally
◆ getValueType()
|
virtual |
Search the metadata (local and inherited) for the specified key and return the its data type.
- Parameters
-
pFlagInherited : If true, the parent Run/Simulation are searched for the metadata entry, if not defined locally
Implements ansys::Project::RunOutputAttr.
◆ hasValue()
|
virtual |
Search the metadata (local and inherited) for the specified key.
- Parameters
-
pFlagInherited : If true, the parent Run/Simulation are searched for the metadata entry, if not defined locally
Implements ansys::Project::RunOutputAttr.
◆ isValid()
|
virtual |
Returns error with message if invalid.
◆ newResult()
| Iterator ansys::Project::Output::newResult | ( | const URL & | pFileLocation, |
| const std::string & | pName, | ||
| const std::string & | pType, | ||
| const std::string & | pSubtype | ||
| ) |
Create a Result object in the current Output folder.
The newResult operation creates a file reference to a specified URL
- Parameters
-
pFileLocation : URL of the Result file, if a relative path it is assumed to be created in the Output folder location (typically the Run folder) pName : Name of the project file, use "" to use same name as the URL filename pType : Type of the file, typically: Result or Case will be stored in the DataType metadata entry pSubType : Format specifier for the file type, for example fluent-dat , fsp-soln will be stored in the {pType}Type metadata entry
◆ ok()
| bool ansys::Project::Output::ok | ( | ) | const |
Indicates if the Iterator is valid and of correct subclass.
◆ operator Iterator()
|
inline |
◆ operator!=()
|
inline |
◆ operator==()
|
inline |
◆ setCase()
| void ansys::Project::Output::setCase | ( | Iterator | pIter | ) |
Assign the case used/shared by results of this output, as link.
◆ setRunStatus()
| void ansys::Project::Output::setRunStatus | ( | RunStatus | pStatus | ) |
◆ setTransparent()
| void ansys::Project::Output::setTransparent | ( | bool | pHide | ) |
Set the Output visible or invisible (transparent) in the project viewer.
◆ setValue() [1/3]
|
virtual |
Sets the local metadata to the specified key/value.
Implements ansys::Project::RunOutputAttr.
◆ setValue() [2/3]
|
inline |
◆ setValue() [3/3]
|
inline |
◆ setValueDouble()
|
virtual |
Sets the local metadata to the specified key/value.
Implements ansys::Project::RunOutputAttr.
◆ setValueInt()
|
virtual |
Sets the local metadata to the specified key/value.
Implements ansys::Project::RunOutputAttr.
Member Data Documentation
◆ aIter
|
protected |
Public Member Functions inherited from