On Wed, Oct 7, 2020 at 7:19 PM Wolfgang Bangerth <bange...@colostate.edu>
wrote:

>
> Xuefeng,
>
> > Still on the course of learning dealii by reading through the tutorials.
> Came
> > up with the following observation.
> >
> >  1. In Step-4, a single QGauss object was created in assemble_system(),
> and
> >     was used later in assemble_system().
> >  2. In Step-23, multiple copies of the same QGauss object (i.e.,
> >     QGauss<dim>(fe.degree + 1)) were created and used in setup_system()
> and run().
> >
> > My question is: will the output from Step-23 be any different if we had
> > created a single QGauss object as a global variable and used it anywhere
> that
> > a QGauss object is needed?
>
> Yes, that are all exactly identical, and will yield exactly the same
> result if
> they have the same type QGauss and are created with the same number of
> points
> (given by the argument).
>
> Best
>   W.
>
> Thanks for the confirmation. I was a Java guy. I found C++ quite different
(or liberal) in terms of variable declaration, initialization and memory
release. That's the reason I asked the question. I did learn from your
answer.

-- 
Stay put, practice social distancing, and be safe!

Best,

--Xuefeng Li, (504)865-3340(phone)
   Like floating clouds, the heart rests easy
   Like flowing water, the spirit stays free
      Loyola University New Orleans
   New Orleans, Louisiana (504)865-2051(fax)

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAO2HPGVE_w8yfcZuaLXrd6qnMiPYiR8z2ka_XigorO0zqPFWNw%40mail.gmail.com.

Reply via email to