Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::sim::anonymous_namespace{gas_reference.cpp} Namespace Reference

Classes

struct  FaceSide
struct  GasFace

Enumerations

enum class  SideKind : uint8_t { Cell , Ghost , Wall }

Functions

uint64_t MulShiftU64 (uint64_t a, uint64_t b, uint32_t shift)
uint64_t TotalAmount (const GasConfig &config, const GasCell &cell)
uint64_t HeatCapacity (const GasConfig &config, const GasCell &cell)
int64_t ChemicalEnergy (const GasConfig &config, const GasCell &cell)
uint64_t CellMass (const GasConfig &config, const GasCoefficients &coefficients, const GasCell &cell)
uint32_t CellTemperature (const GasConfig &config, const GasCell &cell)
int64_t CellPressure (const GasConfig &config, const GasCell &cell, uint32_t temperature)
GasDerived DeriveRaw (const GasConfig &config, const GasCoefficients &coefficients, const GasCell &cell)
uint32_t AxisSize (const GasConfig &config, uint32_t axis)
FaceSide BoundarySide (GasBoundary boundary, uint32_t z)
std::array< uint32_t, GAS_AXES > CellCoordinate (const GasBox &box, uint32_t index)
FaceSide SideAt (const GasBox &box, std::array< uint32_t, GAS_AXES > cell, uint32_t axis, int64_t coordinate)
GasFace MakeFace (const GasBox &box, std::array< uint32_t, GAS_AXES > cell, uint32_t axis, bool high)
std::vector< GasFace > EnumerateFaces (const GasBox &box)
uint32_t CellLayer (const GasBox &box, uint32_t index)
const GasCell & SideCell (const GasBox &box, const std::vector< GasCell > &cells, FaceSide side)
const GasDerived & SideDerived (const GasBox &box, const std::vector< GasDerived > &derived, FaceSide side)
int64_t Excess (const GasBox &box, const std::vector< GasDerived > &derived, FaceSide side)
int64_t HalfHydrostatic (int64_t excess)
int64_t DrivingPressure (const GasBox &box, const std::vector< GasDerived > &derived, const GasFace &face)
void ComputeFaceWeight (const GasBox &box, const std::vector< GasDerived > &derived, GasFace &face)
void ComputeFaceForce (const GasBox &box, const std::vector< GasDerived > &derived, GasFace &face)
void ComputeFaceFlow (const GasBox &box, const std::vector< GasDerived > &derived, const std::vector< GasCell > &forced, GasFace &face)
uint64_t RawFraction (const GasBox &box, const std::vector< GasDerived > &derived, const GasFace &face)
int64_t DivideNearest (int64_t a, uint64_t b)
int64_t MovedEnergy (const GasConfig &config, const GasCell &source, const GasCell &moved)
void Transfer (GasBox &box, const std::vector< GasCell > &forced, std::vector< GasCell > &next, const GasFace &face)
void ApplyImpulse (GasBox &box, std::vector< GasCell > &next, const GasFace &face)
void LimitOutflow (const GasBox &box, const std::vector< GasDerived > &derived, std::vector< GasFace > &faces)
int64_t LimitedSlope (GasReconstruction reconstruction, int64_t a, int64_t b)
int64_t SpeciesRatio (const GasBox &box, const std::vector< GasCell > &cells, const std::vector< GasDerived > &derived, FaceSide side, uint32_t s)
int64_t HalfSlope (const GasBox &box, const std::vector< GasCell > &cells, const std::vector< GasDerived > &derived, const GasFace &face, uint32_t s)
uint64_t MovedAmountQ32 (const GasBox &box, const std::vector< GasCell > &cells, const std::vector< GasDerived > &derived, const GasFace &face, uint32_t s)
uint64_t RoundAmount (const GasBox &box, uint64_t amountQ32, uint64_t hash)
void ComputeMovedAmounts (const GasBox &box, const std::vector< GasCell > &cells, const std::vector< GasDerived > &derived, uint64_t roundingTick, std::vector< GasFace > &faces)
void LimitMovedAmounts (const GasBox &box, const std::vector< GasCell > &cells, std::vector< GasFace > &faces)
std::vector< GasDerived > DeriveAll (const GasBox &box)
void Substep (GasBox &box, const std::vector< GasFace > &layout, uint64_t roundingTick)

Variables

