DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
Sfx_MathFunctions.hpp File Reference
#include <cassert>
#include <type_traits>
#include <ranges>
#include <numeric>
#include <valarray>
#include "include/Sfx_Utility.h"
#include "include/BaseMacros.h"
#include "include/Sfx_UniversalConstants.h"
#include "../Nov_VS2019/dbpp_SimulationUtilities.hpp"

Go to the source code of this file.

Namespaces

namespace  Sfx

Functions

std::valarray< float64 > Sfx::cell_face_average (std::ranges::view auto aRng)
 Compute average of a variable at cell face.
template<typename Range1, typename Range2>
std::common_type_t< Range1, Range2 > Sfx::computeLimitedGradient (const Range1 &aRng1, const Range2 &aRng2)
 Compute gradient by using a limiter function.
template<typename Range, typename FuncLimiter>
requires std::same_as<Range, std::vector<float64>>
auto Sfx::computeDU (Range aRng, FuncLimiter &&aFuncLimiter)
 Compute gradient over cell by applying a slope limiter function. Range aRng Range of values (computational grid)
template<typename Range, typename FuncLimiter>
decltype(auto) Sfx::computeDU (Range &aRng, FuncLimiter &&aFuncLimiter)
auto Sfx::computeDU_v (std::ranges::view auto aView)
 state variables gradient over each cell (1st order)
template<typename Range>
auto Sfx::cell_face_average (const Range &aRng)
float64 Sfx::wrapPi (float64 aTheta)
 "Wrap" an angle in range -pi...pi by adding the correct multiple of 2 pi
float64 Sfx::safeAcos (float64 x)
 "Safe" inverse trig functions
constexpr float64 Sfx::degToRad (float64 aDeg)
 Convert between degrees and radians.
constexpr float64 Sfx::radToDeg (float64 aRad)
void Sfx::sinCos (float *aReturnSin, float *aReturnCos, float aTheta)
 Compute the sin and cosine of an angle. On some platforms, if we know that we need both values, it can be computed faster than computing the two values seperately.
template<typename Range>
auto Sfx::StVenant1D_Incomplete_Flux (Range &aU1, Range &aU2)