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.