int
main ()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(3);
- deallog.attach(logfile);
Testing::srand(3391466);
+ std::ostream &logfile = deallog.get_file_stream();
+
FullMatrix<double> T(3,3,entries);
T.print_formatted(logfile, 0, false);
}
}
}
-
-
int
main ()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(3);
- deallog.attach(logfile);
Testing::srand(3391466);
FullMatrix<double> A(3,3,entries_A);
int
main ()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(3);
- deallog.attach(logfile);
Testing::srand(3391466);
FullMatrix<double> A(3,3,entries_A);
int
main ()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
test(3,4);
test(4,7);
int
main ()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
test();
}
int
main ()
{
- const std::string logname = "output";
- std::ofstream logfile(logname.c_str());
- deallog.attach(logfile);
+ initlog();
test();
}
int
main ()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(3);
- deallog.attach(logfile);
FullMatrix<double> A(3,3,entries_A);
FullMatrix<double> C(3,3);
int
main ()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(3);
- deallog.attach(logfile);
FullMatrix<double> A(3,3,entries_A);
FullMatrix<double> C(3,3);
{
try
{
- std::ofstream logfile("output");
deallog << std::setprecision (2);
- deallog.attach(logfile);
+ initlog();
deallog.depth_console(0);
check<double> ();
int
main ()
{
- std::ofstream logfile("output");
+ initlog();
+ std::ostream &logfile = deallog.get_file_stream();
deallog << std::fixed;
deallog << std::setprecision(3);
- deallog.attach(logfile);
-
logfile << numbers::PI << std::endl;
FullMatrix<double> T(3,3,entries);
logfile << numbers::PI << std::endl;
}
-
-
#include <deal.II/grid/grid_out.h>
-std::ofstream logfile("output");
-
-
-
template <int dim>
void test1 (const bool keep_boundary)
{
GridTools::distort_random (0.1, tria, keep_boundary);
+ std::ostream &logfile = deallog.get_file_stream();
deallog << "dim=" << dim << ", keep_boundary=" << keep_boundary << std::endl;
GridOut().write_gnuplot (tria, logfile);
}
int main ()
{
- deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(4);
test1<1> (true);
test1<1> (false);
return 0;
}
-
int main()
{
- std::ofstream logfile ("output");
+ initlog();
deallog << std::setprecision (PRECISION);
- deallog.attach(logfile);
test<1>();
test<2>();
test<3>();
}
-
int main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
- test(logfile);
+ test(deallog.get_file_stream());
}
int main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
- test(logfile);
+ test(deallog.get_file_stream());
}
-std::ofstream logfile("output");
-
-
void test (const char *filename)
{
Triangulation<3> tria;
int main ()
{
deallog << std::setprecision (2);
- deallog.attach(logfile);
+ initlog();
test (SOURCE_DIR "/grid_in_3d/1.in");
test (SOURCE_DIR "/grid_in_3d/2.in");
test (SOURCE_DIR "/grid_in_3d/evil_0.in");
test (SOURCE_DIR "/grid_in_3d/evil_4.in");
}
-
#include <numeric>
-std::ofstream logfile("output");
-
-
DeclException2 (ExcNumberMismatch,
int, int,
<< "The numbers " << arg1 << " and " << arg2
cell->set_subdomain_id (subdomain);
};
+ std::ostream &logfile = deallog.get_file_stream();
// check 1: count number of cells
// on some level
int main ()
{
- deallog << std::setprecision(4);
- deallog.attach(logfile);
-
+ initlog ();
+ deallog.get_file_stream() << std::setprecision(4);
test ();
return 0;
}
-
#include <numeric>
-std::ofstream logfile("output");
-
-
DeclException2 (ExcNumberMismatch,
int, int,
<< "The numbers " << arg1 << " and " << arg2
cell->set_subdomain_id (subdomain);
};
+ std::ostream &logfile = deallog.get_file_stream();
// check 1: count number of cells
// on some level
int main ()
{
- deallog << std::setprecision(4);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(4);
test ();
return 0;
}
-
#include <numeric>
-std::ofstream logfile("output");
-
-
DeclException2 (ExcNumberMismatch,
int, int,
<< "The numbers " << arg1 << " and " << arg2
cell->set_subdomain_id (subdomain);
};
+ std::ostream &logfile = deallog.get_file_stream();
// check 1: count number of cells
// on some level
int main ()
{
- deallog << std::setprecision(4);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(4);
test ();
return 0;
}
-
int main()
{
- std::ofstream logfile ("output");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
test<3>();
}
-
int main()
{
- std::ofstream logfile ("output");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
test<3>();
}
-
int main()
{
- std::ofstream logfile ("output");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
test<3>();
}
-
int main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("1d");
- test<1>(logfile);
+ test<1>(deallog.get_file_stream());
deallog.pop();
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()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
int main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
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()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("1d");
- test<1>(logfile);
+ test<1>(deallog.get_file_stream());
deallog.pop();
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()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("1d");
- test<1>(logfile);
+ test<1>(deallog.get_file_stream());
deallog.pop();
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()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
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()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
}
int main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
}
int main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
- test<2>(logfile);
- test<3>(logfile);
+ test<2>(deallog.get_file_stream());
+ test<3>(deallog.get_file_stream());
}
int main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("1-2");
- test<1,2>(logfile);
+ test<1,2>(deallog.get_file_stream());
deallog.pop();
deallog.push("1-3");
- test<1,3>(logfile);
+ test<1,3>(deallog.get_file_stream());
deallog.pop();
deallog.push("2-3");
- test<2,3>(logfile);
+ test<2,3>(deallog.get_file_stream());
deallog.pop();
}
#include <iostream>
-std::ofstream logfile("output");
-
-
template <int dim>
void check_rect1 (unsigned int n, bool color, bool log)
{
if (dim == 2)
{
if (log)
- grid_out.write_xfig (tria, logfile);
+ grid_out.write_xfig (tria, deallog.get_file_stream());
else
grid_out.write_xfig (tria, std::cout);
}
else
{
if (log)
- grid_out.write_dx (tria, logfile);
+ grid_out.write_dx (tria, deallog.get_file_stream());
else
grid_out.write_dx (tria, std::cout);
}
int main()
{
+ initlog();
+
check_rect1<2> (1, true, true);
check_rect1<2> (3, true, true);
check_rect1<3> (1, true, true);
+
#FIG 3.2
Landscape
Center
int main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
- test<1,2>(logfile);
- test<2,3>(logfile);
+ test<1,2>(deallog.get_file_stream());
+ test<2,3>(deallog.get_file_stream());
}
*/
template <int dim>
-void check_parallelepiped (std::ofstream &logfile)
+void check_parallelepiped (std::ostream &logfile)
{
// Data structure defining dim coordinates that make up a
// parallelepiped.
int main ()
{
deal_II_exceptions::disable_abort_on_exception();
- std::ofstream logfile ("output");
+ initlog();
+ std::ostream &logfile = deallog.get_file_stream();
check_parallelepiped<1>(logfile);
check_parallelepiped<2>(logfile);
+
ExcInvalidInputOrientation ("The triangulation you are trying to create will consist of cells" " with negative measures. This is usually the result of input data" " that does not define a right-handed coordinate system. The usual" " fix for this is to ensure that in 1D the given point is to the" " right of the origin (or the given edge tensor is positive), in 2D" " that the two edges (and their cross product) obey the right-hand" " rule (which may usually be done by switching the order of the" " points or edge tensors), or in 3D that the edges form a" " right-handed coordinate system (which may also be accomplished by" " switching the order of the first two points or edge tensors).")
ExcInvalidInputOrientation ("The triangulation you are trying to create will consist of cells" " with negative measures. This is usually the result of input data" " that does not define a right-handed coordinate system. The usual" " fix for this is to ensure that in 1D the given point is to the" " right of the origin (or the given edge tensor is positive), in 2D" " that the two edges (and their cross product) obey the right-hand" " rule (which may usually be done by switching the order of the" " points or edge tensors), or in 3D that the edges form a" " right-handed coordinate system (which may also be accomplished by" " switching the order of the first two points or edge tensors).")
ExcInvalidInputOrientation ("The triangulation you are trying to create will consist of cells" " with negative measures. This is usually the result of input data" " that does not define a right-handed coordinate system. The usual" " fix for this is to ensure that in 1D the given point is to the" " right of the origin (or the given edge tensor is positive), in 2D" " that the two edges (and their cross product) obey the right-hand" " rule (which may usually be done by switching the order of the" " points or edge tensors), or in 3D that the edges form a" " right-handed coordinate system (which may also be accomplished by" " switching the order of the first two points or edge tensors).")