refactor(advection): move steady state check to velocities

This commit is contained in:
Max Lübke 2025-02-07 09:51:46 +01:00
parent 16b361c85b
commit 2250ee3f6f
2 changed files with 5 additions and 3 deletions

View File

@ -120,9 +120,7 @@ public:
this->setDomain(velocities.domainX(), velocities.domainY()); this->setDomain(velocities.domainX(), velocities.domainY());
if constexpr (hyd_mode == HYDRAULIC_MODE::STEADY_STATE) { if constexpr (hyd_mode == HYDRAULIC_MODE::STEADY_STATE) {
if (!velocities.isSteady()) { velocities.run();
velocities.run();
}
} }
for (int i = 0; i < this->getIterations(); i++) { for (int i = 0; i < this->getIterations(); i++) {

View File

@ -206,6 +206,10 @@ public:
.deltaCol = this->deltaCol()}; .deltaCol = this->deltaCol()};
if constexpr (hyd_mode == HYDRAULIC_MODE::STEADY_STATE) { if constexpr (hyd_mode == HYDRAULIC_MODE::STEADY_STATE) {
if (steady) {
return;
}
const T deltaColSquare = this->deltaCol() * this->deltaCol(); const T deltaColSquare = this->deltaCol() * this->deltaCol();
const T deltaRowSquare = this->deltaRow() * this->deltaRow(); const T deltaRowSquare = this->deltaRow() * this->deltaRow();
const T minDeltaSquare = std::min(deltaColSquare, deltaRowSquare); const T minDeltaSquare = std::min(deltaColSquare, deltaRowSquare);