Skip to main content

System Coupling Fortran library 2025 R1

syscCommonTypesF

Last update: 17.07.2025
1 module fortran
2 !
3 ! Copyright ANSYS, Inc.
4 ! Unauthorized use, distribution, or duplication is prohibited.
5 !
6 ! Provide free-form Fortran interface for
7 ! System Coupling Participant Library.
8 !
9 ! This interfaces file provides commonly-used types and parameters.
10 !
11 ! ****** Parameter for string legth ***********************************
12 !
13 integer(kind=4), parameter :: SyscStrLen = 256
14 integer(kind=4), parameter :: SyscFilePathLen = 4096
15 !
16 ! ****** Parameters for variable mesh locations ***********************
17 !
18 integer(kind=4), parameter :: SyscNode = 0
19 integer(kind=4), parameter :: SyscElement = 1
20 !
21 ! ****** Parameters for variable tensor types *************************
22 !
23 integer(kind=4), parameter :: SyscScalar = 0
24 integer(kind=4), parameter :: SyscVector = 1
25 !
26 ! ****** Parameters for region topologies *****************************
27 !
28 integer(kind=4), parameter :: SyscSurface = 2
29 integer(kind=4), parameter :: SyscVolume = 3
30 !
31 ! ****** Parameters for region discretization types *******************
32 !
33 integer(kind=4), parameter :: SyscMeshRegion = 0
34 integer(kind=4), parameter :: SyscPointCloudRegion = 1
35 !
36 ! *********** Parameters for interface side ***************************
37 !
38 integer(kind=4), parameter :: SyscInterfaceSide_One = 1
39 integer(kind=4), parameter :: SyscInterfaceSide_Two = 2
40 !
41 ! *********************** Dimensionality ******************************
42 !! \brief Provide a structure for dimensionality
44  real(kind=8) :: length
45  real(kind=8) :: time
46  real(kind=8) :: mass
47  real(kind=8) :: temperature
48  real(kind=8) :: amountofsubstance
49  real(kind=8) :: current
50  real(kind=8) :: luminousintensity
51  real(kind=8) :: angle
52 end type syscdimensionalityf
53 !
54 !**********************************************************************
56 !**********************************************************************
57 !
59 !
60 !**********************************************************************
64 !**********************************************************************
65 function syscgetdimensionalityf() result(ret)
66 !
67  import :: syscdimensionalityf
68  type(syscdimensionalityf) :: ret
69 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
70 !DIR$ ATTRIBUTES DLLIMPORT :: syscGetDimensionalityF
71 !DIR$ ENDIF
72 end function syscgetdimensionalityf
73 !
74 end interface syscgetdimensionalityf
75 !
76 ! *********************************************************************
77 ! \brief Provide parameters for supported quantity types.
78 !
79 ! Quantity type provides information about the physical meaning of
80 ! the variable. This can be useful for detecting validation errors
81 ! during the coupled analysis setup. If the variable does not match
82 ! any of the provided quantity types, quantity type can be set to
83 ! unspecified.
84 !
85 integer(kind=4), parameter :: syscunspecified = 0
86 integer(kind=4), parameter :: syscforce = 1
87 integer(kind=4), parameter :: syscincrementaldisplacement = 2
88 integer(kind=4), parameter :: sysctemperature = 3
89 integer(kind=4), parameter :: syscheatrate = 4
90 integer(kind=4), parameter :: syscheattransfercoefficient = 5
91 integer(kind=4), parameter :: syscconvectionreferencetemperature = 6
92 integer(kind=4), parameter :: syscmodeshape = 7
93 integer(kind=4), parameter :: syscelectricalconductivity = 8
94 !
95 ! ****** Parameters for data type *************************************
96 !
97 integer(kind=4), parameter :: syscdatatype_real = 0
98 integer(kind=4), parameter :: syscdatatype_complex = 1
99 !
100 ! ****** Parameters for participant solver's convergence status *******
101 !
102 integer(kind=4), parameter :: syscdiverging = -1
103 integer(kind=4), parameter :: syscnotyetconverged = 0
104 integer(kind=4), parameter :: syscconverged = 1
105 integer(kind=4), parameter :: sysccomplete = 2
106 integer(kind=4), parameter :: syscnotevaluated = 3
107 !
108 ! ****** Parameters for analysis types ********************************
109 !
110 integer(kind=4), parameter :: syscsteady = 0
111 integer(kind=4), parameter :: sysctransient = 1
112 !
113 ! ****** Parameters for dimension *************************************
114 !
115 integer(kind=8), parameter :: syscd2 = 2
116 integer(kind=8), parameter :: syscd3 = 3
117 !
118 ! ****** Parameters for time integration ******************************
119 !
120 integer(kind=8), parameter :: syscimplicit = 0
121 integer(kind=8), parameter :: syscexplicit = 1
122 !
123 ! *********************************************************************
124 !
127  integer(kind=8) :: timestepnumber
128  real(kind=8) :: starttime
129  real(kind=8) :: timestepsize
130 end type sysctimestepf
131 !
132 ! ****** Parameters for return codes **********************************
133 !
134 integer(kind=4), parameter :: syscstatusok = 0
135 integer(kind=4), parameter :: syscstatuserror = 1
136 !
138 type :: syscerrorf
140  integer(kind=4) :: retcode
142  character(len=SyscStrLen) :: message
143 end type syscerrorf
144 !
145 ! ****** Provide parameters for supported primitive types *************
146 !
147 integer(kind=4), parameter :: syscreal4 = 0
148 integer(kind=4), parameter :: syscreal8 = 1
149 integer(kind=4), parameter :: syscint4 = 2
150 integer(kind=4), parameter :: syscint8 = 3
151 !
152 ! *********************************************************************
164 ! *********************************************************************
166  integer(kind=8) :: analysistype
167  logical(kind=8) :: restartssupported
168  integer(kind=8) :: dimension
169  integer(kind=8) :: timeintegration
170 end type syscsetupinfof
171 !
172 !**********************************************************************
174 !**********************************************************************
175 !
177 !
178 !**********************************************************************
187 !**********************************************************************
188 function syscgetsetupinfof() result(ret)
189 !
190  import :: syscsetupinfof
191  type(syscsetupinfof) :: ret
192 !
193 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
194 !DIR$ ATTRIBUTES DLLIMPORT :: syscGetSetupInfoF
195 !DIR$ ENDIF
196 !
197 end function syscgetsetupinfof
198 !
199 !**********************************************************************
209 !**********************************************************************
210 function syscgetsetupinfof_a(analysisType) result(ret)
211 !
212  import :: syscsetupinfof
213  integer(kind=4), intent(in) :: analysistype
214  type(syscsetupinfof) :: ret
215 !
216 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
217 !DIR$ ATTRIBUTES DLLIMPORT :: syscGetSetupInfoF_A
218 !DIR$ ENDIF
219 !
220 end function syscgetsetupinfof_a
221 !
222 !**********************************************************************
232 !**********************************************************************
233 function syscgetsetupinfof_ar(analysisType, &
234  restartsSupported) result(ret)
235 !
236  import :: syscsetupinfof
237  integer(kind=4), intent(in) :: analysistype
238  logical, intent(in) :: restartssupported
239  type(syscsetupinfof) :: ret
240 !
241 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
242 !DIR$ ATTRIBUTES DLLIMPORT :: syscGetSetupInfoF_AR
243 !DIR$ ENDIF
244 !
245  end function syscgetsetupinfof_ar
246 !
247 !**********************************************************************
257 !**********************************************************************
258 function syscgetsetupinfof_ard(analysisType, &
259  restartsSupported, dimension) result(ret)
260 !
261  import :: syscsetupinfof
262  integer(kind=4), intent(in) :: analysistype
263  logical, intent(in) :: restartssupported
264  integer(kind=8), intent(in) :: dimension
265  type(syscsetupinfof) :: ret
266 !
267 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
268 !DIR$ ATTRIBUTES DLLIMPORT :: syscGetSetupInfoF_ARD
269 !DIR$ ENDIF
270 !
271  end function syscgetsetupinfof_ard
272 !
273 !**********************************************************************
282 !**********************************************************************
283 function syscgetsetupinfof_ardt(analysisType, &
284  restartsSupported, dimension, timeIntegration) &
285  result(ret)
286 !
287  import :: syscsetupinfof
288  integer(kind=4), intent(in) :: analysistype
289  logical, intent(in) :: restartssupported
290  integer(kind=8), intent(in) :: dimension
291  integer(kind=8), intent(in) :: timeintegration
292  type(syscsetupinfof) :: ret
293 !
294 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
295 !DIR$ ATTRIBUTES DLLIMPORT :: syscGetSetupInfoF_ARDT
296 !DIR$ ENDIF
297 !
298  end function syscgetsetupinfof_ardt
299 !
300 end interface syscgetsetupinfof
301 !
302 ! *********************************************************************
315 ! *********************************************************************
317  character(len=SyscFilePathLen) :: setupfilename
318  logical :: restartssupported
319 end type syscsetupfileinfof
320 !
321 !**********************************************************************
324 !**********************************************************************
325 !
327 !
328 !**********************************************************************
334 !**********************************************************************
335 function syscgetsetupfileinfof(setupFileName) result(ret)
336 !
337  import :: syscsetupfileinfof
338  character(len=*), intent(in) :: setupfilename
339  type(syscsetupfileinfof) :: ret
340 !
341 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
342 !DIR$ ATTRIBUTES DLLIMPORT :: syscGetSetupFileInfoF
343 !DIR$ ENDIF
344 !
345 end function syscgetsetupfileinfof
346 !
347 end interface syscgetsetupfileinfof
348 !
349 ! *********************************************************************
351 ! *********************************************************************
353  character(len=SyscFilePathLen) :: basefilename
354 end type syscresultsinfof
355 !
356 !**********************************************************************
359 !**********************************************************************
360 !
362 !
363 !**********************************************************************
369 !**********************************************************************
370 function syscgetresultsinfof(baseFileName) result(ret)
371  import :: syscresultsinfof
372  character(len=*), intent(in) :: basefilename
373  type(syscresultsinfof) :: ret
374 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
375 !DIR$ ATTRIBUTES DLLIMPORT :: syscGetResultsInfoF
376 !DIR$ ENDIF
377 end function syscgetresultsinfof
378 !
379 end interface syscgetresultsinfof
380 !
381 
382 end module fortran
Provide an interface to get dimensionality.
Provide an interface to get a System Coupling results info type.
Provide an interface to get a System Coupling setup file info type.
Provide an interface to get a setup info type.
Provide an error type returned by the Fortran interface calls.
Provide a type for writing results files.
Provide a type for writing System Coupling setup files.
Provide a type for System Coupling setup information.
Provide a time step type.

Connect with Ansys