Does anyone have any advice on this question? John, maybe?
On 04/30/2013 11:29 AM, Robert Blake wrote: > I am trying to run a FEM simulation wherein every element has a > variable-length C data structure defined in an external non-libmesh file > format. What is the easiest way to get this data into libmesh and use > it in parallel? > > I see only a couple of ways of doing this: > > 1.) I can easily do this using MeshData and foreign_id_for_elem(). This > works serially, but MeshData is deprecated and doesn't work in parallel. > > 2.) I can create my own data structure that indexes off of Elem->id(). > Is this possible? Based on my cursory glance at the code, I fear that > Elem->id() will change after partitioning in parallel. If this happens, > this technique won't work. In addition, I'm not sure how this will work > if I decide to use AMR > > 3.) I can give each mesh a unique subdomain_id(), and create my own data > structure that uses that subdomain_id() as an index. This should work > in parallel and for AMR, but it seems like a horrible abuse of the > subdomain_id() and might cause problems for parts of the code that > assume n_subdomains << n_elems. > > 4.) I can create an ExplicitSystem with a (CONSTANT,MONOMIAL) term, fill > that data with an integer ID, and then use that ID to index into an > external data structure of my choosing. I know that this is now the > preferred way of storing element data, but > a.) It seems like a hack to use a floating point field to store integer data > b.) I'd have to take extra care to ensure the variable is NOT > interpolated when doing AMR > c.) I'm still not sure how to populate these data values. All the code > I've seen for populating variables for ExplicitSystems uses > FunctionBase<> which takes point data as it's argument. I'm not quite > sure how to easily access an element's data using (x,y,z) coordinates as > an argument. > > Is there something I've missed? Help! > > Rob > > ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
