From ad4665169e7c1cfe6811d60e6dc79f4df30c9f15 Mon Sep 17 00:00:00 2001 From: guido Date: Wed, 24 Jan 2001 22:44:42 +0000 Subject: [PATCH] some inconsistencies removed git-svn-id: https://svn.dealii.org/trunk@3794 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/point.h | 1 - tests/deal.II/dof_test.cc | 5 +- tests/lac/Makefile.in | 7 +- tests/lac/solver.cc | 4 +- tests/lac/testmatrix.cc | 136 +----------------------------- tests/lac/testmatrix.h | 61 -------------- 6 files changed, 8 insertions(+), 206 deletions(-) diff --git a/deal.II/base/include/base/point.h b/deal.II/base/include/base/point.h index 11799280fa..f45abe4a79 100644 --- a/deal.II/base/include/base/point.h +++ b/deal.II/base/include/base/point.h @@ -165,7 +165,6 @@ class Point : public Tensor<1,dim> DeclException0 (ExcInvalidConstructorCalled); }; - /*------------------------------- Inline functions: Point ---------------------------*/ diff --git a/tests/deal.II/dof_test.cc b/tests/deal.II/dof_test.cc index 9d9447f550..794eaf96d6 100644 --- a/tests/deal.II/dof_test.cc +++ b/tests/deal.II/dof_test.cc @@ -15,12 +15,13 @@ #include #include #include -#include +#include #include #include #include #include #include +#include #include #include #include @@ -295,7 +296,7 @@ void TestCases::run (const unsigned int test_case) deallog << " Distributing degrees of freedom..." << endl; - FEQ1 fe; + FE_Q fe(1); dof->distribute_dofs (fe); deallog << " Renumbering degrees of freedom..." << endl; diff --git a/tests/lac/Makefile.in b/tests/lac/Makefile.in index b3d1baa69a..96d4a33308 100644 --- a/tests/lac/Makefile.in +++ b/tests/lac/Makefile.in @@ -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 diff --git a/tests/lac/solver.cc b/tests/lac/solver.cc index 9897d30cde..5b621f12cc 100644 --- a/tests/lac/solver.cc +++ b/tests/lac/solver.cc @@ -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); diff --git a/tests/lac/testmatrix.cc b/tests/lac/testmatrix.cc index 77d38427dd..1890b47a0a 100644 --- a/tests/lac/testmatrix.cc +++ b/tests/lac/testmatrix.cc @@ -14,6 +14,7 @@ #include "testmatrix.h" #include +#include FDMatrix::FDMatrix(unsigned int nx, unsigned int ny) : @@ -107,141 +108,6 @@ FDMatrix::gnuplot_print(ostream& s, const Vector& 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& 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 ; i0) - { - structure.add(ncoarse,nfine-1); - // lower left - if (i>0) - structure.add(ncoarse,nfine-(2*nx-1)-1); - // upper left - if (i0) - structure.add(ncoarse,nfine-(2*nx-1)+1); - // upper right - if (i0) - structure.add(ncoarse,nfine-(2*nx-1)); - // upper - if (i0) - { - matrix.set(ncoarse,nfine-1,.5); - // lower left - if (i>0) - matrix.set(ncoarse,nfine-(2*nx-1)-1,.25); - // upper left - if (i0) - matrix.set(ncoarse,nfine-(2*nx-1)+1,.25); - // upper right - if (i0) - matrix.set(ncoarse,nfine-(2*nx-1),.5); - // upper - if (i &dst, - const Vector &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 &dst, - const Vector &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&) const; diff --git a/tests/lac/testmatrix.h b/tests/lac/testmatrix.h index 1529df0a5c..f3f3518d82 100644 --- a/tests/lac/testmatrix.h +++ b/tests/lac/testmatrix.h @@ -1,7 +1,6 @@ // $Id$ #include -#include #include /** @@ -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 &dst, - const Vector &src) const; - - /** - * Implementation of abstract - * function in #MGTranferBase#. - */ - virtual void restrict_and_add (const unsigned int from_level, - Vector &dst, - const Vector &src) const; - - /** - * Exception. - */ - DeclException2(ExcDivide, unsigned int, unsigned int, - << "Cannot divide " << arg1 << " by " << arg2); - - private: - /** - * Prolongation matrix structures. - */ - vector structures; - /** - * Prolongation matrices. - */ - vector > 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&); -}; -- 2.39.5