60#ifndef OPENSWMM_2D_INFIL2D_HPP
61#define OPENSWMM_2D_INFIL2D_HPP
185 std::vector<Infil2DDefault>&
defaults() noexcept {
return defaults_; }
192 const std::vector<Infil2DDefault>&
defaults() const noexcept {
return defaults_; }
200 std::vector<Infil2DOverride>&
overrides() noexcept {
return overrides_; }
207 const std::vector<Infil2DOverride>&
overrides() const noexcept {
return overrides_; }
259 void setAquiferOwners(std::vector<uint8_t> owners) { aquifer_owners_ = std::move(owners); }
267 return ownership_messages_;
320 void updateRates(
const MeshData& mesh, SurfaceStateData& state,
double dt,
338 bool active() const noexcept {
return active_; }
361 const std::vector<Infil2DRow>&
resolvedRows() const noexcept {
return resolved_; }
371 const std::vector<Infil2DProvenance>&
provenance() const noexcept {
return prov_; }
387 const std::vector<double>&
cumulative() const noexcept {
return bank_.cumulative(); }
412 std::vector<uint8_t> aquifer_owners_;
413 std::vector<std::string> ownership_messages_;
414 std::vector<Infil2DDefault> defaults_;
415 std::vector<Infil2DOverride> overrides_;
418 bool active_ =
false;
419 double step_seconds_ = 0.0;
423 bool aquifer_2d_available_ =
false;
426 std::vector<Infil2DRow> resolved_;
427 std::vector<Infil2DProvenance> prov_;
Infiltration state and operations for surface water owners.
Definition InfilBank.hpp:31
Owns per-cell infiltration parameters, kernel state and held rates.
Definition Infil2D.hpp:175
const Infil2DOptions & options() const noexcept
Borrow the authored infiltration cadence options.
Definition Infil2D.hpp:222
const std::vector< Infil2DDefault > & defaults() const noexcept
Borrow the authored ordered star/tag fallback rows.
Definition Infil2D.hpp:192
Infil2DOptions & options() noexcept
Borrow the authored infiltration cadence options.
Definition Infil2D.hpp:215
const std::vector< Infil2DOverride > & overrides() const noexcept
Borrow the authored ordered per-cell overrides.
Definition Infil2D.hpp:207
const std::vector< double > & cumulative() const noexcept
Cumulative infiltration CAPACITY per triangle (m): the integral of the published rate,...
Definition Infil2D.hpp:387
const std::vector< std::string > & ownershipMessages() const noexcept
Borrow the most recent successful resolution's default-ownership diagnostics.
Definition Infil2D.hpp:266
void reset()
Clear everything back to the unconfigured fast path.
Definition Infil2D.cpp:434
surface::InfilBank & bank() noexcept
Borrow the canonical mutable per-cell infiltration bank.
Definition Infil2D.hpp:329
std::vector< Infil2DDefault > & defaults() noexcept
Borrow the authored ordered star/tag fallback rows.
Definition Infil2D.hpp:185
void setAquiferOwners(std::vector< uint8_t > owners)
Effective coverage, not inferred from conductivity or authored rows.
Definition Infil2D.hpp:259
bool aquifer2DAvailable() const noexcept
Read the stored aquifer-availability fallback flag.
Definition Infil2D.hpp:288
const std::vector< Infil2DProvenance > & provenance() const noexcept
Provenance per triangle (D-I3, for the writer).
Definition Infil2D.hpp:371
void deactivate() noexcept
E2: [2D_OPTIONS] INFILTRATION NO — keep the rows (they still save) but run without infiltration....
Definition Infil2D.hpp:350
const std::vector< Infil2DRow > & resolvedRows() const noexcept
Resolved method per triangle; has_method == false entries are NONE.
Definition Infil2D.hpp:361
std::vector< Infil2DOverride > & overrides() noexcept
Borrow the authored ordered per-cell overrides.
Definition Infil2D.hpp:200
bool resolve(const MeshData &mesh, const SimulationOptions &opts, std::string &err)
Resolve tag/override precedence into flat per-cell state.
Definition Infil2D.cpp:255
bool active() const noexcept
True when at least one cell resolved to a model.
Definition Infil2D.hpp:338
void setAquifer2DAvailable(bool on) noexcept
G1 — tell validation that a [2D_AQUIFER] resolved, so the AQUIFER_2D destination has somewhere to sen...
Definition Infil2D.hpp:282
double stepSeconds() const noexcept
Resolved cadence in seconds (options_.infil_step, or the project WET_STEP when that was <= 0)....
Definition Infil2D.hpp:397
void updateRates(const MeshData &mesh, SurfaceStateData &state, double dt, surface::InfilBank::Factors factors={1.0, 1.0})
Recompute and publish per-cell infiltration rates (D-I1).
Definition Infil2D.cpp:398
Definition ExchangeLaw.hpp:60
bool parseInfil2DMethod(const std::string &token, InfilModel &method, bool &has_method)
Parse a method token (HORTON, MODIFIED_HORTON, GREEN_AMPT, MODIFIED_GREEN_AMPT, CURVE_NUMBER,...
Definition Infil2D.cpp:150
@ NONE
Definition SolverOptions2D.hpp:116
@ TAG
every cell carrying tag
Definition GwTransportData.hpp:67
const char * infil2DDestToken(Infil2DDest dest)
Inverse of parseInfil2DDest.
Definition Infil2D.cpp:223
bool parseInfil2DDest(const std::string &token, Infil2DDest &dest)
Parse a destination token.
Definition Infil2D.cpp:207
Infil2DDest
Definition Infil2D.hpp:86
@ AQUIFER_2D
Obsolete; migrate using the ownership review.
Definition Infil2D.hpp:89
@ SUBCATCH_AQUIFER
Legacy subcatchment aquifer (U3 track I-b)
Definition Infil2D.hpp:88
@ LOST
Leaves the domain; booked to MassBalance2D::infil_out.
Definition Infil2D.hpp:87
Infil2DProvenance
Definition Infil2D.hpp:150
@ OVERRIDE
From a per-cell [2D_INFILTRATION] row.
Definition Infil2D.hpp:154
@ STAR
From the '*' default row.
Definition Infil2D.hpp:152
int infil2DParamCount(InfilModel method)
Number of meaningful positional parameters for method (used by the writer to trim trailing placeholde...
Definition Infil2D.cpp:235
const char * infil2DMethodToken(const Infil2DRow &row)
Inverse of parseInfil2DMethod — the canonical file token.
Definition Infil2D.cpp:187
constexpr int kInfil2DMaxParams
Definition Infil2D.hpp:94
Definition ExchangeLaw.hpp:60
InfilModel
Definition Infiltration.hpp:45
@ HORTON
Definition Infiltration.hpp:46
All SWMM simulation options parsed from [OPTIONS] section.
Definition SimulationOptions.hpp:168
Definition InfilBank.hpp:34
Definition Infil2D.hpp:130
std::string tag
Definition Infil2D.hpp:131
Infil2DRow row
Definition Infil2D.hpp:132
[2D_INFILTRATION_OPTIONS].
Definition Infil2D.hpp:142
double infil_step
Definition Infil2D.hpp:145
One [2D_INFILTRATION] per-cell override row.
Definition Infil2D.hpp:136
int tri
Triangle index (0-based internally; 1-based in file)
Definition Infil2D.hpp:137
Infil2DRow row
Definition Infil2D.hpp:138
One infiltration specification: method + positional parameters + destination.
Definition Infil2D.hpp:114
bool dest_explicit
Definition Infil2D.hpp:125
double p[kInfil2DMaxParams]
Definition Infil2D.hpp:119
bool has_method
Definition Infil2D.hpp:117
Infil2DDest dest
Definition Infil2D.hpp:120
InfilModel method
Definition Infil2D.hpp:118
SoA storage for 2D mixed triangle/quad mesh geometry and topology.
Definition MeshData.hpp:65
Definition SurfaceStateData.hpp:64