Dear Zhidong,
Thanks for finding and reporting this :)
When we compile the doxygen documentation we remove all occurrences of
dealii::
since, for a variety of reasons, it's easier to pretend in the manual
that all deal.II classes are in the global namespace. This is done
with, if I recall correctly, a simple text substitution - hence, the
webpage for step-40 has
using namespace ::LinearAlgebraPETSc
instead of what is actually in the source file:
using namespace dealii::LinearAlgebraPETSc
Put another way: this text substitution is wrong for this example and
needs to be fixed. Could you help us by opening a GitHub issue to
track this problem with the documentation?
Thanks,
David
On Wed, Dec 11, 2019 at 1:31 PM Zhidong Brian Zhang
<[email protected]> wrote:
>
> Dear, Colleagues,
>
> I tried to run the code from Step-40's webpage,
> https://www.dealii.org/current/doxygen/deal.II/step_40.html
>
> However, I encountered errors: error: ‘LinearAlgebraPETSc’ is not a
> namespace-name
> using namespace ::LinearAlgebraPETSc;
>
> So I compared the code from the locally installed file of Step-40 and found
> there is a slight difference:
>
> Webpage:
> namespace LA
> {
> #if defined(DEAL_II_WITH_PETSC) && !defined(DEAL_II_PETSC_WITH_COMPLEX) && \
> !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
> using namespace ::LinearAlgebraPETSc;
> # define USE_PETSC_LA
> #elif defined(DEAL_II_WITH_TRILINOS)
> using namespace ::LinearAlgebraTrilinos;
> #else
> # error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
> #endif
> } // namespace LA
>
> Locally installed:
> namespace LA
> {
> #if defined(DEAL_II_WITH_PETSC) && !defined(DEAL_II_PETSC_WITH_COMPLEX) && \
> !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
> using namespace dealii::LinearAlgebraPETSc;
> # define USE_PETSC_LA
> #elif defined(DEAL_II_WITH_TRILINOS)
> using namespace dealii::LinearAlgebraTrilinos;
> #else
> # error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
> #endif
> } // namespace LAEnter code here...
>
> I have highlighted the difference. After adding "dealii", the program can be
> run successfully.
>
> I guess maybe these are typos. I am new to deal.ii, so I am not sure my guess
> is correct or not. I am just curious about this (no offence), because I may
> miss some important point here.
>
> Thank you very much for your attention!
>
> Zhidong Brian Zhang
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/6b06a25a-3812-4333-b2db-ee1cbcc9cf09%40googlegroups.com.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/CABrTbYTnXTL4i3_hj4NkAK8SSVSpe1CTjiDZJzsSAkcS5sdzxg%40mail.gmail.com.