int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(PRECISION);
- deallog.attach(logfile);
test<2>();
test<3>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check(double r1, double r2, unsigned int n)
GridOutFlags::DX flags;
flags.write_faces = true;
grid_out.set_flags(flags);
- grid_out.write_dx(tria, logfile);
+ grid_out.write_dx(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<2>(4., 5., 10);
check<3>(3., 5., 6);
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check(double r1, double r2, unsigned int n)
tria.refine_global(1);
GridOut grid_out;
- grid_out.write_gnuplot(tria, logfile);
+ grid_out.write_gnuplot(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<3>(.5, 1, 6);
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check(double r1, double r2, unsigned int n)
tria.refine_global(1);
GridOut grid_out;
- grid_out.write_gnuplot(tria, logfile);
+ grid_out.write_gnuplot(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<3>(.5, 1, 12);
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check(double r1, double r2, unsigned int n)
tria.set_manifold(0, boundary);
GridOut grid_out;
- grid_out.write_gnuplot(tria, logfile);
+ grid_out.write_gnuplot(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<3>(.5, 1, 96);
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check(const unsigned int n)
int
main()
{
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<3>(6);
check<3>(12);
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check(double r1, double r2, unsigned int n)
int
main()
{
+ initlog();
deallog << std::setprecision(3);
- deallog.attach(logfile);
check<3>(.5, 1, 6);
check<3>(.5, 1, 12);
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
test1()
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());
}
int
main()
{
- deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(2);
test1<2>();
test2<2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
void
test(const char *filename)
{
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
test(SOURCE_DIR "/grid_in_3d/1.in");
test(SOURCE_DIR "/grid_in_3d/2.in");
// #include <deal.II/fe/fe_q.h>
// #include <deal.II/numerics/data_out.h>
-
-
-std::ofstream logfile("output");
-
-
void
test(const char *filename)
{
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
test(SOURCE_DIR "/grid_in_3d_02/747.ucd");
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
- deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(2);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
void
check_file()
{
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
check_file();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
void
check_file()
{
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
check_file();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
- deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
+ initlog(false, std::ios_base::fmtflags());
+ deallog.get_file_stream() << std::setprecision(2);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
- deallog << std::setprecision(5);
- logfile << std::setprecision(5);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(5);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
- deallog << std::setprecision(5);
- logfile << std::setprecision(5);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(5);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
test(const std::string &infilename)
gi.attach_triangulation(tria);
gi.read(infilename);
- logfile << "------------------------------------------" << std::endl;
+ deallog.get_file_stream()
+ << "------------------------------------------" << std::endl;
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());
}
int
main()
{
+ initlog();
test<2>(std::string(SOURCE_DIR "/grid_in_tecplot/1.dat"));
test<2>(std::string(SOURCE_DIR "/grid_in_tecplot/2.dat"));
test<2>(std::string(SOURCE_DIR "/grid_in_tecplot/3.dat"));
+
------------------------------------------
# This file was generated by the deal.II library.
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
- deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(2);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
- deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(2);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
check_file(const std::string name, typename GridIn<dim>::Format format)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
filename_resolution();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
void
test(bool second_case = false)
Triangulation<dim> tria;
tria.create_triangulation_compatibility(vertices, cells, subcelldata);
+ std::ostream &logfile = deallog.get_file_stream();
logfile << "---------------------------------------------" << std::endl
<< "dim=" << dim << (second_case ? ", second case" : ", first case")
<< std::endl
int
main()
{
+ initlog(false, std::ios_base::fmtflags());
test<2>();
test<3>(false);
test<3>(true);
+
---------------------------------------------
dim=2, first case
2 0 1 0
3 1 1 0
4 1 0 0
-1 0 quad 1 4 3 2
+1 0 quad 1 4 3 2
---------------------------------------------
dim=3, first case
6 0 1 -1
7 1 1 -1
8 1 0 -1
-1 0 hex 5 6 7 8 1 2 3 4
+1 0 hex 5 6 7 8 1 2 3 4
---------------------------------------------
dim=3, second case
6 0 1 1
7 1 1 1
8 1 0 1
-1 0 hex 5 8 7 6 1 4 3 2
+1 0 hex 5 8 7 6 1 4 3 2
-std::ofstream logfile("output");
-
-
template <int dim>
void
test()
grid_out.set_flags(eps2);
if (dim != 1)
- grid_out.write_eps(tria, logfile);
- grid_out.write_gnuplot(tria, logfile);
+ grid_out.write_eps(tria, deallog.get_file_stream());
+ grid_out.write_gnuplot(tria, deallog.get_file_stream());
grid_out.set_flags(GridOutFlags::Ucd(true));
- grid_out.write_ucd(tria, logfile);
+ grid_out.write_ucd(tria, deallog.get_file_stream());
if (dim != 1)
- grid_out.write_dx(tria, logfile);
+ grid_out.write_dx(tria, deallog.get_file_stream());
}
int
main()
{
- deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(2);
test<1>();
test<2>();
-std::ofstream logfile("output");
-
-
template <int dim>
void
test()
tria.refine_global(2);
GridOut grid_out;
- grid_out.write_dx(tria, logfile);
+ grid_out.write_dx(tria, deallog.get_file_stream());
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active();
for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_cell; ++i)
++cell;
}
tria.execute_coarsening_and_refinement();
- grid_out.write_dx(tria, logfile);
+ grid_out.write_dx(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test<2>();
test<3>();
#include "../tests.h"
-
-
-std::ofstream logfile("output");
-
-
template <int dim>
void
test()
GridOutFlags::Ucd flags;
flags.write_lines = flags.write_faces = true;
grid_out.set_flags(flags);
- grid_out.write_ucd(tria, logfile);
+ grid_out.write_ucd(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test<2>();
test<3>();
#include "../tests.h"
-
-
-std::ofstream logfile("output");
-
-
template <int dim>
void
test()
GridOutFlags::Msh flags;
flags.write_lines = flags.write_faces = true;
grid_out.set_flags(flags);
- grid_out.write_msh(tria, logfile);
+ grid_out.write_msh(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test<2>();
test<3>();
#include "../tests.h"
-
-
-std::ofstream logfile("output");
-
-
void
test()
{
tria.refine_global(1);
GridOut grid_out;
- grid_out.write_vtu(tria, logfile);
+ grid_out.write_vtu(tria, deallog.get_file_stream());
}
int
main()
{
- deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(2);
test();
}
#include "../tests.h"
-
-
-std::ofstream logfile("output");
-
-
void
test()
{
tria.refine_global(1);
GridOut grid_out;
- grid_out.write_gnuplot(tria, logfile);
+ grid_out.write_gnuplot(tria, deallog.get_file_stream());
}
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test();
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog.push("3d");
- test<3>(logfile);
+ test<3>(deallog.get_file_stream());
deallog.pop();
}
#include "../tests.h"
-// Output
-std::ofstream logfile("output");
-
// The simplest test case is to create a parallelepiped grid, output
// the result, and hope for the best.
template <int dim>
GridOut grid_out;
if (log)
- grid_out.write_gnuplot(triangulation, logfile);
+ grid_out.write_gnuplot(triangulation, deallog.get_file_stream());
else
grid_out.write_gnuplot(triangulation, std::cout);
int
main()
{
+ initlog(false, std::ios_base::fmtflags());
+ deallog.get_file_stream() << std::setprecision(2);
// Check parallelepiped
check_parallelepiped<1>(false, true);
check_parallelepiped<2>(false, true);
#include "../tests.h"
-// Output
-std::ofstream logfile("output");
-
// As sketched in the deal.II docs, the parallelepiped class is just a
// hyper_rectangle in 1d and a parallelogram in 2d. That can checked
// by simple comparison to a reference triangulation.
if (log)
{
+ std::ostream &logfile = deallog.get_file_stream();
logfile << "\ncheck 1d parallelepiped (hyper_cube): ";
if (GridTools::have_same_coarse_mesh(triangulation_parallelepiped,
triangulation_cube))
if (log)
{
+ std::ostream &logfile = deallog.get_file_stream();
logfile << "\ncheck 2d parallelepiped (parallelogram): ";
if (GridTools::have_same_coarse_mesh(triangulation_parallelepiped,
triangulation_parallelogram))
int
main()
{
+ initlog();
// Check parallelepiped
check_1d_parallelepiped_by_comparison(true);
check_2d_parallelepiped_by_comparison(true);
- logfile << "\n";
+ deallog.get_file_stream() << "\n";
}
+
check 1d parallelepiped (hyper_cube): OK
check 2d parallelepiped (parallelogram): OK
#include "../tests.h"
-// Output
-std::ofstream logfile("output");
-
// This test creates a parallelepiped (one element) and the same
// parallelepiped (one element); because the code that makes the two
// one-element grids is not the same, but should result in the same
if (log)
{
- logfile << "\ncheck " << dim
- << "d parallelepiped (subdivided_parallelepiped): ";
+ deallog << "check " << dim
+ << "d parallelepiped (subdivided_parallelepiped):";
if (GridTools::have_same_coarse_mesh(
triangulation_parallelepiped,
triangulation_subdivided_parallelepiped))
- logfile << "OK";
+ deallog << "OK" << std::endl;
else
- logfile
- << "not OK... coarse grids are different but they should be the same";
+ deallog
+ << "not OK... coarse grids are different but they should be the same"
+ << std::endl;
}
}
int
main()
{
+ initlog();
// Check parallelepiped
check_nd_parallelepiped_by_comparison<1>(true);
check_nd_parallelepiped_by_comparison<2>(true);
check_nd_parallelepiped_by_comparison<3>(true);
-
- logfile << "\n";
}
-check 1d parallelepiped (subdivided_parallelepiped): OK
-check 2d parallelepiped (subdivided_parallelepiped): OK
-check 3d parallelepiped (subdivided_parallelepiped): OK
+DEAL::check 1d parallelepiped (subdivided_parallelepiped):OK
+DEAL::check 2d parallelepiped (subdivided_parallelepiped):OK
+DEAL::check 3d parallelepiped (subdivided_parallelepiped):OK
#include "../tests.h"
-// Output
-std::ofstream logfile("output");
-
// The simplest test case is to create a parallelepiped grid with a
// number of subdivisions and output the result.
template <int dim>
GridOut grid_out;
if (log)
- grid_out.write_gnuplot(triangulation, logfile);
+ grid_out.write_gnuplot(triangulation, deallog.get_file_stream());
else
grid_out.write_gnuplot(triangulation, std::cout);
int
main()
{
+ initlog(false, std::ios_base::fmtflags());
+ // deallog.get_file_stream() << std::setprecision(2);
// Check parallelepiped
check_subdivided_parallelepiped<1>(false, true);
check_subdivided_parallelepiped<2>(false, true);
#include "../tests.h"
-std::ofstream logfile("output");
-
void
check_remove_anisotropy()
{
/*max ratio =*/1.2);
GridOut grid_out;
- grid_out.write_vtk(triangulation, logfile);
+ grid_out.write_vtk(triangulation, deallog.get_file_stream());
triangulation.clear();
}
int
main()
{
+ initlog();
check_remove_anisotropy();
}
+
# vtk DataFile Version 3.0
-#This file was generated
+#This file was generated
ASCII
DATASET UNSTRUCTURED_GRID
POINT_DATA 64
SCALARS level double 1
LOOKUP_TABLE default
-3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
SCALARS manifold double 1
LOOKUP_TABLE default
--1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <iostream>
-
#include "../tests.h"
-std::ofstream logfile("output");
-
void
check_remove_hanging_nodes()
{
dealii::GridTools::remove_hanging_nodes(tria, /*isotropic=*/false);
GridOut grid_out;
- grid_out.write_vtk(tria, logfile);
+ grid_out.write_vtk(tria, deallog.get_file_stream());
tria.clear();
}
int
main()
{
+ initlog();
check_remove_hanging_nodes();
}
+
# vtk DataFile Version 3.0
-#This file was generated
+#This file was generated
ASCII
DATASET UNSTRUCTURED_GRID
POINT_DATA 144
SCALARS level double 1
LOOKUP_TABLE default
-2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
SCALARS manifold double 1
LOOKUP_TABLE default
--1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 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OKUP_TABLE default
-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#include "../tests.h"
-std::ofstream logfile("output");
-
// 1: continuous refinement of the unit square always in the middle
// 2: refinement of the circle at the boundary
// 2: refinement of a wiggled area at the boundary
-
template <int dim>
class Ball : public FlatManifold<dim>
{
GridOut go;
go.set_flags(GridOutFlags::Ucd(true));
- go.write_ucd(tria, logfile);
+ go.write_ucd(tria, deallog.get_file_stream());
deallog << " Total number of cells = " << tria.n_cells()
<< std::endl
int
main()
{
- deallog << std::setprecision(8);
- logfile << std::setprecision(8);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(8);
for (unsigned int i = 1; i <= 3; ++i)
test<2>(i);
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
// check GridTools::diameter
template <int dim>
void
void
test2()
{
+ std::ostream & logfile = deallog.get_file_stream();
Triangulation<2> tria;
GridGenerator::hyper_cube(tria);
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile);
+ deallog.get_file_stream() << std::setprecision(4);
test1<1>();
test1<2>();
#include "../tests.h"
-
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
test1()
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile);
test1<1>();
test1<2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
test1()
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile);
test1<1>();
test1<2>();
#include "../tests.h"
-
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
test1()
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile);
test1<1>();
test1<2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-using namespace dealii;
-
-
/*
* Generate a grid consisting of two disjoint cells, colorize the two
* outermost faces. They will be matched via collect_periodic_faces.
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile, false);
deallog << "Test for 2D: Hypercube" << std::endl << std::endl;
+
DEAL::Test for 2D: Hypercube
DEAL::
DEAL::face 1 :: -1.000 -3.000 :: 1.000 -3.000
#include "../tests.h"
-std::ofstream logfile("output");
-
-using namespace dealii;
-
-
/*
* Generate a grid consisting of two disjoint cells, colorize the two
* outermost faces. They will be matched via collect_periodic_faces
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile, false);
-
deallog << "Test for 2D: Hypercube" << std::endl << std::endl;
for (int i = 0; i < 2; ++i)
+
DEAL::Test for 2D: Hypercube
DEAL::
DEAL::Triangulation: 0
#include "../tests.h"
-std::ofstream logfile("output");
-
void
test()
{
int
main(int argc, char *argv[])
{
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile);
test();
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");
- deallog.attach(logfile);
+ initlog();
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
check<1>();
check<2>();
check<3>();
-std::ofstream logfile("output");
-
-
// create a triangulation of a cylinder, where the line along the axis is common
// to all cells, thus n_cells are neighboring at this line. in delete_children,
// this is not accounted for (for n_cells>5) and the child lines are deleted,
// write grid to file
GridOut go;
go.set_flags(GridOutFlags::Ucd(true));
- go.write_ucd(tria, logfile);
+ go.write_ucd(tria, deallog.get_file_stream());
// coarsen the first cell again
cell = tria.begin_active(1);
for (unsigned int c = 0; c < 8; ++c)
}
tria.execute_coarsening_and_refinement();
- go.write_ucd(tria, logfile);
+ go.write_ucd(tria, deallog.get_file_stream());
}
int
main()
{
- deallog.attach(logfile);
+ initlog();
check();
return 0;
}
#include "../tests.h"
-
-
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
test1()
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- deallog.attach(logfile);
test1<1>();
test1<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(PRECISION);
- deallog.attach(logfile);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(PRECISION);
- deallog.attach(logfile);
test<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(5);
- deallog.attach(logfile);
// run the tests but continue when finding an exception: we will try
// out a distorted cell for which TriaAccessor::measure() will error
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
// testcase=0:
// create two cubes; translate them so that no vertices overlap
//
// now merge triangulations
GridGenerator::merge_triangulations(tria_1, tria_2, tria_3);
- GridOut().write_gnuplot(tria_3, logfile);
+ GridOut().write_gnuplot(tria_3, deallog.get_file_stream());
deallog << " Total number of cells = " << tria_3.n_cells()
<< std::endl
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
for (unsigned int t = 0; t < 3; ++t)
{
#include "../tests.h"
-std::ofstream logfile("output");
-
template <int dim>
void
mesh_info(const Triangulation<dim> &tria)
int
main()
{
- deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
+ initlog();
+ deallog.get_file_stream() << std::setprecision(2);
make_grid();
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
flatten_triangulation(Triangulation<dim> &tria_in, Triangulation<dim> &tria_out)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Triangulation<3> triangulation;
GridIn<3> grid_in;
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Triangulation<3> triangulation;
GridIn<3> grid_in;
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
Triangulation<3> triangulation;
GridIn<3> grid_in;
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
+ initlog();
Triangulation<3> triangulation;
create_two_cubes_rotation(triangulation, 1);
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
+ initlog();
Triangulation<3> triangulation;
GridGenerator::hyper_ball(triangulation);
triangulation.reset_manifold(0);
#include "../tests.h"
-
-
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
test1()
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- deallog.attach(logfile);
test1<1>();
test1<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
Triangulation<3> tria;
FlatManifold<3> boundary;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
Triangulation<2> tria;
FlatManifold<2> boundary;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
SphericalManifold<3> boundary(Point<3>(1, 0, 0));
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
SphericalManifold<2> boundary(Point<2>(1, 0));
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
FE_Q<2> linear_interpolator(1);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
FE_Q<1> linear_interpolator(1);
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
Triangulation<3> tria;
FlatManifold<3> boundary;
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(3);
deallog << std::fixed;
- deallog.attach(logfile);
SphericalManifold<3> boundary(Point<3>(1, 0, 0));
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
output(const Triangulation<dim> &tria)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
test<1>();
test<2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
output(const Triangulation<dim> &tria)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
test<2>(SOURCE_DIR "/grid_in/2d.xda");
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
output(const Triangulation<dim> &tria)
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
- deallog.attach(logfile);
-
test<1>();
test<2>();
test<3>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
template <int dim, int spacedim>
void
pre_refinement_notification(const std::string & prefix,
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test<1>();
test<2>();
#include "../tests.h"
-
-std::ofstream logfile("output");
-
-
-
template <int dim, int spacedim>
void
pre_refinement_notification(const std::string & prefix,
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test<1>();
test<2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
DeclException2(ExcNumberMismatch,
int,
int,
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- deallog.attach(logfile);
test<1>();
test<2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
DeclException2(ExcNumberMismatch,
int,
int,
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- deallog.attach(logfile);
test<1>();
test<2>();
#include "../tests.h"
-std::ofstream logfile("output");
-
-
template <int dim>
void
test()
int
main()
{
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
- deallog.attach(logfile);
test<1>();
test<2>();
#include "../tests.h"
-
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
test()
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test<1>();
test<2>();
template <int dim>
void
-check_parallelepiped(std::ofstream &logfile)
+check_parallelepiped()
{
// Data structure defining dim coordinates that make up a
// parallelepiped.
}
catch (ExceptionBase &exc)
{
- logfile << exc.get_exc_name() << std::endl;
+ deallog.get_file_stream() << exc.get_exc_name() << std::endl;
}
}
main()
{
deal_II_exceptions::disable_abort_on_exception();
- std::ofstream logfile("output");
+ initlog();
- check_parallelepiped<1>(logfile);
- check_parallelepiped<2>(logfile);
- check_parallelepiped<3>(logfile);
- logfile << "OK" << std::endl;
+ check_parallelepiped<1>();
+ check_parallelepiped<2>();
+ check_parallelepiped<3>();
+ deallog.get_file_stream() << "OK" << std::endl;
}
+
ExcGridHasInvalidCell(cell_no)
ExcGridHasInvalidCell(cell_no)
ExcGridHasInvalidCell(cell_no)
#include "../tests.h"
-
-std::ofstream logfile("output");
-
-
-
template <int dim>
void
test()
GridGenerator::create_union_triangulation(tria_1, tria_2, tria_3);
- GridOut().write_gnuplot(tria_3, logfile);
+ GridOut().write_gnuplot(tria_3, deallog.get_file_stream());
deallog << " Total number of cells = " << tria_3.n_cells()
<< std::endl
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
- deallog.attach(logfile);
test<1>();
test<2>();