Is there anything inherently wrong with creating a System and not
adding any variables to it? I currently do this in my application and
it works fine in optimized mode... but in debug it trips an assert on
lin 654 of dof_map.C.
The trouble is that my application might or might not put anything
into that System depending on what the user specifies in their input
file.... and unfortunately I don't allow that system to not exist in
many places throughout the code (it doesn't have to have anything in
it... it just can't be NULL).
I'm wondering if that's an old assert or if having empty Systems is
really a bad idea...
From: Roy Stogner <roystgnr@ic...> - 2009-03-30 20:42:49
On Mon, 30 Mar 2009, Derek Gaston wrote:
> Is there anything inherently wrong with creating a System and not
> adding any variables to it? I currently do this in my application and
> it works fine in optimized mode... but in debug it trips an assert on
> lin 654 of dof_map.C.
That particular assert can be removed. I'm not sure I'd call it an
"old assert", so much as "an assert that was put in because nobody
imagined a user wanting a system with no variables". I don't see any
place where we depend on n_variables() > 0 in the code itself, though.
And if there are such places I've missed, I'm sure your code will trip
them and point them out for us soon enough. ;-)