Skip to content
Merged
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
Empty file modified include/ConfigParser/cmdline.h
100755 → 100644
Empty file.
4 changes: 4 additions & 0 deletions include/ConfigParser/config_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#include "../../include/GMGPolar/gmgpolar.h"
#include "test_selection.h"

namespace gmgpolar
{

class ConfigParser
{
public:
Expand Down Expand Up @@ -118,3 +121,4 @@ class ConfigParser
void selectTestCase(GeometryType geometry_type, ProblemType problem_type, AlphaCoeff alpha_type,
BetaCoeff beta_type, double Rmax, double kappa_eps, double delta_e, double alpha_jump);
};
} // namespace gmgpolar
5 changes: 5 additions & 0 deletions include/ConfigParser/test_selection.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@

#include "../../include/GMGPolar/test_cases.h"

namespace gmgpolar
{

using DomainGeometryVariant = std::variant<CircularGeometry, ShafranovGeometry, CzarnyGeometry, CulhamGeometry>;

using DensityProfileCoefficientsVariant =
std::variant<PoissonCoefficients, SonnendruckerCoefficients, SonnendruckerGyroCoefficients, ZoniCoefficients,
ZoniGyroCoefficients, ZoniShiftedCoefficients, ZoniShiftedGyroCoefficients>;

} // namespace gmgpolar
7 changes: 6 additions & 1 deletion include/Definitions/equals.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
#include <cmath>
#include <algorithm>

namespace gmgpolar
{

template <typename T>
inline std::enable_if_t<std::is_floating_point_v<T>, bool> equals(T lhs, T rhs)
{
return std::abs(lhs - rhs) <=
(1e3 * std::numeric_limits<T>::epsilon()) * std::max(1.0, std::max(std::abs(lhs), std::abs(rhs)));
}
}

} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#ifdef GMGPOLAR_USE_MUMPS

