Parallel computing

Dear all,

I heve few questions on the example Maxwell-3d-simple.edp from ffddm examples. I need to solve my own maxwell code in parallel and I am new in parallel computing and need to understand this code in detail, I will be thankful if you help me on this.

  1. what are the roles of two preconditioers VarfEprec and VarfOpt ? while in them also the values of the epsilonEprec is equal to 0 in the code. so the VarfEprec is practically equal to Varf.

  2. in the second preconditioned VarfOpt the fourth line ( int2d(meshName,10)(1ikCrossN(vx,vy,vz)’*CrossN(Ex,Ey,Ez)) ) is defined based on what? and this 10 boundry condition is also from where? because all labels in the mesh were defines 1 and 2.

// for the preconditioner
macro VarfEprec(varfName, meshName, PhName)
varf varfName([Ex,Ey,Ez],[vx,vy,vz]) =
int3d(meshName)(Curl(vx,vy,vz)‘Curl(Ex,Ey,Ez))
+ int3d(meshName)(-(k^2-1i
epsilonEprec)[vx,vy,vz]’[Ex,Ey,Ez])
+ int2d(meshName,Robin)(1ikCrossN(vx,vy,vz)’*CrossN(Ex,Ey,Ez))
+ on(Dirichlet,Ex=0,Ey=0,Ez=0); // EOM

// for the preconditioner
macro VarfOpt(varfName, meshName, PhName)
varf varfName([Ex,Ey,Ez],[vx,vy,vz]) =
int3d(meshName)(Curl(vx,vy,vz)'Curl(Ex,Ey,Ez))
+ int3d(meshName)(-(k^2-1i
epsilonEprec)[vx,vy,vz]’[Ex,Ey,Ez])
+ int2d(meshName,Robin)(1ikCrossN(vx,vy,vz)‘CrossN(Ex,Ey,Ez))
+ int2d(meshName,10)(1i
k*CrossN(vx,vy,vz)’*CrossN(Ex,Ey,Ez))
+ on(Dirichlet,Ex=0,Ey=0,Ez=0); // EOM

  1. Defining a coarse mesh setup Thc is obligatory for solving maxwell equation? if yes, what is optimum for mysplit value?

  2. in the ffddmplot(M,sqrt(real(u)^2+real(uy)^2+real(uz)^2), “Global solution”); u is equal with ux? because when I change it to ux I get an error.

Thanks for your guidance in advance.

ffddm is useful to prototype domain decomposition preconditioners. If you simply want to exploit parallel computing easily, your best bet would be to use PETSc. You can simply assemble your varf using the same notation as in a sequential FreeFEM script, see FreeFem-sources/maxwell-3d-PETSc.edp at master · FreeFem/FreeFem-sources · GitHub, and then call a distributed LU solver, with set(A, sparams = "-pc_type lu"). For Maxwell equation, you’ll be able to use the auxiliary-space Maxwell solver through hypre, see AMS — hypre 2.20.0 documentation.

thanks for your reply, Actually, I need to learn how to use ffddm, it will also be necessary and helpful for my other problems, so is it possibe that you explain alittle bit about how to define preconditioers in maxwel equation, and my other questions I asked above?

Sorry, I don’t know that interface. I use PETSc/HPDDM instead.

I have a question. I’ve installed hypre on ubuntu sucessfully and load “hypre_FreeFem” , but it said that can not find hypre.so, how can i solve this problem?

Your reply would be greatly appreciated.

Use load "PETSc" instead.

Thank you very much!

Dear sir,

Is the website http://jolivet.perso.enseeiht.fr/ open for all ? Since i don’t have access to it in these days.

Your reply would be greatly appreciated.

It has moved to http://joliv.et, and I’m guessing you are looking for FreeFem-tutorial in particular?

I am looking for some examples to check if the parallel computing package is installed successfully, as the last question i have asked, load “hypre_FreeFem” has been changed to load “PETSc”. Is the set of the parameters need to be changed as well ?

I am not sure about the compilation on ubuntu is compiled successfully?

Thank you !

Go in examples/hpddm and type make check. You’ll see either failures or success. Yes, you need to change your script when you use load "PETSc". You can look at the tutorial.

Thanks for your guidance and great efforts in FreeFem++.