]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Next round of small updates. In particular do not build the Vanka class into the...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 17 Jul 1999 22:21:01 +0000 (22:21 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 17 Jul 1999 22:21:01 +0000 (22:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@1588 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_matrix.2.templates
deal.II/lac/include/lac/sparse_vanka.h
deal.II/lac/include/lac/sparse_vanka.templates.h
deal.II/lac/source/sparse_matrix.double.cc
deal.II/lac/source/sparse_matrix.float.cc
deal.II/lac/source/sparse_matrix.long_double.cc
deal.II/lac/source/sparse_vanka.cc [new file with mode: 0644]

index 1be0e1294e84cbe028adf8013a213c300a07db9d..865b835b97cf6b90f299b1b0842665e406a561cc 100644 (file)
@@ -43,6 +43,4 @@ template void SparseMatrix<TYPEMAT>::SOR_step (Vector<TYPE2> &, const Vector<TYP
 template void SparseMatrix<TYPEMAT>::TSOR_step (Vector<TYPE2> &, const Vector<TYPE2> &, TYPEMAT) const;
 template void SparseMatrix<TYPEMAT>::SSOR_step (Vector<TYPE2> &, const Vector<TYPE2> &, TYPEMAT) const;
 
-template void SparseVanka<TYPEMAT>::forward(Vector<TYPE2>& dst, const Vector<TYPE2>& dst) const;
-template void SparseVanka<TYPEMAT>::backward(Vector<TYPE2>& dst, const Vector<TYPE2>& dst) const;
 
index 8e638aeafdb87029816675b4bee1726521024000..377b13b6df02c609e522cf397635830cad5e177e 100644 (file)
@@ -117,36 +117,39 @@ class SparseVanka
                                      * if requested by #set_additive#.
                                      */
     template<typename number2>
-    void operator() (Vector<number2>dst,
-                    const Vector<number2>src) const;
+    void operator() (Vector<number2>       &dst,
+                    const Vector<number2> &src) const;
 
                                     /**
                                      * Application of the Vanka operator.
-                                     * This function takes two vector
-                                     * arguments, the residual in #src#
-                                     * and the resulting update vector
-                                     * in #dst#.
+                                     * This function takes the residual
+                                     * in #src# and returns the resulting
+                                     * update vector in #dst#.
                                      */
     template<typename number2>
-    void forward(Vector<number2>& dst, const Vector<number2>& src) const;
+    void forward (Vector<number2>       &dst,
+                 const Vector<number2> &src) const;
+    
                                     /**
                                      * Application of the transpose
                                      * Vanka operator.
-                                     * This function takes two vector
-                                     * arguments, the residual in #src#
-                                     * and the resulting update vector
-                                     * in #dst#.
+                                     * This function takes the residual
+                                     * in #src# and returns the resulting
+                                     * update vector in #dst#.
                                      */
     template<typename number2>
-    void backward(Vector<number2>& dst, const Vector<number2>& src) const;
+    void backward (Vector<number2>       &dst,
+                  const Vector<number2> &src) const;
+    
                                     /**
                                      * Minimize memory consumption.
                                      * Activating this option reduces
                                      * memory needs of the Vanka object
-                                     * to nealy zero. You pay for this
+                                     * to nearly zero. You pay for this
                                      * by a high increase of computing
                                      * time, since all local matrices
-                                     * are built up and inverted every time.
+                                     * are built up and inverted every
+                                     * time the Vanka operator is applied.
                                      */
     void conserve_memory();
 
@@ -171,7 +174,10 @@ class SparseVanka
                                      */
     bool conserve_mem;
                                     /**
-                                     * Array of inverse matrices.
+                                     * Array of inverse matrices,
+                                     * one for each degree of freedom.
+                                     * Only those elements will be used
+                                     * that are tagged in #selected#.
                                      */
     mutable vector<SmartPointer<FullMatrix<float> > > inverses;
 };
index dd24436823b4d41035697b984a11433f90ade130..8a9b24c6312fc35a64d9ee907e23068335fda7b2 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <lac/sparse_vanka.h>
 #include <lac/fullmatrix.h>
+#include <lac/sparsematrix.h>
+#include <lac/vector.h>
 
 #include <map>
 
index 552653314c4abef52bf91aa055e4269ac75722ca..3f46545d3001eb45ce36d7db16769a531e1cdcf4 100644 (file)
 
 #include <cmath>
 #include <lac/sparsematrix.templates.h>
-#include <lac/sparse_vanka.templates.h>
 
 #define TYPEMAT double
 
 template class SparseMatrix<TYPEMAT>;
-template class SparseVanka<TYPEMAT>;
 
 #define TYPE2 float
 
@@ -31,3 +29,6 @@ template class SparseVanka<TYPEMAT>;
 #define TYPE2 long double
 
 #include <lac/sparsematrix.2.templates>
+
+#undef TYPE2
+#undef TYPEMAT
index 996aa409d6e4b8f31b3b35b97c55b546ac63ab83..d2a2963b45f7edc18a6cd76af8f4f49e2f5baf2c 100644 (file)
 
 #include <cmath>
 #include <lac/sparsematrix.templates.h>
-#include <lac/sparse_vanka.templates.h>
+
 
 #define TYPEMAT float
 
 template class SparseMatrix<TYPEMAT>;
-template class SparseVanka<TYPEMAT>;
+
 
 #define TYPE2 float
 
index 4a1b619177889d483a0f76afc108e23cb62a7655..651197dab07aa2f7b85919ca3dc75a39252e8441 100644 (file)
 
 #include <cmath>
 #include <lac/sparsematrix.templates.h>
-#include <lac/sparse_vanka.templates.h>
+
 
 #define TYPEMAT long double
 
 template class SparseMatrix<TYPEMAT>;
-template class SparseVanka<TYPEMAT>;
+
 
 #define TYPE2 float
 
diff --git a/deal.II/lac/source/sparse_vanka.cc b/deal.II/lac/source/sparse_vanka.cc
new file mode 100644 (file)
index 0000000..b77c076
--- /dev/null
@@ -0,0 +1,17 @@
+/* $Id$ */
+
+#include <lac/sparse_vanka.templates.h>
+
+
+// explicit instantiations
+template class SparseVanka<float>;
+template class SparseVanka<double>;
+
+template void SparseVanka<double>::forward (Vector<float>       &dst,
+                                           const Vector<float> &src) const;
+template void SparseVanka<double>::forward (Vector<double>       &dst,
+                                           const Vector<double> &src) const;
+template void SparseVanka<float>::forward (Vector<float>       &dst,
+                                          const Vector<float> &src) const;
+template void SparseVanka<float>::forward (Vector<double>       &dst,
+                                          const Vector<double> &src) const;

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.