#include <iostream>
+#include "../tests.h"
+
using namespace dealii;
using namespace Algorithms;
matrix(1, 0) = -numbers::PI;
OutputOperator<Vector<double>> out;
- out.initialize_stream(logfile);
+ out.initialize_stream(deallog.get_file_stream());
Explicit op_explicit(matrix);
Implicit op_implicit(matrix);
data_out.attach_dof_handler(dof);
data_out.add_data_vector(sol, "base");
data_out.build_patches();
- data_out.write_gnuplot(logfile);
+ data_out.write_gnuplot(deallog.get_file_stream());
data_out.clear();
data_out.attach_dof_handler(refined_dof);
data_out.add_data_vector(refined_sol, "refined");
data_out.build_patches();
- data_out.write_gnuplot(logfile);
+ data_out.write_gnuplot(deallog.get_file_stream());
data_out.clear();
data_out.attach_dof_handler(coarse_dof);
data_out.add_data_vector(coarse_sol, "coarse");
data_out.build_patches();
- data_out.write_gnuplot(logfile);
+ data_out.write_gnuplot(deallog.get_file_stream());
data_out.clear();
data_out.attach_dof_handler(both_dof);
data_out.add_data_vector(both_sol, "both");
data_out.build_patches();
- data_out.write_gnuplot(logfile);
+ data_out.write_gnuplot(deallog.get_file_stream());
// test output using DataOutStack
DataOutStack<2> data_out_stack;
data_out_stack.add_data_vector(sol, "dof");
data_out_stack.build_patches();
data_out_stack.finish_parameter_value();
- data_out_stack.write_gnuplot(logfile);
+ data_out_stack.write_gnuplot(deallog.get_file_stream());
}
data_out_stack.build_patches();
data_out_stack.finish_parameter_value();
- data_out_stack.write_gnuplot(logfile);
+ data_out_stack.write_gnuplot(deallog.get_file_stream());
}
initlog();
deallog << " 1D solution transfer" << std::endl;
- transfer<1>(logfile);
+ transfer<1>(deallog.get_file_stream());
deallog << " 2D solution transfer" << std::endl;
- transfer<2>(logfile);
+ transfer<2>(deallog.get_file_stream());
deallog << " 3D solution transfer" << std::endl;
- transfer<3>(logfile);
+ transfer<3>(deallog.get_file_stream());
}
// create a rinf grid and compute a MappingQEuler to represent the inner
// boundary
void
-curved_grid(std::ofstream &out)
+curved_grid(std::ostream &out)
{
// number of cells in radial and
// circumferential direction
main()
{
initlog();
- deallog << std::setprecision(4);
- logfile << std::setprecision(4);
+ deallog.get_file_stream() << std::setprecision(4);
- curved_grid(logfile);
+ curved_grid(deallog.get_file_stream());
}
try
{
initlog();
- deallog << std::setprecision(2);
+ deallog.get_file_stream() << std::setprecision(2);
test<1>();
test<2>();
try
{
initlog();
- deallog << std::setprecision(2);
+ deallog.get_file_stream() << std::setprecision(2);
test<1>();
test<2>();
{
initlog();
- test_projection<1>(logfile);
- test_projection<2>(logfile);
- test_projection<3>(logfile);
+ test_projection<1>(deallog.get_file_stream());
+ test_projection<2>(deallog.get_file_stream());
+ test_projection<3>(deallog.get_file_stream());
test_renumbering<1>();
test_renumbering<2>();
}
catch (ExceptionBase &e)
{
- logfile << e.what();
+ deallog << e.what();
}
}
}
main()
{
initlog();
- deallog << std::setprecision(2);
+ deallog.get_file_stream() << std::setprecision(2);
test();
<< std::endl;
FullMatrix<float> ff;
ff.copy_transposed(ez);
- ff.print_formatted(logfile, 0, false, 5, "~");
+ ff.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
}
<< std::endl;
FullMatrix<float> ff;
ff.copy_from(ez);
- ff.print_formatted(logfile, 0, false, 5, "~");
+ ff.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
deallog << "LAPACKFullMatrix<double>::copy_from SparseMatrixEZ<double>"
<< std::endl;
LAPACKFullMatrix<double> lfd;
lfd.copy_from(ez);
- lfd.print_formatted(logfile, 0, false, 5, "~");
+ lfd.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
lfd.reinit(2, 3);
deallog << "LAPACKFullMatrix<double>::fill SparseMatrixEZ<double>"
<< std::endl;
lfd.fill(ez, 0, 0, 2, 1);
- lfd.print_formatted(logfile, 0, false, 5, "~");
+ lfd.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
deallog << "LAPACKFullMatrix<double>::fill SparseMatrixEZ<double>"
<< std::endl;
lfd.fill(ez, 1, 1, 4, 2);
- lfd.print_formatted(logfile, 0, false, 5, "~");
+ lfd.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
}
<< std::endl;
SparseMatrixEZ<float> ff;
ff.copy_from(ez);
- ff.print_formatted(logfile, 0, false, 5, "~");
+ ff.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
}
<< std::endl;
SparseMatrixEZ<float> ff(ez.m(), ez.n());
ff.add(2, ez);
- ff.print_formatted(logfile, 0, false, 5, "~");
+ ff.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
}
<< std::endl;
LAPACKFullMatrix<float> ff;
ff.copy_from(ez);
- ff.print_formatted(logfile, 0, false, 5, "~");
+ ff.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
}
<< std::endl;
LAPACKFullMatrix<float> ff(ez.m(), ez.n());
ff.fill(ez, 0, 0, 0, 0, 2, false);
- ff.print_formatted(logfile, 0, false, 5, "~");
+ ff.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
}
{
<< std::endl;
LAPACKFullMatrix<float> ff(ez.n(), ez.m());
ff.fill(ez, 0, 0, 0, 0, 2, true);
- ff.print_formatted(logfile, 0, false, 5, "~");
+ ff.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
}
}
ez.set(4, 2, 13.);
ez.set(4, 3, 14.);
- ez.print_formatted(logfile, 0, false, 5, "~");
+ ez.print_formatted(deallog.get_file_stream(), 0, false, 5, "~");
}
main(int argc, char **argv)
{
initlog();
- deallog << std::setprecision(4);
+ deallog.get_file_stream() << std::setprecision(4);
{
const unsigned int size = 32;
main(int argc, char **argv)
{
initlog();
- deallog << std::setprecision(4);
+ deallog.get_file_stream() << std::setprecision(4);
{
main(int argc, char **argv)
{
initlog();
- deallog << std::setprecision(4);
+ deallog.get_file_stream() << std::setprecision(4);
{
main(int argc, char **argv)
{
initlog();
- deallog << std::setprecision(4);
+ deallog.get_file_stream() << std::setprecision(4);
{
const unsigned int size = 32;
const unsigned int row_length = 3;
check_ez_iterator();
- check_conjugate(logfile);
+ check_conjugate(deallog.get_file_stream());
FDMatrix testproblem(size, size);
unsigned int dim = (size - 1) * (size - 1);
// You can open the generated file
// with paraview.
GridOut gridout;
- gridout.write_ucd(tria, logfile);
+ gridout.write_ucd(tria, deallog.get_file_stream());
return 0;
}
// You can open the generated file with gmsh.
GridOut gridout;
- gridout.write_msh(tria, logfile);
+ gridout.write_msh(tria, deallog.get_file_stream());
return 0;
}
deallog << "Not OK" << std::endl;
deallog << "OK" << std::endl;
- logfile.close();
}
deallog << "size block(1,0):" << csp.block(1, 0).n_rows() << "x"
<< csp.block(1, 0).n_cols() << std::endl;
- csp.print(logfile);
+ csp.print(deallog.get_file_stream());
deallog << std::endl;
for (unsigned int i = 0; i < 3; ++i)
}
}
- csp.print(logfile);
+ csp.print(deallog.get_file_stream());
return 0;
}
sparsity.add(ii, cols.local_to_global(jb, j));
}
- sparsity.print(logfile);
+ sparsity.print(deallog.get_file_stream());
return 0;
}
int
main()
{
- initlog() deallog << std::setprecision(3);
+ initlog();
+ deallog << std::setprecision(3);
double a[3][3] = {{1, 2, 3}, {3, 4, 5}, {6, 7, 8}};
int
main()
{
- initlog() deallog << std::setprecision(3);
+ initlog();
+ deallog << std::setprecision(3);
test_select<2>(1., 1.);
test_select<3>(1., 1.);