From: wolf Date: Sat, 17 Jul 1999 22:21:01 +0000 (+0000) Subject: Next round of small updates. In particular do not build the Vanka class into the... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=718cc91801af4d082bc04d9f767ec09d98db707d;p=dealii-svn.git Next round of small updates. In particular do not build the Vanka class into the same object files as the sparse matrix. git-svn-id: https://svn.dealii.org/trunk@1588 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_matrix.2.templates b/deal.II/lac/include/lac/sparse_matrix.2.templates index 1be0e1294e..865b835b97 100644 --- a/deal.II/lac/include/lac/sparse_matrix.2.templates +++ b/deal.II/lac/include/lac/sparse_matrix.2.templates @@ -43,6 +43,4 @@ template void SparseMatrix::SOR_step (Vector &, const Vector::TSOR_step (Vector &, const Vector &, TYPEMAT) const; template void SparseMatrix::SSOR_step (Vector &, const Vector &, TYPEMAT) const; -template void SparseVanka::forward(Vector& dst, const Vector& dst) const; -template void SparseVanka::backward(Vector& dst, const Vector& dst) const; diff --git a/deal.II/lac/include/lac/sparse_vanka.h b/deal.II/lac/include/lac/sparse_vanka.h index 8e638aeafd..377b13b6df 100644 --- a/deal.II/lac/include/lac/sparse_vanka.h +++ b/deal.II/lac/include/lac/sparse_vanka.h @@ -117,36 +117,39 @@ class SparseVanka * if requested by #set_additive#. */ template - void operator() (Vector& dst, - const Vector& src) const; + void operator() (Vector &dst, + const Vector &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 - void forward(Vector& dst, const Vector& src) const; + void forward (Vector &dst, + const Vector &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 - void backward(Vector& dst, const Vector& src) const; + void backward (Vector &dst, + const Vector &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 > > inverses; }; diff --git a/deal.II/lac/include/lac/sparse_vanka.templates.h b/deal.II/lac/include/lac/sparse_vanka.templates.h index dd24436823..8a9b24c631 100644 --- a/deal.II/lac/include/lac/sparse_vanka.templates.h +++ b/deal.II/lac/include/lac/sparse_vanka.templates.h @@ -3,6 +3,8 @@ #include #include +#include +#include #include diff --git a/deal.II/lac/source/sparse_matrix.double.cc b/deal.II/lac/source/sparse_matrix.double.cc index 552653314c..3f46545d30 100644 --- a/deal.II/lac/source/sparse_matrix.double.cc +++ b/deal.II/lac/source/sparse_matrix.double.cc @@ -11,12 +11,10 @@ #include #include -#include #define TYPEMAT double template class SparseMatrix; -template class SparseVanka; #define TYPE2 float @@ -31,3 +29,6 @@ template class SparseVanka; #define TYPE2 long double #include + +#undef TYPE2 +#undef TYPEMAT diff --git a/deal.II/lac/source/sparse_matrix.float.cc b/deal.II/lac/source/sparse_matrix.float.cc index 996aa409d6..d2a2963b45 100644 --- a/deal.II/lac/source/sparse_matrix.float.cc +++ b/deal.II/lac/source/sparse_matrix.float.cc @@ -11,12 +11,12 @@ #include #include -#include + #define TYPEMAT float template class SparseMatrix; -template class SparseVanka; + #define TYPE2 float diff --git a/deal.II/lac/source/sparse_matrix.long_double.cc b/deal.II/lac/source/sparse_matrix.long_double.cc index 4a1b619177..651197dab0 100644 --- a/deal.II/lac/source/sparse_matrix.long_double.cc +++ b/deal.II/lac/source/sparse_matrix.long_double.cc @@ -11,12 +11,12 @@ #include #include -#include + #define TYPEMAT long double template class SparseMatrix; -template class SparseVanka; + #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 index 0000000000..b77c0765ae --- /dev/null +++ b/deal.II/lac/source/sparse_vanka.cc @@ -0,0 +1,17 @@ +/* $Id$ */ + +#include + + +// explicit instantiations +template class SparseVanka; +template class SparseVanka; + +template void SparseVanka::forward (Vector &dst, + const Vector &src) const; +template void SparseVanka::forward (Vector &dst, + const Vector &src) const; +template void SparseVanka::forward (Vector &dst, + const Vector &src) const; +template void SparseVanka::forward (Vector &dst, + const Vector &src) const;