#include <vector>
template<class MA_inverse, class MB, class MDt, class MC>
- void
- checkVmult(BlockVector<double> &dst, const BlockVector<double> &src,
- const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C)
- {
- deallog << "vmult" << std::endl;
+void
+checkVmult(BlockVector<double> &dst, const BlockVector<double> &src,
+ const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C)
+{
+ deallog << "vmult" << std::endl;
- GrowingVectorMemory < BlockVector<double> > mem;
+ GrowingVectorMemory < BlockVector<double> > mem;
- SchurMatrix<MA_inverse, MB, MDt, MC> S(Ainv, B, Dt, C, mem);
+ SchurMatrix<MA_inverse, MB, MDt, MC> S(Ainv, B, Dt, C, mem);
- S.debug_level(1);
+ S.debug_level(1);
- S.vmult(dst, src);
+ S.vmult(dst, src);
- for (unsigned int i = 0; i < dst.size(); ++i)
- deallog << dst(i) << '\t';
- deallog << std::endl;
- }
+ for (unsigned int i = 0; i < dst.size(); ++i)
+ deallog << dst(i) << '\t';
+ deallog << std::endl;
+}
int
main()
ivector[0] = 1;
double array[] =
- { 2 };
+ { 2 };
std::list<double> l(&array[0], &array[1]);
BlockVector<double> src(ivector, l.begin(), l.end());
BlockVector<double> dst(ivector);
const double Adata1[] =
- { 1 };
+ { 1 };
const double Adata2[] =
- { 2 };
+ { 2 };
const double Adata3[] =
- { 4 };
+ { 4 };
const double Adata4[] =
- { 5 };
+ { 5 };
const double Ddata1[] =
- { 3 };
+ { 3 };
const double Ddata2[] =
- { 6 };
+ { 6 };
const double Bdata1[] =
- { 7 };
+ { 7 };
const double Bdata2[] =
- { 8 };
+ { 8 };
const double Cdata[] =
- { 9 };
+ { 9 };
FullMatrix<double> MA1(1, 1);
FullMatrix<double> MA2(1, 1);
Dt.enter(MD2, 0, 1);
checkVmult<BlockMatrixArray<double>, BlockMatrixArray<double>,
- BlockMatrixArray<double>, BlockMatrixArray<double> >(dst, src, Ainv, B,
- Dt, C);
+ BlockMatrixArray<double>, BlockMatrixArray<double> >(dst, src, Ainv, B,
+ Dt, C);
}
#include <vector>
template<class MA_inverse, class MB, class MDt, class MC>
- void
- checkResidual(BlockVector<double> &dst, const BlockVector<double> &src,
- const BlockVector<double> &rhs, const MA_inverse &Ainv, const MB &B,
- const MDt &Dt, const MC &C)
- {
- deallog << "residual" << std::endl;
+void
+checkResidual(BlockVector<double> &dst, const BlockVector<double> &src,
+ const BlockVector<double> &rhs, const MA_inverse &Ainv, const MB &B,
+ const MDt &Dt, const MC &C)
+{
+ deallog << "residual" << std::endl;
- GrowingVectorMemory < BlockVector<double> > mem;
+ GrowingVectorMemory < BlockVector<double> > mem;
- SchurMatrix<MA_inverse, MB, MDt, MC> S(Ainv, B, Dt, C, mem);
+ SchurMatrix<MA_inverse, MB, MDt, MC> S(Ainv, B, Dt, C, mem);
- double r = S.residual(dst, src, rhs);
+ double r = S.residual(dst, src, rhs);
- deallog << "Residual:" << r << std::endl;
- }
+ deallog << "Residual:" << r << std::endl;
+}
int
main()
ivector[0] = 1;
double src_array[] =
- { 2 };
+ { 2 };
std::list<double> src_l(&src_array[0], &src_array[1]);
BlockVector<double> src(ivector, src_l.begin(), src_l.end());
double rhs_array[] =
- { 1000 };
+ { 1000 };
std::list<double> rhs_l(&rhs_array[0], &rhs_array[1]);
BlockVector<double> rhs(ivector, rhs_l.begin(), rhs_l.end());
BlockVector<double> dst(ivector);
const double Adata1[] =
- { 1 };
+ { 1 };
const double Adata2[] =
- { 2 };
+ { 2 };
const double Adata3[] =
- { 4 };
+ { 4 };
const double Adata4[] =
- { 5 };
+ { 5 };
const double Ddata1[] =
- { 3 };
+ { 3 };
const double Ddata2[] =
- { 6 };
+ { 6 };
const double Bdata1[] =
- { 7 };
+ { 7 };
const double Bdata2[] =
- { 8 };
+ { 8 };
const double Cdata[] =
- { 9 };
+ { 9 };
FullMatrix<double> MA1(1, 1);
FullMatrix<double> MA2(1, 1);
Dt.enter(MD2, 0, 1);
checkResidual<BlockMatrixArray<double>, BlockMatrixArray<double>,
- BlockMatrixArray<double>, BlockMatrixArray<double> >(dst, src, rhs, Ainv,
- B, Dt, C);
+ BlockMatrixArray<double>, BlockMatrixArray<double> >(dst, src, rhs, Ainv,
+ B, Dt, C);
}
#include <vector>
template<class MA_inverse, class MB, class MDt, class MC>
- void
- checkPrepare_rhs(BlockVector<double> &dst, const BlockVector<double> &src,
- const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C)
- {
- deallog << "prepare_rhs" << std::endl;
+void
+checkPrepare_rhs(BlockVector<double> &dst, const BlockVector<double> &src,
+ const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C)
+{
+ deallog << "prepare_rhs" << std::endl;
- GrowingVectorMemory < BlockVector<double> > mem;
+ GrowingVectorMemory < BlockVector<double> > mem;
- SchurMatrix<MA_inverse, MB, MDt, MC> S(Ainv, B, Dt, C, mem);
+ SchurMatrix<MA_inverse, MB, MDt, MC> S(Ainv, B, Dt, C, mem);
- S.debug_level(1);
+ S.debug_level(1);
- S.prepare_rhs(dst, src);
+ S.prepare_rhs(dst, src);
- }
+}
int
main()
ivector[1] = 1;
double src_array[] =
- { 9, 21 };
+ { 9, 21 };
std::list<double> src_l(&src_array[0], &src_array[2]);
BlockVector<double> src(ivector, src_l.begin(), src_l.end());
ivector2[0] = 1;
double dst_array[] =
- { 2 };
+ { 2 };
std::list<double> dst_l(&dst_array[0], &dst_array[1]);
BlockVector<double> dst(ivector2, dst_l.begin(), dst_l.end());
const double Adata1[] =
- { 1 };
+ { 1 };
const double Adata2[] =
- { 2 };
+ { 2 };
const double Adata3[] =
- { 4 };
+ { 4 };
const double Adata4[] =
- { 5 };
+ { 5 };
const double Ddata1[] =
- { 3 };
+ { 3 };
const double Ddata2[] =
- { 6 };
+ { 6 };
const double Bdata1[] =
- { 7 };
+ { 7 };
const double Bdata2[] =
- { 8 };
+ { 8 };
const double Cdata[] =
- { 9 };
+ { 9 };
FullMatrix<double> MA1(1, 1);
FullMatrix<double> MA2(1, 1);
Dt.enter(MD2, 0, 1);
checkPrepare_rhs<BlockMatrixArray<double>, BlockMatrixArray<double>,
- BlockMatrixArray<double>, BlockMatrixArray<double> >(dst, src, Ainv, B,
- Dt, C);
+ BlockMatrixArray<double>, BlockMatrixArray<double> >(dst, src, Ainv, B,
+ Dt, C);
}
#include <vector>
template<class MA_inverse, class MB, class MDt, class MC>
- void
- checkPostprocess(BlockVector<double> &dst, const BlockVector<double> &src,
- const BlockVector<double> &rhs, const MA_inverse &Ainv, const MB &B,
- const MDt &Dt, const MC &C)
- {
- deallog << "postprocess" << std::endl;
+void
+checkPostprocess(BlockVector<double> &dst, const BlockVector<double> &src,
+ const BlockVector<double> &rhs, const MA_inverse &Ainv, const MB &B,
+ const MDt &Dt, const MC &C)
+{
+ deallog << "postprocess" << std::endl;
- GrowingVectorMemory < BlockVector<double> > mem;
+ GrowingVectorMemory < BlockVector<double> > mem;
- SchurMatrix<MA_inverse, MB, MDt, MC> S(Ainv, B, Dt, C, mem);
+ SchurMatrix<MA_inverse, MB, MDt, MC> S(Ainv, B, Dt, C, mem);
- S.debug_level(1);
+ S.debug_level(1);
- S.postprocess(dst, src, rhs);
- }
+ S.postprocess(dst, src, rhs);
+}
int
main()
ivector[1] = 1;
double rhs_array[] =
- { 9, 21 };
+ { 9, 21 };
std::list<double> rhs_l(&rhs_array[0], &rhs_array[2]);
BlockVector<double> rhs(ivector, rhs_l.begin(), rhs_l.end());
ivector2[0] = 1;
double src_array[] =
- { 2 };
+ { 2 };
std::list<double> src_l(&src_array[0], &src_array[1]);
BlockVector<double> src(ivector2, src_l.begin(), src_l.end());
BlockVector<double> dst(ivector);
const double Adata1[] =
- { 1 };
+ { 1 };
const double Adata2[] =
- { 2 };
+ { 2 };
const double Adata3[] =
- { 4 };
+ { 4 };
const double Adata4[] =
- { 5 };
+ { 5 };
const double Ddata1[] =
- { 3 };
+ { 3 };
const double Ddata2[] =
- { 6 };
+ { 6 };
const double Bdata1[] =
- { 7 };
+ { 7 };
const double Bdata2[] =
- { 8 };
+ { 8 };
const double Cdata[] =
- { 9 };
+ { 9 };
FullMatrix<double> MA1(1, 1);
FullMatrix<double> MA2(1, 1);
Dt.enter(MD2, 0, 1);
checkPostprocess<BlockMatrixArray<double>, BlockMatrixArray<double>,
- BlockMatrixArray<double>, BlockMatrixArray<double> >(dst, src, rhs, Ainv,
- B, Dt, C);
+ BlockMatrixArray<double>, BlockMatrixArray<double> >(dst, src, rhs, Ainv,
+ B, Dt, C);
}