Re: [Libmesh-devel] subdomain-ony variables

2009-01-11 Thread Tim Kroeger
Dear Derek/Roy, On Sun, 11 Jan 2009, Derek Gaston wrote: > On Sun, Jan 11, 2009 at 7:52 PM, Roy Stogner wrote: > >> On Sun, 11 Jan 2009, Kirk, Benjamin (JSC-EG) wrote: >> >> I guess I'd go with a set (or set when we >> ever get around to that), but with the special understanding in the >> code th

Re: [Libmesh-devel] subdomain-ony variables

2009-01-11 Thread Derek Gaston
Not a bad idea... But it feels counterintuitive when you are calling add_variable()... Personally it would feel backward. That said I'm not against the idea. Sent from my iPhone On Jan 12, 2009, at 12:12 AM, Tim Kroeger wrote: > Dear Derek/Roy, > > On Sun, 11 Jan 2009, Derek Gaston wrote: >

Re: [Libmesh-devel] subdomain-ony variables

2009-01-11 Thread Derek Gaston
On Sun, Jan 11, 2009 at 7:52 PM, Roy Stogner wrote: > > On Sun, 11 Jan 2009, Kirk, Benjamin (JSC-EG) wrote: > > I guess I'd go with a set (or set when we > ever get around to that), but with the special understanding in the > code that an empty set means "put this variable everywhere". I can't >

Re: [Libmesh-devel] subdomain-ony variables

2009-01-11 Thread Roy Stogner
On Sun, 11 Jan 2009, Kirk, Benjamin (JSC-EG) wrote: > So I have a need to add variables to a system which exist in only > part of the domain. The natural way to implement it would seem to > be using subdomain element flags which define what lives where. > > Now, for the API... > > we currently h

[Libmesh-devel] subdomain-ony variables

2009-01-11 Thread Kirk, Benjamin (JSC-EG)
So I have a need to add variables to a system which exist in only part of the domain. The natural way to implement it would seem to be using subdomain element flags which define what lives where. Now, for the API... we currently have System::add_variable(name, type) what do you think abou

Re: [Libmesh-devel] FEMContext design issue

2009-01-11 Thread Roy Stogner
On Sun, 11 Jan 2009, John Peterson wrote: > Maybe you can hide that behind another function call. For example, > > const std::vector& JxW = this->context()->fe->get_JxW(); > > (the this-> part is of course not necessary). The first call to > context() performs the dynamic_cast to a FEMContext*

Re: [Libmesh-devel] FEMContext design issue

2009-01-11 Thread John Peterson
On Sun, Jan 11, 2009 at 5:48 PM, Roy Stogner wrote: > > On Sat, 10 Jan 2009, John Peterson wrote: > > It sounds like you've got it right. And I guess requiring a context > factory method and reinit method for new context classes isn't so bad; > 99% of users won't need to create a new context clas

Re: [Libmesh-devel] FEMContext design issue

2009-01-11 Thread Roy Stogner
On Sat, 10 Jan 2009, John Peterson wrote: > How low-level do users of BSys::method() need to get? I mean, is it > imperative that they be able to provide the context, or is the library > going to be smart enough to do it for them? Well, it depends on how much context they need. The library wil

Re: [Libmesh-devel] Removing rows/cols of matrix corresponding to Dirichlet DOFs

2009-01-11 Thread David Knezevic
Thanks for the suggestions John, they feasible options for me I think. Just to follow up, I think that the create_submatrix function in SparseMatrix (which only works for a PetscMatrix) should allow me to create a new matrix with the boundary DOFs removed so I'll look into that as well. Thanks