Hi there, I’m trying to implement the following set of equations on FreeFem++
So far I did the following
macro div(u,v) ( dx(u)+dy(v) ) //
load "Element_Mixte"
func RT = RT1;
func PP = P0;
func PPm = P1edge;
for(int K = 0; K < NbTriangles; K++){
//vectorial space
fespace Pmd(Th[K], [PP, PP]);
Pmd [taux, tauy];
Pmd [phix, phiy];
//space RTm
fespace RTm(Th[K], RT);
RTm [sigmaHx, sigmaHy];
RTm [varphix, varphiy];
//edge space
fespace PPm(Th[K], PPm);
PPm p, q;
real[int] edgeLabel = [11,22,33];
matrix mCk;
for(int e=0; e<3;e++){
varf chk([sigmaHx, sigmaHy, p], [varphix, varphiy, q])
= int1d(Th[K],edgeLabel[e])((varphix*N.x + varphiy*N.y)*q);
mCk = chk(RTm, PPm);
}
real[int] bLH(nDoFl0K);
for(int i=0;i<nDoFl0K;i++){
int ii = locationMatrix(K,i);
bLH(i) = lambdaH[][ii];
}
matrix mbl;
for(int e=0; e<3;e++){
varf lhK(muHk, q)
= int1d(Th[K],edgeLabel[e])(bLH(e)*q);
mbl = lhK(LambdaH,PPm);
//cout<< mbl <<"\n";
}
matrix mDk;
varf dhK([sigmaHx, sigmaHy], [taux, tauy])
= int2d(Th[K])((varphix*phix) + (varphiy*phiy));
mDk = dhK(RTm, Pmd);
fespace VhKaux(Th[K],Pk);
VhKaux auxuHhK;
auxuHhK[] = uHhg(K,:);
real[int] sigmaHmsl = kappa*[dx(auxuHhK), dy(auxuHhK)];
matrix mh;
varf hhK(auxuHhK, [taux, tauy])
=int2d(Th[K])(-1*kappa*((dx(auxuHhK)*phix)+(dy(auxuHhK)*phiy)));
mh = hhK(Vh, Pmd);
cout << "SigmaH x elem " << K << "\n";
cout << sigmaHx[] << "\n";
cout << "SigmaH y elem " << K << "\n";
cout << sigmaHy[] << "\n";
cout << "SigmaH msl " << "\n";
cout << sigmaHmsl << "\n";
}
But I’m getting the following error
= int1d(Th[K],edgeLabel[e])((varphix*N.x + varphiy*N.y)*q) error operator * <10LinearCombI6MDroit4C_F0E>, <10LinearCombI6MDroit4C_F0E>
Could someone help me find what I did wrong?