.\" .de Id .. .de Sp .if n .sp .if t .sp 0.4 .. .TH interpolate 4rheolef "rheolef-7.0" "rheolef-7.0" "rheolef-7.0" .\" label: /*Class:interpolate .SH NAME \fBinterpolate\fP - Lagrange interpolation of a function .\" skip: @findex interpolate .\" skip: @clindex space .\" skip: @clindex field .PP .SH DESCRIPTION The function \fBinterpolation\fP implements the Lagrange interpolation of a function or a class-function. .SH SYNOPSIS template field interpolate (const space& Xh, const Function& f); .SH EXAMPLE The following code compute the Lagrange interpolation \fBpi_h_u\fP of u(x). .\" begin_example .Sp .nf Float u(const point& x); ... geo omega("square"); space Xh (omega, "P1"); field pi_h_u = interpolate (Xh, u); .Sp .fi .\" end_example .SH ADVANCED EXAMPLE It is possible the replace the function \fBu\fP by a variable of the \fBfield\fP type that represents a picewise polynomial function: this invocation allows the reinterpolation of a field on another mesh or with another approximation. .\" begin_example .Sp .nf geo omega2 ("square2"); space X2h (omega2, "P1"); field uh2 = interpolate (X2h, pi_h_u); .Sp .fi .\" end_example .\" END .SH COPYRIGHT Copyright (C) 2000-2018 Pierre Saramito GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.