From a25a0676c1a9200ccc6306aa59a7a9dac5f436ac Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 25 Sep 2009 03:39:48 +0000 Subject: [PATCH] Add another test that currently fails. Will fix it next. git-svn-id: https://svn.dealii.org/trunk@19543 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/Makefile | 2 +- tests/bits/gerold_2.cc | 104 ++++++++++++++++++++++++++++++++ tests/bits/gerold_2/cmp/generic | 4 ++ 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 tests/bits/gerold_2.cc create mode 100644 tests/bits/gerold_2/cmp/generic diff --git a/tests/bits/Makefile b/tests/bits/Makefile index 850529a03d..a117de3452 100644 --- a/tests/bits/Makefile +++ b/tests/bits/Makefile @@ -39,7 +39,7 @@ tests_x = grid_generator_?? \ fe_face_to_cell_index \ fe_field_function \ anna_? \ - gerold_1 \ + gerold_? \ roy_1 \ denis_1 \ unit_support_points \ diff --git a/tests/bits/gerold_2.cc b/tests/bits/gerold_2.cc new file mode 100644 index 0000000000..6e6ccebebe --- /dev/null +++ b/tests/bits/gerold_2.cc @@ -0,0 +1,104 @@ +//---------------------------- gerold_2.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2002, 2003, 2004, 2005, 2009 by the deal.II authors and Anna Schneebeli +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- gerold_2.cc --------------------------- + + +// apply SparsityTools::reorder_Cuthill_McKee to the cell connectivity +// graph for the mesh used in gerold_2. apparently the mesh consists +// of two or more non-connected parts, and the reordering algorithm +// trips over that + +#include "../tests.h" +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include +#include + + +template +class LaplaceProblem +{ + public: + void run (); + private: + Triangulation triangulation; +}; + + +template +void LaplaceProblem::run () +{ + GridIn grid_in; + grid_in.attach_triangulation (triangulation); + + std::ifstream input_file("gerold_1.inp"); + grid_in.read_ucd(input_file); + + SparsityPattern cell_connectivity; + GridTools::get_face_connectivity_of_cells (triangulation, + cell_connectivity); + std::vector permutation(triangulation.n_active_cells()); + SparsityTools::reorder_Cuthill_McKee (cell_connectivity, permutation); + + for (unsigned int i=0; i laplace_problem_3d; + laplace_problem_3d.run (); + } + catch (std::exception &exc) + { + deallog << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + deallog << "Exception on processing: " << std::endl + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; + } + catch (...) + { + deallog << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + deallog << "Unknown exception!" << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; + }; + + return 0; +} diff --git a/tests/bits/gerold_2/cmp/generic b/tests/bits/gerold_2/cmp/generic new file mode 100644 index 0000000000..8274245d55 --- /dev/null +++ b/tests/bits/gerold_2/cmp/generic @@ -0,0 +1,4 @@ + +DEAL::Solving problem in 3 space dimensions. +DEAL::read ucd data file +DEAL::ucd data file readin exe -- 2.39.5