Could you please explain it more? I see the Elem is also derived from DOfObject, so it has those member functions. But what is the size of NumericVector v ? After loop over nodal dofs, all the values in v are set to zero, aren't they? So why do we need another loop over elements? Thanks.
Xujun On Thu, Jan 15, 2015 at 5:29 PM, John Peterson <[email protected]> wrote: > On Thu, Jan 15, 2015 at 4:15 PM, Xujun Zhao <[email protected]> wrote: > > Hi folks, > > > > The member function zero_variable() defined in class System conducts two > > loops over nodes and over elements to zero the NumericVector v. It > appears > > to me that the number of nodes should be different from that of elements, > > and the NumericVector v should have the same size as total nodal > variables. I > > am curious why the loop over element is necessary. > > > > On the other hand, the element loop uses: > > unsigned int n_comp = elem->n_comp(sys_num,var_num); > > const dof_id_type index = elem->dof_number(sys_num,var_num,i); > > > > Does Elem class have member functions n_comp() and dof_number()? Thank > you > > for answers in advances. > > Yes, because it is a DofObject. > > -- > John > ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
