Dear FreeFEM community,
I’m actually trying to solve a multiphysics problem in parallel using ffddm. I’m struggle to transfer some electromagnetic quantities (modulus) between two distributed finite element space : from a complex FE space to a real one on the same mesh. In order to do that, I’m trying to use prfe#transferfromVhi(us,Vht,Pkt,rest) as mentioned in the ffddm documentation but without success.
Otherwise, I’ve tried using PETCs interfaces without success too…and find some post Creating Mat from Mat but this is beyond my actual FreeFEM skills…
How can I perform this kind of interpolation ?
Otherwise, how can I save the global real part of the quantity of interest and load it in a new real distributed real finite element space (same mesh) ?
This is the pseudocode of my problem.
macro dimension 2// EOM
include "ffddm.idp"
func Pk = P1;
// Domain decomposition
ffddmbuildDmesh( M ,Th , mpiCommWorld )
ffddmbuildDmesh( M2 ,Th , mpiCommWorld )
macro def(u)u// EOM // scalar field definition
macro init(u)u// EOM // scalar field initialization
ffddmbuildDfespace( FE , M , complex , def , init , Pk ) // FE complex space P1
ffddmbuildDfespace( FE2 , M2 , real , def , init , Pk ) // FE real space P1
FEVhi<complex> def(us) = ucomplex; // complex quantities of interest
FE2Vhi def(ut), def(ut2); // real space
FEtransferfromVhi(us,FE2Vhi,Pk,ut)
ut2 = real(ut); // take the real part
ffddmplot(FE,us,"u source");
ffddmplot(FE2,ut2,"u target"); // observe the real part on the new real Fespace
Thanks in advance for your help !
Best
Damien