constexpr uint64_t PRESSURE_PER_AMOUNT_TEMPERATURE_Q32 = 285682760
constexpr uint64_t HYDROSTATIC_MICROPASCAL_PER_MASS_X10000 = 392266
constexpr uint64_t GRAVITY_MICROMETER_PER_SECOND2 = 9806650
constexpr uint64_t MICRO = 1000000
constexpr uint64_t ONE_Q32 = (uint64_t)1 << 32
constexpr uint64_t LOW_32_BITS = ONE_Q32 - 1
constexpr uint64_t MAX_CELL_AMOUNT = (uint64_t)1 << 31
constexpr uint32_t GAS_ROUNDING_PURPOSE = 0x47610001u

Enumeration Type Documentation

◆ SideKind

enum class bicameral::sim::anonymous_namespace{gas_reference.cpp}::SideKind : uint8_t
strong
Enumerator
Cell 
Ghost 
Wall 

Definition at line 40 of file gas_reference.cpp.

Function Documentation

◆ ApplyImpulse()

void bicameral::sim::anonymous_namespace{gas_reference.cpp}::ApplyImpulse ( GasBox & box,
std::vector< GasCell > & next,
const GasFace & face )

◆ AxisSize()

uint32_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::AxisSize ( const GasConfig & config,
uint32_t axis )

Definition at line 146 of file gas_reference.cpp.

References AxisSize(), bicameral::sim::GasConfig::sizeX, bicameral::sim::GasConfig::sizeY, and bicameral::sim::GasConfig::sizeZ.

Referenced by AxisSize(), EnumerateFaces(), and SideAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BoundarySide()

FaceSide bicameral::sim::anonymous_namespace{gas_reference.cpp}::BoundarySide ( GasBoundary boundary,
uint32_t z )

Definition at line 150 of file gas_reference.cpp.

References BoundarySide(), Ghost, bicameral::sim::Open, and Wall.

Referenced by BoundarySide(), and SideAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CellCoordinate()

std::array< uint32_t, GAS_AXES > bicameral::sim::anonymous_namespace{gas_reference.cpp}::CellCoordinate ( const GasBox & box,
uint32_t index )

Definition at line 157 of file gas_reference.cpp.

References CellCoordinate(), bicameral::sim::GasBox::config, bicameral::sim::GasConfig::sizeX, and bicameral::sim::GasConfig::sizeY.

Referenced by CellCoordinate(), and EnumerateFaces().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CellLayer()

uint32_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::CellLayer ( const GasBox & box,
uint32_t index )

Definition at line 213 of file gas_reference.cpp.

References CellLayer(), bicameral::sim::GasBox::config, bicameral::sim::GasConfig::sizeX, and bicameral::sim::GasConfig::sizeY.

Referenced by CellLayer(), DeriveAll(), and Excess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CellMass()

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::CellMass ( const GasConfig & config,
const GasCoefficients & coefficients,
const GasCell & cell )

Definition at line 100 of file gas_reference.cpp.

References bicameral::sim::GasCell::amounts, CellMass(), bicameral::sim::GasCoefficients::massPerAmount, MulShiftU64(), and bicameral::sim::GasConfig::speciesCount.

Referenced by CellMass(), and DeriveRaw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CellPressure()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::CellPressure ( const GasConfig & config,
const GasCell & cell,
uint32_t temperature )

Definition at line 122 of file gas_reference.cpp.

References CellPressure(), MulShiftU64(), PRESSURE_PER_AMOUNT_TEMPERATURE_Q32, and TotalAmount().

Referenced by CellPressure(), and DeriveRaw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CellTemperature()

uint32_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::CellTemperature ( const GasConfig & config,
const GasCell & cell )

Definition at line 109 of file gas_reference.cpp.

References CellTemperature(), ChemicalEnergy(), bicameral::sim::GasCell::energy, HeatCapacity(), and MICRO.

Referenced by CellTemperature(), and DeriveRaw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ChemicalEnergy()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::ChemicalEnergy ( const GasConfig & config,
const GasCell & cell )

Definition at line 92 of file gas_reference.cpp.

References bicameral::sim::GasCell::amounts, ChemicalEnergy(), bicameral::sim::GasConfig::species, and bicameral::sim::GasConfig::speciesCount.

Referenced by CellTemperature(), ChemicalEnergy(), and MovedEnergy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeFaceFlow()

void bicameral::sim::anonymous_namespace{gas_reference.cpp}::ComputeFaceFlow ( const GasBox & box,
const std::vector< GasDerived > & derived,
const std::vector< GasCell > & forced,
GasFace & face )

◆ ComputeFaceForce()

