Skip to content
Snippets Groups Projects
Commit ccfb5aca authored by Elias Pipping's avatar Elias Pipping
Browse files

[Cleanup] Rename corrections

parent e3ac74b1
No related branches found
No related tags found
No related merge requests found
......@@ -531,16 +531,17 @@ int main(int argc, char *argv[]) {
// Q: is this reasonable?
VectorType u;
VectorType u_saved;
double lastCorrection;
double lastStateCorrection;
for (size_t state_fpi = 1; state_fpi <= state_fpi_max; ++state_fpi) {
stateUpdater->solve(v);
{
SingletonVectorType computed_state;
stateUpdater->extractState(computed_state);
double const correction = stateEnergyNorm.diff(computed_state, alpha);
double const stateCorrection =
stateEnergyNorm.diff(computed_state, alpha);
if (state_fpi <= 2 or correction <
requiredReduction * lastCorrection) {
if (state_fpi <= 2 or stateCorrection <
requiredReduction * lastStateCorrection) {
alpha = computed_state;
relaxationWriter << "N ";
} else {
......@@ -548,7 +549,7 @@ int main(int argc, char *argv[]) {
Arithmetic::addProduct(alpha, 1.0 - relaxation, computed_state);
relaxationWriter << "Y ";
}
lastCorrection = correction;
lastStateCorrection = stateCorrection;
}
solveVelocityProblem(velocityIterate, alpha);
......@@ -561,8 +562,8 @@ int main(int argc, char *argv[]) {
(std::cout << '.').flush();
if (state_fpi > 1) {
double const correctionNorm = AMNorm.diff(u_saved, u);
if (correctionNorm < fixedPointTolerance)
double const velocityCorrection = AMNorm.diff(u_saved, u);
if (velocityCorrection < fixedPointTolerance)
break;
}
if (state_fpi == state_fpi_max)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment