OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::twoD::gpu Namespace Reference

Namespaces

namespace  kperf
 
namespace  plugin
 
namespace  swe_kernels
 

Classes

class  ExplicitKokkosSurfaceSolver
 
struct  SourceBudget
 

Typedefs

using ExecSpace = Kokkos::DefaultExecutionSpace
 
using MemSpace = ExecSpace::memory_space
 
using DView = Kokkos::View<double*, MemSpace>
 mutable double array
 
using CDView = Kokkos::View<const double*, MemSpace>
 const double array
 
using IView = Kokkos::View<int*, MemSpace>
 mutable int array
 
using CIView = Kokkos::View<const int*, MemSpace>
 const int array
 

Functions

KOKKOS_INLINE_FUNCTION double sourceSink (double rate, double h, double dry)
 Apply the cubic wet/dry ramp to a held nonnegative sink demand.
 
KOKKOS_INLINE_FUNCTION SourceBudget sourceBudget (double volume, double h, double area, double dt, double dry, double rain_rate, double coupling_rate, double infil_rate, double evap_rate)
 Compute a donor-limited water-only cell source update without mutating device arrays.
 

Typedef Documentation

◆ CDView

using openswmm::twoD::gpu::CDView = Kokkos::View<const double*, MemSpace>

const double array

◆ CIView

using openswmm::twoD::gpu::CIView = Kokkos::View<const int*, MemSpace>

const int array

◆ DView

using openswmm::twoD::gpu::DView = Kokkos::View<double*, MemSpace>

mutable double array

◆ ExecSpace

using openswmm::twoD::gpu::ExecSpace = Kokkos::DefaultExecutionSpace

◆ IView

using openswmm::twoD::gpu::IView = Kokkos::View<int*, MemSpace>

mutable int array

◆ MemSpace

using openswmm::twoD::gpu::MemSpace = ExecSpace::memory_space

Function Documentation

◆ sourceBudget()

KOKKOS_INLINE_FUNCTION SourceBudget openswmm::twoD::gpu::sourceBudget ( double volume,
double h,
double area,
double dt,
double dry,
double rain_rate,
double coupling_rate,
double infil_rate,
double evap_rate )

Compute a donor-limited water-only cell source update without mutating device arrays.

Parameters
[in]volumeFinite cell water m3 after face transfers; positive part is used with incoming sources, except the no-source fast path returns volume unchanged.
[in]hFinite pre-source depth m used for evaporation/infiltration wet/dry ramps.
[in]areaFinite positive cell area m2.
[in]dtFinite nonnegative source interval s.
[in]dryFinite positive dry-depth ramp threshold m.
[in]rain_rateFinite rainfall m/s; negative rainfall contributes zero.
[in]coupling_rateFinite signed coupling m/s, positive into the surface.
[in]infil_rateFinite held infiltration demand m/s, negative treated as zero.
[in]evap_rateFinite held evaporation demand m/s, negative treated as zero.
Returns
SourceBudget by value: final water m3, nonnegative actual infiltration/evaporation m3, signed actual coupling m3 and applied flag. If every integrated transfer is zero, applied=false; otherwise sinks and outgoing coupling share one availability scale against volume plus inflows.
Note
No general shape/finite validation, allocation, ownership transfer or state booking occurs. Caller writes returned budgets/receipts once; quality/thermal paired transfers are handled outside this water-only kernel. Intended inputs keep all products finite and volume nonnegative.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sourceSink()

KOKKOS_INLINE_FUNCTION double openswmm::twoD::gpu::sourceSink ( double rate,
double h,
double dry )

Apply the cubic wet/dry ramp to a held nonnegative sink demand.

Parameters
[in]rateFinite sink rate m/s; nonpositive returns zero.
[in]hFinite pre-source cell depth m; nonpositive returns zero.
[in]dryFinite positive dry-depth threshold m; at/above it the full rate applies.
Returns
Effective sink rate m/s, using rate*t*t*(3-2*t) below the threshold. This computes no volume budget by itself; no general finite/threshold validation occurs. Pure host/device math.
Here is the caller graph for this function: