MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ advance_pressure()

MAYAFLUX_API void MayaFlux::Kinesis::Acoustics::advance_pressure ( std::span< double > pressure,
std::span< const double > velocity,
std::span< const double > pressure_gain )
noexcept

Advance the interior pressures from the new velocities.

Parameters
pressureN + 1 pressures, points 1 to N - 1 updated in place
velocityN volume velocities from advance_velocity
pressure_gainN + 1 gains from DuctGrid

The two end points are left alone for the end laws.

Definition at line 20 of file StaggeredLine.cpp.

24{
25 const size_t end = std::min({ pressure.size(), pressure_gain.size(), velocity.size() + 1 });
26 for (size_t l = 1; l + 1 < end; ++l) {
27 pressure[l] -= pressure_gain[l] * (velocity[l] - velocity[l - 1]);
28 }
29}
T velocity(const Memory::HistoryBuffer< T > &history, double dt) noexcept
First difference: rate of change of position.

References MayaFlux::Kinesis::velocity().

Here is the call graph for this function: