I know which is possible to “recollect” te results obtained in parallel on the tocal mesh to the global (starting) one using the mpiAllReduce(u,uS,mpiCommWorld, mpiSUM) command. Is there a function whch is doing the opposite, so dictributing a global variable on the local mesh?
I need this since I am loading from a file, node by node, a variable of my problem and so it is strictly defined on the global mesh. By the way to perform the computations I need to move it in the local one.
I’m not sure that this is exactly what I need. Just to be clearer what I am doing is something like that:
I am meshing my domain starting from a point cloud, knowing the load on that point cloud.
mesh Th = triangulate(fname);
I get the load from the point cloud file
fespace Vh(Th,P1);
Vh EE;
{
ifstream file(fname);
real xx,yy;
for(int i = 0; i < EE.n; i++)
file >> xx >> yy >> EE[][i];
}
Now what I would like to do is to produce a local mesh using PETSc (buildDmesh(Th)) and then having a VhPar EEpar which is the exact correspondence of the previously defined EE on the obtained local mesh