Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions include/GMGPolar/igmgpolar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<double> residual,
ConstVector<double> residual_next_level);
void extrapolatedResidual(int current_level, Vector<double> residual, ConstVector<double> residual_next_level);

/* --------------- */
/* Setup Functions */
Expand All @@ -276,24 +275,24 @@ class IGMGPolar

/* ------------------- */
/* Multigrid Functions */
void multigrid_V_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual);
void multigrid_W_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual);
void multigrid_F_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual);
void implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual);
void implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual);
void implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual);
void multigrid_V_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual);
void multigrid_W_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual);
void multigrid_F_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual);
void extrapolated_multigrid_V_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual);
void extrapolated_multigrid_W_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual);
void extrapolated_multigrid_F_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual);

/* ----------------------- */
/* Interpolation functions */
void prolongation(const int current_level, Vector<double> result, ConstVector<double> x) const;
void restriction(const int current_level, Vector<double> result, ConstVector<double> x) const;
void injection(const int current_level, Vector<double> result, ConstVector<double> x) const;
void extrapolatedProlongation(const int current_level, Vector<double> result, ConstVector<double> x) const;
void extrapolatedRestriction(const int current_level, Vector<double> result, ConstVector<double> x) const;
void FMGInterpolation(const int current_level, Vector<double> result, ConstVector<double> x) const;
void prolongation(int current_level, Vector<double> result, ConstVector<double> x) const;
void restriction(int current_level, Vector<double> result, ConstVector<double> x) const;
void injection(int current_level, Vector<double> result, ConstVector<double> x) const;
void extrapolatedProlongation(int current_level, Vector<double> result, ConstVector<double> x) const;
void extrapolatedRestriction(int current_level, Vector<double> result, ConstVector<double> x) const;
void FMGInterpolation(int current_level, Vector<double> result, ConstVector<double> x) const;

/* ------------- */
/* Visualization */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "../../../include/GMGPolar/gmgpolar.h"

void IGMGPolar::implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Vector<double> solution,
Vector<double> rhs, Vector<double> residual)
void IGMGPolar:extrapolated_multigrid_F_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual)
{
assert(0 <= level_depth && level_depth < number_of_levels_ - 1);

Expand Down Expand Up @@ -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<double>(end_MGC - start_MGC).count();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "../../../include/GMGPolar/gmgpolar.h"

void IGMGPolar::implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Vector<double> solution,
Vector<double> rhs, Vector<double> residual)
void IGMGPolar::extrapolated_multigrid_V_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual)
{
assert(0 <= level_depth && level_depth < number_of_levels_ - 1);

Expand Down Expand Up @@ -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<double>(end_MGC - start_MGC).count();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "../../../include/GMGPolar/gmgpolar.h"

void IGMGPolar::implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Vector<double> solution,
Vector<double> rhs, Vector<double> residual)
void IGMGPolar::extrapolated_multigrid_W_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual)
{
assert(0 <= level_depth && level_depth < number_of_levels_ - 1);

Expand Down Expand Up @@ -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<double>(end_MGC - start_MGC).count();
}
}
}
5 changes: 2 additions & 3 deletions src/GMGPolar/MultigridMethods/multigrid_F_Cycle.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "../../../include/GMGPolar/gmgpolar.h"

void IGMGPolar::multigrid_F_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual)
void IGMGPolar::multigrid_F_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual)
{
assert(0 <= level_depth && level_depth < number_of_levels_ - 1);

Expand Down Expand Up @@ -91,4 +90,4 @@ void IGMGPolar::multigrid_F_Cycle(const int level_depth, Vector<double> solution
auto end_MGC = std::chrono::high_resolution_clock::now();
t_avg_MGC_total_ += std::chrono::duration<double>(end_MGC - start_MGC).count();
}
}
}
5 changes: 2 additions & 3 deletions src/GMGPolar/MultigridMethods/multigrid_V_Cycle.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "../../../include/GMGPolar/gmgpolar.h"

