]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
some inconsistencies removed
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Jan 2001 22:44:42 +0000 (22:44 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Jan 2001 22:44:42 +0000 (22:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@3794 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/point.h
tests/deal.II/dof_test.cc
tests/lac/Makefile.in
tests/lac/solver.cc
tests/lac/testmatrix.cc
tests/lac/testmatrix.h

index 11799280faf643abc6991a2e2b816a56c9fe4b93..f45abe4a793ede283b0847b63586419459482071 100644 (file)
@@ -165,7 +165,6 @@ class Point : public Tensor<1,dim>
     DeclException0 (ExcInvalidConstructorCalled);
 };
 
-
 /*------------------------------- Inline functions: Point ---------------------------*/
 
 
index 9d9447f550b708392d2f12cc700cc3a0d7f91d92..794eaf96d62b12f3db7f4e1cbda5bf1ec5d00a96 100644 (file)
 #include <dofs/dof_handler.h>
 #include <grid/tria.h>
 #include <grid/grid_generator.h>
-#include <fe/fe_lib.lagrange.h>
+#include <fe/continuous.h>
 #include <grid/tria_boundary.h>
 #include <grid/tria_iterator.h>
 #include <grid/tria_accessor.h>
 #include <lac/sparse_matrix.h>
 #include <dofs/dof_constraints.h>
+#include <dofs/dof_accessor.h>
 #include <numerics/dof_renumbering.h>
 #include <dofs/dof_tools.h>
 #include <base/logstream.h>
@@ -295,7 +296,7 @@ void TestCases<dim>::run (const unsigned int test_case)
 
 
   deallog << "    Distributing degrees of freedom..." << endl;
-  FEQ1<dim> fe;
+  FE_Q<dim> fe(1);
   dof->distribute_dofs (fe);
 
   deallog << "    Renumbering degrees of freedom..." << endl;
index b3d1baa69a2bec425fded2313d46068b6a86d714..96d4a33308b1dd903ac786c8cb05bfc52278829d 100644 (file)
@@ -23,11 +23,9 @@ debug-mode = on
 # Define library names
 ############################################################
 
-libs.g   = $(lib-deal2-2d.g) \
-           $(lib-lac.g)      \
+libs.g   = $(lib-lac.g)      \
            $(lib-base.g)
-libs     = $(lib-deal2-2d.o) \
-           $(lib-lac.o)      \
+libs     = $(lib-lac.o)      \
            $(lib-base.o)
 
 
@@ -61,7 +59,6 @@ endif
        @$(CXX) $(flags) -c $< -o $@
 
 
-# mgbase.check mg.check are removed until the sutructure of the
 # multigrid classes will be fixed.
 all: vector-vector.check block_vector.check block_matrices.check full_matrix.check solver.check
 exe: $(all:.check=.testcase) benchmark
index 9897d30cde5f0189d3fde96391a2ebba49cba943..5b621f12cc270d86ad90cdc24d272c4b7b33cc88 100644 (file)
@@ -47,8 +47,8 @@ int main()
   deallog.depth_console(0);
   
   GrowingVectorMemory<> mem;
-  SolverControl control(100, 1.e-5);
-  SolverControl verbose_control(100, 1.e-5, true);
+  SolverControl control(100, 1.e-3);
+  SolverControl verbose_control(100, 1.e-3, true);
   SolverCG<> cg(control, mem);
   SolverGMRES<> gmres(control, mem,20);
   SolverBicgstab<> bicgstab(control, mem);
index 77d38427dd674b1c1224271ab265f268e638798e..1890b47a0a8a764ba7a6999d92fe33f37998f7ea 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "testmatrix.h"
 #include <lac/sparse_matrix.h>
+#include <lac/vector.h>
 
 FDMatrix::FDMatrix(unsigned int nx, unsigned int ny)
                :
@@ -107,141 +108,6 @@ FDMatrix::gnuplot_print(ostream& s, const Vector<number>& V) const
    s << endl;
 }
 
