]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Undo accidental changes on step-1, step-6 and step-34
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Oct 2011 11:55:57 +0000 (11:55 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Oct 2011 11:55:57 +0000 (11:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@24592 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-1/Makefile
deal.II/examples/step-34/parameters.prm
deal.II/examples/step-6/step-6.cc

index b4c21ed3257b7a625ac520999557efd7d26de80e..084f822e9a4696cb7883383e69d316827193e6a5 100644 (file)
@@ -33,6 +33,8 @@ D = ../../
 clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 
 
+
+
 #
 #
 # Usually, you will not need to change anything beyond this point.
@@ -43,41 +45,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 # settings
 include $D/common/Make.global_options
 
-CXX += -I$(VTK_DIR)/include/vtk-5.6
-LIBS += -L/usr/local/vtk/lib/vtk/ -I$(VTK_DIR)/include/vtk-5.6 \
--lvtkCharts \
--lvtkCommon \
--lvtkDICOMParser \
--lvtkFiltering \
--lvtkGenericFiltering \
--lvtkGeovis \
--lvtkGraphics \
--lvtkHybrid \
--lvtkIO \
--lvtkImaging \
--lvtkInfovis \
--lvtkNetCDF \
--lvtkRendering \
--lvtkViews \
--lvtkVolumeRendering \
--lvtkWidgets \
--lvtkalglib \
--lvtkexoIIc \
--lvtkexpat \
--lvtkfreetype \
--lvtkftgl \
--lvtkjpeg \
--lvtklibxml2 \
--lvtkmetaio \
--lvtkpng \
--lvtkproj4 \
--lvtksqlite \
--lvtksys \
--lvtktiff \
--lvtkverdict \
--lvtkzlib 
-
-
 
 # Since the whole project consists of only one file, we need not
 # consider difficult dependencies. We only have to declare the
index 03e374ec0a4f4239f2656aa0bd6572677f18eb71..5e12caf422f9eb48ae23d0b519150e8248730cc3 100644 (file)
@@ -1,10 +1,10 @@
 # Listing of Parameters
 # ---------------------
 set Extend solution on the -2,2 box = true
-set External refinement             = 7
+set External refinement             = 5
 set Number of cycles                = 4
 set Run 2d simulation               = true
-set Run 3d simulation               = false
+set Run 3d simulation               = true
 
 
 subsection Exact solution 2d
index 5401616f01a4b6c76332f7af15bb722165b77b63..657a12ade466d455070d5a060d38ede95175c7de 100644 (file)
                                 // been covered in previous examples
                                 // and will thus not be further
                                 // commented on.
-#include <base/quadrature_lib.h>
-#include <base/function.h>
-#include <base/logstream.h>
-#include <lac/vector.h>
-#include <lac/full_matrix.h>
-#include <lac/sparse_matrix.h>
-#include <lac/compressed_sparsity_pattern.h>
-#include <lac/solver_cg.h>
-#include <lac/solver_gmres.h>
-#include <lac/precondition.h>
-#include <grid/tria.h>
-#include <dofs/dof_handler.h>
-#include <grid/grid_generator.h>
-#include <grid/tria_accessor.h>
-#include <grid/tria_iterator.h>
-#include <grid/tria_boundary_lib.h>
-#include <dofs/dof_accessor.h>
-#include <dofs/dof_tools.h>
-#include <fe/fe_values.h>
-#include <numerics/vectors.h>
-#include <numerics/matrices.h>
-#include <numerics/data_out.h>
-
-#include "constrained_matrix.h"
+#include <deal.II/base/quadrature_lib.h>
+#include <deal.II/base/function.h>
+#include <deal.II/base/logstream.h>
+#include <deal.II/lac/vector.h>
+#include <deal.II/lac/full_matrix.h>
+#include <deal.II/lac/sparse_matrix.h>
+#include <deal.II/lac/compressed_sparsity_pattern.h>
+#include <deal.II/lac/solver_cg.h>
+#include <deal.II/lac/precondition.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/dofs/dof_accessor.h>
+#include <deal.II/dofs/dof_tools.h>
+#include <deal.II/fe/fe_values.h>
+#include <deal.II/numerics/vectors.h>
+#include <deal.II/numerics/matrices.h>
+#include <deal.II/numerics/data_out.h>
+
 #include <fstream>
 #include <iostream>
 
@@ -53,7 +51,7 @@
                                 // tri-linear elements, but we will
                                 // now use it for bi-quadratic
                                 // elements:
-#include <fe/fe_q.h>
+#include <deal.II/fe/fe_q.h>
                                 // We will not read the grid from a
                                 // file as in the previous example,
                                 // but generate it using a function
@@ -63,7 +61,7 @@
                                 // the solution) in each step, so we
                                 // need the following include file
                                 // instead of <code>grid_in.h</code>:
-#include <grid/grid_out.h>
+#include <deal.II/grid/grid_out.h>
 
 
                                 // When using locally refined grids,
@@ -79,7 +77,7 @@
                                 // following file contains a class
                                 // which is used to handle these
                                 // constraints:
-#include <lac/constraint_matrix.h>
+#include <deal.II/lac/constraint_matrix.h>
 
                                 // In order to refine our grids
                                 // locally, we need a function from
@@ -88,7 +86,7 @@
                                 // coarsening based on the error
                                 // indicators we have computed. This
                                 // function is defined here:
-#include <grid/grid_refinement.h>
+#include <deal.II/grid/grid_refinement.h>
 
                                 // Finally, we need a simple way to
                                 // actually compute the refinement
                                 // often yields quite nicely adapted
                                 // grids for a wide class of
                                 // problems.
-#include <numerics/error_estimator.h>
+#include <deal.II/numerics/error_estimator.h>
 
                                 // Finally, this is as in previous
                                 // programs:
@@ -617,9 +615,8 @@ void Step6<dim>::assemble_system ()
                                   // constraints due to hanging
                                   // nodes. This is done using the
                                   // following two function calls:
-  // hanging_node_constraints.condense (system_matrix);
-  // hanging_node_constraints.condense (system_rhs);
-  
+  hanging_node_constraints.condense (system_matrix);
+  hanging_node_constraints.condense (system_rhs);
                                   // Using them, degrees of freedom
                                   // associated to hanging nodes have
                                   // been removed from the linear
@@ -698,28 +695,16 @@ void Step6<dim>::assemble_system ()
 template <int dim>
 void Step6<dim>::solve ()
 {
-  SolverControl           solver_control (10000, 1e-12);
-  SolverGMRES<>              solver (solver_control);
-
-  PreconditionIdentity preconditioner;
-//preconditioner.initialize(system_matrix, 1.2);rGM
-
-  double scaling = 10000;
-  typename DoFHandler<dim>::active_cell_iterator
-    cell=dof_handler.begin_active(),
-    endc = dof_handler.end();
-  for(; cell != endc; ++cell)
-    scaling = std::min(scaling, cell->diameter()*cell->diameter());
+  SolverControl           solver_control (1000, 1e-12);
+  SolverCG<>              solver (solver_control);
 
-  ConstrainedOperator<Vector<double>, SparseMatrix<double> >
-    cc(system_matrix, hanging_node_constraints, scaling);
+  PreconditionSSOR<> preconditioner;
+  preconditioner.initialize(system_matrix, 1.2);
 
-                                  // cc.distribute_rhs(system_rhs);
-  solution = system_rhs;
-  cc.distribute_rhs(system_rhs);
-  
-  solver.solve (cc, solution, system_rhs,
+  solver.solve (system_matrix, solution, system_rhs,
                preconditioner);
+
+  hanging_node_constraints.distribute (solution);
 }
 
 
@@ -993,19 +978,6 @@ void Step6<dim>::output_results (const unsigned int cycle) const
 
   GridOut grid_out;
   grid_out.write_eps (triangulation, output);
-  
-  DataOut<dim> data_out;
-
-  data_out.attach_dof_handler (dof_handler);
-  data_out.add_data_vector (solution, "solution");
-  data_out.build_patches ();
-  
-  filename = "solution-";
-  filename += ('0' + cycle);
-  filename += ".vtu";
-  output.close();
-  output.open(filename.c_str());
-  data_out.write_vtu (output);
 }
 
 
@@ -1118,8 +1090,8 @@ void Step6<dim>::run ()
   data_out.add_data_vector (solution, "solution");
   data_out.build_patches ();
 
-  std::ofstream output ("final-solution.vtk");
-  data_out.write_vtk (output);
+  std::ofstream output ("final-solution.eps");
+  data_out.write_eps (output);
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.