void IGMGPolar::multigrid_V_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual)
void IGMGPolar::multigrid_V_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual)
{
assert(0 <= level_depth && level_depth < number_of_levels_ - 1);

Expand Down Expand Up @@ -90,4 +89,4 @@ void IGMGPolar::multigrid_V_Cycle(const int level_depth, Vector<double> solution
auto end_MGC = std::chrono::high_resolution_clock::now();
t_avg_MGC_total_ += std::chrono::duration<double>(end_MGC - start_MGC).count();
}
}
}
5 changes: 2 additions & 3 deletions src/GMGPolar/MultigridMethods/multigrid_W_Cycle.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "../../../include/GMGPolar/gmgpolar.h"

void IGMGPolar::multigrid_W_Cycle(const int level_depth, Vector<double> solution, Vector<double> rhs,
Vector<double> residual)
void IGMGPolar::multigrid_W_Cycle(int level_depth, Vector<double> solution, Vector<double> rhs, Vector<double> residual)
{
assert(0 <= level_depth && level_depth < number_of_levels_ - 1);

Expand Down Expand Up @@ -91,4 +90,4 @@ void IGMGPolar::multigrid_W_Cycle(const int level_depth, Vector<double> solution
auto end_MGC = std::chrono::high_resolution_clock::now();
t_avg_MGC_total_ += std::chrono::duration<double>(end_MGC - start_MGC).count();
}
}
}
12 changes: 6 additions & 6 deletions src/GMGPolar/level_interpolation.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../include/GMGPolar/gmgpolar.h"

void IGMGPolar::prolongation(const int current_level, Vector<double> result, ConstVector<double> x) const
void IGMGPolar::prolongation(int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ && 1 <= current_level);
if (!interpolation_)
Expand All @@ -9,7 +9,7 @@ void IGMGPolar::prolongation(const int current_level, Vector<double> result, Con
interpolation_->applyProlongation(levels_[current_level].grid(), levels_[current_level - 1].grid(), result, x);
}

void IGMGPolar::restriction(const int current_level, Vector<double> result, ConstVector<double> x) const
void IGMGPolar::restriction(int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ - 1 && 0 <= current_level);
if (!interpolation_)
Expand All @@ -18,7 +18,7 @@ void IGMGPolar::restriction(const int current_level, Vector<double> result, Cons
interpolation_->applyRestriction(levels_[current_level].grid(), levels_[current_level + 1].grid(), result, x);
}

void IGMGPolar::injection(const int current_level, Vector<double> result, ConstVector<double> x) const
void IGMGPolar::injection(int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ - 1 && 0 <= current_level);
if (!interpolation_)
Expand All @@ -27,7 +27,7 @@ void IGMGPolar::injection(const int current_level, Vector<double> result, ConstV
interpolation_->applyInjection(levels_[current_level].grid(), levels_[current_level + 1].grid(), result, x);
}

void IGMGPolar::extrapolatedProlongation(const int current_level, Vector<double> result, ConstVector<double> x) const
void IGMGPolar::extrapolatedProlongation(int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ && 1 <= current_level);
if (!interpolation_)
Expand All @@ -37,7 +37,7 @@ void IGMGPolar::extrapolatedProlongation(const int current_level, Vector<double>
result, x);
}

void IGMGPolar::extrapolatedRestriction(const int current_level, Vector<double> result, ConstVector<double> x) const
void IGMGPolar::extrapolatedRestriction(int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ - 1 && 0 <= current_level);
if (!interpolation_)
Expand All @@ -47,7 +47,7 @@ void IGMGPolar::extrapolatedRestriction(const int current_level, Vector<double>
result, x);
}

void IGMGPolar::FMGInterpolation(const int current_level, Vector<double> result, ConstVector<double> x) const
void IGMGPolar::FMGInterpolation(int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ && 1 <= current_level);
if (!interpolation_)
Expand Down
2 changes: 1 addition & 1 deletion src/GMGPolar/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ void IGMGPolar::updateResidualNorms(Level& level, int iteration, double& initial
}
}

void IGMGPolar::extrapolatedResidual(const int current_level, Vector<double> residual,
void IGMGPolar::extrapolatedResidual(int current_level, Vector<double> residual,
ConstVector<double> residual_next_level)
{
const PolarGrid& fineGrid = levels_[current_level].grid();
Expand Down
Loading