Skip to main content

System Coupling C++ library 2024 R1

CommonTypes

Last update: 17.07.2025
1/*
2* Copyright ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
3*/
4
5#pragma once
6
7#include "SystemCouplingParticipant/CommonSettings.hpp"
8#include "SystemCouplingParticipant/ElementTypes.hpp"
9
10#include <string>
11#include <utility>
12
13namespace sysc {
14
27 Diverging = -1,
28 NotYetConverged = 0,
29 Converged = 1,
30 Complete = 2,
31 NotEvaluated = 3
32};
33
35enum class DataType {
36 Real = 0,
37 Complex = 1
38};
39
55
61
108
143
146 std::string baseFileName;
150 baseFileName(std::move(baseFileName)){};
151};
152
155 Surface = 2,
156 Volume = 3
157};
158
161 bool isValid;
162 std::string message;
164 /* \brief Provide a default constructor for ValidityStatus */
166 isValid(true){};
167
174 ValidityStatus(bool isValid, std::string message) :
176 message(std::move(message)){};
177};
178
182 std::string message;
184 /* \brief Provide a default constructor for MeshValidityStatus */
186 isInvalid(false){};
187
196 message(std::move(message)){};
197};
198
208
209using OpaqueDataAccess = void*;
211using RegionName = std::string;
212using VariableName = std::string;
213using CouplingInterfaceName = std::string;
214using RestartPoint = std::string;
215using DisplayName = std::string;
216using AttributeName = std::string;
217using ParameterName = std::string;
240 std::string scHost;
241 unsigned short scPort{0};
242 std::string participantName;
243 bool isCosimulation{false};
244 std::string buildInformation;
245 std::string transcriptFilename;
246
248 ParticipantInfo() = default;
249
252 std::string scHost,
253 unsigned short scPort,
254 std::string participantName) :
255 scHost(std::move(scHost)),
256 scPort(scPort),
257 participantName(std::move(participantName)),
258 isCosimulation(true)
259 {
260 }
261
264 std::string scHost,
265 unsigned short scPort,
266 std::string participantName,
267 std::string buildInformation) :
268 scHost(std::move(scHost)),
269 scPort(scPort),
270 participantName(std::move(participantName)),
271 isCosimulation(true),
272 buildInformation(std::move(buildInformation))
273 {
274 }
275
278 std::string scHost,
279 unsigned short scPort,
280 std::string participantName,
281 std::string buildInformation,
282 std::string transcriptFilename) :
283 scHost(std::move(scHost)),
284 scPort(scPort),
285 participantName(std::move(participantName)),
286 isCosimulation(true),
287 buildInformation(std::move(buildInformation)),
288 transcriptFilename(std::move(transcriptFilename))
289 {
290 }
291};
292
293} // namespace sysc
ConvergenceStatus
Provide enum for participant's solver convergence status.
void * OpaqueDataAccess
Dimension
Provide an enum for participant dimension.
std::string VariableName
std::string DisplayName
std::string CouplingInterfaceName
DataType
Provide enum for variable data types.
std::string ParameterName
PrimitiveType
Provide enum for supported primitive types.
std::string RegionName
std::string AttributeName
Topology
Provide enum for region topologies.
std::string RestartPoint
AnalysisType
Provide an enum for coupled analysis type.
@ UnsignedInt64
@ UnsignedInt16
Provide a struct that contains information about mesh validity.
MeshValidityStatus(bool isInvalid, std::string message)
Provide a non-default constructor for MeshValidityStatus.
provide a structure for the participant information needed to connect to a System Coupling object
ParticipantInfo()=default
Provide a default constructor.
ParticipantInfo(std::string scHost, unsigned short scPort, std::string participantName, std::string buildInformation, std::string transcriptFilename)
Provide a non-default constructor.
ParticipantInfo(std::string scHost, unsigned short scPort, std::string participantName)
Provide a non-default constructor.
ParticipantInfo(std::string scHost, unsigned short scPort, std::string participantName, std::string buildInformation)
Provide a non-default constructor.
Provide a structure for writing System Coupling results files.
ResultsInfo(std::string baseFileName)
Create results file info struct, given a base file name.
std::string baseFileName
Provide a structure for writing System Coupling setup files.
std::string setupFileName
SetupFileInfo(std::string setupFileName)
Provide a non-default constructor for SetupFileInfo.
SetupFileInfo()
Provide a default constructor for SetupFileInfo.
SetupFileInfo(std::string setupFileName, bool restartsSupported)
Provide a non-default constructor for SetupFileInfo.
Provide a structure for System Coupling setup information.
SetupInfo(enum AnalysisType analysisType, bool restartsSupported, enum Dimension dimension)
Provide a constructor for SetupInfo.
SetupInfo(enum AnalysisType analysisType)
Provide a constructor for SetupInfo.
AnalysisType analysisType
Dimension dimension
SetupInfo(enum AnalysisType analysisType, bool restartsSupported)
Provide a constructor for SetupInfo.
Provide a structure containing solution control.
Provide a struct for time step.
TimeStep()=default
Provide a default constructor for TimeStep.
TimeStep(int timeStepNumber, double startTime, double timeStepSize)
Provide a non-default constructor for TimeStep.
Provide a struct that contains information about validity.
ValidityStatus(bool isValid, std::string message)
Provide a non-default constructor for ValidityStatus.

Connect with Ansys