Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::Workflow Class Reference

Last update: 10.07.2023

Group a set of connected operators in order to define a whole data treatment. More...

#include <dpf_api.h>

Inheritance diagram for ansys::dpf::Workflow:
ansys::dpf::DpfTypes

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 &&)
 
Workflowoperator= (Workflow const &)
 
Workflowoperator= (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::OperatoroperatorForOutput (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_stringWorkflow 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_stringWorkflow string definition generated by writeToString().

◆ Workflow() [5/5]

ansys::dpf::Workflow::Workflow ( dp_id  id,
Client const *const  client 
)

Retrieve an existing instance of Workflow on a server.

Member Function Documentation

◆ add()

void ansys::dpf::Workflow::add ( Operator op)

Add operator to workflow.

Parameters
[in]opOperator to add.
Examples
DataApis.cpp.

◆ chainWith() [1/2]

void ansys::dpf::Workflow::chainWith ( const Workflow wf)

Append given workflow.

Parameters
[in]wfWorkflow 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]wfWorkflow to add.
[in]in_out_namesPair 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_nameInput pin name.
[in]fAny data.

◆ connect() [2/52]

void ansys::dpf::Workflow::connect ( std::string const &  pin_name,
Any const &  f,
DpfError error 
)

Connect Any support to input pin.

Parameters
[in]pin_nameInput pin name.
[in]fWorkflow Any data.
[out]errorStatus of call.

◆ 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_nameInput pin name.
[in]fBoolean 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_nameInput pin name.
[in]fBoolean data.
[out]errorStatus 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_nameInput pin name.
[in]fCustomTypeField 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_nameInput pin name.
[in]fCustomTypeField data.
[out]errorStatus 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_nameInput pin name.
[in]fTime 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_nameInput pin name.
[in]fCyclicSupport data.
[out]errorStatus 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_nameInput pin name.
[in]fData 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_nameInput pin name.
[in]fData sources data.
[out]errorStatus 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_nameInput pin name.
[in]fDataTree data.

◆ connect() [12/52]

void ansys::dpf::Workflow::connect ( std::string const &  pin_name,
DataTree const &  f,
DpfError error 
)

Connect DataTree support to input pin.

Parameters
[in]pin_nameInput pin name.
[in]fDataTree support data.
[out]errorStatus of call.

◆ 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_nameInput pin name.
[in]fDouble data.

◆ connect() [14/52]

void ansys::dpf::Workflow::connect ( std::string const &  pin_name,
dp_double  f,
DpfError error 
)

Connect double to input pin.

Parameters
[in]pin_nameInput pin name.
[in]fDouble data.
[out]errorStatus 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_nameInput pin name.
[in]fInteger data.

◆ connect() [16/52]

void ansys::dpf::Workflow::connect ( std::string const &  pin_name,
dp_int  f,
DpfError error 
)

Connect integer to input pin.

Parameters
[in]pin_nameInput pin name.
[in]fInteger data.
[out]errorStatus 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_nameInput pin name.
[in]fField 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_nameInput pin name.
[in]fField data.
[out]errorStatus 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_nameInput pin name.
[in]fFields 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_nameInput pin name.
[in]fFields container data.
[out]errorStatus 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_nameInput pin name.
[in]fLabelSpace 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_nameInput pin name.
[in]fLabelSpace data.
[out]errorStatus 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_nameInput pin name.
[in]fMeshed 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_nameInput pin name.
[in]fMeshed region data.
[out]errorStatus 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_nameInput pin name.
[in]fMeshes 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_nameInput pin name.
[in]fMeshes container data.
[out]errorStatus 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_nameInput pin name.
[in]fOperator from which to connect output pin.
[in]output_pinOutput 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_nameInput pin name.
[in]fOperator from which to connect output pin.
[in]output_pinOutput pin.
[out]errorStatus 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_nameInput pin name.
[in]fProperty 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_nameInput pin name.
[in]fProperty field data.
[out]errorStatus 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_nameInput pin.
[in]dataScoping 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_nameInput pin name.
[in]fScoping data.
[out]errorStatus 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_nameInput pin name.
[in]fScopings 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_nameInput pin name.
[in]fScopings container data.
[out]errorStatus 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_nameInput pin name.
[in]fString 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_nameInput pin name.
[in]fString data.
[out]errorStatus 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_nameInput pin name.
[in]fVector 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_nameInput pin name.
[in]fVector of double data.
[out]errorStatus 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_nameInput pin name.
[in]fVector 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_nameInput pin name.
[in]fVector of integer data.
[out]errorStatus 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_nameInput pin name.
[in]fVector 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_nameInput pin name.
[in]fVector of string data.
[out]errorStatus 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_nameInput pin name.
[in]fStreams data.

◆ connect() [44/52]

void ansys::dpf::Workflow::connect ( std::string const &  pin_name,
Streams const &  f,
DpfError error 
)

Connect Streams to input pin.

Parameters
[in]pin_nameInput pin name.
[in]fStreams data.
[out]errorStatus of call.

◆ 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_nameInput pin name.
[in]fStringField 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_nameInput pin name.
[in]fStringField data.
[out]errorStatus 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_nameInput pin name.
[in]fSupport 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_nameInput pin name.
[in]fSupport data.
[out]errorStatus 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_nameInput pin name.
[in]fTime 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_nameInput pin name.
[in]fTime frequency support data.
[out]errorStatus 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_nameInput pin name.
[in]fWorkflow data.

◆ connect() [52/52]

void ansys::dpf::Workflow::connect ( std::string const &  pin_name,
Workflow const &  f,
DpfError error 
)

Connect Workflow support to input pin.

Parameters
[in]pin_nameInput pin name.
[in]fWorkflow support data.
[out]errorStatus of call.

◆ connectCustom()

template<typename DataT >
void ansys::dpf::Workflow::connectCustom ( std::string const &  input_pin,
DataT const &  d 
)
inline

Connect typed data to input pin.

Exceptions
DpfException
Parameters
[in]input_pinInput 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_workflowWorkflow 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_workflowWorkflow to add.
[in]connectionsConnections 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 Workflow ansys::dpf::Workflow::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_namePin name.

◆ eraseOutputPin()

void ansys::dpf::Workflow::eraseOutputPin ( std::string const &  pin_name)

Removes an exposed pin.

Parameters
[in]pin_namePin 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()

template<typename DataT >
DataT ansys::dpf::Workflow::getCustomOutput ( std::string const &  pin_name)
inline
Returns
Custom result for given output pin.
Parameters
[in]pin_nameOutput pin name.

◆ getOutput()

template<typename DataT >
DataT ansys::dpf::Workflow::getOutput ( std::string const &  pin_name)
Returns
Typed result for given output pin.
Parameters
[in]pin_nameOutput pin name.

◆ getOutputAsAny()

Any ansys::dpf::Workflow::getOutputAsAny ( std::string const &  pin_name)
Returns
Any result for given output pin.
Parameters
[in]pin_nameOutput 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus of call.

◆ getOutputDataTree()

DataTree ansys::dpf::Workflow::getOutputDataTree ( std::string const &  pin_name)
Returns
DataTree result for given output pin.
Parameters
[in]pin_nameOutput 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_nameOutput pin name.

◆ getOutputDouble() [2/2]

dp_double ansys::dpf::Workflow::getOutputDouble ( std::string const &  pin_name,
DpfError error 
)
Returns
Double result for given output pin.
Parameters
[in]pin_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput pin name.

◆ getOutputField() [2/2]

Field ansys::dpf::Workflow::getOutputField ( std::string const &  pin_name,
DpfError error 
)
Returns
Field result for given output pin.
Parameters
[in]pin_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput pin name.

◆ getOutputInt() [2/2]

dp_int ansys::dpf::Workflow::getOutputInt ( std::string const &  pin_name,
DpfError error 
)
Returns
Integer result for given output pin.
Parameters
[in]pin_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput pin name.

◆ getOutputScoping() [2/2]

Scoping ansys::dpf::Workflow::getOutputScoping ( std::string const &  pin_name,
DpfError error 
)
Returns
Scoping result for given output pin.
Parameters
[in]pin_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput pin name.

◆ getOutputStreams() [2/2]

Streams ansys::dpf::Workflow::getOutputStreams ( std::string const &  pin_name,
DpfError error 
)
Returns
Streams result for given output pin.
Parameters
[in]pin_nameOutput pin name.
[out]errorStatus 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_indexOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput pin name.

◆ getOutputSupport() [2/2]

Support ansys::dpf::Workflow::getOutputSupport ( std::string const &  pin_name,
DpfError error 
)
Returns
Support result for given output pin.
Parameters
[in]pin_nameOutput pin name.
[out]errorStatus 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_nameOutput 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_nameOutput pin name.
[out]errorStatus 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_nameOutput pin name.

◆ getOutputUnit() [2/2]

Unit ansys::dpf::Workflow::getOutputUnit ( std::string const &  pin_name,
DpfError error 
)
Returns
Unit result for given output pin.
Parameters
[in]pin_nameOutput pin name.
[out]errorStatus 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_nameOutput pin name.

◆ getOutputWorkflow() [2/2]

Workflow ansys::dpf::Workflow::getOutputWorkflow ( std::string const &  pin_name,
DpfError error 
)
Returns
Workflow result for given output pin.
Parameters
[in]pin_nameOutput pin name.
[out]errorStatus 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_nameName 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_nameName 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_nameName 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]clientClient 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]addressaddress of the server (ip:port).
[in]protocolservers 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]ipip address of the server.
[in]portport of the server.
[in]protocolservers 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_pathName 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_namePin name.
[in]operator_input_pinInput pin.
[in]opOperator 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]opOperator to which to add pin name.
[in]operator_output_pinOutput pin.
[in]pin_namePin 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_namepin_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_namepin_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_nameName of pin to rename.
[in]new_pin_nameNew 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_nameName of pin to rename.
[in]new_pin_nameNew 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_pathName 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_pathName of file to which to write workflow.