void bicameral::sim::anonymous_namespace{gas_reference.cpp}::ComputeFaceForce ( const GasBox & box,
const std::vector< GasDerived > & derived,
GasFace & face )

◆ ComputeFaceWeight()

void bicameral::sim::anonymous_namespace{gas_reference.cpp}::ComputeFaceWeight ( const GasBox & box,
const std::vector< GasDerived > & derived,
GasFace & face )

◆ ComputeMovedAmounts()

void bicameral::sim::anonymous_namespace{gas_reference.cpp}::ComputeMovedAmounts ( const GasBox & box,
const std::vector< GasCell > & cells,
const std::vector< GasDerived > & derived,
uint64_t roundingTick,
std::vector< GasFace > & faces )

Definition at line 531 of file gas_reference.cpp.

References ComputeMovedAmounts(), bicameral::sim::GasBox::config, GAS_ROUNDING_PURPOSE, MovedAmountQ32(), bicameral::sim::GasConfig::randomSeed, RoundAmount(), and bicameral::sim::GasConfig::speciesCount.

Referenced by ComputeMovedAmounts(), and Substep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeriveAll()

std::vector< GasDerived > bicameral::sim::anonymous_namespace{gas_reference.cpp}::DeriveAll ( const GasBox & box)

Definition at line 578 of file gas_reference.cpp.

References CellLayer(), bicameral::sim::GasBox::cells, DeriveAll(), and bicameral::sim::DeriveGasCell().

Referenced by DeriveAll(), and Substep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeriveRaw()

GasDerived bicameral::sim::anonymous_namespace{gas_reference.cpp}::DeriveRaw ( const GasConfig & config,
const GasCoefficients & coefficients,
const GasCell & cell )

Definition at line 130 of file gas_reference.cpp.

References CellMass(), CellPressure(), CellTemperature(), DeriveRaw(), bicameral::sim::GasDerived::inverseAmount, bicameral::sim::GasDerived::inverseMass, bicameral::sim::GasDerived::mass, MAX_CELL_AMOUNT, bicameral::sim::GasDerived::pressure, bicameral::sim::GasDerived::temperature, and TotalAmount().

Referenced by DeriveRaw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DivideNearest()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::DivideNearest ( int64_t a,
uint64_t b )

Definition at line 326 of file gas_reference.cpp.

References DivideNearest().

Referenced by DivideNearest(), and MovedEnergy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrivingPressure()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::DrivingPressure ( const GasBox & box,
const std::vector< GasDerived > & derived,
const GasFace & face )

Definition at line 240 of file gas_reference.cpp.

References bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::axis, bicameral::sim::GasBox::config, DrivingPressure(), Excess(), bicameral::sim::GasConfig::gravity, HalfHydrostatic(), bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::left, bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::right, and SideDerived().

Referenced by ComputeFaceFlow(), and DrivingPressure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnumerateFaces()

std::vector< GasFace > bicameral::sim::anonymous_namespace{gas_reference.cpp}::EnumerateFaces ( const GasBox & box)

Definition at line 194 of file gas_reference.cpp.

References AxisSize(), bicameral::sim::GasConfig::boundary, CellCoordinate(), bicameral::sim::GasBox::cells, bicameral::sim::GasBox::config, EnumerateFaces(), bicameral::sim::GAS_AXES, MakeFace(), and bicameral::sim::Periodic.

Referenced by EnumerateFaces().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Excess()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::Excess ( const GasBox & box,
const std::vector< GasDerived > & derived,
FaceSide side )

Definition at line 226 of file gas_reference.cpp.

References Cell, CellLayer(), Excess(), bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::index, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::kind, and bicameral::sim::GasBox::referenceDerived.

Referenced by ComputeFaceForce(), ComputeFaceWeight(), DrivingPressure(), and Excess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HalfHydrostatic()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::HalfHydrostatic ( int64_t excess)

Definition at line 234 of file gas_reference.cpp.

References HalfHydrostatic(), and HYDROSTATIC_MICROPASCAL_PER_MASS_X10000.

Referenced by ComputeFaceForce(), DrivingPressure(), and HalfHydrostatic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HalfSlope()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::HalfSlope ( const GasBox & box,
const std::vector< GasCell > & cells,
const std::vector< GasDerived > & derived,
const GasFace & face,
uint32_t s )

◆ HeatCapacity()

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::HeatCapacity ( const GasConfig & config,
const GasCell & cell )

Definition at line 83 of file gas_reference.cpp.

References bicameral::sim::GasCell::amounts, HeatCapacity(), bicameral::sim::GasConfig::species, and bicameral::sim::GasConfig::speciesCount.

