Skip to content
Open
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
2 changes: 0 additions & 2 deletions include/GMGPolar/gmgpolar.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ class GMGPolar
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;

/* ------------- */
Expand Down
6 changes: 0 additions & 6 deletions include/Interpolation/interpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,10 @@ class Interpolation
void applyProlongation(const PolarGrid& coarse_grid, const PolarGrid& fine_grid, Vector<double> fine_result,
ConstVector<double> coarse_values) const;

void applyExtrapolatedProlongation(const PolarGrid& coarse_grid, const PolarGrid& fine_grid,
Vector<double> fine_result, ConstVector<double> coarse_values) const;

/* Scaled full weighting (FW) restriction operator. */
void applyRestriction(const PolarGrid& fine_grid, const PolarGrid& coarse_grid, Vector<double> coarse_result,
ConstVector<double> fine_values) const;

void applyExtrapolatedRestriction(const PolarGrid& fine_grid, const PolarGrid& coarse_grid,
Vector<double> coarse_result, ConstVector<double> fine_values) const;

/* Bicubic FMG interpolator 1/16 * [-1, 9, 9, -1] */
void applyFMGInterpolation(const PolarGrid& coarse_grid, const PolarGrid& fine_grid, Vector<double> fine_result,
ConstVector<double> coarse_values) const;
Expand Down
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ set(STENCIL_SOURCES

# file(GLOB_RECURSE INTERPOLATION_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Interpolation/*.cpp)
set(INTERPOLATION_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/Interpolation/extrapolated_prolongation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Interpolation/extrapolated_restriction.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Interpolation/fmg_interpolation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Interpolation/injection.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Interpolation/interpolation.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Ve

// P_ex^T (f_l - A_l*u_l)
level.computeResidual(residual, rhs, solution);
extrapolatedRestriction(level_depth, next_level.residual(), residual);
restriction(level_depth, next_level.residual(), residual);

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level_depth, next_level.solution(), solution);
Expand Down Expand Up @@ -76,7 +76,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Ve

// P_ex^T (f_l - A_l*u_l)
level.computeResidual(residual, rhs, solution);
extrapolatedRestriction(level_depth, next_level.error_correction(), residual);
restriction(level_depth, next_level.error_correction(), residual);

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level_depth, next_level.solution(), solution);
Expand All @@ -98,7 +98,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_F_Cycle(const int level_depth, Ve
}

/* Interpolate the correction */
extrapolatedProlongation(level_depth + 1, residual, next_level.residual());
prolongation(level_depth + 1, residual, next_level.residual());

/* Compute the corrected approximation: u = u + error */
add(solution, ConstVector<double>(residual));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Ve

// P_ex^T (f_l - A_l*u_l)
level.computeResidual(residual, rhs, solution);
extrapolatedRestriction(level_depth, next_level.residual(), residual);
restriction(level_depth, next_level.residual(), residual);

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level_depth, next_level.solution(), solution);
Expand Down Expand Up @@ -76,7 +76,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Ve

// P_ex^T (f_l - A_l*u_l)
level.computeResidual(residual, rhs, solution);
extrapolatedRestriction(level_depth, next_level.error_correction(), residual);
restriction(level_depth, next_level.error_correction(), residual);

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level_depth, next_level.solution(), solution);
Expand All @@ -97,7 +97,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_V_Cycle(const int level_depth, Ve
}

/* Interpolate the correction */
extrapolatedProlongation(level_depth + 1, residual, next_level.residual());
prolongation(level_depth + 1, residual, next_level.residual());

/* Compute the corrected approximation: u = u + error */
add(solution, ConstVector<double>(residual));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Ve

// P_ex^T (f_l - A_l*u_l)
level.computeResidual(residual, rhs, solution);
extrapolatedRestriction(level_depth, next_level.residual(), residual);
restriction(level_depth, next_level.residual(), residual);

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level_depth, next_level.solution(), solution);
Expand Down Expand Up @@ -76,7 +76,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Ve

// P_ex^T (f_l - A_l*u_l)
level.computeResidual(residual, rhs, solution);
extrapolatedRestriction(level_depth, next_level.error_correction(), residual);
restriction(level_depth, next_level.error_correction(), residual);

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level_depth, next_level.solution(), solution);
Expand All @@ -98,7 +98,7 @@ void GMGPolar::implicitlyExtrapolatedMultigrid_W_Cycle(const int level_depth, Ve
}

/* Interpolate the correction */
extrapolatedProlongation(level_depth + 1, residual, next_level.residual());
prolongation(level_depth + 1, residual, next_level.residual());

/* Compute the corrected approximation: u = u + error */
add(solution, ConstVector<double>(residual));
Expand Down
20 changes: 0 additions & 20 deletions src/GMGPolar/level_interpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,6 @@ void GMGPolar::injection(const int current_level, Vector<double> result, ConstVe
interpolation_->applyInjection(levels_[current_level].grid(), levels_[current_level + 1].grid(), result, x);
}

void GMGPolar::extrapolatedProlongation(const int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ && 1 <= current_level);
if (!interpolation_)
throw std::runtime_error("Interpolation not initialized.");

interpolation_->applyExtrapolatedProlongation(levels_[current_level].grid(), levels_[current_level - 1].grid(),
result, x);
}

void GMGPolar::extrapolatedRestriction(const int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ - 1 && 0 <= current_level);
if (!interpolation_)
throw std::runtime_error("Interpolation not initialized.");

interpolation_->applyExtrapolatedRestriction(levels_[current_level].grid(), levels_[current_level + 1].grid(),
result, x);
}

void GMGPolar::FMGInterpolation(const int current_level, Vector<double> result, ConstVector<double> x) const
{
assert(current_level < number_of_levels_ && 1 <= current_level);
Expand Down
115 changes: 0 additions & 115 deletions src/Interpolation/extrapolated_prolongation.cpp

This file was deleted.

76 changes: 0 additions & 76 deletions src/Interpolation/extrapolated_restriction.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ add_executable(gmgpolar_tests
PolarGrid/polargrid.cpp
Interpolation/prolongation.cpp
Interpolation/restriction.cpp
Interpolation/extrapolated_prolongation.cpp
Interpolation/extrapolated_restriction.cpp
Residual/residual.cpp
DirectSolver/directSolver.cpp
DirectSolver/directSolverNoMumps.cpp
Expand Down
Loading