diff --git a/src/mir/method/ProxyWeightedMethod.cc b/src/mir/method/ProxyWeightedMethod.cc index 8583910a7..813f67c4c 100644 --- a/src/mir/method/ProxyWeightedMethod.cc +++ b/src/mir/method/ProxyWeightedMethod.cc @@ -20,7 +20,6 @@ #include "mir/param/MIRParametrisation.h" #include "mir/repres/Representation.h" #include "mir/util/Exceptions.h" -#include "mir/util/Log.h" #include "mir/util/allocator/InPlaceAllocator.h" @@ -30,20 +29,43 @@ namespace mir::method { namespace { -struct StructuredBicubic final : public ProxyWeightedMethod { - explicit StructuredBicubic(const param::MIRParametrisation& param) : - ProxyWeightedMethod(param, "structured-bicubic") {} -}; +#define ATLAS_METHOD(Type, Name) \ + struct Type final : ProxyWeightedMethod { \ + explicit Type(const param::MIRParametrisation& param) : ProxyWeightedMethod(param, Name) {} \ + }; +ATLAS_METHOD(StructuredBilinear, "structured-bilinear"); +ATLAS_METHOD(StructuredBiquasicubic, "structured-biquasicubic"); +ATLAS_METHOD(StructuredBicubic, "structured-bicubic"); +ATLAS_METHOD(FiniteElement, "finite-element"); +ATLAS_METHOD(ConservativeSphericalPolygon, "conservative-spherical-polygon"); +ATLAS_METHOD(GridBoxAverage, "grid-box-average"); +ATLAS_METHOD(GridBoxMaximum, "grid-box-maximum"); + +// "nearest-neighbour" (knn) +// "k-nearest-neighbours" (knn) +// "cubedsphere-bilinear" +// "regional-linear-2d" (structured) +// "spherical-vector" -} // namespace +#undef ATLAS_INTERPOL -static const MethodFactory* METHODS[]{ - new MethodBuilder("structured-bicubic"), + +const MethodFactory* MIR_METHODS[]{ + new MethodBuilder("atlas-structured-bicubic"), + new MethodBuilder("atlas-structured-bilinear"), + new MethodBuilder("atlas-structured-biquasicubic"), + new MethodBuilder("atlas-finite-element"), + new MethodBuilder("atlas-conservative-spherical-polygon"), + new MethodBuilder("atlas-grid-box-average"), + new MethodBuilder("atlas-grid-box-maximum"), }; +} // namespace + + ProxyWeightedMethod::ProxyWeightedMethod(const param::MIRParametrisation& param, const std::string& interpolation_type) : MethodWeighted(param), type_(interpolation_type) {