-FDMGTransfer::FDMGTransfer(unsigned int nx, unsigned int ny,
-                          unsigned int nlevels)
-               :
-               structures(nlevels), matrices(nlevels)
-{
-  unsigned int power = 1 << nlevels;
-  
-  Assert ((nx%power)==0, ExcDivide(nx,power));
-  Assert ((ny%power)==0, ExcDivide(ny,power));
-  
-  nx /= power;
-  ny /= power;
-  
-  for (unsigned int level = 0; level < nlevels; ++ level)
-    {
-      build_matrix(nx,ny,structures[level],matrices[level]);
-      nx *= 2;
-      ny *= 2;
-    }
-}
-
-void
-FDMGTransfer::build_matrix(unsigned int nx, unsigned int ny,
-                          SparsityPattern& structure, SparseMatrix<double>& matrix)
-{
-  structure.reinit((nx-1)*(ny-1),(2*nx-1)*(2*ny-1),9);
-  
-                                  // Traverse all points of coarse grid
-  for (unsigned int i=1 ; i<ny; ++i)
-    for (unsigned int j=1 ; j<nx; ++j)
-      {
-                                        // coarse grid point number
-       unsigned int ncoarse =j+(nx-1)*i -(nx-1) -1;
-                                        // same point on fine grid
-       unsigned int nfine = 2*j+(4*nx-2)*i -(2*nx-1) -1;
-       
-       structure.add(ncoarse,nfine);
-                                        // left
-       if (j>0)
-         {
-           structure.add(ncoarse,nfine-1);
-                                            // lower left
-           if (i>0)
-             structure.add(ncoarse,nfine-(2*nx-1)-1);
-                                            // upper left
-           if (i<ny)
-             structure.add(ncoarse,nfine+(2*nx-1)-1);
-         }
-                                        // right
-       if (j<nx)
-         {
-           structure.add(ncoarse, nfine+1);
-                                            // lower right
-           if (i>0)
-             structure.add(ncoarse,nfine-(2*nx-1)+1);
-                                            // upper right
-           if (i<ny)
-             structure.add(ncoarse,nfine+(2*nx-1)+1);
-         }
-
-                                            // lower
-           if (i>0)
-             structure.add(ncoarse,nfine-(2*nx-1));
-                                            // upper
-           if (i<ny)
-             structure.add(ncoarse,nfine+(2*nx-1));
-      }
-
-  structure.compress();
-  matrix.reinit(structure);
-  
-  for (unsigned int i=1 ; i<ny; ++i)
-    for (unsigned int j=1 ; j<nx; ++j)
-      {
-                                        // coarse grid point number
-       unsigned int ncoarse =j+(nx-1)*i -(nx-1) -1;
-                                        // same point on fine grid
-       unsigned int nfine =2*j+(4*nx-2)*i -(2*nx-1) -1;
-       
-       matrix.set(ncoarse,nfine,1.);
-                                        // left
-       if (j>0)
-         {
-           matrix.set(ncoarse,nfine-1,.5);
-                                            // lower left
-           if (i>0)
-             matrix.set(ncoarse,nfine-(2*nx-1)-1,.25);
-                                            // upper left
-           if (i<ny)
-             matrix.set(ncoarse,nfine+(2*nx-1)-1,.25);
-         }
-                                        // right
-       if (j<nx)
-         {
-           matrix.set(ncoarse,nfine+1,.5);
-                                            // lower right
-           if (i>0)
-             matrix.set(ncoarse,nfine-(2*nx-1)+1,.25);
-                                            // upper right
-           if (i<ny)
-             matrix.set(ncoarse,nfine+(2*nx-1)+1,.25);
-         }
-
-                                            // lower
-           if (i>0)
-             matrix.set(ncoarse,nfine-(2*nx-1),.5);
-                                            // upper
-           if (i<ny)
-             matrix.set(ncoarse,nfine+(2*nx-1),.5);
-      }
-  
-}
-
-void
-FDMGTransfer::prolongate (const unsigned int   to_level,
-                         Vector<double>       &dst,
-                         const Vector<double> &src) const
-{
-  Assert((to_level>0) && (to_level<=matrices.size()),
-        ExcIndexRange(to_level, 0, matrices.size()+1));
-  
-  matrices[to_level-1].Tvmult(dst,src);
-}
-
-
-void
-FDMGTransfer::restrict_and_add (const unsigned int   from_level,
-                               Vector<double>       &dst,
-                               const Vector<double> &src) const
-{
-  Assert((from_level>0) && (from_level<=matrices.size()),
-        ExcIndexRange(from_level, 0, matrices.size()+1));
-
-  matrices[from_level-1].vmult(dst,src);
-}
 
 
 template void FDMatrix::laplacian(SparseMatrix<long double>&) const;
index 1529df0a5cb2194a25162da82380e9acb13f28f2..f3f3518d82fda679ec1aac5aeea3098cd4f3615b 100644 (file)
@@ -1,7 +1,6 @@
 // $Id$
 
 #include <base/exceptions.h>
-#include <multigrid/mg_base.h>
 #include <lac/forward_declarations.h>
 
 /**
@@ -43,63 +42,3 @@ class FDMatrix
     unsigned int ny;
 };
 
-/**
- * Grid transfer for finite differences on uniform grid.
- */
-
-class FDMGTransfer
-  :
-  public MGTransferBase
-{
-  public:
-                                    /**
-                                     * Constructor. Prepares grid
-                                     * transfer matrices for #nlevels#
-                                     * levels on an #nx# times #ny#
-                                     * grid.
-                                     */
-    FDMGTransfer(unsigned int nx, unsigned int ny,
-                unsigned int nlevels);
-
-                                    /**
-                                     * Implementation of abstract
-                                     * function in #MGTranferBase#.
-                                     */
-    virtual void prolongate (const unsigned int   to_level,
-                            Vector<double>       &dst,
-                            const Vector<double> &src) const;
-
-                                    /**
-                                     * Implementation of abstract
-                                     * function in #MGTranferBase#.
-                                     */
-    virtual void restrict_and_add (const unsigned int   from_level,
-                                  Vector<double>       &dst,
-                                  const Vector<double> &src) const;
-
-                                    /**
-                                     * Exception.
-                                     */
-    DeclException2(ExcDivide, unsigned int, unsigned int,
-                  << "Cannot divide " << arg1 << " by " << arg2);
-    
-  private:
-                                    /**
-                                     * Prolongation matrix structures.
-                                     */
-    vector<SparsityPattern> structures;
-                                    /**
-                                     * Prolongation matrices.
-                                     */
-    vector<SparseMatrix<double> > matrices;
-
-                                    /**
-                                     * Matrix generator.
-                                     * The arguments #nx# and #ny#
-                                     * are the numbers on the COARSE level.
-                                     * Builds a transfer matrix from
-                                     * fine to coarse (#vmult#).
-                                     */
-    void build_matrix(unsigned int nx, unsigned int ny,
-                     SparsityPattern&, SparseMatrix<double>&);
-};

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.