From f3ca7dc14aa0f5e654b229c312b943a23d006bc9 Mon Sep 17 00:00:00 2001
From: wolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Date: Wed, 20 Mar 2002 12:46:21 +0000
Subject: [PATCH] Work around a problem of Suns Forte compiler which cant
 handle the case that an enum or a class in a namespace has the same name as
 the namespace itself, as in /*
 ----------------------------------------------- */ /* Problem 10 -- Members
 with the same name as the */ /* enclosing namespace.                         
   */ namespace NS3 {   class NS3 {}; }; NS3::NS3 ns3;

Thus rename the IteratorState enum in the IteratorState namespace into IteratorState_s_.


git-svn-id: https://svn.dealii.org/trunk@5599 0785d39b-7218-0410-832d-ea1e28bc413d
---
 deal.II/deal.II/include/grid/tria_accessor.h  |  2 +-
 .../include/grid/tria_accessor.templates.h    |  2 +-
 deal.II/deal.II/include/grid/tria_iterator.h  |  6 ++--
 .../deal.II/include/grid/tria_iterator_base.h |  2 +-
 deal.II/examples/step-1/Makefile              |  2 +-
 deal.II/examples/step-7/Makefile              |  2 +-
 deal.II/examples/step-7/step-7.cc             | 30 +++++++++++++++----
 7 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/deal.II/deal.II/include/grid/tria_accessor.h b/deal.II/deal.II/include/grid/tria_accessor.h
index cb6b8789f5..232a1895a2 100644
--- a/deal.II/deal.II/include/grid/tria_accessor.h
+++ b/deal.II/deal.II/include/grid/tria_accessor.h
@@ -168,7 +168,7 @@ class TriaAccessor
 				      *  can be in, refer to the
 				      *  @ref{TriaRawIterator} documentation.
 				      */
-    IteratorState::IteratorState state () const;
+    IteratorState::IteratorStates state () const;
 
 				     /**
 				      * Return a pointer to the triangulation
diff --git a/deal.II/deal.II/include/grid/tria_accessor.templates.h b/deal.II/deal.II/include/grid/tria_accessor.templates.h
index 00a32ba2d5..e5d17ed87d 100644
--- a/deal.II/deal.II/include/grid/tria_accessor.templates.h
+++ b/deal.II/deal.II/include/grid/tria_accessor.templates.h
@@ -86,7 +86,7 @@ TriaAccessor<dim>::index () const
 
 template <int dim>
 inline
-IteratorState::IteratorState
+IteratorState::IteratorStates
 TriaAccessor<dim>::state () const
 {
   if ((present_level>=0) && (present_index>=0))
diff --git a/deal.II/deal.II/include/grid/tria_iterator.h b/deal.II/deal.II/include/grid/tria_iterator.h
index 1bceacd45e..5bb60880f0 100644
--- a/deal.II/deal.II/include/grid/tria_iterator.h
+++ b/deal.II/deal.II/include/grid/tria_iterator.h
@@ -288,7 +288,7 @@ class TriaRawIterator :
     TriaRawIterator (Triangulation<dim> *parent,
 		     const int           level,
 		     const int           index,
-		     const typename Accessor::AccessorData *local_data = 0);
+		     const typename AccessorType::AccessorData *local_data = 0);
 
 				     /**
 				      * This is a conversion operator
@@ -465,7 +465,7 @@ class TriaRawIterator :
 				     /**
 				      *  Return the state of the iterator.
 				      */
-    IteratorState::IteratorState state () const;
+    IteratorState::IteratorStates state () const;
 
 				     /**
 				      * Print the iterator to @p{out}. The
@@ -901,7 +901,7 @@ TriaRawIterator<dim,Accessor>::operator -> ()
 
 template <int dim, typename Accessor>
 inline
-IteratorState::IteratorState
+IteratorState::IteratorStates
 TriaRawIterator<dim,Accessor>::state () const
 {
   return accessor.state ();
diff --git a/deal.II/deal.II/include/grid/tria_iterator_base.h b/deal.II/deal.II/include/grid/tria_iterator_base.h
index 11f3eb5dba..7da1415a3d 100644
--- a/deal.II/deal.II/include/grid/tria_iterator_base.h
+++ b/deal.II/deal.II/include/grid/tria_iterator_base.h
@@ -28,7 +28,7 @@ namespace IteratorState
  *   The three states an iterator can be in: valid, past-the-end and
  *   invalid.
  */
