test<2, 2>();
test<3, 3>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<2, 2>();
test<2, 3>();
-
test<3, 3>();
-
- return 0;
}
triangulation.refine_global(refinements);
dof_handler.distribute_dofs(fe);
- {
- // Save mesh to file for visualization
- GridOut grid_out;
- std::ofstream grid_file("grid.vtk");
- grid_out.write_vtk(triangulation, grid_file);
- // deallog << "Grid has been saved into grid.vtk" << std::endl;
- }
+ if (false) // reenable for visualization
+ {
+ GridOut grid_out;
+ std::ofstream grid_file("grid.vtk");
+ grid_out.write_vtk(triangulation, grid_file);
+ // deallog << "Grid has been saved into grid.vtk" << std::endl;
+ }
// deallog << "Surface mesh has " << triangulation.n_active_cells()
// << " cells."
for (unsigned int i = 1; i < 8; ++i)
test(MappingEnum::MappingQ, i);
deallog << bar << std::endl;
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(PRECISION);
- deallog.attach(logfile);
// -----------------------
// Tests for dim=1
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(PRECISION);
- deallog.attach(logfile);
// -----------------------
// Tests for dim=1
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(PRECISION);
- deallog.attach(logfile);
// -----------------------
// Tests for dim=1
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::fixed;
deallog << std::setprecision(PRECISION) << std::fixed;
- deallog.attach(logfile);
// create grid of circle, somehow
// arbitrarily from only one cell,
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<1, 3>();
test_real_to_unit_cell<2, 3>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<2, 3>();
// test_real_to_unit_cell<1,3>();
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<2, 3>();
// test_real_to_unit_cell<1,3>();
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<2, 3>();
-
// test_real_to_unit_cell<1,3>();
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<2, 3>();
-
// test_real_to_unit_cell<1,3>();
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<2, 3>();
-
// test_real_to_unit_cell<1,3>();
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<1, 3>();
test_real_to_unit_cell<2, 3>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<2, 3>();
// test_real_to_unit_cell<1,3>();
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<1, 3>();
test_real_to_unit_cell<2, 3>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<2, 3>();
-
// test_real_to_unit_cell<1,3>();
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<2, 3>();
-
// test_real_to_unit_cell<1,3>();
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test<1, 1>();
test<1, 2>();
test<2, 3>();
test<3, 3>();
-
- return 0;
}
#include "../tests.h"
-std::ofstream logfile("output");
-
-
-
class LaplaceProblem
{
public:
int
main()
{
+ initlog();
deallog << std::setprecision(2);
- logfile << std::setprecision(2);
-
- deallog.attach(logfile);
+ deallog.get_file_stream() << std::setprecision(2);
LaplaceProblem laplace_problem;
laplace_problem.run();
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
-
-
deallog.push("1d");
show_values<1>();
deallog.push("3d");
show_values<3>();
deallog.pop();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
test<1>();
test<2>();
#include <deal.II/numerics/matrix_tools.h>
#include <deal.II/numerics/vector_tools.h>
-#include <iostream>
-
#include "../tests.h"
int
main()
{
- std::ofstream logfile("output");
+ initlog();
deallog << std::setprecision(2);
deallog << std::fixed;
- deallog.attach(logfile);
// convergence studies
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
+ deallog.get_file_stream() << std::setprecision(4);
test<1>();
test<2>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
deallog << std::setprecision(4);
- logfile << std::setprecision(4);
test<1>();
test<2>();
#include <string>
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test()
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, 1>();
test<2, 2>();
test<3, 3>();
-
- return 0;
}
#include <string>
-std::ofstream logfile("output");
-
template <int dim, int spacedim>
void
test(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, 1>(1);
test<2, 2>(1);
test<1, 1>(2);
test<2, 2>(2);
test<3, 3>(2);
- return 0;
}
#include <string>
-std::ofstream logfile("output");
-
void
test(unsigned int degree)
{
int
main()
{
- deallog.attach(logfile);
+ initlog();
test(1);
test(2);
test(3);
- return 0;
}
deallog << mapping.get_degree() << "\t" << diff.l2_norm() << std::endl;
- DataOut<dim> data_out;
- std::ofstream output(
- ("output_" + Utilities::int_to_string(mapping_p) + ".vtk").c_str());
- data_out.attach_dof_handler(dof_handler);
- data_out.add_data_vector(v, "v");
- data_out.add_data_vector(diff, "e");
- data_out.build_patches(mapping, fe.degree);
- data_out.write_vtk(output);
- output.close();
+ if (false) // enable for visualization
+ {
+ DataOut<dim> data_out;
+ std::ofstream output(
+ ("output_" + Utilities::int_to_string(mapping_p) + ".vtk").c_str());
+ data_out.attach_dof_handler(dof_handler);
+ data_out.add_data_vector(v, "v");
+ data_out.add_data_vector(diff, "e");
+ data_out.build_patches(mapping, fe.degree);
+ data_out.write_vtk(output);
+ }
}
}
int
main()
{
+ initlog();
deallog << std::setprecision(5);
- deallog.attach(std::cout);
deallog.depth_console(0);
const static unsigned dim = 3;
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<2>();
test<3>();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test2<2>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
test_real_to_unit_cell<1, 2>();
test_real_to_unit_cell<1, 3>();
test_real_to_unit_cell<2, 3>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell<2>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
// the following is not currently implemented
// test_real_to_unit_cell<1,3>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
+ initlog();
test_real_to_unit_cell<2, 3>();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell();
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
+ initlog();
test_real_to_unit_cell();
-
- return 0;
}
int
main()
{
- std::ofstream logfile("output");
- deallog.attach(logfile);
-
+ initlog();
test_real_to_unit_cell<1, 1>();
test_real_to_unit_cell<2, 2>();
// the following is not currently implemented
// test_real_to_unit_cell<1,3>();
test_real_to_unit_cell<2, 3>();
-
- return 0;
}