On Sat, 15 Jan 2011, David Fuentes wrote: > for solving a time dependent pde with a spatially varying parameter, > what would be the best data structure to use in libMesh to hold my > spatially varying parameter? > > ie heat equation with thermal conductivity as a function of position, k(x). > > I was thinking to create a separate ExplicitSystem w/ piecewise > constant shape functions across elements.
That's pretty much ideal. > However, within a FEMSystem element_time_derivative call, what is the > most efficient way to access the element wise parameters? Not sure. A DiffContext is pretty much restricted to a single system, so you'd have to do something else to access parameters from a separate system. But we don't have an equally easy to use API set up for that access. The obvious solution is for your derived SubFEMSystem to have a pointer to the ExplicitSystem, and then to access that pointer->current_local_solution indexed by the appropriate dof_index... but if you can think of a nicer way to encapsulate that sort of thing, let me know, and we'll see if we can get an API for it into the library. --- Roy ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
