39 using ScalarIndex =
coupling::indexing::CellIndex<dim, scope..., coupling::indexing::IndexTrait::md2macro, coupling::indexing::IndexTrait::noGhost>;
40 using VectorIndex =
coupling::indexing::CellIndex<dim, coupling::indexing::IndexTrait::vector, scope..., coupling::indexing::IndexTrait::md2macro,
41 coupling::indexing::IndexTrait::noGhost>;
46 int sigma,
const char* extrapolationStrategy)
48 _kernel(generateKernel()) {
50 if (GAUSS_KERNEL_RADIUS != 1)
51 throw std::runtime_error(
"ERROR: GAUSS: Kernel radius != 1 currently not supported.");
53 if (extrapolationStrategy ==
nullptr || std::strcmp(extrapolationStrategy,
"none") == 0)
55 else if (std::strcmp(extrapolationStrategy,
"mirror") == 0)
57 else if (std::strcmp(extrapolationStrategy,
"reflect") == 0)
60 std::cout <<
"Extrapolation strategy: " << extrapolationStrategy << std::endl;
61 throw std::runtime_error(
"ERROR: GAUSS: Unknown extrapolation strategy.");
65 std::cout <<
" GAUSS (Dim: " << _dim <<
"): Created Gaussian filter." << std::endl;
67 std::cout <<
" It will not use extrapolation." << std::endl;
69 std::cout <<
" It will use mirroring extrapolation." << std::endl;
71 std::cout <<
" It will use reflecting extrapolation." << std::endl;
77 std::cout <<
" GAUSS (Dim: " << _dim <<
"): Gaussian filter deconstructed" << std::endl;
84 std::array<double, 1 + 2 * GAUSS_KERNEL_RADIUS> generateKernel();
86 constexpr double gaussianDensityFunction(
int x);
96 VectorIndex getIndexAbove(
const VectorIndex index,
unsigned int d);
106 VectorIndex getIndexBelow(
const VectorIndex index,
unsigned int d);
109 const unsigned int _dim;
114 std::array<double, 1 + 2 * GAUSS_KERNEL_RADIUS> _kernel;
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15