You could use a MeshFunction in which you "localize" the solution vector 
of the system you want to access. That is, you can do 
system.solution->localize( global_solution_vec ), and then use 
global_solution_vec in your MeshFunction. You can then evaluate the 
MeshFunction on any element (not just local elements). I do this with 
SerialMesh, I'm not sure if it works with ParallelMesh, maybe someone 
else can weigh in on that.

Alternatively, you could only evaluate the MeshFunction on local 
elements and then send the results to the process that needs them...

David



On 09/02/2014 05:41 PM, Harshad Sahasrabudhe wrote:
> Hi,
>
> I need help with transferring data between 2 meshes. I have one mesh for an
> equation system and another mesh (which is on a sub-domain of the first
> mesh) for a second equation system. Both the meshes are parallelized over
> all the available processors. Now, I need to get the solution from second
> mesh to first mesh on the correct processors. What is the best way to do
> this?
>
> MeshFunction can calculate the solution of the second system on the mesh
> points of the first system, but it can only do this for local elements.
>
> If anyone wants to know the details of what I'm trying to do, read further.
> I'm working on a Schrodinger-Poisson self-consistent simulation. Basically,
> I solve Poisson equation on a large (and coarse) mesh. Then I feed the
> potential (solution of Poisson system) to the Schrodinger system which
> resides on a smaller mesh contained within the region occupied by the
> Poisson system. Then I solve the Schrodinger system and feed the charge
> density (solution of Schrodinger system) back to the Poisson system. This
> loop runs till the potential and charge converge.
>
> This runs fine serially, but when I try to parallelize it the data required
> on a certain processor resides on some other processor.
>
> Any help would be appreciated!
>
> Thanks!
> Harshad
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Libmesh-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libmesh-users


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to