Class ansys::dpf::DataSources
Last update: 25.03.2026
Container of files on which the analysis results can be found.
Inherits from:
Members
- addDomainFile
- addDomainResultFile
- addFile
- addFile
- addFile
- addResultFile
- addResultFile
- addResultFileWString
- addUpStream
- addUpStream
- callAPI
- DataSources
- DataSources
- DataSources
- DataSources
- DataSources
- DataSources
- DataSources
- DataSources
- DataSources
- deep_copy
- describe
- empty
- emptyDataSources
- filePaths
- getClient
- getHash
- getHashableKey
- hasBeenMovedLocally
- hasInternalObject
- identifierbyIndex
- isOnCommonAPI
- isSameObject
- keys
- numPaths
- operator=
- operator=
- pathAndKeyByIndex
- pathAtKeyByIndex
- registerNamespace
- resultFilePaths
- resultKey
- resultNamespaceForKey
- setHashableKey
- ~DataSources
- ~DpfTypes
Friends
Public functions
Function DataSources
ansys::dpf::DataSources::DataSources()
Return type:
Function DataSources
ansys::dpf::DataSources::DataSources(Client const *const client)
Create a file container on a server.
Parameters:
Return type:
Function ~DataSources
virtual ansys::dpf::DataSources::~DataSources()
Return type:
Function DataSources
ansys::dpf::DataSources::DataSources(DataSources const &)
Parameters:
- DataSources const &
Return type:
Function DataSources
ansys::dpf::DataSources::DataSources(DataSources &&) noexcept
Parameters:
- DataSources &&
Return type:
Function DataSources
ansys::dpf::DataSources::DataSources(std::string const &result_file_path, std::string const &key)
Create a file container with given file and key.
Parameters:
- std::string const & result_file_path: [in] Result file with which to create data source container.
- std::string const & key: [in] Key describing type of file.
Return type:
Function DataSources
ansys::dpf::DataSources::DataSources(std::string const &result_file_path, std::string const &key, Client const *const client)
Create a file container with given file and key.
Parameters:
- std::string const & result_file_path: [in] Result file with which to create data source container.
- std::string const & key: [in] Key describing type of file.
- Client const *const client: [in] Client instance designating the IP, port and protocol to use.
Return type:
Function DataSources
ansys::dpf::DataSources::DataSources(std::string const &result_file_path)
Create a file container with given file.
Parameters:
- std::string const & result_file_path: [in] Result file with which to create data source container.
Return type:
Function DataSources
ansys::dpf::DataSources::DataSources(std::string const &result_file_path, Client const *const client)
Create a file container with given file on a server.
Parameters:
- std::string const & result_file_path: [in] Result file with which to create data source container.
- Client const *const client
Return type:
Function DataSources
ansys::dpf::DataSources::DataSources(int id, Client const *const client)
Retrieve an existing instance of DataSources on a server.
Parameters:
- int id: [in] Id of the DataSources object on the server's database.
- Client const *const client: [in] Client instance designating the IP, port and protocol to use.
Return type:
Function operator=
DataSources & ansys::dpf::DataSources::operator=(DataSources const &)
Parameters:
- DataSources const &
Return type: DataSources &
Function operator=
DataSources & ansys::dpf::DataSources::operator=(DataSources &&) noexcept
Parameters:
- DataSources &&
Return type: DataSources &
Function addResultFile
void ansys::dpf::DataSources::addResultFile(std::string const &file_path, std::string const &key)
Define result file with key for data sources.
Parameters:
- std::string const & file_path: [in] Result file to use with data source container.
- std::string const & key: [in] Key describing type of file.
Return type: void
Function addResultFileWString
void ansys::dpf::DataSources::addResultFileWString(std::wstring const &file_path)
Define result for data sources.
Parameters:
- std::wstring const & file_path: [in] Result file to use with data source container.
Return type: void
Function addResultFile
void ansys::dpf::DataSources::addResultFile(std::string const &file_path)
Define result for data sources.
Parameters:
- std::string const & file_path: [in] Result file to use with data source container.
Return type: void
Function addDomainResultFile
void ansys::dpf::DataSources::addDomainResultFile(std::string const &file_path, std::string const &key, dp_int domain_id)
Define data source result file with key and domain.
Parameters:
- std::string const & file_path: [in] Result file to use with data source container.
- std::string const & key: [in] Key describing type of file.
- dp_int domain_id: [in] Domain id of file.
Return type: void
Function addFile
void ansys::dpf::DataSources::addFile(std::string const &file_path, std::string const &key)
Add secondary, non-result, file with key to data sources.
Parameters:
- std::string const & file_path: [in] File to use with data source container.
- std::string const & key: [in] Key describing type of file.
Return type: void
Function addFile
void ansys::dpf::DataSources::addFile(std::string const &file_path)
Add secondary, non-result, file to data sources.
Parameters:
- std::string const & file_path: [in] File to use with data source container.
Return type: void
Function addFile
void ansys::dpf::DataSources::addFile(std::string const &file_path, std::string const &key, std::string const &result_key)
Add secondary, non-result, file with key and result key to data sources.
Parameters:
- std::string const & file_path: [in] File to use with data source container.
- std::string const & key: [in] Key describing type of file.
- std::string const & result_key: [in] Result key for file.
Return type: void
Function addDomainFile
void ansys::dpf::DataSources::addDomainFile(std::string const &file_path, std::string const &key, dp_int domain_id)
Add domain file with key and domain id to data sources.
Parameters:
- std::string const & file_path: [in] File to use with data source container.
- std::string const & key: [in] Key describing type of file.
- dp_int domain_id: [in] Domain id of file.
Return type: void
Function addUpStream
void ansys::dpf::DataSources::addUpStream(DataSources &ds)
Add up stream to data sources.
Parameters:
- DataSources & ds: [in] Upstream data sources.
Return type: void
Function addUpStream
void ansys::dpf::DataSources::addUpStream(DataSources &ds, std::string const &result_key)
Add up stream with result key to data sources.
Parameters:
- DataSources & ds: [in] Upstream data sources.
- std::string const & result_key: [in] Result key for upstream source.
Return type: void
Function resultKey
std::string ansys::dpf::DataSources::resultKey() const
Returns:
Result key of data sources.
Return type: std::string
Function resultNamespaceForKey
std::string ansys::dpf::DataSources::resultNamespaceForKey(std::string const &key) const
Returns:
Result namespace to a given key of data sources.
Parameters:
- std::string const & key
Return type: std::string
Function filePaths
std::vector< std::string > ansys::dpf::DataSources::filePaths(std::string const &key) const
Returns:
Vector of secondary files given by key.
Parameters:
- std::string const & key: [in] Key describing file type.
Return type: std::vector< std::string >
Function resultFilePaths
std::vector< std::string > ansys::dpf::DataSources::resultFilePaths() const
Returns:
Vector of result files in data sources.
Return type: std::vector< std::string >
Function keys
std::vector< std::string > ansys::dpf::DataSources::keys() const
Returns:
Vector of keys in data sources.
Return type: std::vector< std::string >
Function numPaths
int ansys::dpf::DataSources::numPaths() const
Returns:
Size or Num file path in data sources.
Return type: int
Function pathAtKeyByIndex
std::string ansys::dpf::DataSources::pathAtKeyByIndex(std::string const &key, dp_index index) const
Returns:
Path at given key and given index in data sources.
Parameters:
- std::string const & key
- dp_index index
Return type: std::string
Function pathAndKeyByIndex
std::pair< std::string, std::string > ansys::dpf::DataSources::pathAndKeyByIndex(int index) const
Returns:
File path and its key for a given index in data sources.
Parameters:
- int index
Return type: std::pair< std::string, std::string >
Function identifierbyIndex
LabelSpace ansys::dpf::DataSources::identifierbyIndex(int index) const
Returns:
LabelSpace or identifier of a path for a given index in data sources.
Parameters:
- int index
Return type: LabelSpace
Function deep_copy
DataSources ansys::dpf::DataSources::deep_copy(ansys::dpf::Client const *const client=nullptr) const
Create a new DataSources on a server by copying all the data of this DataSources.
Parameters:
- ansys::dpf::Client const *const client = nullptr : [in] Client instance designating the IP, port and protocol to use.
Return type: DataSources
Function getHashableKey
std::string ansys::dpf::DataSources::getHashableKey() const
Set and get an simpler hashable entity (here a file path) instead of the full DataSources to save time
Return type: std::string
Function setHashableKey
void ansys::dpf::DataSources::setHashableKey(const std::string &unique_identifier) const
Parameters:
- const std::string & unique_identifier
Return type: void
Function getHash
size_t ansys::dpf::DataSources::getHash() const
Compute and get the hash of a data_sources
Return type: size_t
Function registerNamespace
void ansys::dpf::DataSources::registerNamespace(std::string const &result_key, std::string const &namspace)
Parameters:
- std::string const & result_key
- std::string const & namspace
Return type: void
Public static functions
Function emptyDataSources
static DataSources ansys::dpf::DataSources::emptyDataSources()
Create an empty data sources. Returns:
Empty DataSources.
Return type: DataSources