Laplace-Beltrami on surfaces

Hello.

I tried to solve the Laplace Beltrami eigenvalue problem on the sphere. The usual syntax for storing the eigenfunction does not seem to work. The eigenvalues are captured correctly, but when using vector=eV I get some error.

The code is below. Removing “vector=eV” gives a code which runs and returns the eigenvalues. I am interested to see the eigenvectors also.

Best regards,
Beni


load “msh3”
load “medit”
load “tetgen”

verbosity = 0;
int K = 10;

real hh = 0.05;

// Mesh 2D
mesh Th = square(10, 20, [xpi-pi/2, 2y*pi]); // ]-pi/2, pi/2[X]0, 2pi[
// A parametrization of a sphere
func f1 = cos(x)*cos(y);
func f2 = cos(x)*sin(y);
func f3 = sin(x);
// Partial derivative of the parametrization DF
func f1x = sin(x)*cos(y);
func f1y = -cos(x)sin(y);
func f2x = -sin(x)sin(y);
func f2y = cos(x)cos(y);
func f3x = cos(x);
func f3y = 0;
//M = DF^t DF
func m11 = f1x^2 + f2x^2 + f3x^2;
func m21 = f1x
f1y + f2x
f2y + f3x
f3y;
func m22 = f1y^2 + f2y^2 + f3y^2;

// Periodic condition
func perio = [[4, y], [2, y], [1, x], [3, x]];

// Mesh adaptation
real vv = 1/square(hh);
Th = adaptmesh(Th, m11vv, m21vv, m22vv, IsMetric=1, inquire=1, periodic=perio);
Th = adaptmesh(Th, m11
vv, m21vv, m22vv, IsMetric=1, periodic=perio);
Th = adaptmesh(Th, m11vv, m21vv, m22vv, IsMetric=1, periodic=perio);
Th = adaptmesh(Th, m11
vv, m21vv, m22vv, IsMetric=1, periodic=perio);

// Sphere
meshS ThS = movemesh23(Th, transfo=[f1, f2, f3]);
plot(ThS);

fespace VhS(ThS,P1);

VhS u,v;

varf a(u,v) =
int2d(ThS)(dx(u)*dx(v) + dy(u)*dy(v)+dz(u)dz(v));
varf b(u,v) = int2d(ThS)( u
v );

matrix A= a(VhS,VhS);
matrix B= b(VhS,VhS);

real[int] ev(K+1);
VhS[int] eV(K+1);

real[int,int] eVect(VhS.ndof,K+1);

cout << VhS.ndof << endl;
cout << ThS.nv << endl;

int k = EigenValue(A,B,value=ev,vector=eV,tol=1e-10);
cout << k << endl;

cout << ev << endl;

I managed to make the code run with “rawvector=(real[int,int])” instead of “vector=(FE vector)”, but I would still want to know, if possible how to make the code run with “vector=”.
Best regards,
Beniamin

Hello,
it’s available in the current branch or last release 4.4-3.
You can look this ex. examples/eigen/LapEigenBeltrami.edp
Axel