28#ifndef OPENSWMM_ENGINE_DATA_STORAGEGEOMETRY_HPP
29#define OPENSWMM_ENGINE_DATA_STORAGEGEOMETRY_HPP
58 double p1,
double p2,
double p3)
noexcept {
60 if (p1 <= 0.0 || p2 <= 0.0 || p3 < 0.0)
return false;
84 double& a,
double& b,
double& c)
noexcept {
88 const double A = p1 / 2.0;
89 const double B = p2 / 2.0;
109 a = 2.0 * (p1 + p2) * Z;
146 if (kw ==
"PARABOLIC" || kw ==
"PARABOLOID")
Structure-of-Arrays (SoA) storage for all node types.
Definition NodeCoupling.cpp:15
StorageShape
Storage-unit surface-area relation.
Definition NodeData.hpp:88
@ CONICAL
Elliptical cone (p1, p2 = base axes, p3 = side slope)
Definition NodeData.hpp:92
@ PYRAMIDAL
Rectangular pyramid (p1 = length, p2 = width, p3 = side slope)
Definition NodeData.hpp:94
@ TABULAR
Area vs. depth from a curve (StorageData::curve)
Definition NodeData.hpp:89
@ PARABOLOID
Elliptical paraboloid(p1, p2 = top axes, p3 = height ≠ 0)
Definition NodeData.hpp:93
@ CYLINDRICAL
Elliptical cylinder (p1 = major axis, p2 = minor axis)
Definition NodeData.hpp:91
@ FUNCTIONAL
Area = c + a*d^b.
Definition NodeData.hpp:90
constexpr bool storage_shape_is_valid_code(int v) noexcept
True when v is a valid StorageShape ordinal (C API boundary check).
Definition StorageGeometry.hpp:153
bool storage_shape_from_keyword(std::string_view kw, StorageShape &out) noexcept
Parse a shape keyword (caller upper-cases first).
Definition StorageGeometry.hpp:141
constexpr double kStoragePi
π to the precision legacy uses (src/legacy/engine/consts.h).
Definition StorageGeometry.hpp:40
bool storage_shape_coeffs(StorageShape s, double p1, double p2, double p3, double &a, double &b, double &c) noexcept
Derive the area-relation coefficients for a geometric shape.
Definition StorageGeometry.hpp:83
bool storage_shape_params_valid(StorageShape s, double p1, double p2, double p3) noexcept
Validate raw shape parameters.
Definition StorageGeometry.hpp:57
constexpr bool storage_shape_is_geometric(StorageShape s) noexcept
True when s is one of the four geometric shapes (i.e. its a/b/c are the quadratic coefficients,...
Definition StorageGeometry.hpp:46
const char * storage_shape_keyword(StorageShape s) noexcept
Canonical INP/GeoPackage keyword for a shape.
Definition StorageGeometry.hpp:123