Reference documentation for deal.II version 8.1.0
mg_smoother.h
1 // ---------------------------------------------------------------------
2 // @f$Id: mg_smoother.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 1999 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__mg_smoother_h
18 #define __deal2__mg_smoother_h
19 
20 
21 #include <deal.II/base/config.h>
22 #include <deal.II/base/smartpointer.h>
23 #include <deal.II/lac/pointer_matrix.h>
24 #include <deal.II/lac/vector_memory.h>
25 #include <deal.II/multigrid/mg_base.h>
26 #include <deal.II/base/mg_level_object.h>
27 #include <vector>
28 
30 
31 /*
32  * MGSmootherBase is defined in mg_base.h
33  */
34 
37 
46 template <class VECTOR>
47 class MGSmoother : public MGSmootherBase<VECTOR>
48 {
49 public:
56  MGSmoother(const unsigned int steps = 1,
57  const bool variable = false,
58  const bool symmetric = false,
59  const bool transpose = false);
60 
73  const unsigned int steps = 1,
74  const bool variable = false,
75  const bool symmetric = false,
76  const bool transpose = false) DEAL_II_DEPRECATED;
77 
82  void set_steps (const unsigned int);
83 
88  void set_variable (const bool);
89 
94  void set_symmetric (const bool);
95 
101  void set_transpose (const bool);
102 
109  void set_debug (const unsigned int level);
110 
111 private:
118 
119 protected:
127  unsigned int steps;
128 
135  bool variable;
136 
143  bool symmetric;
144 
152  bool transpose;
153 
159  unsigned int debug;
160 
165 };
166 
167 
176 template <class VECTOR>
177 class MGSmootherIdentity : public MGSmootherBase<VECTOR>
178 {
179 public:
190  virtual void smooth (const unsigned int level,
191  VECTOR &u,
192  const VECTOR &rhs) const;
193  virtual void clear ();
194 };
195 
196 
197 namespace mg
198 {
233  template<class RELAX, class VECTOR>
234  class SmootherRelaxation : public MGLevelObject<RELAX>, public MGSmoother<VECTOR>
235  {
236  public:
241  SmootherRelaxation(const unsigned int steps = 1,
242  const bool variable = false,
243  const bool symmetric = false,
244  const bool transpose = false);
245 
259  template <class MATRIX2>
260  void initialize (const MGLevelObject<MATRIX2> &matrices,
261  const typename RELAX::AdditionalData &additional_data = typename RELAX::AdditionalData());
262 
276  template <class MATRIX2, class DATA>
277  void initialize (const MGLevelObject<MATRIX2> &matrices,
278  const MGLevelObject<DATA> &additional_data);
293 // template <class MATRIX2>
294 // void initialize (const MGLevelObject<MatrixBlock<MATRIX2> >& matrices,
295 // const typename RELAX::AdditionalData & additional_data = typename RELAX::AdditionalData());
296 
300  void clear ();
301 
305  virtual void smooth (const unsigned int level,
306  VECTOR &u,
307  const VECTOR &rhs) const;
308 
312  std::size_t memory_consumption () const;
313  };
314 }
315 
357 template<class MATRIX, class RELAX, class VECTOR>
358 class MGSmootherRelaxation : public MGSmoother<VECTOR>
359 {
360 public:
364  MGSmootherRelaxation(const unsigned int steps = 1,
365  const bool variable = false,
366  const bool symmetric = false,
367  const bool transpose = false);
368 
377  const unsigned int steps = 1,
378  const bool variable = false,
379  const bool symmetric = false,
380  const bool transpose = false) DEAL_II_DEPRECATED;
381 
397  template <class MATRIX2>
399  const typename RELAX::AdditionalData &additional_data = typename RELAX::AdditionalData());
400 
416  template <class MATRIX2, class DATA>
417  void initialize (const MGLevelObject<MATRIX2> &matrices,
418  const MGLevelObject<DATA> &additional_data);
419 
440  template <class MATRIX2, class DATA>
441  void initialize (const MGLevelObject<MATRIX2> &matrices,
442  const DATA &additional_data,
443  const unsigned int block_row,
444  const unsigned int block_col);
445 
466  template <class MATRIX2, class DATA>
467  void initialize (const MGLevelObject<MATRIX2> &matrices,
468  const MGLevelObject<DATA> &additional_data,
469  const unsigned int block_row,
470  const unsigned int block_col);
471 
475  void clear ();
476 
480  virtual void smooth (const unsigned int level,
481  VECTOR &u,
482  const VECTOR &rhs) const;
483 
489 
493  std::size_t memory_consumption () const;
494 
495 
496 private:
501 
502 };
503 
504 
505 
537 template<class MATRIX, class PRECONDITIONER, class VECTOR>
538 class MGSmootherPrecondition : public MGSmoother<VECTOR>
539 {
540 public:
544  MGSmootherPrecondition(const unsigned int steps = 1,
545  const bool variable = false,
546  const bool symmetric = false,
547  const bool transpose = false);
548 
557  const unsigned int steps = 1,
558  const bool variable = false,
559  const bool symmetric = false,
560  const bool transpose = false) DEAL_II_DEPRECATED;
561 
577  template <class MATRIX2>
579  const typename PRECONDITIONER::AdditionalData &additional_data = typename PRECONDITIONER::AdditionalData());
580 
596  template <class MATRIX2, class DATA>
597  void initialize (const MGLevelObject<MATRIX2> &matrices,
598  const MGLevelObject<DATA> &additional_data);
599 
620  template <class MATRIX2, class DATA>
621  void initialize (const MGLevelObject<MATRIX2> &matrices,
622  const DATA &additional_data,
623  const unsigned int block_row,
624  const unsigned int block_col);
625 
646  template <class MATRIX2, class DATA>
647  void initialize (const MGLevelObject<MATRIX2> &matrices,
648  const MGLevelObject<DATA> &additional_data,
649  const unsigned int block_row,
650  const unsigned int block_col);
651 
655  void clear ();
656 
660  virtual void smooth (const unsigned int level,
661  VECTOR &u,
662  const VECTOR &rhs) const;
663 
669 
673  std::size_t memory_consumption () const;
674 
675 
676 private:
681 
682 };
683 
686 /* ------------------------------- Inline functions -------------------------- */
687 
688 #ifndef DOXYGEN
689 
690 template <class VECTOR>
691 inline void
693  const unsigned int, VECTOR &,
694  const VECTOR &) const
695 {}
696 
697 template <class VECTOR>
698 inline void
700 {}
701 
702 //---------------------------------------------------------------------------
703 
704 template <class VECTOR>
705 inline
707  const unsigned int steps,
708  const bool variable,
709  const bool symmetric,
710  const bool transpose)
711  :
712  steps(steps),
713  variable(variable),
714  symmetric(symmetric),
715  transpose(transpose),
716  debug(0),
717  mem(&my_memory)
718 {}
719 
720 
721 template <class VECTOR>
722 inline
725  const unsigned int steps,
726  const bool variable,
727  const bool symmetric,
728  const bool transpose)
729  :
730  steps(steps),
731  variable(variable),
732  symmetric(symmetric),
733  transpose(transpose),
734  debug(0),
735  mem(&mem)
736 {}
737 
738 
739 template <class VECTOR>
740 inline void
741 MGSmoother<VECTOR>::set_steps (const unsigned int s)
742 {
743  steps = s;
744 }
745 
746 
747 template <class VECTOR>
748 inline void
749 MGSmoother<VECTOR>::set_debug (const unsigned int s)
750 {
751  debug = s;
752 }
753 
754 
755 template <class VECTOR>
756 inline void
757 MGSmoother<VECTOR>::set_variable (const bool flag)
758 {
759  variable = flag;
760 }
761 
762 
763 template <class VECTOR>
764 inline void
765 MGSmoother<VECTOR>::set_symmetric (const bool flag)
766 {
767  symmetric = flag;
768 }
769 
770 
771 template <class VECTOR>
772 inline void
773 MGSmoother<VECTOR>::set_transpose (const bool flag)
774 {
775  transpose = flag;
776 }
777 
778 //----------------------------------------------------------------------//
779 
780 namespace mg
781 {
782  template <class RELAX, class VECTOR>
783  inline
785  const unsigned int steps,
786  const bool variable,
787  const bool symmetric,
788  const bool transpose)
789  : MGSmoother<VECTOR>(steps, variable, symmetric, transpose)
790  {}
791 
792 
793  template <class RELAX, class VECTOR>
794  inline void
795  SmootherRelaxation<RELAX, VECTOR>::clear ()
796  {
798  }
799 
800 
801  template <class RELAX, class VECTOR>
802  template <class MATRIX2>
803  inline void
804  SmootherRelaxation<RELAX, VECTOR>::initialize (
805  const MGLevelObject<MATRIX2> &m,
806  const typename RELAX::AdditionalData &data)
807  {
808  const unsigned int min = m.min_level();
809  const unsigned int max = m.max_level();
810 
811  this->resize(min, max);
812 
813  for (unsigned int i=min; i<=max; ++i)
814  (*this)[i].initialize(m[i], data);
815  }
816 
817 
818  template <class RELAX, class VECTOR>
819  template <class MATRIX2, class DATA>
820  inline void
821  SmootherRelaxation<RELAX, VECTOR>::initialize (
822  const MGLevelObject<MATRIX2> &m,
823  const MGLevelObject<DATA> &data)
824  {
825  const unsigned int min = std::max(m.min_level(), data.min_level());
826  const unsigned int max = std::min(m.max_level(), data.max_level());
827 
828  this->resize(min, max);
829 
830  for (unsigned int i=min; i<=max; ++i)
831  (*this)[i].initialize(m[i], data[i]);
832  }
833 
834 
835  template <class RELAX, class VECTOR>
836  inline void
837  SmootherRelaxation<RELAX, VECTOR>::smooth(
838  const unsigned int level,
839  VECTOR &u,
840  const VECTOR &rhs) const
841  {
842  unsigned int maxlevel = this->max_level();
843  unsigned int steps2 = this->steps;
844 
845  if (this->variable)
846  steps2 *= (1<<(maxlevel-level));
847 
848  bool T = this->transpose;
849  if (this->symmetric && (steps2 % 2 == 0))
850  T = false;
851  if (this->debug > 0)
852  deallog << 'S' << level << ' ';
853 
854  for (unsigned int i=0; i<steps2; ++i)
855  {
856  if (T)
857  (*this)[level].Tstep(u, rhs);
858  else
859  (*this)[level].step(u, rhs);
860  if (this->symmetric)
861  T = !T;
862  }
863  }
864 
865 
866  template <class RELAX, class VECTOR>
867  inline
868  std::size_t
869  SmootherRelaxation<RELAX, VECTOR>::
870  memory_consumption () const
871  {
872  return sizeof(*this)
873  -sizeof(MGLevelObject<RELAX>)
875  + this->mem->memory_consumption();
876  }
877 }
878 
879 
880 //----------------------------------------------------------------------//
881 
882 template <class MATRIX, class RELAX, class VECTOR>
883 inline
886  const unsigned int steps,
887  const bool variable,
888  const bool symmetric,
889  const bool transpose)
890  :
891  MGSmoother<VECTOR>(mem, steps, variable, symmetric, transpose)
892 {}
893 
894 
895 
896 template <class MATRIX, class RELAX, class VECTOR>
897 inline
899  const unsigned int steps,
900  const bool variable,
901  const bool symmetric,
902  const bool transpose)
903  :
904  MGSmoother<VECTOR>(steps, variable, symmetric, transpose)
905 {}
906 
907 
908 
909 template <class MATRIX, class RELAX, class VECTOR>
910 inline void
912 {
913  smoothers.clear();
914 
915  unsigned int i=matrices.min_level(),
916  max_level=matrices.max_level();
917  for (; i<=max_level; ++i)
918  matrices[i]=0;
919 }
920 
921 
922 template <class MATRIX, class RELAX, class VECTOR>
923 template <class MATRIX2>
924 inline void
926  const MGLevelObject<MATRIX2> &m,
927  const typename RELAX::AdditionalData &data)
928 {
929  const unsigned int min = m.min_level();
930  const unsigned int max = m.max_level();
931 
932  matrices.resize(min, max);
933  smoothers.resize(min, max);
934 
935  for (unsigned int i=min; i<=max; ++i)
936  {
937  matrices[i] = &m[i];
938  smoothers[i].initialize(m[i], data);
939  }
940 }
941 
942 template <class MATRIX, class RELAX, class VECTOR>
943 template <class MATRIX2, class DATA>
944 inline void
946  const MGLevelObject<MATRIX2> &m,
947  const MGLevelObject<DATA> &data)
948 {
949  const unsigned int min = m.min_level();
950  const unsigned int max = m.max_level();
951 
952  Assert (data.min_level() == min,
954  Assert (data.max_level() == max,
956 
957  matrices.resize(min, max);
958  smoothers.resize(min, max);
959 
960  for (unsigned int i=min; i<=max; ++i)
961  {
962  matrices[i] = &m[i];
963  smoothers[i].initialize(m[i], data[i]);
964  }
965 }
966 
967 template <class MATRIX, class RELAX, class VECTOR>
968 template <class MATRIX2, class DATA>
969 inline void
971  const MGLevelObject<MATRIX2> &m,
972  const DATA &data,
973  const unsigned int row,
974  const unsigned int col)
975 {
976  const unsigned int min = m.min_level();
977  const unsigned int max = m.max_level();
978 
979  matrices.resize(min, max);
980  smoothers.resize(min, max);
981 
982  for (unsigned int i=min; i<=max; ++i)
983  {
984  matrices[i] = &(m[i].block(row, col));
985  smoothers[i].initialize(m[i].block(row, col), data);
986  }
987 }
988 
989 template <class MATRIX, class RELAX, class VECTOR>
990 template <class MATRIX2, class DATA>
991 inline void
993  const MGLevelObject<MATRIX2> &m,
994  const MGLevelObject<DATA> &data,
995  const unsigned int row,
996  const unsigned int col)
997 {
998  const unsigned int min = m.min_level();
999  const unsigned int max = m.max_level();
1000 
1001  Assert (data.min_level() == min,
1003  Assert (data.max_level() == max,
1005 
1006  matrices.resize(min, max);
1007  smoothers.resize(min, max);
1008 
1009  for (unsigned int i=min; i<=max; ++i)
1010  {
1011  matrices[i] = &(m[i].block(row, col));
1012  smoothers[i].initialize(m[i].block(row, col), data[i]);
1013  }
1014 }
1015 
1016 
1017 template <class MATRIX, class RELAX, class VECTOR>
1018 inline void
1020  const unsigned int level,
1021  VECTOR &u,
1022  const VECTOR &rhs) const
1023 {
1024  unsigned int maxlevel = smoothers.max_level();
1025  unsigned int steps2 = this->steps;
1026 
1027  if (this->variable)
1028  steps2 *= (1<<(maxlevel-level));
1029 
1030  bool T = this->transpose;
1031  if (this->symmetric && (steps2 % 2 == 0))
1032  T = false;
1033  if (this->debug > 0)
1034  deallog << 'S' << level << ' ';
1035 
1036  for (unsigned int i=0; i<steps2; ++i)
1037  {
1038  if (T)
1039  smoothers[level].Tstep(u, rhs);
1040  else
1041  smoothers[level].step(u, rhs);
1042  if (this->symmetric)
1043  T = !T;
1044  }
1045 }
1046 
1047 
1048 
1049 template <class MATRIX, class RELAX, class VECTOR>
1050 inline
1051 std::size_t
1053 memory_consumption () const
1054 {
1055  return sizeof(*this)
1056  + matrices.memory_consumption()
1057  + smoothers.memory_consumption()
1058  + this->mem->memory_consumption();
1059 }
1060 
1061 
1062 //----------------------------------------------------------------------//
1063 
1064 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1065 inline
1067  VectorMemory<VECTOR> &mem,
1068  const unsigned int steps,
1069  const bool variable,
1070  const bool symmetric,
1071  const bool transpose)
1072  :
1073  MGSmoother<VECTOR>(mem, steps, variable, symmetric, transpose)
1074 {}
1075 
1076 
1077 
1078 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1079 inline
1081  const unsigned int steps,
1082  const bool variable,
1083  const bool symmetric,
1084  const bool transpose)
1085  :
1086  MGSmoother<VECTOR>(steps, variable, symmetric, transpose)
1087 {}
1088 
1089 
1090 
1091 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1092 inline void
1094 {
1095  smoothers.clear();
1096 
1097  unsigned int i=matrices.min_level(),
1098  max_level=matrices.max_level();
1099  for (; i<=max_level; ++i)
1100  matrices[i]=0;
1101 }
1102 
1103 
1104 
1105 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1106 template <class MATRIX2>
1107 inline void
1109  const MGLevelObject<MATRIX2> &m,
1110  const typename PRECONDITIONER::AdditionalData &data)
1111 {
1112  const unsigned int min = m.min_level();
1113  const unsigned int max = m.max_level();
1114 
1115  matrices.resize(min, max);
1116  smoothers.resize(min, max);
1117 
1118  for (unsigned int i=min; i<=max; ++i)
1119  {
1120  matrices[i] = &m[i];
1121  smoothers[i].initialize(m[i], data);
1122  }
1123 }
1124 
1125 
1126 
1127 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1128 template <class MATRIX2, class DATA>
1129 inline void
1131  const MGLevelObject<MATRIX2> &m,
1132  const MGLevelObject<DATA> &data)
1133 {
1134  const unsigned int min = m.min_level();
1135  const unsigned int max = m.max_level();
1136 
1137  Assert (data.min_level() == min,
1139  Assert (data.max_level() == max,
1141 
1142  matrices.resize(min, max);
1143  smoothers.resize(min, max);
1144 
1145  for (unsigned int i=min; i<=max; ++i)
1146  {
1147  matrices[i] = &m[i];
1148  smoothers[i].initialize(m[i], data[i]);
1149  }
1150 }
1151 
1152 
1153 
1154 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1155 template <class MATRIX2, class DATA>
1156 inline void
1158  const MGLevelObject<MATRIX2> &m,
1159  const DATA &data,
1160  const unsigned int row,
1161  const unsigned int col)
1162 {
1163  const unsigned int min = m.min_level();
1164  const unsigned int max = m.max_level();
1165 
1166  matrices.resize(min, max);
1167  smoothers.resize(min, max);
1168 
1169  for (unsigned int i=min; i<=max; ++i)
1170  {
1171  matrices[i] = &(m[i].block(row, col));
1172  smoothers[i].initialize(m[i].block(row, col), data);
1173  }
1174 }
1175 
1176 
1177 
1178 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1179 template <class MATRIX2, class DATA>
1180 inline void
1182  const MGLevelObject<MATRIX2> &m,
1183  const MGLevelObject<DATA> &data,
1184  const unsigned int row,
1185  const unsigned int col)
1186 {
1187  const unsigned int min = m.min_level();
1188  const unsigned int max = m.max_level();
1189 
1190  Assert (data.min_level() == min,
1192  Assert (data.max_level() == max,
1194 
1195  matrices.resize(min, max);
1196  smoothers.resize(min, max);
1197 
1198  for (unsigned int i=min; i<=max; ++i)
1199  {
1200  matrices[i] = &(m[i].block(row, col));
1201  smoothers[i].initialize(m[i].block(row, col), data[i]);
1202  }
1203 }
1204 
1205 
1206 
1207 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1208 inline void
1210  const unsigned int level,
1211  VECTOR &u,
1212  const VECTOR &rhs) const
1213 {
1214  unsigned int maxlevel = matrices.max_level();
1215  unsigned int steps2 = this->steps;
1216 
1217  if (this->variable)
1218  steps2 *= (1<<(maxlevel-level));
1219 
1220  typename VectorMemory<VECTOR>::Pointer r(*this->mem);
1221  typename VectorMemory<VECTOR>::Pointer d(*this->mem);
1222 
1223  r->reinit(u,true);
1224  d->reinit(u,true);
1225 
1226  bool T = this->transpose;
1227  if (this->symmetric && (steps2 % 2 == 0))
1228  T = false;
1229  if (this->debug > 0)
1230  deallog << 'S' << level << ' ';
1231 
1232  for (unsigned int i=0; i<steps2; ++i)
1233  {
1234  if (T)
1235  {
1236  if (this->debug > 0)
1237  deallog << 'T';
1238  if (i == 0 && u.all_zero())
1239  *r = rhs;
1240  else
1241  {
1242  matrices[level].Tvmult(*r,u);
1243  r->sadd(-1.,1.,rhs);
1244  }
1245  if (this->debug > 2)
1246  deallog << ' ' << r->l2_norm() << ' ';
1247  smoothers[level].Tvmult(*d, *r);
1248  if (this->debug > 1)
1249  deallog << ' ' << d->l2_norm() << ' ';
1250  }
1251  else
1252  {
1253  if (this->debug > 0)
1254  deallog << 'N';
1255  if (i == 0 && u.all_zero())
1256  *r = rhs;
1257  else
1258  {
1259  matrices[level].vmult(*r,u);
1260  r->sadd(-1.,rhs);
1261  }
1262  if (this->debug > 2)
1263  deallog << ' ' << r->l2_norm() << ' ';
1264  smoothers[level].vmult(*d, *r);
1265  if (this->debug > 1)
1266  deallog << ' ' << d->l2_norm() << ' ';
1267  }
1268  u += *d;
1269  if (this->symmetric)
1270  T = !T;
1271  }
1272  if (this->debug > 0)
1273  deallog << std::endl;
1274 }
1275 
1276 
1277 
1278 template <class MATRIX, class PRECONDITIONER, class VECTOR>
1279 inline
1280 std::size_t
1282 memory_consumption () const
1283 {
1284  return sizeof(*this)
1285  + matrices.memory_consumption()
1286  + smoothers.memory_consumption()
1287  + this->mem->memory_consumption();
1288 }
1289 
1290 
1291 #endif // DOXYGEN
1292 
1293 DEAL_II_NAMESPACE_CLOSE
1294 
1295 #endif
SmootherRelaxation(const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
MGSmootherRelaxation(const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
MGSmoother(const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
Definition: mg.h:82
std::size_t memory_consumption() const
MGLevelObject< PointerMatrix< MATRIX, VECTOR > > matrices
Definition: mg_smoother.h:680
MGSmootherPrecondition(const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
void set_transpose(const bool)
SmartPointer< VectorMemory< VECTOR >, MGSmoother< VECTOR > > mem
Definition: mg_smoother.h:164
void initialize(const MGLevelObject< MATRIX2 > &matrices, const typename PRECONDITIONER::AdditionalData &additional_data=typename PRECONDITIONER::AdditionalData())
bool symmetric
Definition: mg_smoother.h:143
void initialize(const MGLevelObject< MATRIX2 > &matrices, const typename RELAX::AdditionalData &additional_data=typename RELAX::AdditionalData())
void set_debug(const unsigned int level)
unsigned int debug
Definition: mg_smoother.h:159
MGLevelObject< RELAX > smoothers
Definition: mg_smoother.h:488
virtual void smooth(const unsigned int level, VECTOR &u, const VECTOR &rhs) const
virtual void smooth(const unsigned int level, VECTOR &u, const VECTOR &rhs) const
virtual void smooth(const unsigned int level, VECTOR &u, const VECTOR &rhs) const
std::size_t memory_consumption() const
bool variable
Definition: mg_smoother.h:135
void set_steps(const unsigned int)
VectorizedArray< Number > min(const ::VectorizedArray< Number > &x, const ::VectorizedArray< Number > &y)
void set_variable(const bool)
#define Assert(cond, exc)
Definition: exceptions.h:299
unsigned int max_level() const
SymmetricTensor< rank, dim, Number > transpose(const SymmetricTensor< rank, dim, Number > &t)
MGLevelObject< PRECONDITIONER > smoothers
Definition: mg_smoother.h:668
BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED
GrowingVectorMemory< VECTOR > my_memory
Definition: mg_smoother.h:117
MGLevelObject< PointerMatrix< MATRIX, VECTOR > > matrices
Definition: mg_smoother.h:500
void set_symmetric(const bool)
std::size_t memory_consumption() const
unsigned int steps
Definition: mg_smoother.h:127
std::size_t memory_consumption() const
unsigned int min_level() const
::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
bool transpose
Definition: mg_smoother.h:152
VectorizedArray< Number > max(const ::VectorizedArray< Number > &x, const ::VectorizedArray< Number > &y)
virtual void clear()
void initialize(const MGLevelObject< MATRIX2 > &matrices, const typename RELAX::AdditionalData &additional_data=typename RELAX::AdditionalData())
virtual void smooth(const unsigned int level, VECTOR &u, const VECTOR &rhs) const