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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void GMGPolar<DomainGeometry, DensityProfileCoefficients>::extrapolated_multigri

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

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level.level_depth(), next_level.solution(), solution);
Expand Down Expand Up @@ -80,7 +80,7 @@ void GMGPolar<DomainGeometry, DensityProfileCoefficients>::extrapolated_multigri
/* -------------------------- */
// Use 'residual' instead of 'level.error_correction()' as a temporary buffer.
// Note: 'level.error_correction()' has size 0 at level depth = 0.
extrapolatedProlongation(next_level.level_depth(), residual, next_level.error_correction());
prolongation(next_level.level_depth(), residual, next_level.error_correction());

/* ----------------------------------- */
/* Compute the corrected approximation */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void GMGPolar<DomainGeometry, DensityProfileCoefficients>::extrapolated_multigri

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

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level.level_depth(), next_level.solution(), solution);
Expand Down Expand Up @@ -74,7 +74,7 @@ void GMGPolar<DomainGeometry, DensityProfileCoefficients>::extrapolated_multigri
/* -------------------------- */
// Use 'residual' instead of 'level.error_correction()' as a temporary buffer.
// Note: 'level.error_correction()' has size 0 at level depth = 0.
extrapolatedProlongation(next_level.level_depth(), residual, next_level.error_correction());
prolongation(next_level.level_depth(), residual, next_level.error_correction());

/* ----------------------------------- */
/* Compute the corrected approximation */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void GMGPolar<DomainGeometry, DensityProfileCoefficients>::extrapolated_multigri

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

// f_{l-1} - A_{l-1}* Inject(u_l)
injection(level.level_depth(), next_level.solution(), solution);
Expand Down Expand Up @@ -80,7 +80,7 @@ void GMGPolar<DomainGeometry, DensityProfileCoefficients>::extrapolated_multigri
/* -------------------------- */
// Use 'residual' instead of 'level.error_correction()' as a temporary buffer.
// Note: 'level.error_correction()' has size 0 at level depth = 0.
extrapolatedProlongation(next_level.level_depth(), residual, next_level.error_correction());
prolongation(next_level.level_depth(), residual, next_level.error_correction());

/* ----------------------------------- */
/* Compute the corrected approximation */
Expand Down
2 changes: 0 additions & 2 deletions include/GMGPolar/gmgpolar.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ class GMGPolar : public IGMGPolar
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;

/* ------------- */
Expand Down
26 changes: 0 additions & 26 deletions include/GMGPolar/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,6 @@ void GMGPolar<DomainGeometry, DensityProfileCoefficients>::injection(int current
interpolation_->applyInjection(levels_[current_level].grid(), levels_[current_level + 1].grid(), result, x);
}

template <concepts::DomainGeometry DomainGeometry, concepts::DensityProfileCoefficients DensityProfileCoefficients>
void GMGPolar<DomainGeometry, DensityProfileCoefficients>::extrapolatedProlongation(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);
}

template <concepts::DomainGeometry DomainGeometry, concepts::DensityProfileCoefficients DensityProfileCoefficients>
void GMGPolar<DomainGeometry, DensityProfileCoefficients>::extrapolatedRestriction(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);
}

template <concepts::DomainGeometry DomainGeometry, concepts::DensityProfileCoefficients DensityProfileCoefficients>
void GMGPolar<DomainGeometry, DensityProfileCoefficients>::FMGInterpolation(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 @@ -23,16 +23,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 @@ -35,8 +35,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
114 changes: 0 additions & 114 deletions src/Interpolation/extrapolated_prolongation.cpp

This file was deleted.

79 changes: 0 additions & 79 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
65 changes: 0 additions & 65 deletions tests/Interpolation/extrapolated_prolongation.cpp

This file was deleted.

Loading
Loading