On Tue, 26 Jul 2016, Jayaraman, Vegnesh wrote: > I need to transfer solutions between 2 different meshes that are of > different dimensions. > > For eg. I have 2 square domains Mesh1: X,Y = [-1,1] [-1,1] and Mesh 2 :X,Y = > [-2,2] [-2,2] > > I transfer the solution from Mesh 2 to Mesh 1, only for points in Mesh 2 that > are also in Mesh 1. > > Currently by having an identical mesh in Mesh 2 of the Mesh 1 in the region > where they overlap and loop over all the elements to check if the location is > the same in both meshes and transfer solution. > > Is there a better / different or different way to do this.?
Hmm... In the Dirichlet code in dof_map_constraints.C, we allow functions to return NaN as a way of signalling "don't set anything here". It would be a great idea to add the same feature to system_projection.C, after which you could just set the "out of mesh value" of a MeshFunction to be NaN and pass the MeshFunction to project_vector. I don't have time to make the system_projection.C changes myself, though, and if you've already got working code then it's hard to entice you to create a patch yourself. So my only suggestion is that you use the point locator (O(log N)) rather than a loop over all elements (O(N)) to locate overlaps. --- Roy ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users