namespace gmgpolar
{

template <class LevelCacheType>
class DirectSolver_COO_MUMPS_Give : public DirectSolver<LevelCacheType>
{
Expand Down Expand Up @@ -84,4 +87,5 @@ class DirectSolver_COO_MUMPS_Give : public DirectSolver<LevelCacheType>
#include "directSolverGive.inl"
#include "matrixStencil.inl"

} // namespace gmgpolar
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#ifdef GMGPOLAR_USE_MUMPS

namespace gmgpolar
{

template <class LevelCacheType>
class DirectSolver_COO_MUMPS_Take : public DirectSolver<LevelCacheType>
{
Expand Down Expand Up @@ -83,4 +86,5 @@ class DirectSolver_COO_MUMPS_Take : public DirectSolver<LevelCacheType>
#include "directSolverTake.inl"
#include "matrixStencil.inl"

} // namespace gmgpolar
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#include "../directSolver.h"

namespace gmgpolar
{

template <class LevelCacheType>
class DirectSolver_CSR_LU_Give : public DirectSolver<LevelCacheType>
{
Expand Down Expand Up @@ -64,3 +67,4 @@ class DirectSolver_CSR_LU_Give : public DirectSolver<LevelCacheType>
#include "buildSolverMatrix.inl"
#include "directSolverGive.inl"
#include "matrixStencil.inl"
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#include "../directSolver.h"

namespace gmgpolar
{

template <class LevelCacheType>
class DirectSolver_CSR_LU_Take : public DirectSolver<LevelCacheType>
{
Expand Down Expand Up @@ -63,3 +66,4 @@ class DirectSolver_CSR_LU_Take : public DirectSolver<LevelCacheType>
#include "buildSolverMatrix.inl"
#include "directSolverTake.inl"
#include "matrixStencil.inl"
} // namespace gmgpolar
4 changes: 4 additions & 0 deletions include/DirectSolver/directSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#include "mpi.h"
#endif

namespace gmgpolar
{

template <class LevelCacheType>
class DirectSolver
{
Expand All @@ -43,3 +46,4 @@ class DirectSolver
const bool DirBC_Interior_;
const int num_omp_threads_;
};
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#include "../extrapolatedSmoother.h"

namespace gmgpolar
{

// The extrapolated smoother implements the coupled circle-radial smoothing with coarse node elimination.
// Coarse nodes are excluded from the smoothing iteration by:
// 1. Setting their diagonal entries in A_sc to 1.0 (identity mapping)
Expand Down Expand Up @@ -196,3 +199,4 @@ class ExtrapolatedSmootherGive : public ExtrapolatedSmoother<LevelCacheType>
#include "applyAscOrtho.inl"
#include "solveAscSystem.inl"
#include "initializeMumps.inl"
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#include "../extrapolatedSmoother.h"

namespace gmgpolar
{

// The extrapolated smoother implements the coupled circle-radial smoothing with coarse node elimination.
// Coarse nodes are excluded from the smoothing iteration by:
// 1. Setting their diagonal entries in A_sc to 1.0 (identity mapping)
Expand Down Expand Up @@ -200,3 +203,4 @@ class ExtrapolatedSmootherTake : public ExtrapolatedSmoother<LevelCacheType>
#include "buildTridiagonalAsc.inl"
#include "applyAscOrtho.inl"
#include "solveAscSystem.inl"
} // namespace gmgpolar
4 changes: 4 additions & 0 deletions include/ExtrapolatedSmoother/extrapolatedSmoother.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#include "mpi.h"
#endif

namespace gmgpolar
{

template <class LevelCacheType>
class ExtrapolatedSmoother
{
Expand All @@ -42,3 +45,4 @@ class ExtrapolatedSmoother
const bool DirBC_Interior_;
const int num_omp_threads_;
};
} // namespace gmgpolar
4 changes: 4 additions & 0 deletions include/GMGPolar/gmgpolar.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

#include "igmgpolar.h"

namespace gmgpolar
{

template <concepts::DomainGeometry DomainGeometry, concepts::DensityProfileCoefficients DensityProfileCoefficients>
class GMGPolar : public IGMGPolar
{
Expand Down Expand Up @@ -210,3 +213,4 @@ class GMGPolar : public IGMGPolar
#include "MultigridMethods/extrapolated_multigrid_V_Cycle.h"
#include "MultigridMethods/multigrid_F_Cycle.h"
#include "MultigridMethods/multigrid_W_Cycle.h"
} // namespace gmgpolar
4 changes: 4 additions & 0 deletions include/GMGPolar/igmgpolar.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
#include "../PolarGrid/polargrid.h"
#include "../Definitions/global_definitions.h"

namespace gmgpolar
{

class IGMGPolar
{
public:
Expand Down Expand Up @@ -222,3 +225,4 @@ class IGMGPolar
double t_avg_MGC_residual_;
double t_avg_MGC_directSolver_;
};
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class CartesianR2_Boundary_CircularGeometry
{
public:
Expand All @@ -17,3 +20,4 @@ class CartesianR2_Boundary_CircularGeometry
};

static_assert(concepts::BoundaryConditions<CartesianR2_Boundary_CircularGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class CartesianR2_Boundary_CzarnyGeometry
{
public:
Expand All @@ -24,3 +27,4 @@ class CartesianR2_Boundary_CzarnyGeometry
};

static_assert(concepts::BoundaryConditions<CartesianR2_Boundary_CzarnyGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class CartesianR2_Boundary_ShafranovGeometry
{
public:
Expand All @@ -19,3 +22,4 @@ class CartesianR2_Boundary_ShafranovGeometry
};

static_assert(concepts::BoundaryConditions<CartesianR2_Boundary_ShafranovGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class CartesianR6_Boundary_CircularGeometry
{
public:
Expand All @@ -17,3 +20,4 @@ class CartesianR6_Boundary_CircularGeometry
};

static_assert(concepts::BoundaryConditions<CartesianR6_Boundary_CircularGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class CartesianR6_Boundary_CzarnyGeometry
{
public:
Expand All @@ -24,3 +27,4 @@ class CartesianR6_Boundary_CzarnyGeometry
};

static_assert(concepts::BoundaryConditions<CartesianR6_Boundary_CzarnyGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class CartesianR6_Boundary_ShafranovGeometry
{
public:
Expand All @@ -19,3 +22,4 @@ class CartesianR6_Boundary_ShafranovGeometry
};

static_assert(concepts::BoundaryConditions<CartesianR6_Boundary_ShafranovGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class PolarR6_Boundary_CircularGeometry
{
public:
Expand All @@ -17,3 +20,4 @@ class PolarR6_Boundary_CircularGeometry
};

static_assert(concepts::BoundaryConditions<PolarR6_Boundary_CircularGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class PolarR6_Boundary_CulhamGeometry
{
public:
Expand All @@ -17,3 +20,4 @@ class PolarR6_Boundary_CulhamGeometry
};

static_assert(concepts::BoundaryConditions<PolarR6_Boundary_CulhamGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class PolarR6_Boundary_CzarnyGeometry
{
public:
Expand All @@ -23,3 +26,4 @@ class PolarR6_Boundary_CzarnyGeometry
};

static_assert(concepts::BoundaryConditions<PolarR6_Boundary_CzarnyGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class PolarR6_Boundary_ShafranovGeometry
{
public:
Expand All @@ -19,3 +22,4 @@ class PolarR6_Boundary_ShafranovGeometry
};

static_assert(concepts::BoundaryConditions<PolarR6_Boundary_ShafranovGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class Refined_Boundary_CircularGeometry
{
public:
Expand All @@ -17,3 +20,4 @@ class Refined_Boundary_CircularGeometry
};

static_assert(concepts::BoundaryConditions<Refined_Boundary_CircularGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class Refined_Boundary_CulhamGeometry
{
public:
Expand All @@ -17,3 +20,4 @@ class Refined_Boundary_CulhamGeometry
};

static_assert(concepts::BoundaryConditions<Refined_Boundary_CulhamGeometry>);
} // namespace gmgpolar
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "../boundaryConditions.h"

namespace gmgpolar
{

class Refined_Boundary_CzarnyGeometry
{
public:
Expand All @@ -23,3 +26,4 @@ class Refined_Boundary_CzarnyGeometry
};

static_assert(concepts::BoundaryConditions<Refined_Boundary_CzarnyGeometry>);
} // namespace gmgpolar
Loading
Loading