Error while using sparsesolver or UMFPACK

Hello I am trying to solve a system using the Edge element and the variation form involves complex numbers .
Some lines of the code :
fespace Th( meshName , Edge13d )



Th < complex > [Ex,Ey,Ez] ;



solve EQ([Ex,Ey,Ez],[Vx,Vy,Vz],solver = UMFPACK)
= int3d(Team7)(Nu * Curl(Ex,Ey,Ez)’ * Curl(Vx,Vy,Vz) )
+ int3d(Team7)([Jx, Jy, Jz]’ * [Vx, Vy, Vz])
- int3d(Team7)([fx,fy,fz]’ * [Vx,Vy,Vz])
+ on(19,18,21,23,20,22,Ex =0 ,Ey = 0,Ez =0);//

The output I am getting is :
Error umpfack umfpack_zi_numeric status -1
dosolver UMFPACK complex/int 1 0
Error umfpack_di_solve status -3

I would like to ask what does this message imply .

You are solving the indefinite Maxwell equation. Your problem is singular, thus UMFPACK fails.

  1. are you sure you meant int3d(Team7)([Jx, Jy, Jz]' * [Vx, Vy, Vz]) and not int3d(Team7)([Ex, Ey, Ez]' * [Vx, Vy, Vz])?
  2. if yes, use a better direct solver, like MUMPS, using load "MUMPS"
  3. you can also use AMS, it’s only currently interfaced for lowest-order Nédélec FE right now but I can add higher orders as well, cf. maxwell-3d-PETSc.edp.
1 Like

Dear Sir/Madam .

I really adore and appreciate your effort for getting back to me.Thank a ton ! !

  1. Yes I was naively wrong with the variation formulation :

The weak form of the time harmonic Electromagnetic wave equation that I want to solve reads:

f * v dx = (mu^-1).(curl E) * (curl v) dx + k^2. (E * v) dx
f = -i * omega * J
k^2 = (i * sigma * omega) - (eps * omega^2)

I wrote the variation form which reads :

varf vEMwaveEqn([Ex,Ey,Ez],[Vx,Vy,Vz])
= int3d(Team7)(Nu * Curl(Ex,Ey,Ez)’ * Curl(Vx,Vy,Vz) )

  • int3d(Team7)([Ex, Ey, Ez]’ * [Vx, Vy, Vz])
  • int3d(Team7)([fx,fy,fz]’ * [Vx,Vy,Vz])
  • on(4,Ex =0 ,Ey = 0,Ez =0);

//…
matrix EmWaveEqn = vEMwaveEqn(FeEdge,FeEdge,solver = GMRES) ;
complex[int] RHS = vEMwaveEqn(0,FeEdge) ;

I solved the values of :
FeEdge [Jx,Jy,Jz]; // Edge elements has 3 components !

[Jx,Jy,Jz] = Grad(u) * sigma; //*(region == 1) ;

FE1 k2 ; // FE1 is P2 element

FeEdge[Ex,Ey,Ez] ; // FeEdge Edge13d element .

After using iterative solvers, or direct solvers my job is getting “Killed” after few minutes in the terminal .
So I am trying to get some possible answers to the problem.

  1. load "MUMPS" I think it is a plugin and I am trying to install along with PETSc and link it to Freefem++
    3. macro def(i)[i, i#y, i#z]// EOM . Can you please clarify the meaning of" # "in Freefem++.

I wanted to write you after I ran your code but I am having some issues with the PETSc installation due to 2 times installation of MPI (I will fix it soon !)
I would be grateful if you could get back to me.

Regards
Saptarshi Mandal
Bergische University of Wuppertal
Germany

Having two MPI installations is your way to disaster, PETSc or no PETSc. I’d suggest you make a clean install so that you can have all the tools FreeFEM and PETSc have to offer, see the instructions here. Regarding your question about macro, please read the documentation.

Dear Sir
Thank you for the suggestion to use the MUMPS solver.In my above mentioned problem MUMPS worked where as other

direct solvers did not.I am wondering why.