![]() |
OpenSWMM Engine
6.0.0-alpha.3
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.3)
|
Cross-section geometry — faithful 1:1 port of legacy xsect.c. More...
#include "XSectBatch.hpp"#include "xsect_tables.hpp"#include "XSectLookup.hpp"#include <cmath>#include <algorithm>Namespaces | |
| namespace | openswmm |
| namespace | openswmm::xsect |
Functions | |
| double | openswmm::xsect::getAofY (const XSectParams &xs, double y) |
| double | openswmm::xsect::getWofY (const XSectParams &xs, double y) |
| double | openswmm::xsect::getRofA (const XSectParams &xs, double a) |
| double | openswmm::xsect::getSofA (const XSectParams &xs, double a) |
| double | openswmm::xsect::getdSdA (const XSectParams &xs, double a) |
| double | openswmm::xsect::getAmax (const XSectParams &xs) |
| int | openswmm::xsect::locate (double y, const double *table, int n) |
| double | openswmm::xsect::lookup (double x, const double *table, int n_items) |
| double | openswmm::xsect::invLookup (double y, const double *table, int n_items) |
| double | openswmm::xsect::getYcircular (double alpha) |
| double | openswmm::xsect::getScircular (double alpha) |
| double | openswmm::xsect::getRofY (const XSectParams &xs, double y) |
| double | openswmm::xsect::getYofA (const XSectParams &xs, double a) |
| double | openswmm::xsect::getAofS (const XSectParams &xs, double s_factor) |
| double | openswmm::xsect::getYcrit (const XSectParams &xs, double q) |
| bool | openswmm::xsect::isOpen (int type) |
| int | openswmm::xsect::setParams (XSectParams &xs, int type, const double p[], double ucf) |
Cross-section geometry — faithful 1:1 port of legacy xsect.c.
All formulas, lookup tables, constants, and dispatch logic are direct translations from src/legacy/engine/xsect.c (SWMM 5.2.x). Table data comes from xsect_tables.hpp. Numerical parity with the legacy engine is verified shape-by-shape by tests/unit/engine/test_xsect_parity.cpp.
Field-name mapping (legacy TXsect -> XSectParams): yFull->y_full wMax->w_max ywMax->yw_max aFull->a_full rFull->r_full sFull->s_full sMax->s_max yBot->y_bot aBot->a_bot sBot->s_bot rBot->r_bot