Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

## [Libmesh-users] spatially varying parameters w/ FEMSystem

 [Libmesh-users] spatially varying parameters w/ FEMSystem From: David Fuentes - 2011-01-15 22:06:50 ```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. However, within a FEMSystem element_time_derivative call, what is the most efficient way to access the element wise parameters? thanks, df ```

 [Libmesh-users] spatially varying parameters w/ FEMSystem From: David Fuentes - 2011-01-15 22:06:50 ```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. However, within a FEMSystem element_time_derivative call, what is the most efficient way to access the element wise parameters? thanks, df ```
 Re: [Libmesh-users] spatially varying parameters w/ FEMSystem From: Roy Stogner - 2011-01-15 23:58:55 ```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 ```