From: Wolfgang Bangerth Date: Thu, 28 Apr 2022 21:29:29 +0000 (-0600) Subject: Add another test. X-Git-Tag: v9.4.0-rc1~277^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf461b7bab7753e510176d36ebf854d677ad79c9;p=dealii.git Add another test. --- diff --git a/tests/data_out/data_out_faces_postprocessor_boundary_id_03.cc b/tests/data_out/data_out_faces_postprocessor_boundary_id_03.cc new file mode 100644 index 0000000000..046bafe35c --- /dev/null +++ b/tests/data_out/data_out_faces_postprocessor_boundary_id_03.cc @@ -0,0 +1,86 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2016 - 2018 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- + + +// Like the data_out_faces_postprocess_boundary_id_02 test, but also +// output information about internal faces (with -1 to indicate that +// no boundary indicator is available). + + +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "../tests.h" + + + +std::ofstream logfile("output"); + + +template +void +test() +{ + Triangulation triangulation; + FE_DGQ fe(1); + DoFHandler dof_handler(triangulation); + + GridGenerator::hyper_cube(triangulation, 0, 1, true); + triangulation.refine_global(1); + triangulation.begin_active()->set_refine_flag(); + triangulation.execute_coarsening_and_refinement(); + + dof_handler.distribute_dofs(fe); + + // Create a dummy vector. We will ignore its contents. + Vector solution(dof_handler.n_dofs()); + + DataPostprocessors::BoundaryIds p; + DataOutFaces data_out(false); + data_out.attach_dof_handler(dof_handler); + data_out.add_data_vector(solution, p); + data_out.build_patches(); + data_out.write_gnuplot(logfile); +} + + +int +main() +{ + logfile << std::setprecision(2); + deallog << std::setprecision(2); + + test<2>(); + test<2>(); + + return 0; +} diff --git a/tests/data_out/data_out_faces_postprocessor_boundary_id_03.output b/tests/data_out/data_out_faces_postprocessor_boundary_id_03.output new file mode 100644 index 0000000000..38301f95ff --- /dev/null +++ b/tests/data_out/data_out_faces_postprocessor_boundary_id_03.output @@ -0,0 +1,238 @@ +# This file was generated by the deal.II library. + + +# +# For a description of the GNUPLOT format see the GNUPLOT manual. +# +# +0.5 0 -1 +0.5 0.5 -1 + + +1 0 1 +1 0.5 1 + + +0.5 0 2 +1 0 2 + + +0.5 0.5 -1 +1 0.5 -1 + + +0 0.5 0 +0 1 0 + + +0.5 0.5 -1 +0.5 1 -1 + + +0 0.5 -1 +0.5 0.5 -1 + + +0 1 3 +0.5 1 3 + + +0.5 0.5 -1 +0.5 1 -1 + + +1 0.5 1 +1 1 1 + + +0.5 0.5 -1 +1 0.5 -1 + + +0.5 1 3 +1 1 3 + + +0 0 0 +0 0.25 0 + + +0.25 0 -1 +0.25 0.25 -1 + + +0 0 2 +0.25 0 2 + + +0 0.25 -1 +0.25 0.25 -1 + + +0.25 0 -1 +0.25 0.25 -1 + + +0.5 0 -1 +0.5 0.25 -1 + + +0.25 0 2 +0.5 0 2 + + +0.25 0.25 -1 +0.5 0.25 -1 + + +0 0.25 0 +0 0.5 0 + + +0.25 0.25 -1 +0.25 0.5 -1 + + +0 0.25 -1 +0.25 0.25 -1 + + +0 0.5 -1 +0.25 0.5 -1 + + +0.25 0.25 -1 +0.25 0.5 -1 + + +0.5 0.25 -1 +0.5 0.5 -1 + + +0.25 0.25 -1 +0.5 0.25 -1 + + +0.25 0.5 -1 +0.5 0.5 -1 + + +# This file was generated by the deal.II library. + + +# +# For a description of the GNUPLOT format see the GNUPLOT manual. +# +# +0.5 0 -1 +0.5 0.5 -1 + + +1 0 1 +1 0.5 1 + + +0.5 0 2 +1 0 2 + + +0.5 0.5 -1 +1 0.5 -1 + + +0 0.5 0 +0 1 0 + + +0.5 0.5 -1 +0.5 1 -1 + + +0 0.5 -1 +0.5 0.5 -1 + + +0 1 3 +0.5 1 3 + + +0.5 0.5 -1 +0.5 1 -1 + + +1 0.5 1 +1 1 1 + + +0.5 0.5 -1 +1 0.5 -1 + + +0.5 1 3 +1 1 3 + + +0 0 0 +0 0.25 0 + + +0.25 0 -1 +0.25 0.25 -1 + + +0 0 2 +0.25 0 2 + + +0 0.25 -1 +0.25 0.25 -1 + + +0.25 0 -1 +0.25 0.25 -1 + + +0.5 0 -1 +0.5 0.25 -1 + + +0.25 0 2 +0.5 0 2 + + +0.25 0.25 -1 +0.5 0.25 -1 + + +0 0.25 0 +0 0.5 0 + + +0.25 0.25 -1 +0.25 0.5 -1 + + +0 0.25 -1 +0.25 0.25 -1 + + +0 0.5 -1 +0.25 0.5 -1 + + +0.25 0.25 -1 +0.25 0.5 -1 + + +0.5 0.25 -1 +0.5 0.5 -1 + + +0.25 0.25 -1 +0.5 0.25 -1 + + +0.25 0.5 -1 +0.5 0.5 -1 + +