int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
+ deallog.get_file_stream().setf(std::ios::fixed);
// Create triangulation
Triangulation<2> tri;
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog << std::setprecision(8);
- test_projection<2>(logfile);
- test_projection<3>(logfile);
+ test_projection<2>(deallog.get_file_stream());
+ test_projection<3>(deallog.get_file_stream());
}
template <int dim>
void
-test_isotropic(int type, std::ostream *logfile)
+test_isotropic(int type, std::ostream &logfile)
{
const RefinementCase<dim> ref_cases[7] = {
RefinementCase<dim>::cut_x,
tria.reset_manifold(0);
tria.refine_global(1);
- *logfile << "cycle: 0, number of cells: " << tria.n_cells() << std::endl;
+ logfile << "cycle: 0, number of cells: " << tria.n_cells() << std::endl;
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
endc = tria.end();
grid_out.write_eps(tria, outfile);
}
- *logfile << "cycle: " << cycle << ", number of cells: " << tria.n_cells()
- << std::endl;
+ logfile << "cycle: " << cycle << ", number of cells: " << tria.n_cells()
+ << std::endl;
if (tria.n_cells() > max_cells || cycle == max_cycle)
break;
int
main()
{
- std::ostream *logfile;
+ initlog();
- if (single_file)
- logfile = new std::ofstream("output");
- else
- logfile = &std::cout;
+ std::ostream &logfile = deallog.get_file_stream();
- *logfile << std::endl
- << " 2D" << std::endl
- << "-----------------------" << std::endl;
+ logfile << " 2D" << std::endl
+ << "-----------------------" << std::endl;
- *logfile << "HyperCube:" << std::endl;
+ logfile << "HyperCube:" << std::endl;
test_isotropic<2>(0, logfile);
- *logfile << "HyperBall:" << std::endl;
+ logfile << "HyperBall:" << std::endl;
test_isotropic<2>(1, logfile);
- *logfile << std::endl;
- *logfile << " 3D" << std::endl
- << "-----------------------" << std::endl;
+ logfile << std::endl;
+ logfile << " 3D" << std::endl
+ << "-----------------------" << std::endl;
- *logfile << "HyperCube:" << std::endl;
+ logfile << "HyperCube:" << std::endl;
test_isotropic<3>(0, logfile);
- *logfile << "HyperBall:" << std::endl;
+ logfile << "HyperBall:" << std::endl;
test_isotropic<3>(1, logfile);
-
- // clear whatever is in the buffer
- *logfile << std::flush;
- if (single_file)
- delete logfile;
}
int
main()
{
- std::ofstream logfile("output");
- deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(4);
- transfer<2>(logfile);
- transfer<3>(logfile);
+ transfer<2>(deallog.get_file_stream());
+ transfer<3>(deallog.get_file_stream());
}
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(PRECISION);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(PRECISION);
+ deallog.get_file_stream().setf(std::ios::fixed);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
- deallog.attach(logfile);
const unsigned int dim = 2;
AutoSinExp<dim> auto_function;
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
- ConditionalOStream o(logfile, true);
+ ConditionalOStream o(deallog.get_file_stream(), true);
o << "Yes" << std::endl;
deallog << o.is_active() << std::endl;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
Tensor<2, 2> t;
t[0][0] = 1;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
Tensor<2, 3> t;
t[0][0] = 1;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
Tensor<4, 2> t;
t[0][0][0][0] = 1;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
Tensor<4, 3> t;
t[0][0][0][0] = 1;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test<4>();
test<5>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
if (true)
{
deallog << " Functions::StokesCosine<2>" << std::endl;
Functions::StokesCosine<2> f(1.);
- check_function(f, 4, logfile);
+ check_function(f, 4, deallog.get_file_stream());
}
if (true)
{
deallog << " Functions::StokesCosine<3>" << std::endl;
Functions::StokesCosine<3> f(1.);
- check_function(f, 4, logfile);
+ check_function(f, 4, deallog.get_file_stream());
}
if (true)
// Use odd number of points to
// avoid lines with
// discontinuous derivatives.
- check_function(f, 5, logfile);
+ check_function(f, 5, deallog.get_file_stream());
}
if (true)
{
deallog << "Functions::Kovasznay" << std::endl;
Functions::Kovasznay f(10.);
- check_function(f, 4, logfile);
+ check_function(f, 4, deallog.get_file_stream());
}
if (true)
{
deallog << "Functions::PoisseuilleFlow<2>" << std::endl;
Functions::PoisseuilleFlow<2> f(.8, 10.);
- check_function(f, 4, logfile);
+ check_function(f, 4, deallog.get_file_stream());
}
if (true)
{
deallog << "Functions::PoisseuilleFlow<3>" << std::endl;
Functions::PoisseuilleFlow<3> f(.8, 10.);
- check_function(f, 4, logfile);
+ check_function(f, 4, deallog.get_file_stream());
}
}
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check1<1>();
check1<2>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check1<1>();
check1<2>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<1>();
check<2>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check1<1>();
check1<2>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<1, 1>();
check<2, 1>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<1>();
check<2>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<1>();
check<2>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<1>();
check<2>();
#define MAX_DIM 3
#define MAX_N_COMPONENT 7
-#define LOG_FILE "output"
#define NUMBER double
#define TESTEE Functions::ConstantFunction
int
main()
{
+ initlog();
// Create data for each component
std::vector<NUMBER> component_data(MAX_N_COMPONENT);
component_data.assign(data, data + MAX_N_COMPONENT);
}
- std::ofstream logfile(LOG_FILE);
- deallog.attach(logfile);
-
test_n_components<1, NUMBER>(component_data);
test_n_components<2, NUMBER>(component_data);
test_n_components<3, NUMBER>(component_data);
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<1>();
}
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<1>();
}
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
Functions::LSingularityFunction fl;
Functions::LSingularityGradFunction flg;
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<3>();
}
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
check<3>();
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
check<1>();
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
check<1>();
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
const std::vector<Polynomial<double>> p =
Hierarchical::generate_complete_basis(10);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
// the isnan() function (which we call in is_finite()) helpfully
// produces a floating point exception when called with a signalling
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
// the isnan() function (which we call in is_finite()) helpfully
// produces a floating point exception when called with a signalling
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog << std::numeric_limits<double>::infinity() << std::endl;
deallog << -std::numeric_limits<double>::infinity() << std::endl;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
// the isnan() function (which we call in is_finite()) helpfully
// produces a floating point exception when called with a signalling
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog << numbers::PI << std::endl;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog << numbers::PI * 2 << 42 << std::endl;
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
{
LogStream log;
- log.attach(logfile);
+ log.attach(deallog.get_file_stream());
log.log_thread_id(false);
log << "This should be printed!";
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check(std::complex<float>(1.5, 2.5));
check(std::complex<float>(-1.5, -2.5));
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check((float)1.5);
check((float)-1.5);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<1>();
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<1>();
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<1, float>();
check<2, float>();
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
interpolation_conditions(HermiteInterpolation::generate_complete_basis(6));
plot(HermiteInterpolation::generate_complete_basis(6));
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
QTrapez<1> trapez;
QSimpson<1> simpson;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("LagrangeEquidistant");
for (unsigned i = 1; i < 10; i += 2)
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("LagrangeEquidistant");
for (unsigned i = 8; i < 18; i += 2)
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("LagrangeEquidistant");
for (unsigned i = 1; i < 8; i += 2)
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check_poly(10);
check_poly(50);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
deallog.push("Lagrange");
std::vector<Polynomial<double>> p;
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
PolynomialsBDM<2> p20(0);
PolynomialsBDM<2> p21(1);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
PolynomialsBDM<3> p31(1);
PolynomialsBDM<3> p32(2);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
PolynomialsBernardiRaugel<2> p_2d(1);
check_poly_q(p_2d);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check_poly(25);
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
PolynomialsRaviartThomas<2> p20(0);
PolynomialsRaviartThomas<2> p21(1);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
PolynomialsRT_Bubbles<2> p20(1);
PolynomialsRT_Bubbles<2> p21(2);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(0);
- deallog.attach(logfile);
deallog.push("BDM");
check_bdm<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
typedef Tensor<0, 1> T;
T t1(13.), t2(42);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<float>();
check<double>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<float>();
check<double>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<float>();
check<double>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<float>();
check<double>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<float>();
check<double>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(0);
- deallog.attach(logfile);
// a square table
if (true)
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(0);
- deallog.attach(logfile);
// rank=1
{
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(0);
- deallog.attach(logfile);
const std::string elements = "1 2 3 4 5 6";
{
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(0);
- deallog.attach(logfile);
// rank=1
{
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(0);
- deallog.attach(logfile);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
// set precision on the output
// stream to 4 digits
- logfile << std::setprecision(4);
+ deallog.get_file_stream() << std::setprecision(4);
// but then set precision on the
// table output to 2
table.set_precision("key", 2);
// now output the table...
- table.write_text(logfile);
+ table.write_text(deallog.get_file_stream());
// ...and then output some other
// number, hopefully with 4 digits
// of precision
- logfile << 0.123456789 << std::endl;
+ deallog.get_file_stream() << 0.123456789 << std::endl;
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
const TableIndices<2> t1(84, 42);
TableIndices<2> t2;
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
{
Threads::Task<> t1 = Threads::new_task(test, 1);
deallog << "OK" << std::endl;
}
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Threads::Task<> t1 = Threads::new_task(test, 1);
Threads::Task<> t2 = Threads::new_task(test, 2);
deallog << "OK" << std::endl;
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
{
Threads::Thread<> t1 = Threads::new_thread(test, 1);
deallog << "OK" << std::endl;
}
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Threads::TaskGroup<> tg;
tg += Threads::new_task(test, 1);
deallog << "OK" << std::endl;
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
{
Threads::new_task(test, 1);
deallog << "OK" << std::endl;
}
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Threads::TaskGroup<double> tg;
tg += Threads::new_task(std::bind(test, 1));
deallog << "OK" << std::endl;
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
int arg1 = 1;
int arg2 = 2;
deallog << "OK" << std::endl;
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Threads::TaskGroup<double> tg;
deallog << "OK" << std::endl;
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Threads::ThreadGroup<double> tg;
tg += Threads::new_thread(std::bind(test, 1));
deallog << "OK" << std::endl;
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test();
-
- deallog.detach();
- logfile.close();
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
worker_thread = Threads::new_thread(worker);
waiter_threads.join_all();
deallog << "All waiting threads finished." << std::endl;
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
+
using namespace Threads;
ThreadGroup<X<0>> tg;
ThreadGroup<X<0> &> tgr;
tgr.join_all();
tgcr.join_all();
+ std::ofstream *out_stream =
+ dynamic_cast<std::ofstream *>(&deallog.get_file_stream());
+ Assert(out_stream != nullptr, ExcInternalError());
deallog.detach();
- logfile.close();
+ out_stream->close();
sort_file_contents("output");
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
{
// use std::cout so that no output is saved to the logfile, because it
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Timer t1, t2;
TimerOutput tO(std::cout, TimerOutput::summary, TimerOutput::cpu_times);
int
main()
{
- std::string logname = "output";
- std::ofstream logfile(logname);
+ initlog();
if (!std::is_pod<VectorizedArray<double>>::value)
- logfile << "Not OK because VectorizedArray<double> is not POD!"
- << std::endl;
+ deallog.get_file_stream()
+ << "Not OK because VectorizedArray<double> is not POD!" << std::endl;
if (!std::is_trivial<VectorizedArray<double>>::value)
- logfile << "Not OK because VectorizedArray<double> is not trivial!"
- << std::endl;
+ deallog.get_file_stream()
+ << "Not OK because VectorizedArray<double> is not trivial!" << std::endl;
- logfile << "OK" << std::endl;
- logfile.close();
+ deallog.get_file_stream() << "OK" << std::endl;
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
do_project();
}
int
main()
{
- std::ofstream logfile("output");
- deallog << std::setprecision(3);
-
- deallog.attach(logfile);
+ initlog();
do_project();
}
#include <iostream>
#include <string>
-std::ofstream logfile("output");
-
template <int spacedim>
class BEM
{
void
BEM<spacedim>::run()
{
- deallog.attach(logfile);
-
ConvergenceTable table;
if (spacedim == 2)
"error",
DataOut<spacedim - 1, DoFHandler<spacedim - 1, spacedim>>::type_cell_data);
dataout.build_patches();
- dataout.write_vtk(logfile);
+ dataout.write_vtk(deallog.get_file_stream());
}
template <int spacedim>
{
GridOut grid_out;
grid_out.set_flags(GridOutFlags::Ucd(true));
- grid_out.write_ucd(tria, logfile);
- grid_out.write_msh(tria, logfile);
+ grid_out.write_ucd(tria, deallog.get_file_stream());
+ grid_out.write_msh(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
+
BEM<2> bem;
bem.run();
#include <string>
-std::ofstream logfile("output");
-
-
template <int dim, int spacedim>
void
test(std::string filename)
DataOut<dim, DoFHandler<dim, spacedim>> dataout;
dataout.add_data_vector(dof_handler, numbering, "numbering");
dataout.build_patches();
- dataout.write_vtk(logfile);
+ dataout.write_vtk(deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
deallog << "Test<1,2>" << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_2.inp");
#include "../tests.h"
-std::ofstream logfile("output");
-
-
int
main()
{
- deallog.attach(logfile);
+ initlog();
const unsigned int dim = 1;
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
class Identity : public Function<dim>
{
int
main()
{
- deallog.attach(logfile);
+ initlog();
int fe_degree = 2;
int mapping_degree = 2;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1, 2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
int
main()
{
- deallog.attach(logfile);
+ initlog();
const unsigned int dim = 1;
#include <deal.II/numerics/data_out.h>
#include <deal.II/numerics/vector_tools.h>
-
-
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
dataout.attach_triangulation(triangulation);
dataout.add_data_vector(projected_directional_derivative, "derivative");
dataout.build_patches();
- dataout.write_vtk(logfile);
+ dataout.write_vtk(deallog.get_file_stream());
}
int
main()
{
- logfile.precision(4);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
deallog << "Test <1,2>" << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_4.inp");
#include <deal.II/numerics/vector_tools.h>
-
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename, unsigned int degree = 1)
int
main()
{
- logfile.precision(4);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
deallog << "Test <1,2>, Q1, Q2, Q3" << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_4.inp", 1);
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
GridOut grid_out;
grid_out.set_flags(GridOutFlags::Ucd(true));
- grid_out.write_ucd(tria, logfile);
- grid_out.write_msh(tria, logfile);
+ grid_out.write_ucd(tria, deallog.get_file_stream());
+ grid_out.write_msh(tria, deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<1, 2>(SOURCE_DIR "/grids/circle_1.inp");
test<2, 3>(SOURCE_DIR "/grids/square.inp");
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
gi.read_ucd(in);
GridOut grid_out;
- grid_out.write_gnuplot(tria, logfile);
+ grid_out.write_gnuplot(tria, deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<2, 3>(SOURCE_DIR "/grids/square.inp");
test<2, 3>(SOURCE_DIR "/grids/sphere_1.inp");
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
{
- logfile << " Tria<" << dim << "," << spacedim << ">: " << std::endl;
+ deallog.get_file_stream()
+ << " Tria<" << dim << "," << spacedim << ">: " << std::endl;
Triangulation<dim, spacedim> tria;
GridIn<dim, spacedim> gi;
gi.attach_triangulation(tria);
ptria.execute_coarsening_and_refinement();
}
- ptria.write_flags(logfile);
+ ptria.write_flags(deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<2, 3>(SOURCE_DIR "/grids/square.inp");
test<2, 3>(SOURCE_DIR "/grids/sphere_1.inp");
#include <string>
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
for (unsigned int cycle = 0; cycle < 3; ++cycle)
{
tria.refine_global(1);
- grid_out.write_msh(tria, logfile);
+ grid_out.write_msh(tria, deallog.get_file_stream());
}
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
deallog << "Test<1,2>" << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_1.inp");
#include <string>
-std::ofstream logfile("output");
-
double
test(const unsigned int n,
const unsigned int exponent,
int
main()
{
- deallog.attach(logfile);
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(5);
const double a = 1, b = 5.;
using namespace std;
-std::ofstream logfile("output");
-
-
// Returns the following integral: /int_0^1 x^N * ln(|x-point|/alpha) dx
double
log_integral(const unsigned int N, const double point, const double alpha);
int
main()
{
- deallog.attach(logfile);
+ initlog();
+
deallog << std::fixed;
deallog << std::setprecision(10);
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<2, 3>(SOURCE_DIR "/grids/square.inp");
test<2, 3>(SOURCE_DIR "/grids/sphere_1.inp");
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
class X : public Function<dim>
{
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<2, 3>(SOURCE_DIR "/grids/square.inp");
test<2, 3>(SOURCE_DIR "/grids/sphere_1.inp");
#include "../tests.h"
-std::ofstream logfile("output");
-
void
test()
{
int
main()
{
- deallog.attach(logfile);
+ initlog();
test();
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
class X : public Function<dim>
{
int
main()
{
- deallog.attach(logfile);
+ initlog();
test();
#include "../tests.h"
-std::ofstream logfile("output");
-
void
test()
{
int
main()
{
- deallog.attach(logfile);
+ initlog();
test();
using namespace dealii;
-std::ofstream logfile("output");
-
void
test()
{
int
main()
{
- deallog.attach(logfile);
+ initlog();
test();
#include <string>
-std::ofstream logfile("output");
-
-
template <int dim, int spacedim>
void
test(std::string filename, unsigned int n)
int
main()
{
- deallog.attach(logfile);
+ initlog();
for (unsigned int n = 1; n < 8; ++n)
{
#include <string>
-std::ofstream logfile("output");
-
-
template <int dim, int spacedim>
void
test(std::string filename)
DataOut<dim, DoFHandler<dim, spacedim>> dataout;
dataout.add_data_vector(dof_handler, interpolated_one, "numbering");
dataout.build_patches();
- dataout.write_vtk(logfile);
+ dataout.write_vtk(deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
deallog << "Test<1,2>" << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_2.inp");
#include <string>
-
-std::ofstream logfile("output");
-
// Test interpolation on system of finite elements.
template <int dim, int spacedim>
dataout.attach_dof_handler(dof_handler);
dataout.add_data_vector(interpolated_one, "test");
dataout.build_patches();
- dataout.write_vtk(logfile);
+ dataout.write_vtk(deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
deallog << "Test<1,2>" << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_2.inp");
#include <string>
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
GridOut grid_out;
grid_out.set_flags(GridOutFlags::Ucd(true));
- grid_out.write_ucd(tria, logfile);
+ grid_out.write_ucd(tria, deallog.get_file_stream());
QTrapez<dim> quad;
MappingQGeneric<dim, spacedim> mapping(1);
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<1, 2>(SOURCE_DIR "/grids/circle_1.inp");
test<2, 3>(SOURCE_DIR "/grids/square.inp");
#include <string>
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
GridOut grid_out;
grid_out.set_flags(GridOutFlags::Ucd(true));
- grid_out.write_ucd(tria, logfile);
+ grid_out.write_ucd(tria, deallog.get_file_stream());
QTrapez<dim> quad;
MappingQ1Eulerian<dim, Vector<double>, spacedim> mapping(shift_dh, shift);
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<1, 2>(SOURCE_DIR "/grids/circle_1.inp");
test<2, 3>(SOURCE_DIR "/grids/square.inp");
#include <string>
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename, unsigned int degree)
GridOut grid_out;
grid_out.set_flags(GridOutFlags::Ucd(true));
- grid_out.write_ucd(tria, logfile);
+ grid_out.write_ucd(tria, deallog.get_file_stream());
QTrapez<dim> quad;
MappingQEulerian<dim, Vector<double>, spacedim> mapping(degree,
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<1, 2>(SOURCE_DIR "/grids/circle_1.inp", 1);
test<1, 2>(SOURCE_DIR "/grids/circle_1.inp", 2);
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim, int spacedim>
void
test()
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<1, 2>();
test<2, 3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
Triangulation<2, 3> tria;
GridIn<2, 3> gi;
GridOut go;
- go.write_ucd(tria, logfile);
+ go.write_ucd(tria, deallog.get_file_stream());
return 0;
}
+
4 1 0 0 0
1 -1.25 0 -0.0195312
2 -1.25 0 -0.00976562
3 -1.09375 0.0288444 -0.0195312
4 -1.09375 0.0291878 -0.00976562
-1 10 quad 3 1 2 4
+1 10 quad 3 1 2 4
#include <string>
-std::ofstream logfile("output");
-
-
template <int dim, int spacedim>
void
test(std::string filename, unsigned int n)
DataOut<dim, DoFHandler<dim, spacedim>> dataout;
dataout.add_data_vector(dof_handler, projected_one, "projection");
dataout.build_patches();
- dataout.write_vtk(logfile);
+ dataout.write_vtk(deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
for (unsigned int n = 1; n < 5; n++)
{
#include <string>
-std::ofstream logfile("output");
-
-
template <int dim, int spacedim>
void
test(std::string filename, unsigned int n)
dataout.attach_dof_handler(dof_handler);
dataout.add_data_vector(interpolated_one, "numbering");
dataout.build_patches();
- dataout.write_vtk(logfile);
+ dataout.write_vtk(deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
for (unsigned int n = 1; n < 5; n++)
{
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(std::string filename)
int
main()
{
- deallog.attach(logfile);
+ initlog();
test<2, 3>(SOURCE_DIR "/grids/square.inp");
test<2, 3>(SOURCE_DIR "/grids/sphere_1.inp");
#include <string>
-std::ofstream logfile("output");
-
// Computes the area and the outer normals of circles and spheres
// which are more and more refined, and prints the error on the
// output.
int
main()
{
- deallog.attach(logfile);
+ initlog();
deallog << "Test <1,2>" << std::endl;
test<1, 2>(SOURCE_DIR "/grids/circle_1.inp");
#include <deal.II/lac/full_matrix.h>
-std::ofstream logfile("output");
-
-
template <typename number>
void
fill_matrix(FullMatrix<number> &A)
int
main()
{
- deallog.attach(logfile);
+ initlog();
FullMatrix<double> A1(10, 10);
Tensor<2, 3> T1;
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
- Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
+ initlog();
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
- Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
+ initlog();
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
deal_II_exceptions::disable_abort_on_exception();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
ExcMessage("Current code works properly only with one process."));
const unsigned int dim = 2;
- std::ofstream logfile;
if (I_am_host)
{
- logfile.open("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("2d");
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
- Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
+ initlog();
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
}
int
main(int argc, char *argv[])
{
+ initlog();
+
deal_II_exceptions::disable_abort_on_exception();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
ExcMessage("Current code works properly only with one process."));
const unsigned int dim = 3;
- std::ofstream logfile;
if (I_am_host)
{
- logfile.open("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("3d");
}
int
main(int argc, char *argv[])
{
+ initlog();
+
deal_II_exceptions::disable_abort_on_exception();
#ifdef DEAL_II_WITH_MPI
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
deallog.push("2d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
void
test(unsigned n_refinements)
if (rank == 0)
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("2d");
test<2>(n_refinements);
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
(void)argv;
#endif
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int
main(int argc, char *argv[])
{
+ initlog();
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
deallog.push("2d");
- test<2>(logfile);
+ test<2>(deallog.get_file_stream());
deallog.pop();
}
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("2d");
check<2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
class ExactSolution : public Function<dim>
{
int
main()
{
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile << std::setprecision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
check<1>();
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile << std::setprecision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
check<1>();
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(3);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
hp::FECollection<3> fe;
for (unsigned int i = 0; i < 4; ++i)
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(3);
-
- deallog.attach(logfile);
-
+ initlog();
+ deallog.get_file_stream().precision(3);
std::vector<Point<2>> points_glob;
std::vector<Point<2>> points;
// constraint between degrees of freedom 3->14->17->6->3 with the algorithm
// that is presently in make_hanging_node_constraints
-char logname[] = "output";
-
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(3);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
// create a mesh like this:
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(3);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
// create a mesh like this (viewed
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
test()
int
main()
{
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
// this test depends on the right
// starting value of the random
// a test where a degree of freedom was constrained multiple times,
// but with different weights. see the hp paper for more on this
-char logname[] = "output";
-
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(3);
-
- deallog.attach(logfile);
-
+ initlog();
+ deallog.get_file_stream().precision(3);
// create a mesh like this (viewed
// from top):
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(7);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(7);
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(3);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test<3>();
}
// a modified version of step-27 that crashes because of circular constraints.
-char logname[] = "output";
-
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/timer.h>
int
main()
{
- std::ofstream logfile(logname);
- logfile << std::setprecision(4);
+ initlog();
+ deallog.get_file_stream().precision(4);
deallog << std::setprecision(4);
- deallog.attach(logfile);
try
{
LaplaceProblem<3> laplace_problem_2d;
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(3);
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
try
{
LaplaceProblem<3> laplace_problem_2d;
// used with hp::DoFHandler in 1d. Test that this is no longer the case
-#include "../tests.h"
-std::ofstream logfile("output");
-
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/table_handler.h>
#include <list>
#include <sstream>
+#include "../tests.h"
+
template <int dim>
class ExactSolution : public Function<dim>
{
try
{
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test();
deallog << "OK" << std::endl;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
{
deal_II_exceptions::disable_abort_on_exception();
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
deallog << "Try dim == 1" << std::flush << std::endl;
test<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
deallog << "Try dim == 1" << std::flush << std::endl;
test<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
deallog << "Try dim == 1" << std::flush << std::endl;
test<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
deallog << "Try dim == 1" << std::flush << std::endl;
test<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ 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());
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(PRECISION);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(PRECISION);
+ deallog.get_file_stream().setf(std::ios::fixed);
deal_II_exceptions::disable_abort_on_exception();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(1);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(1);
+ deallog.get_file_stream().setf(std::ios::fixed);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(7);
-
- deallog.attach(logfile);
- deallog.depth_console(0);
+ initlog();
+ deallog.get_file_stream().precision(7);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile(logname);
- logfile.precision(7);
-
- deallog.attach(logfile);
- deallog.depth_console(0);
+ initlog();
+ deallog.get_file_stream().precision(7);
test<1>();
test<2>();
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
-
try
{
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
-
try
{
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
FE_Q<2> fe_1(1);
FE_Q<2> fe_2(2);
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
run(bool random_p, unsigned int *indx)
int
main()
{
- logfile.precision(8);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(8);
unsigned int index[] = {1, 2, 3, 4, 5, 6, 7};
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main(int argc, char *argv[])
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<2>(true, 0);
test<2>(true, 1);
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
-
- deallog.attach(logfile);
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
+ deallog.get_file_stream().precision(3);
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
diffusionMechanics<DIMS> problem(1, 1);
problem.run();
}
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
+ deallog.get_file_stream().precision(3);
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
CHECK_ALL(Q, 1);
CHECK_ALL(Q, 2);
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
Step27::MixedFECollection<1>().run();
Step27::MixedFECollection<2>().run();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("3d");
check<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
check<3>();
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(PRECISION);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(PRECISION);
+ deallog.get_file_stream().setf(std::ios::fixed);
deal_II_exceptions::disable_abort_on_exception();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(PRECISION);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(PRECISION);
+ deallog.get_file_stream().setf(std::ios::fixed);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(1);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(1);
+ deallog.get_file_stream().setf(std::ios::fixed);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ 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());
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ 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());
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ 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());
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ 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());
}
// a hp-ified version of step-10
-#include "../tests.h"
-std::ofstream logfile("output");
-
-
#include <deal.II/base/convergence_table.h>
#include <deal.II/base/quadrature_lib.h>
#include <iostream>
+#include "../tests.h"
+
const long double pi = 3.141592653589793238462643;
int
main()
{
- logfile.precision(6);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(6);
gnuplot_output<2>();
// a hp-ified version of step-11
-#include "../tests.h"
-
-std::ofstream logfile("output");
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/table_handler.h>
#include <algorithm>
#include <iostream>
+#include "../tests.h"
+
template <int dim>
class LaplaceProblem
{
try
{
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
for (unsigned int mapping_degree = 1; mapping_degree <= 3;
++mapping_degree)
LaplaceProblem<2>(mapping_degree).run();
// a hp-ified version of step-12
-#include "../tests.h"
-std::ofstream logfile("output");
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/timer.h>
#include <iostream>
+#include "../tests.h"
+
template <int dim>
class RHS : public Function<dim>
{
try
{
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
DGMethod<2> dgmethod;
dgmethod.run();
// a hp-ified version of step-13
-#include "../tests.h"
-std::ofstream logfile("output");
-
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/table_handler.h>
#include <list>
#include <sstream>
+#include "../tests.h"
+
namespace Evaluation
{
try
{
- logfile.precision(2);
+ initlog();
+ deallog.get_file_stream().precision(2);
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
solve_problem<2>("global");
solve_problem<2>("kelly");
}
-std::ofstream logfile("output");
-
-
void make_grid(Triangulation<2> &triangulation)
{
const Point<2> center(1, 0);
int
main()
{
- logfile.precision(2);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(2);
Triangulation<2> triangulation;
make_grid(triangulation);
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
class LaplaceProblem
{
public:
int
main()
{
- logfile.precision(2);
+ initlog();
+ deallog.get_file_stream().precision(2);
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
LaplaceProblem laplace_problem;
laplace_problem.run();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
class LaplaceProblem
{
int
main()
{
- logfile.precision(6);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(6);
LaplaceProblem laplace_problem;
laplace_problem.run();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
class LaplaceProblem
{
public:
int
main()
{
- logfile.precision(6);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(6);
LaplaceProblem laplace_problem;
laplace_problem.run();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
class LaplaceProblem
{
int
main()
{
- logfile.precision(6);
-
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(6);
LaplaceProblem laplace_problem;
laplace_problem.run();
// a hp-ified version of step-4
-#include "../tests.h"
-std::ofstream logfile("output");
-
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
#include <iostream>
+#include "../tests.h"
+
template <int dim>
int
main()
{
- logfile.precision(2);
+ initlog();
+ deallog.get_file_stream().precision(2);
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
{
LaplaceProblem<2> laplace_problem_2d;
laplace_problem_2d.run();
// a hp-ified version of step-7
-#include "../tests.h"
-std::ofstream logfile("output");
-
-
#include <deal.II/base/convergence_table.h>
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
#include <iostream>
#include <typeinfo>
+#include "../tests.h"
+
template <int dim>
int
main()
{
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
const unsigned int dim = 2;
try
// a hp-ified version of step-8
-#include "../tests.h"
-std::ofstream logfile("output");
-
-
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
#include <iostream>
+#include "../tests.h"
+
template <int dim>
int
main()
{
- logfile.precision(2);
+ initlog();
deallog << std::setprecision(2);
-
- deallog.attach(logfile);
+ deallog.get_file_stream().precision(2);
try
{
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
+ initlog();
deallog << std::setprecision(4) << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
+ initlog();
deallog << std::setprecision(4) << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(8) << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(8) << std::fixed;
- deallog.attach(logfile);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(8) << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(8) << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(8) << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
-
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
// Test square matrix initialization
test(4, true);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test_rect(3, 4, &rect[0][0]);
test_rect(4, 3, &rect[0][0]);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test(4, false);
test(4, true);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test_rect(4, 4, &symm[0][0]);
test_rect(4, 3, &rect[0][0]);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test_rect(4, 4, &symm[0][0]);
test_rect(4, 3, &rect[0][0]);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(1);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(1);
FullMatrix<double> A(4, 4, &left[0][0]), B(4, 4, &right[0][0]);
LAPACKFullMatrix<double> LA(4, 4), LB(4, 4);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(1);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(1);
FullMatrix<double> A(4, 4, &left[0][0]), B(4, 4, &right[0][0]);
LAPACKFullMatrix<double> LA(4, 4), LB(4, 4);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(1);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(1);
FullMatrix<double> A(4, 4, &left[0][0]);
LAPACKFullMatrix<double> LA(4, 4);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test(false);
test(true);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{1, 3, 11, 17, 32, 64, 200, 391}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{1, 3, 11, 17, 32, 64, 200, 391}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{1, 3, 11, 17, 32, 64, 200, 391}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{1, 3, 11, 17, 32, 64, 200, 391}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{1, 3, 11, 17, 32, 64, 200, 391}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{17, 391}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{17, 391}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{1, 3, 11}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test<double>();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test<double>();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test<double>();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
-
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
test(4);
test(7);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<unsigned int> sizes = {{17, 35, 391}};
for (const auto &s : sizes)
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(5);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(5);
test<double>();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(5);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(5);
test<double>();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(5);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(5);
test<double>();
}
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<std::array<unsigned int, 3>> sizes = {{3, 3, 3},
{7, 7, 7},
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<std::array<unsigned int, 2>> sizes = {
{3, 3}, {7, 7}, {51, 51}, {320, 320}, {3, 9}, {9, 7}, {5, 17}, {320, 121}};
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<std::array<unsigned int, 2>> sizes = {
{3, 3}, {7, 7}, {51, 51}, {320, 320}, {3, 9}, {9, 7}, {10, 5}, {320, 120}};
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- logfile.precision(3);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(3);
const std::vector<std::array<unsigned int, 2>> sizes = {
{3, 3}, {7, 7}, {51, 51}, {320, 320}, {3, 9}, {9, 7}, {10, 5}, {320, 120}};
int
main()
{
- std::ofstream logfile("output");
- // logfile.setf(std::ios::fixed);
+ initlog();
deallog << std::setprecision(4);
- deallog.attach(logfile);
GrowingVectorMemory<> mem;
SolverControl control(100, 1.e-3);
int
main()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
test_laplacian<double>(10);
test_laplacian<double>(20);
#include "../tests.h"
-std::ofstream logfile("output");
-
using namespace dealii;
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
{
deallog.push("2d");
#include "../tests.h"
-std::ofstream logfile("output");
-
using namespace dealii;
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
{
deallog.push("2d");
#include "../tests.h"
-std::ofstream logfile("output");
-
using namespace dealii;
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
{
deallog.push("2d");
#include "../tests.h"
-std::ofstream logfile("output");
-
using namespace dealii;
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
{
deallog.push("2d");
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
// there used to be a bug in the cell similarity detection for the above
// test pattern of an FE_RaviartThomas inside and FESystem, but cell
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
-
deallog.push("1d");
check<1>();
deallog.pop();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
loop<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
-
deallog.push("2d_2");
check<2, 2>();
int
main()
{
- std::ofstream logfile("output");
- dealii::deallog.attach(logfile);
+ initlog();
{
NeumanBC<2> func(1.25);
int
main()
{
- std::ofstream logfile("output");
- dealii::deallog.attach(logfile);
+ initlog();
{
NeumanBC<2> func(1.25);
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- dealii::deallog.attach(logfile, /*do not print job id*/ false);
- dealii::deallog.depth_console(0);
+ initlog();
test();
}
+
DEAL::size: 0
DEAL::max_size: 3
DEAL::initial:
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(3);
+ initlog();
+ deallog.get_file_stream().precision(3);
- deallog.attach(logfile);
test();
return 0;
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test_hyper_sphere<2>();
test_hyper_sphere<3>();
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_sphere<2>();
test_hyper_sphere<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<3>();
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<3>();
}
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
check<3>();
}
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
run<3>();
}
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
run<2>();
}
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(7);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(7);
+ deallog.get_file_stream().setf(std::ios::fixed);
run<3>();
}
int
main()
{
- std::ofstream logfile("output");
- logfile.precision(4);
- logfile.setf(std::ios::fixed);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream().precision(4);
+ deallog.get_file_stream().setf(std::ios::fixed);
check<3>();
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test_hyper_sphere<2>();
test_hyper_sphere<3>();
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_sphere<2>();
test_hyper_sphere<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test_hyper_sphere<2>();
test_hyper_sphere<3>();
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
int
main()
{
- std::ofstream logfile("output");
- logfile << std::setprecision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
TestPointValueHistory<2> test;
test.run();
int
main()
{
- std::ofstream logfile("output");
- logfile << std::setprecision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
TestPointValueHistory<2> test;
test.run();
int
main()
{
- std::ofstream logfile("output");
- logfile << std::setprecision(2);
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
TestPointValueHistory<2> test;
test.run();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
FE_RaviartThomasNodal<2> rt21(1);
test_hyper_cube(rt21);
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
class BoundaryFunction : public Function<dim>
{
VectorTools::project_boundary_values_curl_conforming_l2(
dof_handler, 0, boundary_function, 0, constraints);
constraints.close();
- constraints.print(logfile);
+ constraints.print(deallog.get_file_stream());
}
int
main()
{
- deallog << std::setprecision(2);
- deallog.attach(logfile);
+ initlog();
FE_Nedelec<2> fe_2(1);
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
class BoundaryFunction : public Function<dim>
{
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
test<2>(0);
test<2>(1);
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
class BoundaryFunction : public Function<dim>
{
VectorTools::project_boundary_values_div_conforming(
dof_handler, 0, boundary_function, 0, constraints);
constraints.close();
- constraints.print(logfile);
+ constraints.print(deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
FE_RaviartThomas<2> fe_2(1);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
- deallog.depth_console(0);
-
test<1>();
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
test<3>();
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
test_hyper_cube<2>();
test_hyper_cube<3>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
std::vector<bool> end_sweep_flags;
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("2d");
check<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(4);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(8);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(8);
deallog << std::fixed;
- deallog.attach(logfile);
deallog.push("1d");
check<1>();
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3_with_alias_03.prm");
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3_with_alias_04.prm");
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3_with_space.prm");
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// as for parameter_handler_3, but
// use different output format
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(logfile, ParameterHandler::LaTeX);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::LaTeX);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// as for parameter_handler_3, but
// use different output format
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(logfile, ParameterHandler::LaTeX);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::LaTeX);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// as for parameter_handler_3, but
// use different output format
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(logfile, ParameterHandler::LaTeX);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::LaTeX);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// as for parameter_handler_3, but
// use different output format
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(logfile, ParameterHandler::LaTeX);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::LaTeX);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
prm.leave_subsection();
- prm.print_parameters(logfile, ParameterHandler::LaTeX);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::LaTeX);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int", "1", Patterns::Integer());
prm.declare_entry("int", "2", Patterns::Integer());
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
// same as parameter_handler_3
ParameterHandler prm;
prm.leave_subsection();
// then write
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
// same as parameter_handler_3
ParameterHandler prm;
prm.leave_subsection();
// then write
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
// and do it again with the opposite
// value
prm.leave_subsection();
// then write
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing");
// as for parameter_handler_3, but
// use different output format
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(logfile, ParameterHandler::Description);
+ prm.print_parameters(deallog.get_file_stream(),
+ ParameterHandler::Description);
}
catch (std::exception &exc)
{
{
try
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.enter_subsection("Testing testing");
// as for parameter_handler_3, but
// use different output format
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_8.prm");
- prm.print_parameters(logfile, ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
}
catch (std::exception &exc)
{
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int1", "1", Patterns::Integer(), "doc 1");
// write it out again
prm.print_parameters(deallog.get_file_stream(), ParameterHandler::JSON);
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int1", "1", Patterns::Integer(), "doc 1");
// write it out again
prm.print_parameters(deallog.get_file_stream(), ParameterHandler::XML);
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int1", "1", Patterns::Integer(), "doc 1");
prm.leave_subsection();
- prm.print_parameters(logfile, ParameterHandler::JSON);
- logfile << std::endl;
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::JSON);
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int1", "1", Patterns::Integer(), "doc 1");
prm.enter_subsection("ss1");
prm.enter_subsection("Testing%testing");
- prm.print_parameters_section(logfile, ParameterHandler::Text, 0);
+ prm.print_parameters_section(deallog.get_file_stream(),
+ ParameterHandler::Text,
+ 0);
prm.leave_subsection();
prm.leave_subsection();
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int1", "1", Patterns::Integer(), "doc 1");
prm.enter_subsection("ss1");
prm.enter_subsection("Testing%testing");
- prm.print_parameters_section(logfile, ParameterHandler::Text, 0, true);
+ prm.print_parameters_section(deallog.get_file_stream(),
+ ParameterHandler::Text,
+ 0,
+ true);
prm.leave_subsection();
prm.leave_subsection();
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int1", "1", Patterns::Integer(), "doc 1");
prm.enter_subsection("ss1");
prm.enter_subsection("Testing%testing");
- prm.print_parameters_section(logfile, ParameterHandler::XML, 0, true);
+ prm.print_parameters_section(deallog.get_file_stream(),
+ ParameterHandler::XML,
+ 0,
+ true);
prm.leave_subsection();
prm.leave_subsection();
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int1", "1", Patterns::Integer(), "doc 1");
prm.leave_subsection();
- prm.print_parameters(logfile, ParameterHandler::XML);
- logfile << std::endl;
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::XML);
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
ParameterHandler prm;
prm.declare_entry("int1", "1", Patterns::Integer(), "doc 1");
prm.leave_subsection();
// set a special fill char and verify that it is being used
- logfile.fill('x');
- logfile.width(15);
- logfile << std::left << 42 << std::endl;
+ deallog.get_file_stream().fill('x');
+ deallog.get_file_stream().width(15);
+ deallog.get_file_stream() << std::left << 42 << std::endl;
// now let ParameterHandler output its state
- prm.print_parameters(logfile, ParameterHandler::Description);
+ prm.print_parameters(deallog.get_file_stream(),
+ ParameterHandler::Description);
// verify that the special fill char is still available (i.e., that
// print_parameters() has saved and restored the stream flags)
- logfile.width(15);
- logfile << std::left << 42 << std::endl;
+ deallog.get_file_stream().width(15);
+ deallog.get_file_stream() << std::left << 42 << std::endl;
return 0;
}
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- dealii::deallog.attach(logfile);
+ initlog();
try
{
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- dealii::deallog.attach(logfile);
- dealii::deallog.depth_console(0);
+ initlog();
try
{
test_vector(v);
deallog << "vector:" << std::endl;
- v.print(logfile);
+ v.print(deallog.get_file_stream());
}
}
return 1;
}
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- dealii::deallog.attach(logfile);
- dealii::deallog.depth_console(0);
+ intilog()
- try
+ try
{
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
{
test_matrix(m);
deallog << "matrix:" << std::endl;
- m.print(logfile);
+ m.print(deallog.get_file_stream());
}
}
return 1;
}
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- dealii::deallog.attach(logfile);
- dealii::deallog.depth_console(0);
+ initlog();
try
{
test(m);
deallog << "matrix:" << std::endl;
- m.print(logfile);
+ m.print(deallog.get_file_stream());
}
}
return 1;
}
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- dealii::deallog.attach(logfile);
- dealii::deallog.depth_console(0);
+ initlog();
try
{
test_matrix(m);
deallog << "matrix:" << std::endl;
- m.print(logfile);
+ m.print(deallog.get_file_stream());
}
}
return 1;
}
- logfile << std::endl;
+ deallog.get_file_stream() << std::endl;
return 0;
}
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
- deallog.depth_console(0);
+ initlog();
try
{
// Some output
deallog << "Complex vectors: " << std::endl;
deallog << "v: " << std::flush;
- v.print(logfile, 0, false, true);
+ v.print(deallog.get_file_stream(), 0, false, true);
deallog << "w: " << std::flush;
- w.print(logfile, 0, false, true);
+ w.print(deallog.get_file_stream(), 0, false, true);
deallog << "OK" << std::endl;
}
}
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
- deallog.depth_console(0);
+ initlog();
try
{
// SOme output
deallog << "Complex vectors: " << std::endl;
- v.print(logfile, 0, false, true);
- w.print(logfile, 0, false, true);
+ v.print(deallog.get_file_stream(), 0, false, true);
+ w.print(deallog.get_file_stream(), 0, false, true);
deallog << "OK" << std::endl;
}
}
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
- deallog.depth_console(0);
+ initlog();
try
{
// Output
deallog << "Complex vectors: " << std::endl;
- v.print(logfile, 0, false, true);
- w.print(logfile, 0, false, true);
+ v.print(deallog.get_file_stream(), 0, false, true);
+ w.print(deallog.get_file_stream(), 0, false, true);
deallog << "OK" << std::endl;
}
}
int
main(int argc, char **argv)
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
- deallog.depth_console(0);
+ initlog();
try
{
// print with prescribed precision
deallog << "unreadable=true,across=false" << std::endl;
- v.print(logfile, 10, true, false);
+ v.print(deallog.get_file_stream(), 10, true, false);
deallog << "unreadable=false,across=true" << std::endl;
- v.print(logfile, 3, false, true);
+ v.print(deallog.get_file_stream(), 3, false, true);
}
}
catch (std::exception &exc)
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test<1, 1>();
test<1, 2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test<1, 1>();
test<1, 2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test<1, 1>();
test<1, 2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
test();