OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm_transport.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: Apache-2.0
2 *
3 * Copyright 2026 Caleb Buahin
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
39
40#ifndef OPENSWMM_TRANSPORT_H
41#define OPENSWMM_TRANSPORT_H
42
43#include "openswmm_engine.h"
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
57
60 int* configured);
61
64 int* mode);
65
72 int mode);
73
76 double* value);
77
80 double value);
81
84 double* dx);
85
88 double dx);
89
92 int* count);
93
96 int index,
97 int* link_index,
98 double* value);
99
102 int* count);
103
115 char* element, int elem_len,
116 char* species, int spec_len,
117 int* is_ts, double* value,
118 char* ts_name, int ts_len);
119
122 int* count);
123
130 char* element, int elem_len,
131 char* species, int spec_len,
132 int* is_ts, double* value,
133 char* ts_name, int ts_len);
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif /* OPENSWMM_TRANSPORT_H */
#define SWMM_ENGINE_API
Definition openswmm_2d.h:53
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:51
OpenSWMM Engine — primary transparent C API (master header).
SWMM_ENGINE_API int swmm_transport_get_target_dx(SWMM_Engine engine, double *dx)
TARGET_DX, display length units; 0 means engine default.
Definition openswmm_transport_impl.cpp:115
SWMM_ENGINE_API int swmm_transport_get_dispersion_value(SWMM_Engine engine, double *value)
VALUE-mode coefficient, display units (ft²/s or m²/s).
Definition openswmm_transport_impl.cpp:93
SWMM_ENGINE_API int swmm_transport_get_boundary(SWMM_Engine engine, int index, char *element, int elem_len, char *species, int spec_len, int *is_ts, double *value, char *ts_name, int ts_len)
Read boundary row index.
Definition openswmm_transport_impl.cpp:165
SWMM_ENGINE_API int swmm_transport_set_target_dx(SWMM_Engine engine, double dx)
Set TARGET_DX (must be >= 0 and finite; 0 restores default).
Definition openswmm_transport_impl.cpp:123
SWMM_ENGINE_API int swmm_transport_get_conduit_disp(SWMM_Engine engine, int index, int *link_index, double *value)
Override row index: link index + coefficient (display units).
Definition openswmm_transport_impl.cpp:142
SWMM_ENGINE_API int swmm_transport_get_dispersion_mode(SWMM_Engine engine, int *mode)
The dispersion mode (SWMM_TransportDispersionMode).
Definition openswmm_transport_impl.cpp:72
SWMM_ENGINE_API int swmm_transport_boundary_count(SWMM_Engine engine, int *count)
Number of [TRANSPORT_BOUNDARIES] rows (raw, as configured).
Definition openswmm_transport_impl.cpp:156
SWMM_ENGINE_API int swmm_transport_conduit_disp_count(SWMM_Engine engine, int *count)
Number of per-conduit dispersion override rows.
Definition openswmm_transport_impl.cpp:133
SWMM_ENGINE_API int swmm_transport_source_count(SWMM_Engine engine, int *count)
Number of [TRANSPORT_SOURCES] rows (raw, as configured).
Definition openswmm_transport_impl.cpp:176
SWMM_TransportDispersionMode
[TRANSPORT_OPTIONS] DISPERSION mode.
Definition openswmm_transport.h:50
@ SWMM_DISPERSION_FISCHER
Definition openswmm_transport.h:53
@ SWMM_DISPERSION_OFF
Definition openswmm_transport.h:51
@ SWMM_DISPERSION_VALUE
Definition openswmm_transport.h:55
SWMM_ENGINE_API int swmm_transport_get_configured(SWMM_Engine engine, int *configured)
1 if a transport.ard component is configured on the model.
Definition openswmm_transport_impl.cpp:63
SWMM_ENGINE_API int swmm_transport_set_dispersion_value(SWMM_Engine engine, double value)
Set the VALUE-mode coefficient (must be >= 0 and finite).
Definition openswmm_transport_impl.cpp:101
SWMM_ENGINE_API int swmm_transport_set_dispersion_mode(SWMM_Engine engine, int mode)
Set the dispersion mode.
Definition openswmm_transport_impl.cpp:81
SWMM_ENGINE_API int swmm_transport_get_source(SWMM_Engine engine, int index, char *element, int elem_len, char *species, int spec_len, int *is_ts, double *value, char *ts_name, int ts_len)
Read source row index. Same contract as the boundary reader; value is the VALUE-mode mass rate (speci...
Definition openswmm_transport_impl.cpp:185