ansys::dpf::Workflow Class Reference
Last update: 10.07.2023
ansys::dpf::Workflow Class Reference
Group a set of connected operators in order to define a whole data treatment. More...
#include <dpf_api.h>
Public Member Functions | |
Workflow () | |
Workflow (std::string const &workflow_string) | |
Workflow (Client const *const client) | |
Workflow (std::string const &workflow_string, Client const *const client) | |
Workflow (dp_id id, Client const *const client) | |
Workflow (Workflow const &) | |
Workflow (Workflow &&) | |
Workflow & | operator= (Workflow const &) |
Workflow & | operator= (Workflow &&) |
Workflow | getCopy () const |
void | add (Operator &op) |
void | connectWith (Workflow &left_workflow) |
void | connectWith (Workflow &left_workflow, std::map< std::string, std::string > const &connections) |
bool | hasInputPin (std::string const &pin_name) const |
bool | hasOutputPin (std::string const &pin_name) const |
std::vector< std::string > | listInputPins () const |
std::vector< std::string > | listOutputPins () const |
void | nameInputPin (std::string const &pin_name, int operator_input_pin, Operator &op) |
void | nameOutputPin (Operator &op, int operator_output_pin, std::string const &pin_name) |
void | eraseInputPin (std::string const &pin_name) |
void | eraseOutputPin (std::string const &pin_name) |
void | writeToSwf (std::string const &file_path) const |
void | writeToGraphViz (std::string const &file_path) const |
void | writeToJson (std::string &jsonString) const |
void | readFromJson (const std::string &jsonString) |
std::string | writeToString () const |
void | chainWith (const Workflow &wf) |
void | chainWith (const Workflow &wf, const std::pair< std::string, std::string > &in_out_names) |
void | renameInputPin (std::string const &old_pin_name, std::string const &new_pin_name) |
void | renameOutputPin (std::string const &old_pin_name, std::string const &new_pin_name) |
void | loadFromSwf (std::string const &file_path) |
void | generateDerivativeFor (std::string const &output_name, std::string const &symbol_name) |
bool | hasOutputWhenEvaluated (std::string const &pin_name) |
dp_int | numberOfOperators () const |
std::string | operatorNameByIndex (dp_int index) const |
Operator | firstOperator () const |
Operator | lastOperator () const |
Field | getOutputField (std::string const &pin_name) |
FieldsContainer | getOutputFieldsContainer (std::string const &pin_name) |
Scoping | getOutputScoping (std::string const &pin_name) |
ScopingsContainer | getOutputScopingsContainer (std::string const &pin_name) |
MeshesContainer | getOutputMeshesContainer (std::string const &pin_name) |
TimeFreqSupport | getOutputTimeFreqSupport (std::string const &pin_name) |
MeshedRegion | getOutputMeshedRegion (std::string const &pin_name) |
ResultInfo | getOutputResultInfo (std::string const &pin_name) |
Support | getOutputSupport (std::string const &pin_name) |
CyclicSupport | getOutputCyclicSupport (std::string const &pin_name) |
DataSources | getOutputDataSources (std::string const &pin_name) |
Streams | getOutputStreams (std::string const &pin_name) |
PropertyField | getOutputPropertyField (std::string const &pin_namepin_name) |
Unit | getOutputUnit (std::string const &pin_name) |
Workflow | getOutputWorkflow (std::string const &pin_name) |
DataTree | getOutputDataTree (std::string const &pin_name) |
StringField | getOutputStringField (std::string const &pin_name) |
CustomTypeField | getOutputCustomTypeField (std::string const &pin_name) |
dp_int | getOutputInt (std::string const &pin_name) |
dp_double | getOutputDouble (std::string const &pin_name) |
bool | getOutputBool (std::string const &pin_name) |
std::string | getOutputString (std::string const &pin_index) |
Any | getOutputAsAny (std::string const &pin_name) |
DpfVector< int > | getOutputIntVector (std::string const &pin_name) |
DpfVector< double > | getOutputDoubleVector (std::string const &pin_name) |
template<typename DataT > | |
DataT | getCustomOutput (std::string const &pin_name) |
template<typename DataT > | |
DataT | getOutput (std::string const &pin_name) |
Field | getOutputField (std::string const &pin_name, DpfError &error) |
FieldsContainer | getOutputFieldsContainer (std::string const &pin_name, DpfError &error) |
Scoping | getOutputScoping (std::string const &pin_name, DpfError &error) |
ScopingsContainer | getOutputScopingsContainer (std::string const &pin_name, DpfError &error) |
MeshesContainer | getOutputMeshesContainer (std::string const &pin_name, DpfError &error) |
TimeFreqSupport | getOutputTimeFreqSupport (std::string const &pin_name, DpfError &error) |
MeshedRegion | getOutputMeshedRegion (std::string const &pin_name, DpfError &error) |
ResultInfo | getOutputResultInfo (std::string const &pin_name, DpfError &error) |
Support | getOutputSupport (std::string const &pin_name, DpfError &error) |
CyclicSupport | getOutputCyclicSupport (std::string const &pin_name, DpfError &error) |
DataSources | getOutputDataSources (std::string const &pin_name, DpfError &error) |
Streams | getOutputStreams (std::string const &pin_name, DpfError &error) |
PropertyField | getOutputPropertyField (std::string const &pin_name, DpfError &error) |
StringField | getOutputStringField (std::string const &pin_name, DpfError &error) |
CustomTypeField | getOutputCustomTypeField (std::string const &pin_name, DpfError &error) |
Unit | getOutputUnit (std::string const &pin_name, DpfError &error) |
Workflow | getOutputWorkflow (std::string const &pin_name, DpfError &error) |
dp_int | getOutputInt (std::string const &pin_name, DpfError &error) |
dp_double | getOutputDouble (std::string const &pin_name, DpfError &error) |
bool | getOutputBool (std::string const &pin_name, DpfError &error) |
std::string | getOutputString (std::string const &pin_name, DpfError &error) |
DpfVector< int > | getOutputIntVector (std::string const &pin_name, DpfError &error) |
DpfVector< double > | getOutputDoubleVector (std::string const &pin_name, DpfError &error) |
void | connect (std::string const &pin_name, std::string const &f) |
void | connect (std::string const &pin_name, dp_int f) |
void | connect (std::string const &pin_name, bool f) |
void | connect (std::string const &pin_name, dp_double f) |
void | connect (std::string const &pin_name, std::vector< int > const &f) |
void | connect (std::string const &pin_name, std::vector< dp_double > const &f) |
void | connect (std::string const &pin_name, std::vector< std::string > const &f) |
void | connect (std::string const &pin_name, Scoping const &data) |
void | connect (std::string const &pin_name, Field const &f) |
void | connect (std::string const &pin_name, FieldsContainer const &f) |
void | connect (std::string const &pin_name, ScopingsContainer const &f) |
void | connect (std::string const &pin_name, MeshesContainer const &f) |
void | connect (std::string const &pin_name, MeshedRegion const &f) |
void | connect (std::string const &pin_name, PropertyField const &f) |
void | connect (std::string const &pin_name, Support const &f) |
void | connect (std::string const &pin_name, TimeFreqSupport const &f) |
void | connect (std::string const &pin_name, CyclicSupport const &f) |
void | connect (std::string const &pin_name, Workflow const &f) |
void | connect (std::string const &pin_name, DataSources const &f) |
void | connect (std::string const &pin_name, Streams const &f) |
void | connect (std::string const &pin_name, DataTree const &f) |
void | connect (std::string const &pin_name, StringField const &f) |
void | connect (std::string const &pin_name, CustomTypeField const &f) |
void | connect (std::string const &pin_name, LabelSpace const &f) |
void | connect (std::string const &pin_name, Any const &f) |
void | connect (std::string const &pin_name, Operator const &f, dp_index output_pin) |
template<typename DataT > | |
void | connectCustom (std::string const &input_pin, DataT const &d) |
void | connect (std::string const &pin_name, dp_int f, DpfError &error) |
void | connect (std::string const &pin_name, bool f, DpfError &error) |
void | connect (std::string const &pin_name, dp_double f, DpfError &error) |
void | connect (std::string const &pin_name, std::string const &f, DpfError &error) |
void | connect (std::string const &pin_name, std::vector< int > const &f, DpfError &error) |
void | connect (std::string const &pin_name, std::vector< dp_double > const &f, DpfError &error) |
void | connect (std::string const &pin_name, std::vector< std::string > const &f, DpfError &error) |
void | connect (std::string const &pin_name, Scoping const &f, DpfError &error) |
void | connect (std::string const &pin_name, Field const &f, DpfError &error) |
void | connect (std::string const &pin_name, FieldsContainer const &f, DpfError &error) |
void | connect (std::string const &pin_name, ScopingsContainer const &f, DpfError &error) |
void | connect (std::string const &pin_name, MeshesContainer const &f, DpfError &error) |
void | connect (std::string const &pin_name, MeshedRegion const &f, DpfError &error) |
void | connect (std::string const &pin_name, DataSources const &f, DpfError &error) |
void | connect (std::string const &pin_name, Streams const &f, DpfError &error) |
void | connect (std::string const &pin_name, PropertyField const &f, DpfError &error) |
void | connect (std::string const &pin_name, Support const &f, DpfError &error) |
void | connect (std::string const &pin_name, CyclicSupport const &f, DpfError &error) |
void | connect (std::string const &pin_name, TimeFreqSupport const &f, DpfError &error) |
void | connect (std::string const &pin_name, Workflow const &f, DpfError &error) |
void | connect (std::string const &pin_name, DataTree const &f, DpfError &error) |
void | connect (std::string const &pin_name, StringField const &f, DpfError &error) |
void | connect (std::string const &pin_name, CustomTypeField const &f, DpfError &error) |
void | connect (std::string const &pin_name, LabelSpace const &f, DpfError &error) |
void | connect (std::string const &pin_name, Any const &f, DpfError &error) |
void | connect (std::string const &pin_name, Operator const &f, dp_index output_pin, DpfError &error) |
void | discoverAllOperators () |
int | record (std::string const &name, bool transfer_ownership, DpfError &error) |
int | record (std::string const &name, bool transfer_ownership) |
bool | tryReplaceWorkflowInRegistry (int id, std::string const &name, bool transfer_ownership) |
bool | eraseWorkflowFromRegistry () |
Workflow | instantiateOnRemote (ansys::dpf::Client const *const client) const |
Workflow | instantiateOnRemote (std::string const &address, std::string const &protocol) const |
Workflow | instantiateOnRemote (std::string const &ip, int port, std::string const &protocol) const |
dp_id | getRemoteId () const |
std::vector< std::pair< int, ansys::dpf::Operator > > | operatorsForInput (std::string const &input_name) const |
std::pair< int, ansys::dpf::Operator > | operatorForOutput (std::string const &output_name) const |
Public Member Functions inherited from ansys::dpf::DpfTypes | |
virtual bool | empty () const |
virtual std::string | describe () const |
so::API const * | callAPI () const |
bool | isOnCommonAPI () const |
bool | getClient (Client &client) const |
bool | hasBeenMovedLocally () const |
bool | isSameObject (DpfTypes const &rhs) const |
Static Public Member Functions | |
static Workflow | emptyWorkflow () |
Detailed Description
Group a set of connected operators in order to define a whole data treatment.
Operators can be chained together to create workflows. To do so, the user only needs to connect some operator's outputs to an other operator's inputs. With workflows, lazy evaluation is performed, which means that when the last operator's outputs are asked by the user, all the connected operators will also be evaluated (and not before) to compute a given result.
The different operators contained in a workflow can be internally connected together so that the end user doesn't need to be aware of its complexity. The workflow only needs to expose the necessary inputs pin and output pins. For example, a workflow could expose a "time scoping" input pin and a "data sources" input pin and expose a "result" output pin and have very complex routines inside it.
- Examples
- DataApis.cpp.
Constructor & Destructor Documentation
◆ Workflow() [1/5]
ansys::dpf::Workflow::Workflow | ( | ) |
Create a new workflow.
◆ Workflow() [2/5]
ansys::dpf::Workflow::Workflow | ( | std::string const & | workflow_string | ) |
Create a workflow from a string.
- Parameters
-
[in] workflow_string Workflow string definition generated by writeToString().
◆ Workflow() [3/5]
ansys::dpf::Workflow::Workflow | ( | Client const *const | client | ) |
Create a new workflow on a server.
◆ Workflow() [4/5]
ansys::dpf::Workflow::Workflow | ( | std::string const & | workflow_string, |
Client const *const | client | ||
) |
Create a workflow from a string on a server.
- Parameters
-
[in] workflow_string Workflow string definition generated by writeToString().
◆ Workflow() [5/5]
Retrieve an existing instance of Workflow on a server.
Member Function Documentation
◆ add()
void ansys::dpf::Workflow::add | ( | Operator & | op | ) |
◆ chainWith() [1/2]
void ansys::dpf::Workflow::chainWith | ( | const Workflow & | wf | ) |
Append given workflow.
- Parameters
-
[in] wf Workflow to add.
◆ chainWith() [2/2]
void ansys::dpf::Workflow::chainWith | ( | const Workflow & | wf, |
const std::pair< std::string, std::string > & | in_out_names | ||
) |
Append given workflow. Output name is connected to input name of given workflow.
- Parameters
-
[in] wf Workflow to add. [in] in_out_names Pair of input/output names.
◆ connect() [1/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Any const & | f | ||
) |
Connect Any to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Any data.
◆ connect() [2/52]
◆ connect() [3/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
bool | f | ||
) |
Connect boolean to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Boolean data.
◆ connect() [4/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
bool | f, | ||
DpfError & | error | ||
) |
Connect boolean to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Boolean data. [out] error Status of call.
◆ connect() [5/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
CustomTypeField const & | f | ||
) |
Connect CustomTypeField to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f CustomTypeField data.
◆ connect() [6/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
CustomTypeField const & | f, | ||
DpfError & | error | ||
) |
Connect CustomTypeField support to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f CustomTypeField data. [out] error Status of call.
◆ connect() [7/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
CyclicSupport const & | f | ||
) |
Connect CyclicSupport to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Time frequency support data.
◆ connect() [8/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
CyclicSupport const & | f, | ||
DpfError & | error | ||
) |
Connect CyclicSupport to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f CyclicSupport data. [out] error Status of call.
◆ connect() [9/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
DataSources const & | f | ||
) |
Connect data sources to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Data sources data.
◆ connect() [10/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
DataSources const & | f, | ||
DpfError & | error | ||
) |
Connect data sources to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Data sources data. [out] error Status of call.
◆ connect() [11/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
DataTree const & | f | ||
) |
Connect DataTree to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f DataTree data.
◆ connect() [12/52]
◆ connect() [13/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
dp_double | f | ||
) |
Connect double to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Double data.
◆ connect() [14/52]
Connect double to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Double data. [out] error Status of call.
◆ connect() [15/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
dp_int | f | ||
) |
Connect integer to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Integer data.
◆ connect() [16/52]
Connect integer to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Integer data. [out] error Status of call.
◆ connect() [17/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Field const & | f | ||
) |
Connect field to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Field data.
◆ connect() [18/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Field const & | f, | ||
DpfError & | error | ||
) |
Connect field to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Field data. [out] error Status of call.
◆ connect() [19/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
FieldsContainer const & | f | ||
) |
Connect fields container to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Fields container data.
◆ connect() [20/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
FieldsContainer const & | f, | ||
DpfError & | error | ||
) |
Connect fields container to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Fields container data. [out] error Status of call.
◆ connect() [21/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
LabelSpace const & | f | ||
) |
Connect LabelSpace to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f LabelSpace data.
◆ connect() [22/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
LabelSpace const & | f, | ||
DpfError & | error | ||
) |
Connect LabelSpace support to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f LabelSpace data. [out] error Status of call.
◆ connect() [23/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
MeshedRegion const & | f | ||
) |
Connect mesed region to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Meshed region data.
◆ connect() [24/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
MeshedRegion const & | f, | ||
DpfError & | error | ||
) |
Connect meshed region to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Meshed region data. [out] error Status of call.
◆ connect() [25/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
MeshesContainer const & | f | ||
) |
Connect meshes container to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Meshes container data.
◆ connect() [26/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
MeshesContainer const & | f, | ||
DpfError & | error | ||
) |
Connect meshes container to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Meshes container data. [out] error Status of call.
◆ connect() [27/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Operator const & | f, | ||
dp_index | output_pin | ||
) |
Connect operator output pin to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Operator from which to connect output pin. [in] output_pin Output pin.
◆ connect() [28/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Operator const & | f, | ||
dp_index | output_pin, | ||
DpfError & | error | ||
) |
Connect operator output pin to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Operator from which to connect output pin. [in] output_pin Output pin. [out] error Status of call.
◆ connect() [29/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
PropertyField const & | f | ||
) |
Connect property field to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Property field data.
◆ connect() [30/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
PropertyField const & | f, | ||
DpfError & | error | ||
) |
Connect property field to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Property field data. [out] error Status of call.
◆ connect() [31/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Scoping const & | data | ||
) |
Connect Scoping data to input_pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin. [in] data Scoping data to connect to pin.
◆ connect() [32/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Scoping const & | f, | ||
DpfError & | error | ||
) |
Connect scoping to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Scoping data. [out] error Status of call.
◆ connect() [33/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
ScopingsContainer const & | f | ||
) |
Connect scopings container to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Scopings container data.
◆ connect() [34/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
ScopingsContainer const & | f, | ||
DpfError & | error | ||
) |
Connect scopings container to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Scopings container data. [out] error Status of call.
◆ connect() [35/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
std::string const & | f | ||
) |
Connect string to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f String data.
◆ connect() [36/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
std::string const & | f, | ||
DpfError & | error | ||
) |
Connect string to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f String data. [out] error Status of call.
◆ connect() [37/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
std::vector< dp_double > const & | f | ||
) |
Connect vector of doubles to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Vector of doubles data.
◆ connect() [38/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
std::vector< dp_double > const & | f, | ||
DpfError & | error | ||
) |
Connect vector of doubles to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Vector of double data. [out] error Status of call.
◆ connect() [39/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
std::vector< int > const & | f | ||
) |
Connect vector of integers to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Vector of integers data.
◆ connect() [40/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
std::vector< int > const & | f, | ||
DpfError & | error | ||
) |
Connect vector of integers to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Vector of integer data. [out] error Status of call.
◆ connect() [41/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
std::vector< std::string > const & | f | ||
) |
Connect vector of strings to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Vector of strings data.
◆ connect() [42/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
std::vector< std::string > const & | f, | ||
DpfError & | error | ||
) |
Connect vector of strings to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Vector of string data. [out] error Status of call.
◆ connect() [43/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Streams const & | f | ||
) |
Connect Streams to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Streams data.
◆ connect() [44/52]
◆ connect() [45/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
StringField const & | f | ||
) |
Connect StringField to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f StringField data.
◆ connect() [46/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
StringField const & | f, | ||
DpfError & | error | ||
) |
Connect StringField support to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f StringField data. [out] error Status of call.
◆ connect() [47/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Support const & | f | ||
) |
Connect support to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Support data.
◆ connect() [48/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Support const & | f, | ||
DpfError & | error | ||
) |
Connect support to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Support data. [out] error Status of call.
◆ connect() [49/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
TimeFreqSupport const & | f | ||
) |
Connect time frequency support to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Time frequency support data.
◆ connect() [50/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
TimeFreqSupport const & | f, | ||
DpfError & | error | ||
) |
Connect timefrequency support to input pin.
- Parameters
-
[in] pin_name Input pin name. [in] f Time frequency support data. [out] error Status of call.
◆ connect() [51/52]
void ansys::dpf::Workflow::connect | ( | std::string const & | pin_name, |
Workflow const & | f | ||
) |
Connect Workflow to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] pin_name Input pin name. [in] f Workflow data.
◆ connect() [52/52]
◆ connectCustom()
|
inline |
Connect typed data to input pin.
- Exceptions
-
DpfException
- Parameters
-
[in] input_pin Input pin name. d {in] Typed data
◆ connectWith() [1/2]
void ansys::dpf::Workflow::connectWith | ( | Workflow & | left_workflow | ) |
connect left_worflow to this workflow with matching input/output names.
- Parameters
-
[in] left_workflow Workflow to add.
◆ connectWith() [2/2]
void ansys::dpf::Workflow::connectWith | ( | Workflow & | left_workflow, |
std::map< std::string, std::string > const & | connections | ||
) |
connect left_worflow to this workflow with specified connections (out->in).
- Parameters
-
[in] left_workflow Workflow to add. [in] connections Connections map (out to in).
◆ discoverAllOperators()
void ansys::dpf::Workflow::discoverAllOperators | ( | ) |
Using operator's connectivity, discover all operators contained in the workflow and add them inside.
◆ emptyWorkflow()
|
static |
Create an empty workflow.
- Returns
- Empty Workflow.
◆ eraseInputPin()
void ansys::dpf::Workflow::eraseInputPin | ( | std::string const & | pin_name | ) |
Removes an exposed pin.
- Parameters
-
[in] pin_name Pin name.
◆ eraseOutputPin()
void ansys::dpf::Workflow::eraseOutputPin | ( | std::string const & | pin_name | ) |
Removes an exposed pin.
- Parameters
-
[in] pin_name Pin name.
◆ firstOperator()
Operator ansys::dpf::Workflow::firstOperator | ( | ) | const |
- Returns
- First operator in workflow chain.
◆ getCopy()
Workflow ansys::dpf::Workflow::getCopy | ( | ) | const |
- Returns
- Copy of workflow.
◆ getCustomOutput()
|
inline |
- Returns
- Custom result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutput()
DataT ansys::dpf::Workflow::getOutput | ( | std::string const & | pin_name | ) |
- Returns
- Typed result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputAsAny()
Any ansys::dpf::Workflow::getOutputAsAny | ( | std::string const & | pin_name | ) |
- Returns
- Any result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputBool() [1/2]
bool ansys::dpf::Workflow::getOutputBool | ( | std::string const & | pin_name | ) |
- Returns
- Boolean result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputBool() [2/2]
bool ansys::dpf::Workflow::getOutputBool | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Boolean result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputCustomTypeField() [1/2]
CustomTypeField ansys::dpf::Workflow::getOutputCustomTypeField | ( | std::string const & | pin_name | ) |
- Returns
- CustomTypeField result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputCustomTypeField() [2/2]
CustomTypeField ansys::dpf::Workflow::getOutputCustomTypeField | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- CustomTypeField result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputCyclicSupport() [1/2]
CyclicSupport ansys::dpf::Workflow::getOutputCyclicSupport | ( | std::string const & | pin_name | ) |
- Returns
- CyclicSupport result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputCyclicSupport() [2/2]
CyclicSupport ansys::dpf::Workflow::getOutputCyclicSupport | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- CyclicSupport result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputDataSources() [1/2]
DataSources ansys::dpf::Workflow::getOutputDataSources | ( | std::string const & | pin_name | ) |
- Returns
- Data sources result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputDataSources() [2/2]
DataSources ansys::dpf::Workflow::getOutputDataSources | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Data sources result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputDataTree()
DataTree ansys::dpf::Workflow::getOutputDataTree | ( | std::string const & | pin_name | ) |
- Returns
- DataTree result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputDouble() [1/2]
dp_double ansys::dpf::Workflow::getOutputDouble | ( | std::string const & | pin_name | ) |
- Returns
- Double result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputDouble() [2/2]
- Returns
- Double result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputDoubleVector() [1/2]
DpfVector< double > ansys::dpf::Workflow::getOutputDoubleVector | ( | std::string const & | pin_name | ) |
- Returns
- Doubles vector result as DpfVector for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputDoubleVector() [2/2]
DpfVector< double > ansys::dpf::Workflow::getOutputDoubleVector | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Doubles vector result as DpfVector for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputField() [1/2]
Field ansys::dpf::Workflow::getOutputField | ( | std::string const & | pin_name | ) |
- Returns
- Field result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputField() [2/2]
- Returns
- Field result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputFieldsContainer() [1/2]
FieldsContainer ansys::dpf::Workflow::getOutputFieldsContainer | ( | std::string const & | pin_name | ) |
- Returns
- Fields container result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
- Examples
- DataApis.cpp.
◆ getOutputFieldsContainer() [2/2]
FieldsContainer ansys::dpf::Workflow::getOutputFieldsContainer | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Fields container result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputInt() [1/2]
dp_int ansys::dpf::Workflow::getOutputInt | ( | std::string const & | pin_name | ) |
- Returns
- Integer result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputInt() [2/2]
- Returns
- Integer result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputIntVector() [1/2]
DpfVector< int > ansys::dpf::Workflow::getOutputIntVector | ( | std::string const & | pin_name | ) |
- Returns
- Integers vector result as DpfVector for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputIntVector() [2/2]
DpfVector< int > ansys::dpf::Workflow::getOutputIntVector | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Integers vector result as DpfVector for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputMeshedRegion() [1/2]
MeshedRegion ansys::dpf::Workflow::getOutputMeshedRegion | ( | std::string const & | pin_name | ) |
- Returns
- Meshed region result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputMeshedRegion() [2/2]
MeshedRegion ansys::dpf::Workflow::getOutputMeshedRegion | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Meshed region result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputMeshesContainer() [1/2]
MeshesContainer ansys::dpf::Workflow::getOutputMeshesContainer | ( | std::string const & | pin_name | ) |
- Returns
- Meshes container result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputMeshesContainer() [2/2]
MeshesContainer ansys::dpf::Workflow::getOutputMeshesContainer | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Meshes container result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputPropertyField() [1/2]
PropertyField ansys::dpf::Workflow::getOutputPropertyField | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Property field result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputPropertyField() [2/2]
PropertyField ansys::dpf::Workflow::getOutputPropertyField | ( | std::string const & | pin_namepin_name | ) |
- Returns
- Property field result for given output pin.
- Parameters
-
[in] pin_namepin_name Output pin name.
◆ getOutputResultInfo() [1/2]
ResultInfo ansys::dpf::Workflow::getOutputResultInfo | ( | std::string const & | pin_name | ) |
- Returns
- Result information result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputResultInfo() [2/2]
ResultInfo ansys::dpf::Workflow::getOutputResultInfo | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Result information result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputScoping() [1/2]
Scoping ansys::dpf::Workflow::getOutputScoping | ( | std::string const & | pin_name | ) |
- Returns
- Scoping result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputScoping() [2/2]
- Returns
- Scoping result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputScopingsContainer() [1/2]
ScopingsContainer ansys::dpf::Workflow::getOutputScopingsContainer | ( | std::string const & | pin_name | ) |
- Returns
- Scopings container result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputScopingsContainer() [2/2]
ScopingsContainer ansys::dpf::Workflow::getOutputScopingsContainer | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Scopings container result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputStreams() [1/2]
Streams ansys::dpf::Workflow::getOutputStreams | ( | std::string const & | pin_name | ) |
- Returns
- Streams result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputStreams() [2/2]
- Returns
- Streams result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputString() [1/2]
std::string ansys::dpf::Workflow::getOutputString | ( | std::string const & | pin_index | ) |
- Returns
- String result for given output pin.
- Parameters
-
[in] pin_index Output pin name.
◆ getOutputString() [2/2]
std::string ansys::dpf::Workflow::getOutputString | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- String result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputStringField() [1/2]
StringField ansys::dpf::Workflow::getOutputStringField | ( | std::string const & | pin_name | ) |
- Returns
- StringField result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputStringField() [2/2]
StringField ansys::dpf::Workflow::getOutputStringField | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- StringField result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputSupport() [1/2]
Support ansys::dpf::Workflow::getOutputSupport | ( | std::string const & | pin_name | ) |
- Returns
- Support result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputSupport() [2/2]
- Returns
- Support result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputTimeFreqSupport() [1/2]
TimeFreqSupport ansys::dpf::Workflow::getOutputTimeFreqSupport | ( | std::string const & | pin_name | ) |
- Returns
- Time frequency support result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputTimeFreqSupport() [2/2]
TimeFreqSupport ansys::dpf::Workflow::getOutputTimeFreqSupport | ( | std::string const & | pin_name, |
DpfError & | error | ||
) |
- Returns
- Time frequency support result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputUnit() [1/2]
Unit ansys::dpf::Workflow::getOutputUnit | ( | std::string const & | pin_name | ) |
- Returns
- Unit result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputUnit() [2/2]
- Returns
- Unit result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getOutputWorkflow() [1/2]
Workflow ansys::dpf::Workflow::getOutputWorkflow | ( | std::string const & | pin_name | ) |
- Returns
- Workflow result for given output pin.
- Parameters
-
[in] pin_name Output pin name.
◆ getOutputWorkflow() [2/2]
- Returns
- Workflow result for given output pin.
- Parameters
-
[in] pin_name Output pin name. [out] error Status of call.
◆ getRemoteId()
dp_id ansys::dpf::Workflow::getRemoteId | ( | ) | const |
If the workflow is remote, returns its Id on the server.
◆ hasInputPin()
bool ansys::dpf::Workflow::hasInputPin | ( | std::string const & | pin_name | ) | const |
- Returns
- Indication of existence of given input pin.
- Parameters
-
[in] pin_name Name of pin for which to check existence.
◆ hasOutputPin()
bool ansys::dpf::Workflow::hasOutputPin | ( | std::string const & | pin_name | ) | const |
- Returns
- Indication of existence of given output pin.
- Parameters
-
[in] pin_name Name of in for which to check existence.
◆ hasOutputWhenEvaluated()
bool ansys::dpf::Workflow::hasOutputWhenEvaluated | ( | std::string const & | pin_name | ) |
- Returns
- Indication of existence of output pin when workflow evaluated.
- Parameters
-
[in] pin_name Name of output pin to check existence.
◆ instantiateOnRemote() [1/3]
Workflow ansys::dpf::Workflow::instantiateOnRemote | ( | ansys::dpf::Client const *const | client | ) | const |
Make a copy of the workflow (with writeToString) on a server.
- Parameters
-
[in] client Client instance designating the IP, port and protocol to use.
◆ instantiateOnRemote() [2/3]
Workflow ansys::dpf::Workflow::instantiateOnRemote | ( | std::string const & | address, |
std::string const & | protocol | ||
) | const |
Asks the server to make a copy of the workflow (with writeToString) on a server address.
- Parameters
-
[in] address address of the server (ip:port). [in] protocol servers protocol (ex: 'grpc').
◆ instantiateOnRemote() [3/3]
Workflow ansys::dpf::Workflow::instantiateOnRemote | ( | std::string const & | ip, |
int | port, | ||
std::string const & | protocol | ||
) | const |
Asks the server to make a copy of the workflow (with writeToString) on a server address.
- Parameters
-
[in] ip ip address of the server. [in] port port of the server. [in] protocol servers protocol (ex: 'grpc').
◆ lastOperator()
Operator ansys::dpf::Workflow::lastOperator | ( | ) | const |
- Returns
- last operator in workflow chain.
◆ listInputPins()
std::vector< std::string > ansys::dpf::Workflow::listInputPins | ( | ) | const |
- Returns
- Vector of input pin names.
◆ listOutputPins()
std::vector< std::string > ansys::dpf::Workflow::listOutputPins | ( | ) | const |
- Returns
- Vector of output pin names.
◆ loadFromSwf()
void ansys::dpf::Workflow::loadFromSwf | ( | std::string const & | file_path | ) |
Load workflow from given file.
- Parameters
-
[in] file_path Name of file from which to read workflow.
◆ nameInputPin()
void ansys::dpf::Workflow::nameInputPin | ( | std::string const & | pin_name, |
int | operator_input_pin, | ||
Operator & | op | ||
) |
Add an input name to given pin of operator.
- Parameters
-
[in] pin_name Pin name. [in] operator_input_pin Input pin. [in] op Operator to which to add pin name.
- Examples
- DataApis.cpp.
◆ nameOutputPin()
void ansys::dpf::Workflow::nameOutputPin | ( | Operator & | op, |
int | operator_output_pin, | ||
std::string const & | pin_name | ||
) |
Add an output name to given pin of operator.
- Parameters
-
[in] op Operator to which to add pin name. [in] operator_output_pin Output pin. [in] pin_name Pin name.
- Examples
- DataApis.cpp.
◆ numberOfOperators()
dp_int ansys::dpf::Workflow::numberOfOperators | ( | ) | const |
- Returns
- Number of operators in workflow chain.
◆ operatorForOutput()
std::pair< int, ansys::dpf::Operator > ansys::dpf::Workflow::operatorForOutput | ( | std::string const & | output_name | ) | const |
get the Operator and their exposed output pin number for a given exposed output pin name.
- Parameters
-
[in] output_name pin_name
◆ operatorNameByIndex()
std::string ansys::dpf::Workflow::operatorNameByIndex | ( | dp_int | index | ) | const |
- Returns
- Operator name by index in workflow chain.
◆ operatorsForInput()
std::vector< std::pair< int, ansys::dpf::Operator > > ansys::dpf::Workflow::operatorsForInput | ( | std::string const & | input_name | ) | const |
get the list of Operator s and their exposed input pin number for a given exposed input pin name.
- Parameters
-
[in] input_name pin_name
◆ readFromJson()
void ansys::dpf::Workflow::readFromJson | ( | const std::string & | jsonString | ) |
load workflow from string in a json format.
◆ renameInputPin()
void ansys::dpf::Workflow::renameInputPin | ( | std::string const & | old_pin_name, |
std::string const & | new_pin_name | ||
) |
Rename input pin with given name to new name.
- Parameters
-
[in] old_pin_name Name of pin to rename. [in] new_pin_name New pin name.
◆ renameOutputPin()
void ansys::dpf::Workflow::renameOutputPin | ( | std::string const & | old_pin_name, |
std::string const & | new_pin_name | ||
) |
Rename output pin with given name to new name.
- Parameters
-
[in] old_pin_name Name of pin to rename. [in] new_pin_name New pin name.
◆ writeToGraphViz()
void ansys::dpf::Workflow::writeToGraphViz | ( | std::string const & | file_path | ) | const |
Write workflow to given file, in a graphViz format.
- Parameters
-
[in] file_path Name of file to which to write workflow.
◆ writeToJson()
void ansys::dpf::Workflow::writeToJson | ( | std::string & | jsonString | ) | const |
Write workflow to string in a json format.
◆ writeToString()
std::string ansys::dpf::Workflow::writeToString | ( | ) | const |
Write workflow to text.
◆ writeToSwf()
void ansys::dpf::Workflow::writeToSwf | ( | std::string const & | file_path | ) | const |
Write workflow to given file, in a DataProcessing format.
- Parameters
-
[in] file_path Name of file to which to write workflow.