// Computation of Steklov or Wentzell eigenvalues // FreeFem implementation by Beniamin Bogosel // // uses radial representation for the shape in terms of Fourier coefficients // parametrization uses a vector of the form // vec = [a0, as, bs] where as are coefficients of cos and bs coefficients of sin // // The code shows how to implement an eigenvalue problem // and how to handle tangential derivatives in weak form // // Please read and refer to the associated paper // B. Bogosel, The method of fundamental solutions applied to boundary eigenvalue problems, 2016, Journal of Computational and Applied Mathematics // real beta = 0; // parameter for the Laplace-Beltrami coefficient // For Steklov eigenvalue choose 0 real[int] vec; int M = 300; int eigCount = 11; // the number of eigenvalues to compute vec = [1.0,0,0,0,0.3]; // vector of Fourier coefficients for the // boundary parametrization vec = [1,0.1,0,0,0,0.1,0,0.1,0,0,-0.1]; vec = [1,0.1,0.2,0.3,-0.1,0.1,0.4]; // evaluation of a trigonometric polynomial func real ptrig(real t, real[int] VV){ real[int] vect = VV; int n = (vect.n-1)/2; real[int] as = vect(1:n) ; // coeffs of cos real[int] bs = vect(n+1:2*n); // coeffs of sin real a0 =vect(0); real Sum = a0; // initialize sum for(int i=0;i