![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Data-oriented batch cross-section geometry — shape-grouped SoA. More...
#include "XSectBatch.hpp"#include "xsect_tables.hpp"#include "XSectKernels.hpp"#include "XSectLookup.hpp"#include "../core/SimulationContext.hpp"#include "../math/SIMD.hpp"#include <cmath>#include <algorithm>#include <numeric>#include <type_traits>#include <vector>Namespaces | |
| namespace | openswmm |
| namespace | openswmm::xsect_batch |
Functions | |
| void | openswmm::xsect_batch::area_circular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT a_full, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate circular/force-main normalized area for a contiguous batch. | |
| void | openswmm::xsect_batch::area_rect (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT area, int count) |
| Multiply rectangular depths and widths using the shared SIMD routine. | |
| void | openswmm::xsect_batch::area_trapezoidal (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_bot, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate trapezoid batch area through the shared analytic leaf. | |
| void | openswmm::xsect_batch::area_triangular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate triangular batch area through the shared analytic leaf. | |
| void | openswmm::xsect_batch::area_parabolic (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT r_bot, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate parabolic batch area through the shared analytic leaf. | |
| void | openswmm::xsect_batch::area_powerfunc (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT s_bot, const double *OPENSWMM_RESTRICT r_bot, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate power-function batch area through the shared analytic leaf. | |
| void | openswmm::xsect_batch::area_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT a_full, const double *table, int table_size, double *OPENSWMM_RESTRICT area, int count) |
| Scale one shared normalized area table for a batch. | |
| void | openswmm::xsect_batch::area_inv_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT a_full, const double *table, int table_size, const xsect::LocateLut *lut, double *OPENSWMM_RESTRICT area, int count) |
| Invert one shared normalized depth-versus-area table for batch areas. | |
| void | openswmm::xsect_batch::perlink_tabulated_pair (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT nrm, const double *OPENSWMM_RESTRICT scale_a, const double *OPENSWMM_RESTRICT scale_b, const double *const *tables_a, const double *const *tables_b, int table_size, double *OPENSWMM_RESTRICT out_a, double *OPENSWMM_RESTRICT out_b, int count) |
| Fuse two per-element profile lookups on one normalized depth grid. | |
| void | openswmm::xsect_batch::perlink_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT nrm, const double *OPENSWMM_RESTRICT scale, const double *const *tables, int table_size, double *OPENSWMM_RESTRICT result, int count) |
| Per-link tabulated lookup (for IRREGULAR shapes where each link has its own table). | |
| void | openswmm::xsect_batch::hydrad_circular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT r_full, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate circular/force-main batch hydraulic radii from the built-in table. | |
| void | openswmm::xsect_batch::area_hydrad_circular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT a_full, const double *OPENSWMM_RESTRICT r_full, double *OPENSWMM_RESTRICT area, double *OPENSWMM_RESTRICT hydrad, int count) |
| Fuse circular batch area and hydraulic-radius table interpolation. | |
| void | openswmm::xsect_batch::hydrad_trapezoidal (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_bot, const double *OPENSWMM_RESTRICT s_bot, const double *OPENSWMM_RESTRICT r_bot, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate trapezoid batch hydraulic radius through the shared leaf. | |
| void | openswmm::xsect_batch::hydrad_triangular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT s_bot, const double *OPENSWMM_RESTRICT r_bot, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate triangular batch hydraulic radius through the shared leaf. | |
| void | openswmm::xsect_batch::hydrad_rect (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate the simple two-bank rectangular batch radius formula. | |
| void | openswmm::xsect_batch::hydrad_rect_closed (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT w_max, const double *OPENSWMM_RESTRICT a_full, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate closed-rectangle batch radius including crown perimeter correction. | |
| void | openswmm::xsect_batch::hydrad_rect_open (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT w_max, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate open-rectangle batch radius excluding configured banks. | |
| void | openswmm::xsect_batch::width_rect_closed (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT nrm, const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT width, int count) |
| Evaluate the closed-rectangle exact-crown top-width convention in a batch. | |
| void | openswmm::xsect_batch::hydrad_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT r_full, const double *table, int table_size, double *OPENSWMM_RESTRICT hydrad, int count) |
| Scale one shared normalized hydraulic-radius table for a batch. | |
| void | openswmm::xsect_batch::width_circular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT width, int count) |
| Evaluate circular batch top widths from the built-in width table. | |
| void | openswmm::xsect_batch::width_trapezoidal (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_bot, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT width, int count) |
| Evaluate trapezoid batch top widths through the shared leaf. | |
| void | openswmm::xsect_batch::width_triangular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT width, int count) |
| Evaluate triangular batch top widths through the shared leaf. | |
| void | openswmm::xsect_batch::width_rect (const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT width, int count) |
| Copy constant rectangular widths to the batch output. | |
| void | openswmm::xsect_batch::width_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT w_max, const double *table, int table_size, double *OPENSWMM_RESTRICT width, int count) |
| Scale one shared normalized width table for a batch. | |
| double | openswmm::xsect_batch::norm_lookup (double depth, double param, const double *t, int n) noexcept |
| Normalize a depth and dispatch the build-selected table interpolation. | |
| double | openswmm::xsect_batch::norm_x (double depth, double param) noexcept |
| Normalize a depth with the selected exact or fast-lookup operand convention. | |
Data-oriented batch cross-section geometry — shape-grouped SoA.
Shape-specific kernels are written as tight loops over contiguous arrays with no branching — the compiler can auto-vectorise them (and we can add explicit SIMD intrinsics later for hot paths).
The XSectGroups::computeXxx() methods iterate over shape groups, call the appropriate kernel, then scatter results back to the global link arrays via the link_idx mapping.