44 bool active() const noexcept {
return !contacts_.empty(); }
52 return i >= 0 && std::size_t(i) < cell_owned_.size() && cell_owned_[i];
61 return i >= 0 && std::size_t(i) < link_owned_.size() && link_owned_[i];
70 const std::vector<int>&
cells() const noexcept {
return cells_; }
78 const std::vector<ChannelGroundContact>&
contacts() const noexcept {
return contacts_; }
133 double seconds, std::vector<
double>& surface_mass);
141 const std::vector<
double>&
channelAtmosphere() const noexcept {
return channel_atmospheric_j_; }
149 const std::vector<double>&
channelToGround() const noexcept {
return channel_ground_j_; }
158 return channel_species_to_ground_;
168 return channel_increment_j_;
193 std::vector<ChannelGroundContact> contacts_;
194 std::vector<uint8_t> cell_owned_, link_owned_;
195 std::vector<int> cells_;
196 std::vector<std::pair<std::size_t, std::size_t>> contact_ranges_;
197 std::vector<double> channel_atmospheric_j_, channel_ground_j_, channel_increment_j_,
198 channel_species_to_ground_;
Mesh thermal state, including bed energy retained through surface drying.
Definition CompletedSourceArchive.hpp:25
Definition ChannelGround.hpp:29
const std::vector< double > & channelAtmosphere() const noexcept
Borrow cumulative signed atmospheric energy added to routed channel water.
Definition ChannelGround.hpp:141
std::string advance(const SolverOptions2D &, const std::vector< SurfaceThermalSample > &, double seconds, std::vector< double > &surface_mass)
Advance the shared finite channel/soil solve and publish surface temperature-volume.
Definition ChannelGround.cpp:317
const std::vector< ChannelGroundContact > & contacts() const noexcept
Borrow the prepared contact segments sorted by link, begin fraction and cell.
Definition ChannelGround.hpp:78
const std::vector< int > & cells() const noexcept
Borrow the prepared unique owned cells in increasing mesh-index order.
Definition ChannelGround.hpp:70
std::size_t contactCount(int link) const noexcept
Read the number of mapped contact pieces for a routed link.
Definition ChannelGround.hpp:86
bool active() const noexcept
Test whether any prepared channel/ground contact exists.
Definition ChannelGround.hpp:44
const std::vector< double > & channelThermalIncrement() const noexcept
Borrow cumulative net finite thermal energy change of routed water.
Definition ChannelGround.hpp:167
const std::vector< double > & channelToGround() const noexcept
Borrow cumulative signed channel-to-ground contact energy.
Definition ChannelGround.hpp:149
bool ownsCell(int i) const noexcept
Test the resolved thermal contact ownership mask for one cell.
Definition ChannelGround.hpp:51
const std::vector< double > & channelSpeciesToGround() const noexcept
Borrow cumulative signed species exchange into physical porewater.
Definition ChannelGround.hpp:157
void clear()
Release this contact mapping, borrowed bindings and diagnostic storage.
Definition ChannelGround.hpp:38
double bedTemperature(int link, double begin=0, double end=1) const noexcept
Read the capacity-weighted temperature of physical soil beneath a channel reach.
Definition ChannelGround.cpp:266
std::string modelIdentity() const
Serialize the prepared ownership, contact geometry and transport row identity.
Definition ChannelGround.cpp:57
bool ownsLink(int i) const noexcept
Test the resolved thermal contact ownership mask for one link.
Definition ChannelGround.hpp:60
std::string initialize(SimulationContext &, const MeshData &, GroundHeatState &, SubsurfaceTransportState &, SurfaceStateData &, double coordinate_to_si)
Resolve channel geometry onto shared porous thermal columns and bind borrowed owners.
Definition ChannelGround.cpp:123
Definition OutfallExchange.hpp:17
Definition MeshCheckpointState.hpp:18
Definition ExchangeLaw.hpp:60
Central, reentrant simulation context.
Definition SimulationContext.hpp:390
Definition GroundHeat.hpp:45
SoA storage for 2D mixed triangle/quad mesh geometry and topology.
Definition MeshData.hpp:65
Definition SolverOptions2D.hpp:257
Species mass in both aquifer zones, and where mass crossed a boundary.
Definition SubsurfaceTransportState.hpp:69
Definition SurfaceStateData.hpp:64
Definition ChannelGround.hpp:24
double mass
Definition ChannelGround.hpp:25
double volume
Definition ChannelGround.hpp:25
double evaporated
Definition ChannelGround.hpp:25