Referenced by CellTemperature(), HeatCapacity(), and MovedEnergy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LimitedSlope()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::LimitedSlope ( GasReconstruction reconstruction,
int64_t a,
int64_t b )

Definition at line 461 of file gas_reference.cpp.

References LimitedSlope(), and bicameral::sim::Minmod.

Referenced by HalfSlope(), and LimitedSlope().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LimitMovedAmounts()

void bicameral::sim::anonymous_namespace{gas_reference.cpp}::LimitMovedAmounts ( const GasBox & box,
const std::vector< GasCell > & cells,
std::vector< GasFace > & faces )

Definition at line 549 of file gas_reference.cpp.

References bicameral::sim::GasCell::amounts, Cell, bicameral::sim::GasBox::cells, bicameral::sim::GasBox::config, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::index, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::kind, LimitMovedAmounts(), and bicameral::sim::GasConfig::speciesCount.

Referenced by LimitMovedAmounts(), and Substep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LimitOutflow()

void bicameral::sim::anonymous_namespace{gas_reference.cpp}::LimitOutflow ( const GasBox & box,
const std::vector< GasDerived > & derived,
std::vector< GasFace > & faces )

Definition at line 438 of file gas_reference.cpp.

References Cell, bicameral::sim::GasBox::cells, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::index, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::kind, LimitOutflow(), ONE_Q32, and RawFraction().

Referenced by LimitOutflow(), and Substep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeFace()

GasFace bicameral::sim::anonymous_namespace{gas_reference.cpp}::MakeFace ( const GasBox & box,
std::array< uint32_t, GAS_AXES > cell,
uint32_t axis,
bool high )

Definition at line 180 of file gas_reference.cpp.

References bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::axis, bicameral::sim::GAS_AXES, bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::id, bicameral::sim::GasBox::Index(), bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::left, bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::leftOuter, MakeFace(), bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::right, bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::rightOuter, and SideAt().

Referenced by EnumerateFaces(), and MakeFace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MovedAmountQ32()

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::MovedAmountQ32 ( const GasBox & box,
const std::vector< GasCell > & cells,
const std::vector< GasDerived > & derived,
const GasFace & face,
uint32_t s )

Definition at line 504 of file gas_reference.cpp.

References bicameral::sim::GasCell::amounts, bicameral::sim::GasBox::config, bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::flow, bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::fraction, HalfSlope(), bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::left, MovedAmountQ32(), MulShiftU64(), bicameral::sim::GasConfig::reconstruction, bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::right, SideCell(), TotalAmount(), and bicameral::sim::Upwind.

Referenced by ComputeMovedAmounts(), and MovedAmountQ32().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MovedEnergy()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::MovedEnergy ( const GasConfig & config,
const GasCell & source,
const GasCell & moved )

Definition at line 338 of file gas_reference.cpp.

References ChemicalEnergy(), DivideNearest(), bicameral::sim::GasCell::energy, HeatCapacity(), and MovedEnergy().

Referenced by MovedEnergy(), and Transfer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MulShiftU64()

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::MulShiftU64 ( uint64_t a,
uint64_t b,
uint32_t shift )

Definition at line 70 of file gas_reference.cpp.

References MulShiftU64().

Referenced by CellMass(), CellPressure(), MovedAmountQ32(), MulShiftU64(), RawFraction(), and SpeciesRatio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RawFraction()

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::RawFraction ( const GasBox & box,
const std::vector< GasDerived > & derived,
const GasFace & face )

Definition at line 315 of file gas_reference.cpp.

References bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::flow, bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::left, MulShiftU64(), RawFraction(), bicameral::sim::anonymous_namespace{gas_reference.cpp}::GasFace::right, and SideDerived().

Referenced by LimitOutflow(), and RawFraction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RoundAmount()

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::RoundAmount ( const GasBox & box,
uint64_t amountQ32,
uint64_t hash )

Definition at line 522 of file gas_reference.cpp.

References bicameral::sim::GasBox::config, LOW_32_BITS, RoundAmount(), and bicameral::sim::GasConfig::stochasticRounding.

Referenced by ComputeMovedAmounts(), and RoundAmount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SideAt()

FaceSide bicameral::sim::anonymous_namespace{gas_reference.cpp}::SideAt ( const GasBox & box,
std::array< uint32_t, GAS_AXES > cell,
uint32_t axis,
int64_t coordinate )

Definition at line 165 of file gas_reference.cpp.