-  enum IteratorState
+  enum IteratorStates
   {
 	valid,
 	past_the_end,
diff --git a/deal.II/examples/step-1/Makefile b/deal.II/examples/step-1/Makefile
index 9761232d00..5d76059226 100644
--- a/deal.II/examples/step-1/Makefile
+++ b/deal.II/examples/step-1/Makefile
@@ -14,7 +14,7 @@ target = $(basename $(shell echo step-*.cc))
 # run-time checking of parameters and internal states is performed, so
 # you should set this value to `on' while you develop your program,
 # and to `off' when running production computations.
-debug-mode = on
+debug-mode = off
 
 
 # As third field, we need to give the path to the top-level deal.II
diff --git a/deal.II/examples/step-7/Makefile b/deal.II/examples/step-7/Makefile
index 6360bcca20..da9acbbdb7 100644
--- a/deal.II/examples/step-7/Makefile
+++ b/deal.II/examples/step-7/Makefile
@@ -14,7 +14,7 @@ target = $(basename $(shell echo step-*.cc))
 # run-time checking of parameters and internal states is performed, so
 # you should set this value to `on' while you develop your program,
 # and to `off' when running production computations.
-debug-mode = on
+debug-mode = off
 
 
 # As third field, we need to give the path to the top-level deal.II
diff --git a/deal.II/examples/step-7/step-7.cc b/deal.II/examples/step-7/step-7.cc
index a27f10c6bd..bc06127426 100644
--- a/deal.II/examples/step-7/step-7.cc
+++ b/deal.II/examples/step-7/step-7.cc
@@ -35,6 +35,7 @@
 #include <dofs/dof_accessor.h>
 #include <dofs/dof_tools.h>
 #include <fe/fe_q.h>
+#include <fe/mapping_q.h>
 #include <numerics/matrices.h>
 #include <numerics/error_estimator.h>
 #include <numerics/data_out.h>
@@ -166,6 +167,14 @@ SolutionBase<2>::source_centers[SolutionBase<2>::n_source_centers]
     Point<2>(-0.5, -0.5), 
     Point<2>(+0.5, -0.5)   };
 
+				 // ...and finally for 3d:
+template <>
+const Point<3>
+SolutionBase<3>::source_centers[SolutionBase<3>::n_source_centers]
+= { Point<3>(-0.5, +0.5, -0.5), 
+    Point<3>(-0.5, -0.5, +0.5), 
+    Point<3>(+0.5, -0.5, 0.0)   };
+
 				 // There remains to assign a value to
 				 // the half-width of the
 				 // exponentials. We would like to use
@@ -780,7 +789,8 @@ void LaplaceProblem<dim>::assemble_system ()
 				   // cell (rather than on the unit
 				   // cell) to evaluate the right hand
 				   // side function.
-  FEValues<dim>  fe_values (*fe, quadrature_formula, 
+  MappingQ<dim> mapping(3);
+  FEValues<dim>  fe_values (mapping, *fe, quadrature_formula, 
 			    UpdateFlags(update_values    |
 					update_gradients |
 					update_q_points  |
@@ -1051,15 +1061,21 @@ void LaplaceProblem<dim>::assemble_system ()
 template <int dim>
 void LaplaceProblem<dim>::solve () 
 {
-  SolverControl           solver_control (1000, 1e-12);
+  SolverControl           solver_control (30, 1e-4);
   PrimitiveVectorMemory<> vector_memory;
   SolverCG<>              cg (solver_control, vector_memory);
 
   PreconditionSSOR<> preconditioner;
   preconditioner.initialize(system_matrix, 1.2);
 
-  cg.solve (system_matrix, solution, system_rhs,
-	    preconditioner);
+  try
+    {
+      cg.solve (system_matrix, solution, system_rhs,
+		preconditioner);
+    }
+  catch (...)
+    {
+    };
 
   hanging_node_constraints.distribute (solution);
 };
@@ -1322,7 +1338,11 @@ void LaplaceProblem<dim>::process_solution (const unsigned int cycle)
 template <int dim>
 void LaplaceProblem<dim>::run () 
 {
-  for (unsigned int cycle=0; cycle<7; ++cycle)
+  const unsigned int n_cycles = (refinement_mode == global_refinement ?
+				 (dim == 2 ? 7 : 3)
+				 :
+				 (dim == 2 ? 12 : 7));
+  for (unsigned int cycle=0; cycle<n_cycles; ++cycle)
     {
 				       // The first action in each
 				       // iteration of the outer loop
-- 
2.39.5