Skip to content

Commit

Permalink
Moving registration to header
Browse files Browse the repository at this point in the history
Optimised build was omitting XZInterpolation factory registrations.
  • Loading branch information
bendudson committed Feb 4, 2024
1 parent 6ee9f74 commit 936cd55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions include/bout/interpolation_xz.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,12 @@ using RegisterXZInterpolation = XZInterpolationFactory::RegisterInFactory<Derive
using RegisterUnavailableXZInterpolation =
XZInterpolationFactory::RegisterUnavailableInFactory;

namespace {
RegisterXZInterpolation<XZHermiteSpline> registerinterphermitespline{"hermitespline"};
RegisterXZInterpolation<XZMonotonicHermiteSpline> registerinterpmonotonichermitespline{
"monotonichermitespline"};
RegisterXZInterpolation<XZLagrange4pt> registerinterplagrange4pt{"lagrange4pt"};
RegisterXZInterpolation<XZBilinear> registerinterpbilinear{"bilinear"};
} // namespace

#endif // INTERP_XZ_H
8 changes: 0 additions & 8 deletions src/mesh/interpolation_xz.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,3 @@ const Field3D interpolate(const Field2D& f, const Field3D& delta_x) {
}
return result;
}

namespace {
RegisterXZInterpolation<XZHermiteSpline> registerinterphermitespline{"hermitespline"};
RegisterXZInterpolation<XZMonotonicHermiteSpline> registerinterpmonotonichermitespline{
"monotonichermitespline"};
RegisterXZInterpolation<XZLagrange4pt> registerinterplagrange4pt{"lagrange4pt"};
RegisterXZInterpolation<XZBilinear> registerinterpbilinear{"bilinear"};
} // namespace

0 comments on commit 936cd55

Please sign in to comment.