References AxisSize(), bicameral::sim::GasConfig::boundary, BoundarySide(), Cell, bicameral::sim::GasBox::config, bicameral::sim::GasBox::Index(), bicameral::sim::Periodic, and SideAt().

Referenced by MakeFace(), and SideAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SideCell()

const GasCell & bicameral::sim::anonymous_namespace{gas_reference.cpp}::SideCell ( const GasBox & box,
const std::vector< GasCell > & cells,
FaceSide side )

Definition at line 217 of file gas_reference.cpp.

References Ghost, bicameral::sim::GasBox::ghost, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::index, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::kind, and SideCell().

Referenced by ComputeFaceFlow(), MovedAmountQ32(), SideCell(), SpeciesRatio(), and Transfer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SideDerived()

const GasDerived & bicameral::sim::anonymous_namespace{gas_reference.cpp}::SideDerived ( const GasBox & box,
const std::vector< GasDerived > & derived,
FaceSide side )

Definition at line 221 of file gas_reference.cpp.

References Ghost, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::index, bicameral::sim::anonymous_namespace{gas_reference.cpp}::FaceSide::kind, bicameral::sim::GasBox::referenceDerived, and SideDerived().

Referenced by ComputeFaceForce(), DrivingPressure(), RawFraction(), SideDerived(), and SpeciesRatio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SpeciesRatio()

int64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::SpeciesRatio ( const GasBox & box,
const std::vector< GasCell > & cells,
const std::vector< GasDerived > & derived,
FaceSide side,
uint32_t s )

Definition at line 475 of file gas_reference.cpp.

References MulShiftU64(), SideCell(), SideDerived(), and SpeciesRatio().

Referenced by HalfSlope(), and SpeciesRatio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Substep()

void bicameral::sim::anonymous_namespace{gas_reference.cpp}::Substep ( GasBox & box,
const std::vector< GasFace > & layout,
uint64_t roundingTick )

Definition at line 586 of file gas_reference.cpp.

References ApplyImpulse(), bicameral::sim::GasBox::cells, ComputeFaceFlow(), ComputeFaceForce(), ComputeMovedAmounts(), DeriveAll(), LimitMovedAmounts(), LimitOutflow(), Substep(), and Transfer().

Referenced by Substep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TotalAmount()

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::TotalAmount ( const GasConfig & config,
const GasCell & cell )

Definition at line 74 of file gas_reference.cpp.

References bicameral::sim::GasCell::amounts, bicameral::sim::GasConfig::speciesCount, and TotalAmount().

Referenced by CellPressure(), DeriveRaw(), MovedAmountQ32(), and TotalAmount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Transfer()

Variable Documentation

◆ GAS_ROUNDING_PURPOSE

uint32_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::GAS_ROUNDING_PURPOSE = 0x47610001u
constexpr

Definition at line 37 of file gas_reference.cpp.

Referenced by ComputeMovedAmounts().

◆ GRAVITY_MICROMETER_PER_SECOND2

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::GRAVITY_MICROMETER_PER_SECOND2 = 9806650
constexpr

Definition at line 28 of file gas_reference.cpp.

◆ HYDROSTATIC_MICROPASCAL_PER_MASS_X10000

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::HYDROSTATIC_MICROPASCAL_PER_MASS_X10000 = 392266
constexpr

Definition at line 26 of file gas_reference.cpp.

Referenced by HalfHydrostatic().

◆ LOW_32_BITS

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::LOW_32_BITS = ONE_Q32 - 1
constexpr

Definition at line 31 of file gas_reference.cpp.

Referenced by RoundAmount().

◆ MAX_CELL_AMOUNT

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::MAX_CELL_AMOUNT = (uint64_t)1 << 31
constexpr

Definition at line 34 of file gas_reference.cpp.

Referenced by DeriveRaw().

◆ MICRO

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::MICRO = 1000000
constexpr

Definition at line 29 of file gas_reference.cpp.

Referenced by CellTemperature().

◆ ONE_Q32

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::ONE_Q32 = (uint64_t)1 << 32
constexpr

Definition at line 30 of file gas_reference.cpp.

Referenced by HalfSlope(), and LimitOutflow().

◆ PRESSURE_PER_AMOUNT_TEMPERATURE_Q32

uint64_t bicameral::sim::anonymous_namespace{gas_reference.cpp}::PRESSURE_PER_AMOUNT_TEMPERATURE_Q32 = 285682760
constexpr

Definition at line 23 of file gas_reference.cpp.

Referenced by CellPressure().