On Thu, Jan 28, 2016 at 6:24 AM, <hu.b...@xemail.me> wrote: > Dear all, > I am trying to read-in an external parameter for my mesh; in particular, > this is an external potential. > I get this potential from an other programme on some grid, meaning I have > given values at certain points but no elements associated with that. > As pointed out on > http://users.ices.utexas.edu/~roystgnr/oldlibmeshdoc/ex12.php#output , > the MeshData class seems to be made to deal with exactly that problem; but > I am not able to find any specification about the file types xta/xtr and > unv as mentioned on that page (i.e. without elemnt-based view ). > Moreover, also on the doc-page of the read() function of MeshData::read() > > https://libmesh.github.io/doxygen/classlibMesh_1_1MeshData.html#a75bc0115c3f9ebf6c57ede071b42a9c8 > it is stated that there should be 'elements' given. > > So my question is: Can I handle data related to a point-set instead of > finite elements in libmesh and if yes: How do I do it? >
Yes, the usual way to do this is with a separate ExplicitSystem, by loading the data into its "rhs" vector. Unfortunately, what we don't have a great way of doing (because it's somewhat application-specific) is mapping the values from the other application into your libmesh application. Unless you can do something really simple like ensure that the node numbering is the same between the two programs, or you are able to define a mapping between the two programs in some simple way, you are stuck searching for corresponding physical points in order to determine the correct DOF to set in the ExplicitSystem. Another possibility is to build a searchable KD tree with Nanoflann, which we distribute with libmesh. This would allow for logarithmic rather than linear searching for nodes. I've posted an example code which creates a Nanoflann tree here: https://gist.github.com/jwpeterson/7a36f9f794df67d51126 In this example code, we are searching for duplicate nodes in the Mesh, but you should be able to adapt it to search for node points from your other application... -- John ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users