Skip to content

Commit

Permalink
Fix application of limiter for StructuredInterpolation2D
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Nov 13, 2024
1 parent fc85c7e commit 9a66167
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ class StructuredInterpolation2D : public Method {
FunctionSpace source_;
FunctionSpace target_;

bool matrix_free_;
bool verbose_;
bool limiter_;
bool matrix_free_;
double convert_units_;
idx_t out_npts_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,15 @@ double StructuredInterpolation2D<Kernel>::convert_units_multiplier( const Field&
template <typename Kernel>
StructuredInterpolation2D<Kernel>::StructuredInterpolation2D( const Method::Config& config ) :
Method( config ),
matrix_free_{false} ,
verbose_{false} {
config.get( "matrix_free", matrix_free_ );
verbose_{false},
limiter_{false},
matrix_free_{false} {
config.get( "verbose", verbose_ );
config.get( "limiter", limiter_ );
config.get( "matrix_free", matrix_free_ );
if (limiter_ && not matrix_free_) {
ATLAS_THROW_EXCEPTION("Cannot apply configuration 'limiter=true' and 'matrix_free=false' together");
}
}


Expand Down Expand Up @@ -328,7 +333,7 @@ template <typename Kernel>
void StructuredInterpolation2D<Kernel>::setup( const FunctionSpace& source ) {
using namespace structured2d;

kernel_.reset( new Kernel( source ) );
kernel_.reset( new Kernel( source, util::Config( "limiter", limiter_ ) ) );

if ( functionspace::StructuredColumns( source ).halo() < 1 ) {
throw_Exception( "The source functionspace must have (halo >= 1) for pole treatment" );
Expand Down

0 comments on commit 9a66167

Please sign in to comment.