diff --git a/include/GMGPolar/igmgpolar.h b/include/GMGPolar/igmgpolar.h index d5ecf032..07415123 100644 --- a/include/GMGPolar/igmgpolar.h +++ b/include/GMGPolar/igmgpolar.h @@ -249,8 +249,7 @@ class IGMGPolar /* ------------------------------------------------------------------------- */ /* Compute the extrapolated residual: res_ex = 4/3 res_fine - 1/3 res_coarse */ - void extrapolatedResidual(const int current_level, Vector residual, - ConstVector residual_next_level); + void extrapolatedResidual(int current_level, Vector residual, ConstVector residual_next_level); /* --------------- */ /* Setup Functions */ @@ -276,24 +275,24 @@ class IGMGPolar /* ------------------- */ /* Multigrid Functions */ - void multigrid_V_Cycle(const int level_depth, Vector solution, Vector rhs, Vector residual); - void multigrid_W_Cycle(const int level_depth, Vector solution, Vector rhs, Vector residual); - void multigrid_F_Cycle(const int level_depth, Vector solution, Vector rhs, Vector residual); - void implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Vector solution, Vector rhs, - Vector residual); - void implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Vector solution, Vector rhs, - Vector residual); - void implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Vector solution, Vector rhs, - Vector residual); + void multigrid_V_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual); + void multigrid_W_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual); + void multigrid_F_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual); + void extrapolated_multigrid_V_Cycle(int level_depth, Vector solution, Vector rhs, + Vector residual); + void extrapolated_multigrid_W_Cycle(int level_depth, Vector solution, Vector rhs, + Vector residual); + void extrapolated_multigrid_F_Cycle(int level_depth, Vector solution, Vector rhs, + Vector residual); /* ----------------------- */ /* Interpolation functions */ - void prolongation(const int current_level, Vector result, ConstVector x) const; - void restriction(const int current_level, Vector result, ConstVector x) const; - void injection(const int current_level, Vector result, ConstVector x) const; - void extrapolatedProlongation(const int current_level, Vector result, ConstVector x) const; - void extrapolatedRestriction(const int current_level, Vector result, ConstVector x) const; - void FMGInterpolation(const int current_level, Vector result, ConstVector x) const; + void prolongation(int current_level, Vector result, ConstVector x) const; + void restriction(int current_level, Vector result, ConstVector x) const; + void injection(int current_level, Vector result, ConstVector x) const; + void extrapolatedProlongation(int current_level, Vector result, ConstVector x) const; + void extrapolatedRestriction(int current_level, Vector result, ConstVector x) const; + void FMGInterpolation(int current_level, Vector result, ConstVector x) const; /* ------------- */ /* Visualization */ diff --git a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_F_Cycle.cpp b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_F_Cycle.cpp index e7b4acb6..df136535 100644 --- a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_F_Cycle.cpp +++ b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_F_Cycle.cpp @@ -1,7 +1,6 @@ #include "../../../include/GMGPolar/gmgpolar.h" -void IGMGPolar::implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Vector solution, - Vector rhs, Vector residual) +void IGMGPolar:extrapolated_multigrid_F_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual) { assert(0 <= level_depth && level_depth < number_of_levels_ - 1); @@ -123,4 +122,4 @@ void IGMGPolar::implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, V auto end_MGC = std::chrono::high_resolution_clock::now(); t_avg_MGC_total_ += std::chrono::duration(end_MGC - start_MGC).count(); } -} \ No newline at end of file +} diff --git a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_V_Cycle.cpp b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_V_Cycle.cpp index 66673392..fadfff2d 100644 --- a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_V_Cycle.cpp +++ b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_V_Cycle.cpp @@ -1,7 +1,6 @@ #include "../../../include/GMGPolar/gmgpolar.h" -void IGMGPolar::implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Vector solution, - Vector rhs, Vector residual) +void IGMGPolar::extrapolated_multigrid_V_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual) { assert(0 <= level_depth && level_depth < number_of_levels_ - 1); @@ -122,4 +121,4 @@ void IGMGPolar::implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, V auto end_MGC = std::chrono::high_resolution_clock::now(); t_avg_MGC_total_ += std::chrono::duration(end_MGC - start_MGC).count(); } -} \ No newline at end of file +} diff --git a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_W_Cycle.cpp b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_W_Cycle.cpp index 655efe5a..96ba0c57 100644 --- a/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_W_Cycle.cpp +++ b/src/GMGPolar/MultigridMethods/implicitly_extrapolated_multigrid_W_Cycle.cpp @@ -1,7 +1,6 @@ #include "../../../include/GMGPolar/gmgpolar.h" -void IGMGPolar::implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Vector solution, - Vector rhs, Vector residual) +void IGMGPolar::extrapolated_multigrid_W_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual) { assert(0 <= level_depth && level_depth < number_of_levels_ - 1); @@ -123,4 +122,4 @@ void IGMGPolar::implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, V auto end_MGC = std::chrono::high_resolution_clock::now(); t_avg_MGC_total_ += std::chrono::duration(end_MGC - start_MGC).count(); } -} \ No newline at end of file +} diff --git a/src/GMGPolar/MultigridMethods/multigrid_F_Cycle.cpp b/src/GMGPolar/MultigridMethods/multigrid_F_Cycle.cpp index 6023aeaa..6c497d6c 100644 --- a/src/GMGPolar/MultigridMethods/multigrid_F_Cycle.cpp +++ b/src/GMGPolar/MultigridMethods/multigrid_F_Cycle.cpp @@ -1,7 +1,6 @@ #include "../../../include/GMGPolar/gmgpolar.h" -void IGMGPolar::multigrid_F_Cycle(const int level_depth, Vector solution, Vector rhs, - Vector residual) +void IGMGPolar::multigrid_F_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual) { assert(0 <= level_depth && level_depth < number_of_levels_ - 1); @@ -91,4 +90,4 @@ void IGMGPolar::multigrid_F_Cycle(const int level_depth, Vector solution auto end_MGC = std::chrono::high_resolution_clock::now(); t_avg_MGC_total_ += std::chrono::duration(end_MGC - start_MGC).count(); } -} \ No newline at end of file +} diff --git a/src/GMGPolar/MultigridMethods/multigrid_V_Cycle.cpp b/src/GMGPolar/MultigridMethods/multigrid_V_Cycle.cpp index 8026c26e..7bb39c06 100644 --- a/src/GMGPolar/MultigridMethods/multigrid_V_Cycle.cpp +++ b/src/GMGPolar/MultigridMethods/multigrid_V_Cycle.cpp @@ -1,7 +1,6 @@ #include "../../../include/GMGPolar/gmgpolar.h" -void IGMGPolar::multigrid_V_Cycle(const int level_depth, Vector solution, Vector rhs, - Vector residual) +void IGMGPolar::multigrid_V_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual) { assert(0 <= level_depth && level_depth < number_of_levels_ - 1); @@ -90,4 +89,4 @@ void IGMGPolar::multigrid_V_Cycle(const int level_depth, Vector solution auto end_MGC = std::chrono::high_resolution_clock::now(); t_avg_MGC_total_ += std::chrono::duration(end_MGC - start_MGC).count(); } -} \ No newline at end of file +} diff --git a/src/GMGPolar/MultigridMethods/multigrid_W_Cycle.cpp b/src/GMGPolar/MultigridMethods/multigrid_W_Cycle.cpp index 39f727a0..65fd22af 100644 --- a/src/GMGPolar/MultigridMethods/multigrid_W_Cycle.cpp +++ b/src/GMGPolar/MultigridMethods/multigrid_W_Cycle.cpp @@ -1,7 +1,6 @@ #include "../../../include/GMGPolar/gmgpolar.h" -void IGMGPolar::multigrid_W_Cycle(const int level_depth, Vector solution, Vector rhs, - Vector residual) +void IGMGPolar::multigrid_W_Cycle(int level_depth, Vector solution, Vector rhs, Vector residual) { assert(0 <= level_depth && level_depth < number_of_levels_ - 1); @@ -91,4 +90,4 @@ void IGMGPolar::multigrid_W_Cycle(const int level_depth, Vector solution auto end_MGC = std::chrono::high_resolution_clock::now(); t_avg_MGC_total_ += std::chrono::duration(end_MGC - start_MGC).count(); } -} \ No newline at end of file +} diff --git a/src/GMGPolar/level_interpolation.cpp b/src/GMGPolar/level_interpolation.cpp index 4ae90c86..b2703825 100644 --- a/src/GMGPolar/level_interpolation.cpp +++ b/src/GMGPolar/level_interpolation.cpp @@ -1,6 +1,6 @@ #include "../../include/GMGPolar/gmgpolar.h" -void IGMGPolar::prolongation(const int current_level, Vector result, ConstVector x) const +void IGMGPolar::prolongation(int current_level, Vector result, ConstVector x) const { assert(current_level < number_of_levels_ && 1 <= current_level); if (!interpolation_) @@ -9,7 +9,7 @@ void IGMGPolar::prolongation(const int current_level, Vector result, Con interpolation_->applyProlongation(levels_[current_level].grid(), levels_[current_level - 1].grid(), result, x); } -void IGMGPolar::restriction(const int current_level, Vector result, ConstVector x) const +void IGMGPolar::restriction(int current_level, Vector result, ConstVector x) const { assert(current_level < number_of_levels_ - 1 && 0 <= current_level); if (!interpolation_) @@ -18,7 +18,7 @@ void IGMGPolar::restriction(const int current_level, Vector result, Cons interpolation_->applyRestriction(levels_[current_level].grid(), levels_[current_level + 1].grid(), result, x); } -void IGMGPolar::injection(const int current_level, Vector result, ConstVector x) const +void IGMGPolar::injection(int current_level, Vector result, ConstVector x) const { assert(current_level < number_of_levels_ - 1 && 0 <= current_level); if (!interpolation_) @@ -27,7 +27,7 @@ void IGMGPolar::injection(const int current_level, Vector result, ConstV interpolation_->applyInjection(levels_[current_level].grid(), levels_[current_level + 1].grid(), result, x); } -void IGMGPolar::extrapolatedProlongation(const int current_level, Vector result, ConstVector x) const +void IGMGPolar::extrapolatedProlongation(int current_level, Vector result, ConstVector x) const { assert(current_level < number_of_levels_ && 1 <= current_level); if (!interpolation_) @@ -37,7 +37,7 @@ void IGMGPolar::extrapolatedProlongation(const int current_level, Vector result, x); } -void IGMGPolar::extrapolatedRestriction(const int current_level, Vector result, ConstVector x) const +void IGMGPolar::extrapolatedRestriction(int current_level, Vector result, ConstVector x) const { assert(current_level < number_of_levels_ - 1 && 0 <= current_level); if (!interpolation_) @@ -47,7 +47,7 @@ void IGMGPolar::extrapolatedRestriction(const int current_level, Vector result, x); } -void IGMGPolar::FMGInterpolation(const int current_level, Vector result, ConstVector x) const +void IGMGPolar::FMGInterpolation(int current_level, Vector result, ConstVector x) const { assert(current_level < number_of_levels_ && 1 <= current_level); if (!interpolation_) diff --git a/src/GMGPolar/solver.cpp b/src/GMGPolar/solver.cpp index 68aed2ca..a09670dd 100644 --- a/src/GMGPolar/solver.cpp +++ b/src/GMGPolar/solver.cpp @@ -314,7 +314,7 @@ void IGMGPolar::updateResidualNorms(Level& level, int iteration, double& initial } } -void IGMGPolar::extrapolatedResidual(const int current_level, Vector residual, +void IGMGPolar::extrapolatedResidual(int current_level, Vector residual, ConstVector residual_next_level) { const PolarGrid& fineGrid = levels_[current_level].grid();