]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
library compiles without MG
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Apr 2000 16:31:44 +0000 (16:31 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Apr 2000 16:31:44 +0000 (16:31 +0000)
git-svn-id: https://svn.dealii.org/branches/Branch-3-0@2675 0785d39b-7218-0410-832d-ea1e28bc413d

12 files changed:
deal.II/common/Make.global_options.in
deal.II/configure
deal.II/configure.in
deal.II/deal.II/include/dofs/dof_tools.h
deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/include/numerics/dof_renumbering.h
deal.II/deal.II/include/numerics/matrices.h
deal.II/deal.II/source/dofs/dof_renumbering.cc
deal.II/deal.II/source/dofs/dof_tools.cc
deal.II/deal.II/source/grid/intergrid_map.cc
tests/lac/testmatrix.cc
tests/lac/testmatrix.h

index 1ccf90f09c039f80b347395506c5f8fe2469fbf1..a72e79d4ae906c092b86371217acf7676c1cf8f9 100644 (file)
@@ -80,12 +80,12 @@ INCLUDE           += $(addprefix -I, $(include-path-base) \
 
 # compiler flags for debug and optimized mode
 
-CXXFLAGS.g   = -DDEBUG -ggdb -Wall -W -Wconversion \
+CXXFLAGS.g   = @DEFS@ -DDEBUG -ggdb -Wall -W -Wconversion \
                -Winline -Woverloaded-virtual\
               -ftemplate-depth-32\
                $(INCLUDE) \
               $(LIBPATH)
-CXXFLAGS.o   = -O2 -Wuninitialized \
+CXXFLAGS.o   = @DEFS@ -O2 -Wuninitialized \
                -felide-constructors -fnonnull-objects \
               -ftemplate-depth-32 \
                $(INCLUDE) \
index 46eeb1a203536b0da9443ac8b088cb4d7a3827a9..ca9fd782fc2f4894f9ce6b29df9acd41b9b12b46 100755 (executable)
@@ -1116,6 +1116,10 @@ fi
 
 if test $enablemultigrid = yes ; then
    echo "$ac_t""Configuring multigrid" 1>&6
+   cat >> confdefs.h <<\EOF
+#define ENABLE_MULTIGRID 1
+EOF
+
 fi
 
 
@@ -1132,7 +1136,7 @@ else
 fi
 
 echo $ac_n "checking for kdoc""... $ac_c" 1>&6
-echo "configure:1136: checking for kdoc" >&5
+echo "configure:1140: checking for kdoc" >&5
 if test -r $kdocdir/kdoc ; then
   echo "$ac_t""found" 1>&6
 else
@@ -1161,7 +1165,7 @@ if test "$docxx" = to-be-determined ; then
   # Extract the first word of ""doc++"", so it can be a program name with args.
 set dummy "doc++"; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1165: checking for $ac_word" >&5
+echo "configure:1169: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_docxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1195,7 +1199,7 @@ fi
 
 else
   echo $ac_n "checking for doc++""... $ac_c" 1>&6
-echo "configure:1199: checking for doc++" >&5
+echo "configure:1203: checking for doc++" >&5
   if test -x "$docxx" ; then
     echo "$ac_t""yes" 1>&6
   else
index 5a39ddba3b141adfae9583e4e0c97820f908b91a..9f13ff83b1a182db80da2eba55996777f6530995 100644 (file)
@@ -146,6 +146,7 @@ AC_ARG_ENABLE(multigrid,
     fi)
 if test $enablemultigrid = yes ; then
    AC_MSG_RESULT(Configuring multigrid)
+   AC_DEFINE(ENABLE_MULTIGRID)
 fi
 AC_SUBST(enablemultigrid)
 
index 5bcb95a0a46bd1c6611c1734047b6c91712db638..34e1c9724b86ddaf138f43e17994aa2b31463956 100644 (file)
@@ -14,9 +14,6 @@
 #define __deal2__dof_tools_h
 
 
-// Copyright Wolfgang Bangerth, Guido Kanschat, and others 1999
-
-
 #include <lac/forward_declarations.h>
 #include <vector>
 
@@ -358,6 +355,8 @@ class DoFTools
                             const vector<bool>    &select,
                             vector<bool>          &selected_dofs);
 
+#ifdef ENABLE_MULTIGRID
+
                                     /**
                                      * Do the same thing as #extract_dofs#
                                      * for one level of a multi-grid DoF
@@ -369,6 +368,8 @@ class DoFTools
                                   const vector<bool>      &select,
                                   vector<bool>            &selected_dofs);
 
+#endif
+
                                     /**
                                      * Exception
                                      */
index 90e769c8e47b9526d7ddf51be467029999239884..fcca529e2d49bdddee997cd601b73e4ea8a3f2c1 100644 (file)
@@ -3202,7 +3202,9 @@ class Triangulation : public TriaDimensionInfo<dim>,
     friend class TriaRawIterator<3,CellAccessor<3> >;
 
     friend class DoFHandler<dim>;
+#ifdef ENABLE_MULTIGRID
     friend class MGDoFHandler<dim>;
+#endif
 };
 
 
