INTERFACE SPAnalyticPWFunction; (* Piecewise-analytic functions on the sphere *) IMPORT SPPWFunction, SPTriang; FROM SPFunction IMPORT Point, Gradient; TYPE T = SPPWFunction.T; TYPE TriangleData <: PublicTriangleData; PublicTriangleData = SPPWFunction.TriangleData OBJECT evalProc: EvalProc; gradProc: GradProc; slapProc: SLapProc; descr: TEXT; (* Analytic description of function. *) END; TYPE EvalProc = PROCEDURE (READONLY p: Point): LONG; GradProc = PROCEDURE (READONLY p: Point): Gradient; SLapProc = PROCEDURE (READONLY p: Point): LONG; LONG = LONGREAL; PROCEDURE Uniform( tri: REF SPTriang.T; evalProc: EvalProc; gradProc: GradProc; slapProc: SLapProc; descr: TEXT ): T; (* Creates an SPAnalyticPWFunction.T with triangulation "tri" which is actually the same function on all triangles of "tri". So all TriangleData records will contain the same "evalProc", "gradProc", "slapProc", and "descr" fields. *) PROCEDURE FromName(name: TEXT; tri: REF SPTriang.T): T; (* Returns a "Uniform" piecewise analytic function where the function is specified by the "name". Only a small fixed set of names is recognized; if the name is invalid, the result is NIL. *) END SPAnalyticPWFunction.