From: Roy S. <roy...@ic...> - 2017-11-15 15:46:52
|
On Wed, 15 Nov 2017, Zack Vitoh wrote: > I think > http://libmesh.github.io/doxygen/classlibMesh_1_1SubdomainPartitioner.html#details > > May help, but still not sure if this is the best approach No, that's unrelated to what you want to do. The class you should look up is https://libmesh.github.io/doxygen/classlibMesh_1_1PointLocatorBase.html and the method you want to look at in the library is "sub_point_locator" in MeshBase. The default PointLocatorTree implementation uses a binary/quad/oct tree (in 1/2/3D) and will give you a logarithmic search time. If you have *really* large meshes, then you might be able to come up with a faster custom locator (e.g. if you know your quadrature points will be in an element touching the current element, then you could use Elem::find_point_neighbors() to get all those elements, and check just those for an O(1) search with a lousy constant), but the point locator will probably be the best way to get started simply. --- Roy > On Tue, Nov 14, 2017 at 10:17 PM, Zack Vitoh <jan...@gm...> wrote: > >> I could loop over (a subset of) all elements in the mesh, but is there a >> function within a class that achieves this (possibly more efficiently?) >> >> Thanks! >> >> PS: I am trying to incorporate a "nonlocal quadrature rule" where the >> nonlocal quadrature involves points outside of the current element. If any >> other advice can be provided (e.g. specific classes/functions to look at) >> to this end, I'd appreciate it, as I am going about this in what feels to >> be a hackish, wrong way. >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Libmesh-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libmesh-users > > |