index 6cfc7806635cda8e4aaf24130459889be5ec03ee..bcddc951d31877a317a29f9b9fda4f41f8e2fa25 100644 (file)
@@ -183,6 +183,7 @@ class DoFRenumbering
                               const bool                  use_constraints    = false,
                               const vector<unsigned int> &starting_indices   = vector<unsigned int>());
 
+#ifdef ENABLE_MULTIGRID
                                     /**
                                      * Renumber the degrees of freedom
                                      * according to the Cuthill-McKee method,
@@ -208,6 +209,8 @@ class DoFRenumbering
                               const bool                  reversed_numbering = false,
                               const vector<unsigned int> &starting_indices   = vector<unsigned int> ());
 
+#endif
+
                                     /**
                                      * Sort the degrees of freedom by
                                      * component. The numbering within
index 37c761551aa86562040e72f08e9e3d698151c69e..2351d49ba9785d8d88a446410bc5f0cb283d3a0d 100644 (file)
@@ -288,6 +288,8 @@ class MatrixCreator
                                       SparseMatrix<double>     &matrix,
                                       const Function<dim>      *a = 0);
 
+#ifdef ENABLE_MULTIGRID
+
                                     /**
                                      * Generate Laplace matrix for a given level.
                                      * 
@@ -300,6 +302,8 @@ class MatrixCreator
                                             SparseMatrix<float>&     matrix,
                                             const Function<dim>*     a = 0);
 
+#endif
+
                                     /**
                                      * Assemble the Laplace matrix and a right
                                      * hand side vector. If no 
index 2856331c4d1ca390d3c52cb26a2281737a8f50f7..4a6bc36e1504643c94bb1c11831ab1a4f0f4829a 100644 (file)
 #include <dofs/dof_handler.h>
 #include <dofs/dof_constraints.h>
 #include <dofs/dof_tools.h>
+#ifdef ENABLE_MULTIGRID
 #include <multigrid/mg_dof_handler.h>
 #include <multigrid/mg_dof_tools.h>
+#endif
 #include <fe/fe.h>
 #include <numerics/dof_renumbering.h>
 
@@ -237,6 +239,8 @@ void DoFRenumbering::Cuthill_McKee (DoFHandler<dim>            &dof_handler,
 };
 
 
+#ifdef ENABLE_MULTIGRID
+
 template <int dim>
 void DoFRenumbering::Cuthill_McKee (MGDoFHandler<dim>          &dof_handler,
                                    const unsigned int          level,
@@ -398,7 +402,10 @@ void DoFRenumbering::Cuthill_McKee (MGDoFHandler<dim>          &dof_handler,
                                   // this is dimension specific and
                                   // thus needs an own function
   dof_handler.renumber_dofs (level, new_number);
-};
+}
+
+
+#endif // ENABLE_MULTIGRID
 
 
 template <int dim>
@@ -503,12 +510,16 @@ void DoFRenumbering::Cuthill_McKee (DoFHandler<deal_II_dimension> &dof_handler,
                                    const bool                     use_constraints,
                                    const vector<unsigned int>    &starting_indices);
 
+template
+void DoFRenumbering::component_wise (DoFHandler<deal_II_dimension> &dof_handler,
+                                    const vector<unsigned int>    &component_order_arg);
+
+#ifdef ENABLE_MULTIGRID
+
 template
 void DoFRenumbering::Cuthill_McKee (MGDoFHandler<deal_II_dimension> &dof_handler,
                                    const unsigned int               level,
                                    const bool                       reversed_numbering,
                                    const vector<unsigned int>      &starting_indices);
 
-template
-void DoFRenumbering::component_wise (DoFHandler<deal_II_dimension> &dof_handler,
-                                    const vector<unsigned int>    &component_order_arg);
+#endif
index 27d6282af772ce8dba5c5f6c1782414c5c196abf..450a502a86bb19fcd1c6b53399db307b051e1ca1 100644 (file)
 #include <dofs/dof_handler.h>
 #include <dofs/dof_accessor.h>
 #include <dofs/dof_constraints.h>
+
+#ifdef ENABLE_MULTIGRID
+
 #include <multigrid/mg_dof_handler.h>
 #include <multigrid/mg_dof_accessor.h>
+
+#endif
+
 #include <fe/fe.h>
 #include <fe/fe_system.h>
 #include <dofs/dof_tools.h>
@@ -677,6 +683,9 @@ DoFTools::extract_dofs(const DoFHandler<dim> &dof,
 }
 
 
+
+#ifdef ENABLE_MULTIGRID
+
 template<int dim>
 void
 DoFTools::extract_level_dofs(const unsigned int       level,
@@ -708,6 +717,8 @@ DoFTools::extract_level_dofs(const unsigned int       level,
     }
 }
 
+#endif // ENABLE_MULTIGRID
+
 
 // explicit instantiations
 #if deal_II_dimension > 1
@@ -750,8 +761,12 @@ DoFTools::distribute_cell_to_dof_vector (const DoFHandler<deal_II_dimension> &do
 template void DoFTools::extract_dofs(const DoFHandler<deal_II_dimension>& dof,
                                     const vector<bool>& local_select,
                                     vector<bool>& selected_dofs);
+
+#ifdef ENABLE_MULTIGRID
+
 template void DoFTools::extract_level_dofs(unsigned int level,
                                           const MGDoFHandler<deal_II_dimension>& dof,
                                           const vector<bool>& local_select,
                                           vector<bool>& selected_dofs);
 
+#endif
index 64767b115c262e33eab9799684f28b77d76d845b..ce99ba4e512711ba1c4ac517e65a12f48cdb0ecc 100644 (file)
 #include <dofs/dof_handler.h>
 #include <grid/tria_accessor.h>
 #include <dofs/dof_accessor.h>
+
+#ifdef ENABLE_MULTIGRID
+
 #include <multigrid/mg_dof_handler.h>
 #include <multigrid/mg_dof_accessor.h>
+
+#endif
+
 #include <grid/tria_iterator.h>
 #include <grid/intergrid_map.h>
 
@@ -174,6 +180,9 @@ void InterGridMap<GridClass,dim>::clear ()
 // explicit instantiations
 template class InterGridMap<Triangulation, deal_II_dimension>;
 template class InterGridMap<DoFHandler, deal_II_dimension>;
-template class InterGridMap<MGDoFHandler, deal_II_dimension>;
 
+#ifdef ENABLE_MULTIGRID
+
+template class InterGridMap<MGDoFHandler, deal_II_dimension>;
 
+#endif
index 77d38427dd674b1c1224271ab265f268e638798e..1f9dc2363bf8c22d570dcbdf19bc821c11e6af25 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,6 +108,9 @@ FDMatrix::gnuplot_print(ostream& s, const Vector<number>& V) const
    s << endl;
 }
 
+
+#ifdef ENABLE_MULTIGRID
+
 FDMGTransfer::FDMGTransfer(unsigned int nx, unsigned int ny,
                           unsigned int nlevels)
                :
@@ -243,6 +247,7 @@ FDMGTransfer::restrict_and_add (const unsigned int   from_level,
   matrices[from_level-1].vmult(dst,src);
 }
 
+#endif // ENABLE_MULTIGRID
 
 template void FDMatrix::laplacian(SparseMatrix<long double>&) const;
 template void FDMatrix::laplacian(SparseMatrix<double>&) const;
index 5c1b392b77bebeb9ed67e457f5ecf169f4614bd9..e25e0727505a2a64d00d813d8eeecb3364fb2c17 100644 (file)
@@ -2,8 +2,13 @@
 
 #include <lac/forward_declarations.h>
 #include <base/exceptions.h>
+
+#ifdef ENABLE_MULTIGRID
+
 #include <multigrid/mg_base.h>
 
+#endif
+
 /**
  * Finite difference matrix on uniform grid.
  * Generator for simple 5-point discretization of Laplace problem.
@@ -43,6 +48,8 @@ class FDMatrix
     unsigned int ny;
 };
 
+#ifdef ENABLE_MULTIGRID
+
 /**
  * Grid transfer for finite differences on uniform grid.
  */
@@ -103,3 +110,5 @@ class FDMGTransfer
     void build_matrix(unsigned int nx, unsigned int ny,
                      SparsityPattern&, SparseMatrix<double>&);
 };
+
+#endif // ENABLE_MULTIGRID

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.