OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
LayerTransport.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2
11
12#ifndef OPENSWMM_LAYER_TRANSPORT_HPP
13#define OPENSWMM_LAYER_TRANSPORT_HPP
14#include <string>
15#include <vector>
16namespace openswmm::twoD {
22 int from = -1, to = -1;
23 double capacity = 0;
24};
26 std::vector<double> mass, concentration, transferred;
27 std::string error;
28};
29// Reusable private column workspace. Inputs to the overloads below must not
30// alias this storage. Results remain valid until the next use of this scratch;
31// the caller must provide exclusive access for the complete call.
37 const std::vector<double>& capacity, const std::vector<double>& rhs,
38 const std::vector<LayerTransportMove>& moves, LayerTransportScratch& scratch,
39 bool signed_species = false);
41 const std::vector<double>& capacity, const std::vector<double>& initial,
42 const std::vector<double>& rhs, const std::vector<LayerTransportMove>& moves,
43 LayerTransportScratch& scratch, bool signed_species = false,
44 const std::vector<double>* donor_available = nullptr);
67LayerTransportResult solveLayerTransport(const std::vector<double>& capacity,
68 const std::vector<double>& rhs,
69 const std::vector<LayerTransportMove>& moves,
70 bool signed_species = false);
98 const std::vector<double>& capacity, const std::vector<double>& initial,
99 const std::vector<double>& rhs, const std::vector<LayerTransportMove>& moves,
100 bool signed_species = false, const std::vector<double>* donor_available = nullptr);
101}
102#endif
Definition ExchangeLaw.hpp:60
LayerTransportResult advanceLayerTransportEuler(const std::vector< double > &capacity, const std::vector< double > &initial, const std::vector< double > &rhs, const std::vector< LayerTransportMove > &moves, bool signed_species, const std::vector< double > *donor_available)
Forward-Euler stage evaluated from beginning inventories/storage. All outgoing moves from a donor sha...
Definition LayerTransport.cpp:108
LayerTransportResult solveLayerTransport(const std::vector< double > &capacity, const std::vector< double > &rhs, const std::vector< LayerTransportMove > &moves, bool signed_species)
Conservative, positivity-preserving implicit donor transport on a column chain. rhs holds mass after ...
Definition LayerTransport.cpp:17
Definition LayerTransport.hpp:21
int to
Definition LayerTransport.hpp:22
int from
Definition LayerTransport.hpp:22
double capacity
Definition LayerTransport.hpp:23
Definition LayerTransport.hpp:25
std::vector< double > concentration
Definition LayerTransport.hpp:26
std::vector< double > mass
Definition LayerTransport.hpp:26
std::string error
Definition LayerTransport.hpp:27
std::vector< double > transferred
Definition LayerTransport.hpp:26
Definition LayerTransport.hpp:32
std::vector< double > upper
Definition LayerTransport.hpp:34
std::vector< double > remaining
Definition LayerTransport.hpp:34
std::vector< double > dry
Definition LayerTransport.hpp:34
std::vector< double > requested
Definition LayerTransport.hpp:34
std::vector< double > diagonal
Definition LayerTransport.hpp:34
std::vector< double > lower
Definition LayerTransport.hpp:34
LayerTransportResult result
Definition LayerTransport.hpp:33
std::vector< double > b
Definition LayerTransport.hpp:34
std::vector< double > scale
Definition LayerTransport.hpp:34