> Yes. We're using C-like semantics here, where if you want to access > the 0th index in an array then the array should be at least length 1.
Roy, I agree. But if I did want to know the dof_number associated with the a certain variable at a node (nodal dof) that does not have any components associated with it, then what do I specify for the third argument. This was my dilemma and since it's an unsigned int, I wasn't sure what else to specify. Or am I going about finding the dof_number for the node wrongly ? Vijay On Tue, Jun 1, 2010 at 1:30 PM, Roy Stogner <royst...@ices.utexas.edu> wrote: > > On Tue, 1 Jun 2010, Vijay S. Mahadevan wrote: > >> libmesh_assert (comp < this->n_comp(s,var)); >> >> in line 572 of file dof_object.h is failing when trying to compute the >> dof_number of a node when using Lagrange basis. My number of >> components (n_comp()) returns 0 and when I call the dof_number method >> as >> >> node->dof_number(sys_id, _var_id, 0) >> >> the assert fails. Is this the intended behavior for the assert ? > > Yes. We're using C-like semantics here, where if you want to access > the 0th index in an array then the array should be at least length 1. > >> Just checking. It is not extremely critical for me since this affects >> only my debug mode and the opt mode seems to run fine. > > Beware "seems to" - we have found overzealous assertions in the > library before, but this isn't one of them. > --- > Roy > ------------------------------------------------------------------------------ _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel