Skip to content

Allow operator() in AnalyticalCoordFunction

Oliver Sander requested to merge allow-operator-in-analytical-coordfunction into master

Classes that implemented closed-form ('analytical') coordinate functions for GeometryGrid currently need to derive from the AnalyticalCoordFunction class, and implement the method

void evaluate ( const DomainVector &x, RangeVector &y ) const

This appears a bit old-fashioned.

This patch allows to alternatively implement

RangeVector operator() ( const DomainVector& x) const

If that method exists, GeometryGrid will use it. Otherwise, it will fall back on 'evaluate'. Therefore, while this patch is an interface enhancement, it does not break any existing code.

Merge request reports

Loading