From: Martin Kronbichler Date: Tue, 1 Sep 2015 11:46:35 +0000 (+0200) Subject: Run astyle over testsuite. X-Git-Tag: v8.4.0-rc2~498^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1500%2Fhead;p=dealii.git Run astyle over testsuite. --- diff --git a/tests/algorithms/any_data_01.cc b/tests/algorithms/any_data_01.cc index 88200b64e4..9934a6c5f7 100644 --- a/tests/algorithms/any_data_01.cc +++ b/tests/algorithms/any_data_01.cc @@ -23,44 +23,44 @@ double d1 = 17.; -void fill(AnyData& data) +void fill(AnyData &data) { int i = 7; data.add(i, " i 7"); data.add(d1, " d 17."); - data.add(&d1, " d* 17."); - data.add(&d1, "cd* 17."); + data.add(&d1, " d* 17."); + data.add(&d1, "cd* 17."); d1 = 18.; } -void extract(const AnyData& data) +void extract(const AnyData &data) { // This set of tests with old functionality. Remove when deprecating // index access - for (unsigned int i=0;i(0) << std::endl; + << '\t' << data.entry(0) << std::endl; deallog << data.name(1) - << '\t' << data.entry(1) << std::endl; + << '\t' << data.entry(1) << std::endl; deallog << data.name(2) - << '\t' << *data.entry(2) << std::endl; + << '\t' << *data.entry(2) << std::endl; deallog << data.name(3) - << '\t' << *data.entry(3) << std::endl; + << '\t' << *data.entry(3) << std::endl; // From here on keep after deprecation int i1 = data.entry(" i 7"); const int i2 = data.entry(" i 7"); double d = data.entry(" d 17."); - double* p2 = data.entry(" d* 17."); - const double * p3 = data.entry("cd* 17."); - + double *p2 = data.entry(" d* 17."); + const double *p3 = data.entry("cd* 17."); + deallog << i1 << std::endl - << i2 << std::endl - << d << std::endl - << *p2 << std::endl - << *p3 << std::endl; + << i2 << std::endl + << d << std::endl + << *p2 << std::endl + << *p3 << std::endl; deallog << *data.try_read(" d 17.") << std::endl; @@ -73,7 +73,7 @@ void extract(const AnyData& data) deallog << "(nil)" << std::endl; else AssertThrow (false, ExcInternalError()); - + // try // { // double* p3a = data.entry("cd* 17."); @@ -93,11 +93,11 @@ void extract(const AnyData& data) int main() { deal_II_exceptions::disable_abort_on_exception(); - + std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - + AnyData data; fill(data); extract(data); diff --git a/tests/algorithms/newton_01.cc b/tests/algorithms/newton_01.cc index e09a5245aa..27beb91c33 100644 --- a/tests/algorithms/newton_01.cc +++ b/tests/algorithms/newton_01.cc @@ -68,7 +68,7 @@ public: void SquareRoot::residual (AnyData &out, const AnyData &in) { - Vector& v = *out.entry*>(0); + Vector &v = *out.entry*>(0); //residuum = 0 v(0) = 0.; const Vector &x = *in.entry*>("Newton iterate"); @@ -77,7 +77,7 @@ void SquareRoot::residual (AnyData &out, const AnyData &in) void SquareRoot::solve (AnyData &out, const AnyData &in) { - Vector& v = *out.entry*>(0); + Vector &v = *out.entry*>(0); v(0) = 0; const Vector &x = *in.entry*>("Newton iterate"); const Vector &r = *in.entry*>("Newton residual"); diff --git a/tests/algorithms/theta_01.cc b/tests/algorithms/theta_01.cc index aa9dd48734..ebfbfbbb9b 100644 --- a/tests/algorithms/theta_01.cc +++ b/tests/algorithms/theta_01.cc @@ -87,7 +87,7 @@ int main() solver.notify(Events::initial); solver(outdata, indata); deallog << "Result: " << value(0) << ' ' << value(1) - << " Norm " << value.l2_norm() << std::endl; + << " Norm " << value.l2_norm() << std::endl; } @@ -102,8 +102,8 @@ Explicit::Explicit(const FullMatrix &M) void Explicit::operator() (AnyData &out, const AnyData &in) { - const double* step = in.read_ptr("Timestep"); - + const double *step = in.read_ptr("Timestep"); + if (this->notifications.test(Events::initial) || this->notifications.test(Events::new_timestep_size)) { m.equ(-*step, *matrix); @@ -127,8 +127,8 @@ Implicit::Implicit(const FullMatrix &M) void Implicit::operator() (AnyData &out, const AnyData &in) { - const double * step = in.read_ptr("Timestep"); - + const double *step = in.read_ptr("Timestep"); + if (this->notifications.test(Events::initial) || this->notifications.test(Events::new_timestep_size)) { m.equ(*step, *matrix); diff --git a/tests/aniso/anisotropic_crash.cc b/tests/aniso/anisotropic_crash.cc index d7536a9541..c1ddd6fc60 100644 --- a/tests/aniso/anisotropic_crash.cc +++ b/tests/aniso/anisotropic_crash.cc @@ -56,9 +56,9 @@ int main() { switch (Testing::rand()%4) { - /// If a randomly drawn - /// number is 0 or 1 we - /// cut x or y, resp. + /// If a randomly drawn + /// number is 0 or 1 we + /// cut x or y, resp. case 0: cell->set_refine_flag( RefinementCase<2>::cut_axis(0) ); break; diff --git a/tests/base/anisotropic_1.cc b/tests/base/anisotropic_1.cc index 879343610b..17fd2b860a 100644 --- a/tests/base/anisotropic_1.cc +++ b/tests/base/anisotropic_1.cc @@ -138,14 +138,14 @@ void check_poly(const Point &x, deallog << "\t3rd\t"; for (unsigned int d1=0; d1> i; - AssertThrow (!in, ExcIO()); + AssertThrow (!in, ExcIO()); } diff --git a/tests/base/derivative_forms_01.cc b/tests/base/derivative_forms_01.cc index d75f649aee..125903b233 100644 --- a/tests/base/derivative_forms_01.cc +++ b/tests/base/derivative_forms_01.cc @@ -20,48 +20,50 @@ // Compute the derivative of F: R^dim -> R^spacedim // We construct the function F_i, i=[0,spacedim) -// and we compute the first and second derivatives using +// and we compute the first and second derivatives using // Sacado typedef typename Sacado::Fad::DFad Sdouble; typedef typename Sacado::Fad::DFad SSdouble; template -void test() { +void test() +{ Tensor<1,dim,SSdouble> x; - for(unsigned int j=0; j F; - for(unsigned int i=0; i dF; - for(unsigned int i=0; i ddF; - for(unsigned int i=0; i function(1); std::map constants; diff --git a/tests/base/function_parser_03.cc b/tests/base/function_parser_03.cc index e0347e3351..57ba539711 100644 --- a/tests/base/function_parser_03.cc +++ b/tests/base/function_parser_03.cc @@ -43,14 +43,14 @@ int main () double value = fp.value(Point<2>(2.0,2.5)); Assert(abs(1.0+2.0*2.5 - value) < 1e-10, ExcMessage("wrong value")); - + std::vector expressions; expressions.push_back("sin(2*mypi*x)+y"); constants["mypi"] = numbers::PI; fp.initialize("x,y", expressions, constants); double value1 = fp.value(Point<2>(1.0,2.5), 0); Assert(abs(2.5 - value1) < 1e-10, ExcMessage("wrong value")); - + } diff --git a/tests/base/function_parser_04.cc b/tests/base/function_parser_04.cc index cfbd11a77b..c4fc994468 100644 --- a/tests/base/function_parser_04.cc +++ b/tests/base/function_parser_04.cc @@ -37,11 +37,11 @@ struct scratch_data struct copy_data { - int value; - copy_data(): - value(0) - {} - + int value; + copy_data(): + value(0) + {} + }; @@ -53,11 +53,11 @@ void assemble(const std::vector::iterator &it, double value = fp.value(Point<2>(s, 2.5)); Assert(abs(1.0+s*2.5 - value) < 1e-10, ExcMessage("wrong value")); std::cout << data.value << std::endl; - + data.value = (abs(1.0+s*2.5 - value) < 1e-10)?1:0; } -void copy(int & value, const copy_data &data) +void copy(int &value, const copy_data &data) { value += data.value; } @@ -70,7 +70,7 @@ void test2() fp.initialize("s,t", "s*t+c", constants); std::vector v(10000); - for (unsigned int i=0;i constants; - + // FunctionParser with 2 variables and 1 component: FunctionParser<2> fp(1); fp.initialize(variables, - expression, - constants); + expression, + constants); // Point at which we want to evaluate the function Point<2> point(0.0, 4.0); // evaluate the expression at 'point': double result = fp.value(point); - + deallog << "Function '" << expression << "'" - << " @ " << point - << " is " << result << std::endl; + << " @ " << point + << " is " << result << std::endl; } @@ -54,8 +54,8 @@ void test2() // And populate it with the newly created objects. vector_function.initialize(variables, - expressions, - constants); + expressions, + constants); // Point at which we want to evaluate the function Point<3> point(0.0, 1.0, 1.0); @@ -71,9 +71,9 @@ void test2() // Output the evaluated function deallog << "Function '" << expressions[0] << "," << expressions[1] << "'" - << " @ " << point - << " is " << result << std::endl; - } + << " @ " << point + << " is " << result << std::endl; +} int main() @@ -82,5 +82,5 @@ int main() test1(); test2(); - + } diff --git a/tests/base/function_parser_06.cc b/tests/base/function_parser_06.cc index 52352bd951..31c2a1e044 100644 --- a/tests/base/function_parser_06.cc +++ b/tests/base/function_parser_06.cc @@ -26,24 +26,24 @@ #include -void eval(const std::string & exp, const Point<2> & p, double expected) +void eval(const std::string &exp, const Point<2> &p, double expected) { std::string variables = "x,y"; std::map constants; FunctionParser<2> fp(1); fp.initialize(variables, - exp, - constants); + exp, + constants); double result = fp.value(p); deallog << "'" << exp << "' @ " << p << " is " << result - << " ( expected " << expected << " )" << std::endl; + << " ( expected " << expected << " )" << std::endl; if (fabs(result-expected)>1e-10) deallog << "ERROR!" << std::endl; - - - + + + } @@ -57,7 +57,7 @@ void test() eval("if(x<1.0 | y<1.0,0,y)",Point<2>(1.5,1.5), 1.5); eval("if(x<1.0 | y<1.0,0,y)",Point<2>(1.5,0.5), 0.0); eval("if(x<1.0 | y<1.0,0,y)",Point<2>(0.5,-2), 0.0); - + eval("if(x<1.0 & y<1.0,0,y)",Point<2>(1.5,-2.0), -2.0); double x,y; @@ -68,7 +68,7 @@ void test() y=3.1; eval("atan2(x,y)",Point<2>(x,y), atan2(x,y)); - eval("if(x==1.0,0,y)",Point<2>(1.0,-2.0), 0.0); + eval("if(x==1.0,0,y)",Point<2>(1.0,-2.0), 0.0); eval("if(x==1.0,0,y)",Point<2>(1.1,-2.0), -2.0); eval("int(2.1)",Point<2>(1.1,-2.0), 2.0); diff --git a/tests/base/function_parser_07.cc b/tests/base/function_parser_07.cc index 41d47772b5..70e35bbe73 100644 --- a/tests/base/function_parser_07.cc +++ b/tests/base/function_parser_07.cc @@ -28,19 +28,19 @@ #include -void eval(const std::string & exp, const Point<2> & p, double expected) +void eval(const std::string &exp, const Point<2> &p, double expected) { std::string variables = "x,y"; std::map constants; FunctionParser<2> fp(1); fp.initialize(variables, - exp, - constants); + exp, + constants); double result = fp.value(p); deallog << "'" << exp << "' @ " << p << " is " << result - << " ( expected " << expected << " )" << std::endl; + << " ( expected " << expected << " )" << std::endl; if (fabs(result-expected)>1e-10) deallog << "ERROR!" << std::endl; } @@ -56,7 +56,7 @@ void test() eval("if (x<1.0 | y<1.0,0,y)",Point<2>(1.5,1.5), 1.5); eval("if (x<1.0 | y<1.0,0,y)",Point<2>(1.5,0.5), 0.0); eval("if (x<1.0 | y<1.0,0,y)",Point<2>(0.5,-2), 0.0); - + eval("if (x<1.0 & y<1.0,0,y)",Point<2>(1.5,-2.0), -2.0); double x,y; @@ -67,7 +67,7 @@ void test() y=3.1; eval("atan2 (x,y)",Point<2>(x,y), atan2(x,y)); - eval("if (x==1.0,0,y)",Point<2>(1.0,-2.0), 0.0); + eval("if (x==1.0,0,y)",Point<2>(1.0,-2.0), 0.0); eval("if (x==1.0,0,y)",Point<2>(1.1,-2.0), -2.0); eval("int (2.1)",Point<2>(1.1,-2.0), 2.0); diff --git a/tests/base/functions_04.cc b/tests/base/functions_04.cc index 2a4d8fa28f..819c50c86b 100644 --- a/tests/base/functions_04.cc +++ b/tests/base/functions_04.cc @@ -181,7 +181,7 @@ check_function(const Functions::FlowFunction &f, { names[i] = std::string("comp"); } - + DataOutBase::DXFlags dxflags; DataOutBase::GnuplotFlags gflags; std::vector > vectors; diff --git a/tests/base/generate_normal_random_number_01.cc b/tests/base/generate_normal_random_number_01.cc index f12745227f..278dd9e789 100644 --- a/tests/base/generate_normal_random_number_01.cc +++ b/tests/base/generate_normal_random_number_01.cc @@ -31,7 +31,7 @@ std::pair test () { const double mu = 13; const double sigma = 3; - + unsigned int N = 1000000; double sum = 0; double sum_square = 0; @@ -70,18 +70,18 @@ int main() tg[1].join(); tg[2].join(); tg[3].join(); - - + + // the random number generator is thread-local, so we should get the // same result every time deallog << tg[0].return_value().first - << ' ' - << tg[0].return_value().second - << std::endl; + << ' ' + << tg[0].return_value().second + << std::endl; AssertThrow (tg[1].return_value() == tg[0].return_value(), - ExcInternalError()); + ExcInternalError()); AssertThrow (tg[2].return_value() == tg[0].return_value(), - ExcInternalError()); + ExcInternalError()); AssertThrow (tg[3].return_value() == tg[0].return_value(), - ExcInternalError()); + ExcInternalError()); } diff --git a/tests/base/graph_coloring_01.cc b/tests/base/graph_coloring_01.cc index 760703a74a..630f63c3e2 100644 --- a/tests/base/graph_coloring_01.cc +++ b/tests/base/graph_coloring_01.cc @@ -34,7 +34,7 @@ template std::vector get_conflict_indices_cfem( - typename DoFHandler::active_cell_iterator const &it) + typename DoFHandler::active_cell_iterator const &it) { std::vector local_dof_indices(it->get_fe().dofs_per_cell); it->get_dof_indices(local_dof_indices); @@ -56,19 +56,19 @@ void check() // Create the coloring typename DoFHandler::active_cell_iterator cell(dof_handler.begin_active()); std::vector::active_cell_iterator> > coloring( - GraphColoring::make_graph_coloring(cell,dof_handler.end(), - std_cxx11::function (typename - DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); + GraphColoring::make_graph_coloring(cell,dof_handler.end(), + std_cxx11::function (typename + DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); // Output the coloring for (unsigned int color=0; colorcenter()[j]<<" "; - deallog<center()[j]<<" "; + deallog< std::vector get_conflict_indices_cfem( - typename DoFHandler::active_cell_iterator const &it) + typename DoFHandler::active_cell_iterator const &it) { std::vector local_dof_indices(it->get_fe().dofs_per_cell); it->get_dof_indices(local_dof_indices); @@ -57,28 +57,28 @@ void check() typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); for (; cellcenter()[0]==0.625) && (cell->center()[1]==0.625)) - cell->set_refine_flag(); - } + { + if ((cell->center()[0]==0.625) && (cell->center()[1]==0.625)) + cell->set_refine_flag(); + } triangulation.execute_coarsening_and_refinement(); dof_handler.distribute_dofs(fe); // Create the coloring std::vector::active_cell_iterator> > coloring( - GraphColoring::make_graph_coloring(dof_handler.begin_active(),dof_handler.end(), - std_cxx11::function (typename - DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); + GraphColoring::make_graph_coloring(dof_handler.begin_active(),dof_handler.end(), + std_cxx11::function (typename + DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); // Output the coloring for (unsigned int color=0; colorcenter()[j]<<" "; - deallog<center()[j]<<" "; + deallog< std::vector get_conflict_indices_cfem( - typename hp::DoFHandler::active_cell_iterator const &it) + typename hp::DoFHandler::active_cell_iterator const &it) { std::vector local_dof_indices(it->get_fe().dofs_per_cell); it->get_dof_indices(local_dof_indices); @@ -68,19 +68,19 @@ void check() // Create the coloring std::vector::active_cell_iterator> > coloring( - GraphColoring::make_graph_coloring(dof_handler.begin_active(),dof_handler.end(), - std_cxx11::function (typename - hp::DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); + GraphColoring::make_graph_coloring(dof_handler.begin_active(),dof_handler.end(), + std_cxx11::function (typename + hp::DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); // Output the coloring for (unsigned int color=0; colorcenter()[j]<<" "; - deallog<center()[j]<<" "; + deallog< std::vector get_conflict_indices_cfem( - typename DoFHandler::active_cell_iterator const &it) + typename DoFHandler::active_cell_iterator const &it) { std::vector local_dof_indices(it->get_fe().dofs_per_cell); it->get_dof_indices(local_dof_indices); @@ -58,34 +58,34 @@ void check() typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); for (; cellcenter()[0]==0.625) && (cell->center()[1]==0.625)) - cell->set_refine_flag(); - } + { + if ((cell->center()[0]==0.625) && (cell->center()[1]==0.625)) + cell->set_refine_flag(); + } triangulation.execute_coarsening_and_refinement(); dof_handler.distribute_dofs(fe); // Create the coloring std::vector::active_cell_iterator> > coloring( - GraphColoring::make_graph_coloring(dof_handler.begin_active(),dof_handler.end(), - std_cxx11::function (typename - DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); + GraphColoring::make_graph_coloring(dof_handler.begin_active(),dof_handler.end(), + std_cxx11::function (typename + DoFHandler::active_cell_iterator const &)> (&get_conflict_indices_cfem))); // Check that a color does not contain a conflict index twice for (unsigned int color=0; color color_set; - for (unsigned int i=0; i dofs = get_conflict_indices_cfem(coloring[color][i]); - for (unsigned int j=0; j color_set; + for (unsigned int i=0; i dofs = get_conflict_indices_cfem(coloring[color][i]); + for (unsigned int j=0; j std::vector get_conflict_indices_cfem( - typename DoFHandler::active_cell_iterator const &it) + typename DoFHandler::active_cell_iterator const &it) { std::vector local_dof_indices(it->get_fe().dofs_per_cell); it->get_dof_indices(local_dof_indices); @@ -46,7 +46,7 @@ template void check() { deallog << "dim=" << dim << std::endl; - + // Create the Triangulation and the DoFHandler Triangulation triangulation; GridGenerator::hyper_cube(triangulation, -1, 1); @@ -59,25 +59,25 @@ void check() for (unsigned int l=0; l<11-2*dim; ++l) { typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); for (; cellcenter().distance (Point()) < cell->diameter()) - cell->set_refine_flag(); + if (cell->center().distance (Point()) < cell->diameter()) + cell->set_refine_flag(); triangulation.execute_coarsening_and_refinement(); } dof_handler.distribute_dofs(fe); deallog << "Total number of cells = " << triangulation.n_active_cells() - << std::endl; - + << std::endl; + // Create the coloring std::vector::active_cell_iterator> > - coloring + coloring = GraphColoring::make_graph_coloring(dof_handler.begin_active(), - dof_handler.end(), - std_cxx11::function - (typename DoFHandler::active_cell_iterator const &)> - (&get_conflict_indices_cfem)); + dof_handler.end(), + std_cxx11::function + (typename DoFHandler::active_cell_iterator const &)> + (&get_conflict_indices_cfem)); for (unsigned int color=0; coloris_valid() || index_set.n_elements()==0, ExcInternalError()); - it = index_set.end_intervals(); - Assert(!it->is_valid(), ExcInternalError()); + IndexSet::IntervalIterator it = index_set.begin_intervals(); + Assert(it->is_valid() || index_set.n_elements()==0, ExcInternalError()); + it = index_set.end_intervals(); + Assert(!it->is_valid(), ExcInternalError()); } // Construct empty iterator { - IndexSet::IntervalIterator it; - Assert(!it->is_valid(), ExcInternalError()); - it = index_set.begin_intervals(); - Assert(it->is_valid() || index_set.n_elements()==0, ExcInternalError()); + IndexSet::IntervalIterator it; + Assert(!it->is_valid(), ExcInternalError()); + it = index_set.begin_intervals(); + Assert(it->is_valid() || index_set.n_elements()==0, ExcInternalError()); } } diff --git a/tests/base/index_set_readwrite_03.cc b/tests/base/index_set_readwrite_03.cc index a52031d864..971c2599c8 100644 --- a/tests/base/index_set_readwrite_03.cc +++ b/tests/base/index_set_readwrite_03.cc @@ -46,7 +46,7 @@ void test () Assert(is1 == is2, ExcInternalError()); deallog << is1.is_element(4) << " " << is2.is_element(4) << std::endl; - + deallog << "OK" << std::endl; std::remove ("a.idxset"); diff --git a/tests/base/is_finite.cc b/tests/base/is_finite.cc index bc71920e8d..5b9dc73d24 100644 --- a/tests/base/is_finite.cc +++ b/tests/base/is_finite.cc @@ -73,7 +73,7 @@ int main () fedisableexcept(FE_INVALID); #endif - + check (); check (); diff --git a/tests/base/log_nan.cc b/tests/base/log_nan.cc index cc43164a4e..d37c6b9b7a 100644 --- a/tests/base/log_nan.cc +++ b/tests/base/log_nan.cc @@ -41,7 +41,7 @@ int main () #if defined(DEAL_II_HAVE_FP_EXCEPTIONS) fedisableexcept(FE_INVALID); #endif - + deallog << std::numeric_limits::quiet_NaN() << std::endl; deallog << std::numeric_limits::signaling_NaN() << std::endl; diff --git a/tests/base/polynomial_test.cc b/tests/base/polynomial_test.cc index 9cc7ce8048..ab8f3251b6 100644 --- a/tests/base/polynomial_test.cc +++ b/tests/base/polynomial_test.cc @@ -112,14 +112,14 @@ void check_poly(const Point &x, deallog << "\t3rd\t"; for (unsigned int d1=0; d1 -void check_quadrature (double*); -void check_GRC_right(double*); +void check_quadrature (double *); +void check_GRC_right(double *); int main() { // this stores the exact values of \int_0^1 x^i/sqrt(x(1-x)) dx static double exact_monomials[32]; - + exact_monomials[0] = 3.141592653589793; exact_monomials[1] = 1.570796326794897; exact_monomials[2] = 1.178097245096172; @@ -80,7 +80,7 @@ int main() deallog.depth_console(0); deallog.threshold_double(1.e-10); deallog << std::setprecision(8); - + deallog << "* 1d Gauss-Chebyshev" << std::endl; check_quadrature,1>(&exact_monomials[0]); @@ -101,34 +101,34 @@ template void check_quadrature(double *exact_monomials) { - for (unsigned int n=startn; n<18; ++n) + for (unsigned int n=startn; n<18; ++n) { - quadrature_type quadrature(n); - const std::vector > &points =quadrature.get_points(); - const std::vector &weights=quadrature.get_weights(); - - - for (unsigned int i=0; i<32; ++i) - { - long double quadrature_int=0; - double err = 0; - - // Check the integral - // x^i/sqrt(x(1-x)) - long double f=1.; - for (unsigned int x=0; x(points[x](0)), i*1.0L); - quadrature_int+=f*static_cast(weights[x]); - } - err = std::fabs(quadrature_int-exact_monomials[i]); - deallog << "Quadrature order " << n << ", polynomial of degree " << i << ": "; - - if (err < 1.e-15) - deallog << "exact." << std::endl; - else - deallog << "error " << err << std::endl; - } + quadrature_type quadrature(n); + const std::vector > &points =quadrature.get_points(); + const std::vector &weights=quadrature.get_weights(); + + + for (unsigned int i=0; i<32; ++i) + { + long double quadrature_int=0; + double err = 0; + + // Check the integral + // x^i/sqrt(x(1-x)) + long double f=1.; + for (unsigned int x=0; x(points[x](0)), i*1.0L); + quadrature_int+=f*static_cast(weights[x]); + } + err = std::fabs(quadrature_int-exact_monomials[i]); + deallog << "Quadrature order " << n << ", polynomial of degree " << i << ": "; + + if (err < 1.e-15) + deallog << "exact." << std::endl; + else + deallog << "error " << err << std::endl; + } } } @@ -139,32 +139,32 @@ void check_GRC_right (double *exact_monomials) for (unsigned int n=1; n<18; ++n) { - QGaussRadauChebyshev<1> quadrature(n,QGaussRadauChebyshev<1>::right); - const std::vector > &points=quadrature.get_points(); - const std::vector &weights=quadrature.get_weights(); + QGaussRadauChebyshev<1> quadrature(n,QGaussRadauChebyshev<1>::right); + const std::vector > &points=quadrature.get_points(); + const std::vector &weights=quadrature.get_weights(); - for (unsigned int i=0; i<32; ++i) - { - long double quadrature_int=0; - double err = 0; + for (unsigned int i=0; i<32; ++i) + { + long double quadrature_int=0; + double err = 0; // Check the integral // x^i/sqrt(x(1-x)) - long double f=1.; - for (unsigned int x=0; x(points[x](0)), i*1.0L); - quadrature_int+=f*static_cast(weights[x]); - } - err = std::fabs(quadrature_int-exact_monomials[i]); - deallog << "Quadrature order " << n << ", polynomial of degree " << i << ": "; - - if (err < 1.e-15) - deallog << "exact." << std::endl; - else - deallog << "error " << err << std::endl; - } + long double f=1.; + for (unsigned int x=0; x(points[x](0)), i*1.0L); + quadrature_int+=f*static_cast(weights[x]); + } + err = std::fabs(quadrature_int-exact_monomials[i]); + deallog << "Quadrature order " << n << ", polynomial of degree " << i << ": "; + + if (err < 1.e-15) + deallog << "exact." << std::endl; + else + deallog << "error " << err << std::endl; + } } } diff --git a/tests/base/quadrature_sorted_test.cc b/tests/base/quadrature_sorted_test.cc index 507cc505c1..f75366e39b 100644 --- a/tests/base/quadrature_sorted_test.cc +++ b/tests/base/quadrature_sorted_test.cc @@ -178,23 +178,28 @@ check_faces (const std::vector*>& quadratures, const bool sub) template void -check_quadratures (const std::vector*>& quadratures) { - for(unsigned int i=0; i &quad = *quadratures[i]; - bool check = true; - for(unsigned int q=1; q*> &quadratures) +{ + for (unsigned int i=0; i &quad = *quadratures[i]; + bool check = true; + for (unsigned int q=1; q t (3); @@ -62,7 +62,7 @@ main () // rank=2 { deallog << "rank=2" << std::endl; - + const double entries[] = { 1, 2, 3, 4, 5, 6 }; // create a 2x3 table from this @@ -71,9 +71,9 @@ main () for (unsigned int i=0; i t (2,3,2); @@ -101,14 +102,14 @@ main () for (unsigned int i=0; i t (2,3); std::istringstream in1(elements); t.fill (std::istream_iterator(in1), - true); + true); for (unsigned int i=0; i(in2), - false); + false); for (unsigned int i=0; i t (3, entries, true); for (unsigned int i=0; i t (3, entries, false); for (unsigned int i=0; i t (2, 3, entries, true); for (unsigned int i=0; i t (2, 3, entries, false); for (unsigned int i=0; i t (2,3,2, entries, true); for (unsigned int i=0; i t (2,3,2, entries, false); for (unsigned int i=0; i::reinit(TableIndices) work +// check that Table<{1,2,3},T>::reinit(TableIndices) work #include "../tests.h" #include diff --git a/tests/base/task_11.cc b/tests/base/task_11.cc index 46b4400e8c..7304644e25 100644 --- a/tests/base/task_11.cc +++ b/tests/base/task_11.cc @@ -75,7 +75,7 @@ int main() deallog.threshold_double(1.e-10); const unsigned int n = testing_max_num_threads(); - + // if we have a machine with less than 5 cores fake the output: if (MultithreadInfo::n_threads() - const Tensor<1,dim,std::complex > right = + const Tensor<1,dim,std::complex > right = t * std::complex (1,2); // multiply on the left by a complex - const Tensor<1,dim,std::complex > left = + const Tensor<1,dim,std::complex > left = std::complex (1,2) * t; // they should yield the same result Assert (left == right, ExcInternalError ()); deallog << "dim = " << dim << std::endl - << left << " : " << right << std::endl; + << left << " : " << right << std::endl; } diff --git a/tests/base/tensor_complex_06.cc b/tests/base/tensor_complex_06.cc index e27d3e071f..8b8eb8d87a 100644 --- a/tests/base/tensor_complex_06.cc +++ b/tests/base/tensor_complex_06.cc @@ -31,7 +31,7 @@ void test_tensor_01 () { t[i] = std::complex (i,1); } - const Tensor<1,dim,std::complex > res = + const Tensor<1,dim,std::complex > res = t * std::complex (1,2); deallog << "dim = " << dim << ": " << res << std::endl; @@ -46,7 +46,7 @@ void test_tensor_02 () { t[i] = std::complex (1,i); } - const Tensor<1,dim,std::complex > res = + const Tensor<1,dim,std::complex > res = t * std::complex (1,2); deallog << "dim = " << dim << ": " << res << std::endl; diff --git a/tests/base/thread_local_storage_03.cc b/tests/base/thread_local_storage_03.cc index 11342c4ecd..00dffee92e 100644 --- a/tests/base/thread_local_storage_03.cc +++ b/tests/base/thread_local_storage_03.cc @@ -51,7 +51,7 @@ void test () t = Threads::new_thread (&X::f, x); AssertThrow (t.return_value() == 42, - ExcInternalError()); + ExcInternalError()); } diff --git a/tests/base/thread_local_storage_04.cc b/tests/base/thread_local_storage_04.cc index 962ea09be8..6ac26262b2 100644 --- a/tests/base/thread_local_storage_04.cc +++ b/tests/base/thread_local_storage_04.cc @@ -54,13 +54,13 @@ void test () Threads::Thread t; t = Threads::new_thread (&X::f, x); AssertThrow (t.return_value() == 10, - ExcInternalError()); + ExcInternalError()); } { Threads::Thread t; t = Threads::new_thread (&X::f, x); AssertThrow (t.return_value() == 11, - ExcInternalError()); + ExcInternalError()); } AssertThrow (counter == 12, ExcInternalError()); diff --git a/tests/base/threads_02.cc b/tests/base/threads_02.cc index ecd7a4a685..e16ca0009b 100644 --- a/tests/base/threads_02.cc +++ b/tests/base/threads_02.cc @@ -19,1630 +19,2442 @@ #include #include template struct X {}; -struct U { +struct U +{ virtual ~U () {} - X<0> foo_0 () { + X<0> foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_0 () { + static X<0> static_foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_0 () { + X<0> &ref_foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_0 () { + static X<0> &static_ref_foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_0 () { + static const X<0> &static_const_ref_foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_0 () { + X<0> foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_0 () { + static X<0> static_foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_0 () { + X<0> &ref_foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_0 () { + const X<0> &const_ref_foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_0 () { + const X<0> &const_ref_foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_0 () { + const X<0> &const_ref_foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_0_const ()const { + const X<0> &const_ref_foo_0_const ()const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_0_const ()const { + const X<0> &const_ref_foo_ref_0_const ()const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_0_const ()const { + const X<0> &const_ref_foo_const_ref_0_const ()const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_0 () { + virtual const X<0> &virtual_const_ref_foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_0 () { + virtual const X<0> &virtual_const_ref_foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_0 () { + virtual const X<0> &virtual_const_ref_foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_0_const ()const { + virtual const X<0> &virtual_const_ref_foo_0_const ()const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_0_const ()const { + virtual const X<0> &virtual_const_ref_foo_ref_0_const ()const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_0_const ()const { + virtual const X<0> &virtual_const_ref_foo_const_ref_0_const ()const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_0 () { + static X<0> &static_ref_foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_0 () { + static const X<0> &static_const_ref_foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_0 () { + X<0> foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_0 () { + static X<0> static_foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_0 () { + X<0> &ref_foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_0 () { + static X<0> &static_ref_foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_0 () { + static const X<0> &static_const_ref_foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_0_const () const { + X<0> foo_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_0_const () const { + X<0> &ref_foo_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_0_const () const { + X<0> foo_ref_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_0_const () const { + X<0> &ref_foo_ref_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_0_const () const { + X<0> foo_const_ref_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_0_const () const { + X<0> &ref_foo_const_ref_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_0_const () const { + virtual X<0> virtual_foo_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_0_const () const { + virtual X<0> &virtual_ref_foo_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_0_const () const { + virtual X<0> virtual_foo_ref_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_0_const () const { + virtual X<0> &virtual_ref_foo_ref_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_0_const () const { + virtual X<0> virtual_foo_const_ref_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_0_const () const { + virtual X<0> &virtual_ref_foo_const_ref_0_const () const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_0 () { + virtual X<0> virtual_foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_0 () { + virtual X<0> &virtual_ref_foo_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_0 () { + virtual X<0> virtual_foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_0 () { + virtual X<0> &virtual_ref_foo_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_0 () { + virtual X<0> virtual_foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_0 () { + virtual X<0> &virtual_ref_foo_const_ref_0 () + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_1 (X<1>) { + X<0> foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_1 (X<1>) { + static X<0> static_foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_1 (X<1>) { + X<0> &ref_foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_1 (X<1>) { + static X<0> &static_ref_foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_1 (X<1>) { + static const X<0> &static_const_ref_foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_1 (X<1>&) { + X<0> foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_1 (X<1>&) { + static X<0> static_foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_1 (X<1>&) { + X<0> &ref_foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_1 (X<1>) { + const X<0> &const_ref_foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_1 (X<1>&) { + const X<0> &const_ref_foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_1 (X<1>&) { + const X<0> &const_ref_foo_const_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_1_const (X<1>)const { + const X<0> &const_ref_foo_1_const (X<1>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_1_const (X<1>&)const { + const X<0> &const_ref_foo_ref_1_const (X<1> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_1_const (X<1>&)const { + const X<0> &const_ref_foo_const_ref_1_const (X<1> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_1 (X<1>) { + virtual const X<0> &virtual_const_ref_foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_1 (X<1>&) { + virtual const X<0> &virtual_const_ref_foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_1 (X<1>&) { + virtual const X<0> &virtual_const_ref_foo_const_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_1_const (X<1>)const { + virtual const X<0> &virtual_const_ref_foo_1_const (X<1>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_1_const (X<1>&)const { + virtual const X<0> &virtual_const_ref_foo_ref_1_const (X<1> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_1_const (X<1>&)const { + virtual const X<0> &virtual_const_ref_foo_const_ref_1_const (X<1> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_1 (X<1>&) { + static X<0> &static_ref_foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_1 (X<1>&) { + static const X<0> &static_const_ref_foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_1 (const X<1>&) { + X<0> foo_const_ref_1 (const X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_1 (const X<1>&) { + static X<0> static_foo_const_ref_1 (const X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_1 (const X<1>&) { + X<0> &ref_foo_const_ref_1 (const X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_1 (const X<1>&) { + static X<0> &static_ref_foo_const_ref_1 (const X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_1 (const X<1>&) { + static const X<0> &static_const_ref_foo_const_ref_1 (const X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_1_const (X<1>) const { + X<0> foo_1_const (X<1>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_1_const (X<1>) const { + X<0> &ref_foo_1_const (X<1>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_1_const (X<1>&) const { + X<0> foo_ref_1_const (X<1> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_1_const (X<1>&) const { + X<0> &ref_foo_ref_1_const (X<1> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_1_const (const X<1>&) const { + X<0> foo_const_ref_1_const (const X<1> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_1_const (const X<1>&) const { + X<0> &ref_foo_const_ref_1_const (const X<1> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_1_const (X<1>) const { + virtual X<0> virtual_foo_1_const (X<1>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_1_const (X<1>) const { + virtual X<0> &virtual_ref_foo_1_const (X<1>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_1_const (X<1>&) const { + virtual X<0> virtual_foo_ref_1_const (X<1> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_1_const (X<1>&) const { + virtual X<0> &virtual_ref_foo_ref_1_const (X<1> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_1_const (const X<1>&) const { + virtual X<0> virtual_foo_const_ref_1_const (const X<1> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_1_const (const X<1>&) const { + virtual X<0> &virtual_ref_foo_const_ref_1_const (const X<1> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_1 (X<1>) { + virtual X<0> virtual_foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_1 (X<1>) { + virtual X<0> &virtual_ref_foo_1 (X<1>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_1 (X<1>&) { + virtual X<0> virtual_foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_1 (X<1>&) { + virtual X<0> &virtual_ref_foo_ref_1 (X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_1 (const X<1>&) { + virtual X<0> virtual_foo_const_ref_1 (const X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_1 (const X<1>&) { + virtual X<0> &virtual_ref_foo_const_ref_1 (const X<1> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_2 (X<1>,X<2>) { + X<0> foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_2 (X<1>,X<2>) { + static X<0> static_foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_2 (X<1>,X<2>) { + X<0> &ref_foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_2 (X<1>,X<2>) { + static X<0> &static_ref_foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_2 (X<1>,X<2>) { + static const X<0> &static_const_ref_foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_2 (X<1>&,X<2>&) { + X<0> foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_2 (X<1>&,X<2>&) { + static X<0> static_foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_2 (X<1>&,X<2>&) { + X<0> &ref_foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_2 (X<1>,X<2>) { + const X<0> &const_ref_foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_2 (X<1>&,X<2>&) { + const X<0> &const_ref_foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_2 (X<1>&,X<2>&) { + const X<0> &const_ref_foo_const_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_2_const (X<1>,X<2>)const { + const X<0> &const_ref_foo_2_const (X<1>,X<2>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_2_const (X<1>&,X<2>&)const { + const X<0> &const_ref_foo_ref_2_const (X<1> &,X<2> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_2_const (X<1>&,X<2>&)const { + const X<0> &const_ref_foo_const_ref_2_const (X<1> &,X<2> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_2 (X<1>,X<2>) { + virtual const X<0> &virtual_const_ref_foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_2 (X<1>&,X<2>&) { + virtual const X<0> &virtual_const_ref_foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_2 (X<1>&,X<2>&) { + virtual const X<0> &virtual_const_ref_foo_const_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_2_const (X<1>,X<2>)const { + virtual const X<0> &virtual_const_ref_foo_2_const (X<1>,X<2>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_2_const (X<1>&,X<2>&)const { + virtual const X<0> &virtual_const_ref_foo_ref_2_const (X<1> &,X<2> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_2_const (X<1>&,X<2>&)const { + virtual const X<0> &virtual_const_ref_foo_const_ref_2_const (X<1> &,X<2> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_2 (X<1>&,X<2>&) { + static X<0> &static_ref_foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_2 (X<1>&,X<2>&) { + static const X<0> &static_const_ref_foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_2 (const X<1>&,const X<2>&) { + X<0> foo_const_ref_2 (const X<1> &,const X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_2 (const X<1>&,const X<2>&) { + static X<0> static_foo_const_ref_2 (const X<1> &,const X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_2 (const X<1>&,const X<2>&) { + X<0> &ref_foo_const_ref_2 (const X<1> &,const X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_2 (const X<1>&,const X<2>&) { + static X<0> &static_ref_foo_const_ref_2 (const X<1> &,const X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_2 (const X<1>&,const X<2>&) { + static const X<0> &static_const_ref_foo_const_ref_2 (const X<1> &,const X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_2_const (X<1>,X<2>) const { + X<0> foo_2_const (X<1>,X<2>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_2_const (X<1>,X<2>) const { + X<0> &ref_foo_2_const (X<1>,X<2>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_2_const (X<1>&,X<2>&) const { + X<0> foo_ref_2_const (X<1> &,X<2> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_2_const (X<1>&,X<2>&) const { + X<0> &ref_foo_ref_2_const (X<1> &,X<2> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_2_const (const X<1>&,const X<2>&) const { + X<0> foo_const_ref_2_const (const X<1> &,const X<2> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_2_const (const X<1>&,const X<2>&) const { + X<0> &ref_foo_const_ref_2_const (const X<1> &,const X<2> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_2_const (X<1>,X<2>) const { + virtual X<0> virtual_foo_2_const (X<1>,X<2>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_2_const (X<1>,X<2>) const { + virtual X<0> &virtual_ref_foo_2_const (X<1>,X<2>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_2_const (X<1>&,X<2>&) const { + virtual X<0> virtual_foo_ref_2_const (X<1> &,X<2> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_2_const (X<1>&,X<2>&) const { + virtual X<0> &virtual_ref_foo_ref_2_const (X<1> &,X<2> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_2_const (const X<1>&,const X<2>&) const { + virtual X<0> virtual_foo_const_ref_2_const (const X<1> &,const X<2> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_2_const (const X<1>&,const X<2>&) const { + virtual X<0> &virtual_ref_foo_const_ref_2_const (const X<1> &,const X<2> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_2 (X<1>,X<2>) { + virtual X<0> virtual_foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_2 (X<1>,X<2>) { + virtual X<0> &virtual_ref_foo_2 (X<1>,X<2>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_2 (X<1>&,X<2>&) { + virtual X<0> virtual_foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_2 (X<1>&,X<2>&) { + virtual X<0> &virtual_ref_foo_ref_2 (X<1> &,X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_2 (const X<1>&,const X<2>&) { + virtual X<0> virtual_foo_const_ref_2 (const X<1> &,const X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_2 (const X<1>&,const X<2>&) { + virtual X<0> &virtual_ref_foo_const_ref_2 (const X<1> &,const X<2> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_3 (X<1>,X<2>,X<3>) { + X<0> foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_3 (X<1>,X<2>,X<3>) { + static X<0> static_foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_3 (X<1>,X<2>,X<3>) { + X<0> &ref_foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_3 (X<1>,X<2>,X<3>) { + static X<0> &static_ref_foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_3 (X<1>,X<2>,X<3>) { + static const X<0> &static_const_ref_foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_3 (X<1>&,X<2>&,X<3>&) { + X<0> foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_3 (X<1>&,X<2>&,X<3>&) { + static X<0> static_foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_3 (X<1>&,X<2>&,X<3>&) { + X<0> &ref_foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_3 (X<1>,X<2>,X<3>) { + const X<0> &const_ref_foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_3 (X<1>&,X<2>&,X<3>&) { + const X<0> &const_ref_foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_3 (X<1>&,X<2>&,X<3>&) { + const X<0> &const_ref_foo_const_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_3_const (X<1>,X<2>,X<3>)const { + const X<0> &const_ref_foo_3_const (X<1>,X<2>,X<3>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_3_const (X<1>&,X<2>&,X<3>&)const { + const X<0> &const_ref_foo_ref_3_const (X<1> &,X<2> &,X<3> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_3_const (X<1>&,X<2>&,X<3>&)const { + const X<0> &const_ref_foo_const_ref_3_const (X<1> &,X<2> &,X<3> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_3 (X<1>,X<2>,X<3>) { + virtual const X<0> &virtual_const_ref_foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_3 (X<1>&,X<2>&,X<3>&) { + virtual const X<0> &virtual_const_ref_foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_3 (X<1>&,X<2>&,X<3>&) { + virtual const X<0> &virtual_const_ref_foo_const_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_3_const (X<1>,X<2>,X<3>)const { + virtual const X<0> &virtual_const_ref_foo_3_const (X<1>,X<2>,X<3>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_3_const (X<1>&,X<2>&,X<3>&)const { + virtual const X<0> &virtual_const_ref_foo_ref_3_const (X<1> &,X<2> &,X<3> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_3_const (X<1>&,X<2>&,X<3>&)const { + virtual const X<0> &virtual_const_ref_foo_const_ref_3_const (X<1> &,X<2> &,X<3> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_3 (X<1>&,X<2>&,X<3>&) { + static X<0> &static_ref_foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_3 (X<1>&,X<2>&,X<3>&) { + static const X<0> &static_const_ref_foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_3 (const X<1>&,const X<2>&,const X<3>&) { + X<0> foo_const_ref_3 (const X<1> &,const X<2> &,const X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_3 (const X<1>&,const X<2>&,const X<3>&) { + static X<0> static_foo_const_ref_3 (const X<1> &,const X<2> &,const X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_3 (const X<1>&,const X<2>&,const X<3>&) { + X<0> &ref_foo_const_ref_3 (const X<1> &,const X<2> &,const X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_3 (const X<1>&,const X<2>&,const X<3>&) { + static X<0> &static_ref_foo_const_ref_3 (const X<1> &,const X<2> &,const X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_3 (const X<1>&,const X<2>&,const X<3>&) { + static const X<0> &static_const_ref_foo_const_ref_3 (const X<1> &,const X<2> &,const X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_3_const (X<1>,X<2>,X<3>) const { + X<0> foo_3_const (X<1>,X<2>,X<3>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_3_const (X<1>,X<2>,X<3>) const { + X<0> &ref_foo_3_const (X<1>,X<2>,X<3>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_3_const (X<1>&,X<2>&,X<3>&) const { + X<0> foo_ref_3_const (X<1> &,X<2> &,X<3> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_3_const (X<1>&,X<2>&,X<3>&) const { + X<0> &ref_foo_ref_3_const (X<1> &,X<2> &,X<3> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_3_const (const X<1>&,const X<2>&,const X<3>&) const { + X<0> foo_const_ref_3_const (const X<1> &,const X<2> &,const X<3> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_3_const (const X<1>&,const X<2>&,const X<3>&) const { + X<0> &ref_foo_const_ref_3_const (const X<1> &,const X<2> &,const X<3> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_3_const (X<1>,X<2>,X<3>) const { + virtual X<0> virtual_foo_3_const (X<1>,X<2>,X<3>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_3_const (X<1>,X<2>,X<3>) const { + virtual X<0> &virtual_ref_foo_3_const (X<1>,X<2>,X<3>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_3_const (X<1>&,X<2>&,X<3>&) const { + virtual X<0> virtual_foo_ref_3_const (X<1> &,X<2> &,X<3> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_3_const (X<1>&,X<2>&,X<3>&) const { + virtual X<0> &virtual_ref_foo_ref_3_const (X<1> &,X<2> &,X<3> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_3_const (const X<1>&,const X<2>&,const X<3>&) const { + virtual X<0> virtual_foo_const_ref_3_const (const X<1> &,const X<2> &,const X<3> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_3_const (const X<1>&,const X<2>&,const X<3>&) const { + virtual X<0> &virtual_ref_foo_const_ref_3_const (const X<1> &,const X<2> &,const X<3> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_3 (X<1>,X<2>,X<3>) { + virtual X<0> virtual_foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_3 (X<1>,X<2>,X<3>) { + virtual X<0> &virtual_ref_foo_3 (X<1>,X<2>,X<3>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_3 (X<1>&,X<2>&,X<3>&) { + virtual X<0> virtual_foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_3 (X<1>&,X<2>&,X<3>&) { + virtual X<0> &virtual_ref_foo_ref_3 (X<1> &,X<2> &,X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_3 (const X<1>&,const X<2>&,const X<3>&) { + virtual X<0> virtual_foo_const_ref_3 (const X<1> &,const X<2> &,const X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_3 (const X<1>&,const X<2>&,const X<3>&) { + virtual X<0> &virtual_ref_foo_const_ref_3 (const X<1> &,const X<2> &,const X<3> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_4 (X<1>,X<2>,X<3>,X<4>) { + X<0> foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_4 (X<1>,X<2>,X<3>,X<4>) { + static X<0> static_foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_4 (X<1>,X<2>,X<3>,X<4>) { + X<0> &ref_foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) { + static X<0> &static_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) { + static const X<0> &static_const_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + X<0> foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + static X<0> static_foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + X<0> &ref_foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) { + const X<0> &const_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + const X<0> &const_ref_foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + const X<0> &const_ref_foo_const_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_4_const (X<1>,X<2>,X<3>,X<4>)const { + const X<0> &const_ref_foo_4_const (X<1>,X<2>,X<3>,X<4>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_4_const (X<1>&,X<2>&,X<3>&,X<4>&)const { + const X<0> &const_ref_foo_ref_4_const (X<1> &,X<2> &,X<3> &,X<4> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_4_const (X<1>&,X<2>&,X<3>&,X<4>&)const { + const X<0> &const_ref_foo_const_ref_4_const (X<1> &,X<2> &,X<3> &,X<4> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) { + virtual const X<0> &virtual_const_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + virtual const X<0> &virtual_const_ref_foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + virtual const X<0> &virtual_const_ref_foo_const_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_4_const (X<1>,X<2>,X<3>,X<4>)const { + virtual const X<0> &virtual_const_ref_foo_4_const (X<1>,X<2>,X<3>,X<4>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_4_const (X<1>&,X<2>&,X<3>&,X<4>&)const { + virtual const X<0> &virtual_const_ref_foo_ref_4_const (X<1> &,X<2> &,X<3> &,X<4> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_4_const (X<1>&,X<2>&,X<3>&,X<4>&)const { + virtual const X<0> &virtual_const_ref_foo_const_ref_4_const (X<1> &,X<2> &,X<3> &,X<4> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + static X<0> &static_ref_foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + static const X<0> &static_const_ref_foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_4 (const X<1>&,const X<2>&,const X<3>&,const X<4>&) { + X<0> foo_const_ref_4 (const X<1> &,const X<2> &,const X<3> &,const X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_4 (const X<1>&,const X<2>&,const X<3>&,const X<4>&) { + static X<0> static_foo_const_ref_4 (const X<1> &,const X<2> &,const X<3> &,const X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_4 (const X<1>&,const X<2>&,const X<3>&,const X<4>&) { + X<0> &ref_foo_const_ref_4 (const X<1> &,const X<2> &,const X<3> &,const X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_4 (const X<1>&,const X<2>&,const X<3>&,const X<4>&) { + static X<0> &static_ref_foo_const_ref_4 (const X<1> &,const X<2> &,const X<3> &,const X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_4 (const X<1>&,const X<2>&,const X<3>&,const X<4>&) { + static const X<0> &static_const_ref_foo_const_ref_4 (const X<1> &,const X<2> &,const X<3> &,const X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_4_const (X<1>,X<2>,X<3>,X<4>) const { + X<0> foo_4_const (X<1>,X<2>,X<3>,X<4>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_4_const (X<1>,X<2>,X<3>,X<4>) const { + X<0> &ref_foo_4_const (X<1>,X<2>,X<3>,X<4>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_4_const (X<1>&,X<2>&,X<3>&,X<4>&) const { + X<0> foo_ref_4_const (X<1> &,X<2> &,X<3> &,X<4> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_4_const (X<1>&,X<2>&,X<3>&,X<4>&) const { + X<0> &ref_foo_ref_4_const (X<1> &,X<2> &,X<3> &,X<4> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_4_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&) const { + X<0> foo_const_ref_4_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_4_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&) const { + X<0> &ref_foo_const_ref_4_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_4_const (X<1>,X<2>,X<3>,X<4>) const { + virtual X<0> virtual_foo_4_const (X<1>,X<2>,X<3>,X<4>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_4_const (X<1>,X<2>,X<3>,X<4>) const { + virtual X<0> &virtual_ref_foo_4_const (X<1>,X<2>,X<3>,X<4>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_4_const (X<1>&,X<2>&,X<3>&,X<4>&) const { + virtual X<0> virtual_foo_ref_4_const (X<1> &,X<2> &,X<3> &,X<4> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_4_const (X<1>&,X<2>&,X<3>&,X<4>&) const { + virtual X<0> &virtual_ref_foo_ref_4_const (X<1> &,X<2> &,X<3> &,X<4> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_4_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&) const { + virtual X<0> virtual_foo_const_ref_4_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_4_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&) const { + virtual X<0> &virtual_ref_foo_const_ref_4_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_4 (X<1>,X<2>,X<3>,X<4>) { + virtual X<0> virtual_foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) { + virtual X<0> &virtual_ref_foo_4 (X<1>,X<2>,X<3>,X<4>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + virtual X<0> virtual_foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_4 (X<1>&,X<2>&,X<3>&,X<4>&) { + virtual X<0> &virtual_ref_foo_ref_4 (X<1> &,X<2> &,X<3> &,X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_4 (const X<1>&,const X<2>&,const X<3>&,const X<4>&) { + virtual X<0> virtual_foo_const_ref_4 (const X<1> &,const X<2> &,const X<3> &,const X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_4 (const X<1>&,const X<2>&,const X<3>&,const X<4>&) { + virtual X<0> &virtual_ref_foo_const_ref_4 (const X<1> &,const X<2> &,const X<3> &,const X<4> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + X<0> foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + static X<0> static_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + X<0> &ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + static X<0> &static_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + static const X<0> &static_const_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + X<0> foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + static X<0> static_foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + X<0> &ref_foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + const X<0> &const_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + const X<0> &const_ref_foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + const X<0> &const_ref_foo_const_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>)const { + const X<0> &const_ref_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_5_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&)const { + const X<0> &const_ref_foo_ref_5_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_5_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&)const { + const X<0> &const_ref_foo_const_ref_5_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + virtual const X<0> &virtual_const_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + virtual const X<0> &virtual_const_ref_foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + virtual const X<0> &virtual_const_ref_foo_const_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>)const { + virtual const X<0> &virtual_const_ref_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_5_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&)const { + virtual const X<0> &virtual_const_ref_foo_ref_5_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_5_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&)const { + virtual const X<0> &virtual_const_ref_foo_const_ref_5_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + static X<0> &static_ref_foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + static const X<0> &static_const_ref_foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_5 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) { + X<0> foo_const_ref_5 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_5 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) { + static X<0> static_foo_const_ref_5 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_5 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) { + X<0> &ref_foo_const_ref_5 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_5 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) { + static X<0> &static_ref_foo_const_ref_5 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_5 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) { + static const X<0> &static_const_ref_foo_const_ref_5 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>) const { + X<0> foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>) const { + X<0> &ref_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_5_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) const { + X<0> foo_ref_5_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_5_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) const { + X<0> &ref_foo_ref_5_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_5_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) const { + X<0> foo_const_ref_5_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_5_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) const { + X<0> &ref_foo_const_ref_5_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>) const { + virtual X<0> virtual_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>) const { + virtual X<0> &virtual_ref_foo_5_const (X<1>,X<2>,X<3>,X<4>,X<5>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_5_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) const { + virtual X<0> virtual_foo_ref_5_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_5_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) const { + virtual X<0> &virtual_ref_foo_ref_5_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_5_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) const { + virtual X<0> virtual_foo_const_ref_5_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_5_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) const { + virtual X<0> &virtual_ref_foo_const_ref_5_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + virtual X<0> virtual_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) { + virtual X<0> &virtual_ref_foo_5 (X<1>,X<2>,X<3>,X<4>,X<5>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + virtual X<0> virtual_foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_5 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&) { + virtual X<0> &virtual_ref_foo_ref_5 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_5 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) { + virtual X<0> virtual_foo_const_ref_5 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_5 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&) { + virtual X<0> &virtual_ref_foo_const_ref_5 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + X<0> foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + static X<0> static_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + X<0> &ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + static X<0> &static_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + static const X<0> &static_const_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + X<0> foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + static X<0> static_foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + X<0> &ref_foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + const X<0> &const_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + const X<0> &const_ref_foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + const X<0> &const_ref_foo_const_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>)const { + const X<0> &const_ref_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_6_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&)const { + const X<0> &const_ref_foo_ref_6_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_6_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&)const { + const X<0> &const_ref_foo_const_ref_6_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + virtual const X<0> &virtual_const_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + virtual const X<0> &virtual_const_ref_foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + virtual const X<0> &virtual_const_ref_foo_const_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>)const { + virtual const X<0> &virtual_const_ref_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_6_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&)const { + virtual const X<0> &virtual_const_ref_foo_ref_6_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_6_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&)const { + virtual const X<0> &virtual_const_ref_foo_const_ref_6_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + static X<0> &static_ref_foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + static const X<0> &static_const_ref_foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_6 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) { + X<0> foo_const_ref_6 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_6 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) { + static X<0> static_foo_const_ref_6 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_6 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) { + X<0> &ref_foo_const_ref_6 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_6 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) { + static X<0> &static_ref_foo_const_ref_6 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_6 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) { + static const X<0> &static_const_ref_foo_const_ref_6 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) const { + X<0> foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) const { + X<0> &ref_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_6_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) const { + X<0> foo_ref_6_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_6_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) const { + X<0> &ref_foo_ref_6_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_6_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) const { + X<0> foo_const_ref_6_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_6_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) const { + X<0> &ref_foo_const_ref_6_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) const { + virtual X<0> virtual_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) const { + virtual X<0> &virtual_ref_foo_6_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_6_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) const { + virtual X<0> virtual_foo_ref_6_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_6_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) const { + virtual X<0> &virtual_ref_foo_ref_6_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_6_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) const { + virtual X<0> virtual_foo_const_ref_6_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_6_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) const { + virtual X<0> &virtual_ref_foo_const_ref_6_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + virtual X<0> virtual_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) { + virtual X<0> &virtual_ref_foo_6 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + virtual X<0> virtual_foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_6 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&) { + virtual X<0> &virtual_ref_foo_ref_6 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_6 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) { + virtual X<0> virtual_foo_const_ref_6 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_6 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&) { + virtual X<0> &virtual_ref_foo_const_ref_6 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + X<0> foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + static X<0> static_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + X<0> &ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + static X<0> &static_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + static const X<0> &static_const_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + X<0> foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + static X<0> static_foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + X<0> &ref_foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + const X<0> &const_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + const X<0> &const_ref_foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + const X<0> &const_ref_foo_const_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>)const { + const X<0> &const_ref_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_7_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&)const { + const X<0> &const_ref_foo_ref_7_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_7_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&)const { + const X<0> &const_ref_foo_const_ref_7_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + virtual const X<0> &virtual_const_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + virtual const X<0> &virtual_const_ref_foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + virtual const X<0> &virtual_const_ref_foo_const_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>)const { + virtual const X<0> &virtual_const_ref_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_7_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&)const { + virtual const X<0> &virtual_const_ref_foo_ref_7_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_7_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&)const { + virtual const X<0> &virtual_const_ref_foo_const_ref_7_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + static X<0> &static_ref_foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + static const X<0> &static_const_ref_foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_7 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) { + X<0> foo_const_ref_7 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_7 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) { + static X<0> static_foo_const_ref_7 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_7 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) { + X<0> &ref_foo_const_ref_7 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_7 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) { + static X<0> &static_ref_foo_const_ref_7 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_7 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) { + static const X<0> &static_const_ref_foo_const_ref_7 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) const { + X<0> foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) const { + X<0> &ref_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_7_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) const { + X<0> foo_ref_7_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_7_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) const { + X<0> &ref_foo_ref_7_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_7_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) const { + X<0> foo_const_ref_7_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_7_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) const { + X<0> &ref_foo_const_ref_7_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) const { + virtual X<0> virtual_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) const { + virtual X<0> &virtual_ref_foo_7_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_7_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) const { + virtual X<0> virtual_foo_ref_7_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_7_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) const { + virtual X<0> &virtual_ref_foo_ref_7_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_7_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) const { + virtual X<0> virtual_foo_const_ref_7_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_7_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) const { + virtual X<0> &virtual_ref_foo_const_ref_7_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + virtual X<0> virtual_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) { + virtual X<0> &virtual_ref_foo_7 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + virtual X<0> virtual_foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_7 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&) { + virtual X<0> &virtual_ref_foo_ref_7 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_7 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) { + virtual X<0> virtual_foo_const_ref_7 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_7 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&) { + virtual X<0> &virtual_ref_foo_const_ref_7 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + X<0> foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + static X<0> static_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + X<0> &ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + static X<0> &static_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + static const X<0> &static_const_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + X<0> foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + static X<0> static_foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + X<0> &ref_foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + const X<0> &const_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + const X<0> &const_ref_foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + const X<0> &const_ref_foo_const_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>)const { + const X<0> &const_ref_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_ref_8_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&)const { + const X<0> &const_ref_foo_ref_8_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - const X<0> & const_ref_foo_const_ref_8_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&)const { + const X<0> &const_ref_foo_const_ref_8_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + virtual const X<0> &virtual_const_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + virtual const X<0> &virtual_const_ref_foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + virtual const X<0> &virtual_const_ref_foo_const_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>)const { + virtual const X<0> &virtual_const_ref_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_ref_8_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&)const { + virtual const X<0> &virtual_const_ref_foo_ref_8_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual const X<0> & virtual_const_ref_foo_const_ref_8_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&)const { + virtual const X<0> &virtual_const_ref_foo_const_ref_8_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &)const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + static X<0> &static_ref_foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + static const X<0> &static_const_ref_foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_8 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) { + X<0> foo_const_ref_8 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> static_foo_const_ref_8 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) { + static X<0> static_foo_const_ref_8 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_8 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) { + X<0> &ref_foo_const_ref_8 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static X<0> & static_ref_foo_const_ref_8 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) { + static X<0> &static_ref_foo_const_ref_8 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - static const X<0> & static_const_ref_foo_const_ref_8 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) { + static const X<0> &static_const_ref_foo_const_ref_8 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) const { + X<0> foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) const { + X<0> &ref_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_ref_8_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) const { + X<0> foo_ref_8_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_ref_8_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) const { + X<0> &ref_foo_ref_8_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> foo_const_ref_8_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) const { + X<0> foo_const_ref_8_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - X<0> & ref_foo_const_ref_8_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) const { + X<0> &ref_foo_const_ref_8_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) const { + virtual X<0> virtual_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) const { + virtual X<0> &virtual_ref_foo_8_const (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_8_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) const { + virtual X<0> virtual_foo_ref_8_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_8_const (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) const { + virtual X<0> &virtual_ref_foo_ref_8_const (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_8_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) const { + virtual X<0> virtual_foo_const_ref_8_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_8_const (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) const { + virtual X<0> &virtual_ref_foo_const_ref_8_const (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) const + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + virtual X<0> virtual_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) { + virtual X<0> &virtual_ref_foo_8 (X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + virtual X<0> virtual_foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_ref_8 (X<1>&,X<2>&,X<3>&,X<4>&,X<5>&,X<6>&,X<7>&,X<8>&) { + virtual X<0> &virtual_ref_foo_ref_8 (X<1> &,X<2> &,X<3> &,X<4> &,X<5> &,X<6> &,X<7> &,X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> virtual_foo_const_ref_8 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) { + virtual X<0> virtual_foo_const_ref_8 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } - virtual X<0> & virtual_ref_foo_const_ref_8 (const X<1>&,const X<2>&,const X<3>&,const X<4>&,const X<5>&,const X<6>&,const X<7>&,const X<8>&) { + virtual X<0> &virtual_ref_foo_const_ref_8 (const X<1> &,const X<2> &,const X<3> &,const X<4> &,const X<5> &,const X<6> &,const X<7> &,const X<8> &) + { deallog << unify_pretty_function(__PRETTY_FUNCTION__) << std::endl; - static X<0> x; return x; + static X<0> x; + return x; } }; -int main () { +int main () +{ std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); @@ -1651,428 +2463,428 @@ int main () { ThreadGroup&> tgr; ThreadGroup&> tgcr; U u; -X<1> x1; -X<2> x2; -X<3> x3; -X<4> x4; -X<5> x5; -X<6> x6; -X<7> x7; -X<8> x8; - tgr += new_thread (&U::ref_foo_0, u); - tgr += new_thread (&U::ref_foo_0_const, u); - tgr += new_thread (&U::ref_foo_const_ref_0, u); - tgr += new_thread (&U::ref_foo_const_ref_0_const, u); - tgr += new_thread (&U::ref_foo_ref_0, u); - tgr += new_thread (&U::ref_foo_ref_0_const, u); - tgcr += new_thread (&U::const_ref_foo_0, u); - tgcr += new_thread (&U::const_ref_foo_0_const, u); - tgcr += new_thread (&U::const_ref_foo_const_ref_0, u); - tgcr += new_thread (&U::const_ref_foo_const_ref_0_const, u); - tgcr += new_thread (&U::const_ref_foo_ref_0, u); - tgcr += new_thread (&U::const_ref_foo_ref_0_const, u); - tgcr += new_thread (&U::virtual_const_ref_foo_0, u); - tgcr += new_thread (&U::virtual_const_ref_foo_0_const, u); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_0, u); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_0_const, u); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_0, u); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_0_const, u); - tg += new_thread (&U::foo_0, u); - tg += new_thread (&U::foo_0_const, u); - tg += new_thread (&U::foo_const_ref_0, u); - tg += new_thread (&U::foo_const_ref_0_const, u); - tg += new_thread (&U::foo_ref_0, u); - tg += new_thread (&U::foo_ref_0_const, u); - tgr += new_thread (&U::virtual_ref_foo_0, u); - tgr += new_thread (&U::virtual_ref_foo_0_const, u); - tgr += new_thread (&U::virtual_ref_foo_const_ref_0, u); - tgr += new_thread (&U::virtual_ref_foo_const_ref_0_const, u); - tgr += new_thread (&U::virtual_ref_foo_ref_0, u); - tgr += new_thread (&U::virtual_ref_foo_ref_0_const, u); - tg += new_thread (&U::virtual_foo_0, u); - tg += new_thread (&U::virtual_foo_0_const, u); - tg += new_thread (&U::virtual_foo_const_ref_0, u); - tg += new_thread (&U::virtual_foo_const_ref_0_const, u); - tg += new_thread (&U::virtual_foo_ref_0, u); - tg += new_thread (&U::virtual_foo_ref_0_const, u); + X<1> x1; + X<2> x2; + X<3> x3; + X<4> x4; + X<5> x5; + X<6> x6; + X<7> x7; + X<8> x8; + tgr += new_thread (&U::ref_foo_0, u); + tgr += new_thread (&U::ref_foo_0_const, u); + tgr += new_thread (&U::ref_foo_const_ref_0, u); + tgr += new_thread (&U::ref_foo_const_ref_0_const, u); + tgr += new_thread (&U::ref_foo_ref_0, u); + tgr += new_thread (&U::ref_foo_ref_0_const, u); + tgcr += new_thread (&U::const_ref_foo_0, u); + tgcr += new_thread (&U::const_ref_foo_0_const, u); + tgcr += new_thread (&U::const_ref_foo_const_ref_0, u); + tgcr += new_thread (&U::const_ref_foo_const_ref_0_const, u); + tgcr += new_thread (&U::const_ref_foo_ref_0, u); + tgcr += new_thread (&U::const_ref_foo_ref_0_const, u); + tgcr += new_thread (&U::virtual_const_ref_foo_0, u); + tgcr += new_thread (&U::virtual_const_ref_foo_0_const, u); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_0, u); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_0_const, u); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_0, u); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_0_const, u); + tg += new_thread (&U::foo_0, u); + tg += new_thread (&U::foo_0_const, u); + tg += new_thread (&U::foo_const_ref_0, u); + tg += new_thread (&U::foo_const_ref_0_const, u); + tg += new_thread (&U::foo_ref_0, u); + tg += new_thread (&U::foo_ref_0_const, u); + tgr += new_thread (&U::virtual_ref_foo_0, u); + tgr += new_thread (&U::virtual_ref_foo_0_const, u); + tgr += new_thread (&U::virtual_ref_foo_const_ref_0, u); + tgr += new_thread (&U::virtual_ref_foo_const_ref_0_const, u); + tgr += new_thread (&U::virtual_ref_foo_ref_0, u); + tgr += new_thread (&U::virtual_ref_foo_ref_0_const, u); + tg += new_thread (&U::virtual_foo_0, u); + tg += new_thread (&U::virtual_foo_0_const, u); + tg += new_thread (&U::virtual_foo_const_ref_0, u); + tg += new_thread (&U::virtual_foo_const_ref_0_const, u); + tg += new_thread (&U::virtual_foo_ref_0, u); + tg += new_thread (&U::virtual_foo_ref_0_const, u); - tgr += new_thread (&U::static_ref_foo_0); - tgr += new_thread (&U::static_ref_foo_const_ref_0); - tgr += new_thread (&U::static_ref_foo_ref_0); - tgcr += new_thread (&U::static_const_ref_foo_0); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_0); - tgcr += new_thread (&U::static_const_ref_foo_ref_0); - tg += new_thread (&U::static_foo_0); - tg += new_thread (&U::static_foo_const_ref_0); - tg += new_thread (&U::static_foo_ref_0); - tgr += new_thread (&U::ref_foo_1, u, x1); - tgr += new_thread (&U::ref_foo_1_const, u, x1); - tgr += new_thread (&U::ref_foo_const_ref_1, u, x1); - tgr += new_thread (&U::ref_foo_const_ref_1_const, u, x1); - tgr += new_thread (&U::ref_foo_ref_1, u, x1); - tgr += new_thread (&U::ref_foo_ref_1_const, u, x1); - tgcr += new_thread (&U::const_ref_foo_1, u, x1); - tgcr += new_thread (&U::const_ref_foo_1_const, u, x1); - tgcr += new_thread (&U::const_ref_foo_const_ref_1, u, x1); - tgcr += new_thread (&U::const_ref_foo_const_ref_1_const, u, x1); - tgcr += new_thread (&U::const_ref_foo_ref_1, u, x1); - tgcr += new_thread (&U::const_ref_foo_ref_1_const, u, x1); - tgcr += new_thread (&U::virtual_const_ref_foo_1, u, x1); - tgcr += new_thread (&U::virtual_const_ref_foo_1_const, u, x1); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_1, u, x1); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_1_const, u, x1); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_1, u, x1); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_1_const, u, x1); - tg += new_thread (&U::foo_1, u, x1); - tg += new_thread (&U::foo_1_const, u, x1); - tg += new_thread (&U::foo_const_ref_1, u, x1); - tg += new_thread (&U::foo_const_ref_1_const, u, x1); - tg += new_thread (&U::foo_ref_1, u, x1); - tg += new_thread (&U::foo_ref_1_const, u, x1); - tgr += new_thread (&U::virtual_ref_foo_1, u, x1); - tgr += new_thread (&U::virtual_ref_foo_1_const, u, x1); - tgr += new_thread (&U::virtual_ref_foo_const_ref_1, u, x1); - tgr += new_thread (&U::virtual_ref_foo_const_ref_1_const, u, x1); - tgr += new_thread (&U::virtual_ref_foo_ref_1, u, x1); - tgr += new_thread (&U::virtual_ref_foo_ref_1_const, u, x1); - tg += new_thread (&U::virtual_foo_1, u, x1); - tg += new_thread (&U::virtual_foo_1_const, u, x1); - tg += new_thread (&U::virtual_foo_const_ref_1, u, x1); - tg += new_thread (&U::virtual_foo_const_ref_1_const, u, x1); - tg += new_thread (&U::virtual_foo_ref_1, u, x1); - tg += new_thread (&U::virtual_foo_ref_1_const, u, x1); + tgr += new_thread (&U::static_ref_foo_0); + tgr += new_thread (&U::static_ref_foo_const_ref_0); + tgr += new_thread (&U::static_ref_foo_ref_0); + tgcr += new_thread (&U::static_const_ref_foo_0); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_0); + tgcr += new_thread (&U::static_const_ref_foo_ref_0); + tg += new_thread (&U::static_foo_0); + tg += new_thread (&U::static_foo_const_ref_0); + tg += new_thread (&U::static_foo_ref_0); + tgr += new_thread (&U::ref_foo_1, u, x1); + tgr += new_thread (&U::ref_foo_1_const, u, x1); + tgr += new_thread (&U::ref_foo_const_ref_1, u, x1); + tgr += new_thread (&U::ref_foo_const_ref_1_const, u, x1); + tgr += new_thread (&U::ref_foo_ref_1, u, x1); + tgr += new_thread (&U::ref_foo_ref_1_const, u, x1); + tgcr += new_thread (&U::const_ref_foo_1, u, x1); + tgcr += new_thread (&U::const_ref_foo_1_const, u, x1); + tgcr += new_thread (&U::const_ref_foo_const_ref_1, u, x1); + tgcr += new_thread (&U::const_ref_foo_const_ref_1_const, u, x1); + tgcr += new_thread (&U::const_ref_foo_ref_1, u, x1); + tgcr += new_thread (&U::const_ref_foo_ref_1_const, u, x1); + tgcr += new_thread (&U::virtual_const_ref_foo_1, u, x1); + tgcr += new_thread (&U::virtual_const_ref_foo_1_const, u, x1); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_1, u, x1); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_1_const, u, x1); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_1, u, x1); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_1_const, u, x1); + tg += new_thread (&U::foo_1, u, x1); + tg += new_thread (&U::foo_1_const, u, x1); + tg += new_thread (&U::foo_const_ref_1, u, x1); + tg += new_thread (&U::foo_const_ref_1_const, u, x1); + tg += new_thread (&U::foo_ref_1, u, x1); + tg += new_thread (&U::foo_ref_1_const, u, x1); + tgr += new_thread (&U::virtual_ref_foo_1, u, x1); + tgr += new_thread (&U::virtual_ref_foo_1_const, u, x1); + tgr += new_thread (&U::virtual_ref_foo_const_ref_1, u, x1); + tgr += new_thread (&U::virtual_ref_foo_const_ref_1_const, u, x1); + tgr += new_thread (&U::virtual_ref_foo_ref_1, u, x1); + tgr += new_thread (&U::virtual_ref_foo_ref_1_const, u, x1); + tg += new_thread (&U::virtual_foo_1, u, x1); + tg += new_thread (&U::virtual_foo_1_const, u, x1); + tg += new_thread (&U::virtual_foo_const_ref_1, u, x1); + tg += new_thread (&U::virtual_foo_const_ref_1_const, u, x1); + tg += new_thread (&U::virtual_foo_ref_1, u, x1); + tg += new_thread (&U::virtual_foo_ref_1_const, u, x1); - tgr += new_thread (&U::static_ref_foo_1,x1); - tgr += new_thread (&U::static_ref_foo_const_ref_1,x1); - tgr += new_thread (&U::static_ref_foo_ref_1,x1); - tgcr += new_thread (&U::static_const_ref_foo_1,x1); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_1,x1); - tgcr += new_thread (&U::static_const_ref_foo_ref_1,x1); - tg += new_thread (&U::static_foo_1,x1); - tg += new_thread (&U::static_foo_const_ref_1,x1); - tg += new_thread (&U::static_foo_ref_1,x1); - tgr += new_thread (&U::ref_foo_2, u, x1,x2); - tgr += new_thread (&U::ref_foo_2_const, u, x1,x2); - tgr += new_thread (&U::ref_foo_const_ref_2, u, x1,x2); - tgr += new_thread (&U::ref_foo_const_ref_2_const, u, x1,x2); - tgr += new_thread (&U::ref_foo_ref_2, u, x1,x2); - tgr += new_thread (&U::ref_foo_ref_2_const, u, x1,x2); - tgcr += new_thread (&U::const_ref_foo_2, u, x1,x2); - tgcr += new_thread (&U::const_ref_foo_2_const, u, x1,x2); - tgcr += new_thread (&U::const_ref_foo_const_ref_2, u, x1,x2); - tgcr += new_thread (&U::const_ref_foo_const_ref_2_const, u, x1,x2); - tgcr += new_thread (&U::const_ref_foo_ref_2, u, x1,x2); - tgcr += new_thread (&U::const_ref_foo_ref_2_const, u, x1,x2); - tgcr += new_thread (&U::virtual_const_ref_foo_2, u, x1,x2); - tgcr += new_thread (&U::virtual_const_ref_foo_2_const, u, x1,x2); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_2, u, x1,x2); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_2_const, u, x1,x2); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_2, u, x1,x2); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_2_const, u, x1,x2); - tg += new_thread (&U::foo_2, u, x1,x2); - tg += new_thread (&U::foo_2_const, u, x1,x2); - tg += new_thread (&U::foo_const_ref_2, u, x1,x2); - tg += new_thread (&U::foo_const_ref_2_const, u, x1,x2); - tg += new_thread (&U::foo_ref_2, u, x1,x2); - tg += new_thread (&U::foo_ref_2_const, u, x1,x2); - tgr += new_thread (&U::virtual_ref_foo_2, u, x1,x2); - tgr += new_thread (&U::virtual_ref_foo_2_const, u, x1,x2); - tgr += new_thread (&U::virtual_ref_foo_const_ref_2, u, x1,x2); - tgr += new_thread (&U::virtual_ref_foo_const_ref_2_const, u, x1,x2); - tgr += new_thread (&U::virtual_ref_foo_ref_2, u, x1,x2); - tgr += new_thread (&U::virtual_ref_foo_ref_2_const, u, x1,x2); - tg += new_thread (&U::virtual_foo_2, u, x1,x2); - tg += new_thread (&U::virtual_foo_2_const, u, x1,x2); - tg += new_thread (&U::virtual_foo_const_ref_2, u, x1,x2); - tg += new_thread (&U::virtual_foo_const_ref_2_const, u, x1,x2); - tg += new_thread (&U::virtual_foo_ref_2, u, x1,x2); - tg += new_thread (&U::virtual_foo_ref_2_const, u, x1,x2); + tgr += new_thread (&U::static_ref_foo_1,x1); + tgr += new_thread (&U::static_ref_foo_const_ref_1,x1); + tgr += new_thread (&U::static_ref_foo_ref_1,x1); + tgcr += new_thread (&U::static_const_ref_foo_1,x1); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_1,x1); + tgcr += new_thread (&U::static_const_ref_foo_ref_1,x1); + tg += new_thread (&U::static_foo_1,x1); + tg += new_thread (&U::static_foo_const_ref_1,x1); + tg += new_thread (&U::static_foo_ref_1,x1); + tgr += new_thread (&U::ref_foo_2, u, x1,x2); + tgr += new_thread (&U::ref_foo_2_const, u, x1,x2); + tgr += new_thread (&U::ref_foo_const_ref_2, u, x1,x2); + tgr += new_thread (&U::ref_foo_const_ref_2_const, u, x1,x2); + tgr += new_thread (&U::ref_foo_ref_2, u, x1,x2); + tgr += new_thread (&U::ref_foo_ref_2_const, u, x1,x2); + tgcr += new_thread (&U::const_ref_foo_2, u, x1,x2); + tgcr += new_thread (&U::const_ref_foo_2_const, u, x1,x2); + tgcr += new_thread (&U::const_ref_foo_const_ref_2, u, x1,x2); + tgcr += new_thread (&U::const_ref_foo_const_ref_2_const, u, x1,x2); + tgcr += new_thread (&U::const_ref_foo_ref_2, u, x1,x2); + tgcr += new_thread (&U::const_ref_foo_ref_2_const, u, x1,x2); + tgcr += new_thread (&U::virtual_const_ref_foo_2, u, x1,x2); + tgcr += new_thread (&U::virtual_const_ref_foo_2_const, u, x1,x2); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_2, u, x1,x2); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_2_const, u, x1,x2); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_2, u, x1,x2); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_2_const, u, x1,x2); + tg += new_thread (&U::foo_2, u, x1,x2); + tg += new_thread (&U::foo_2_const, u, x1,x2); + tg += new_thread (&U::foo_const_ref_2, u, x1,x2); + tg += new_thread (&U::foo_const_ref_2_const, u, x1,x2); + tg += new_thread (&U::foo_ref_2, u, x1,x2); + tg += new_thread (&U::foo_ref_2_const, u, x1,x2); + tgr += new_thread (&U::virtual_ref_foo_2, u, x1,x2); + tgr += new_thread (&U::virtual_ref_foo_2_const, u, x1,x2); + tgr += new_thread (&U::virtual_ref_foo_const_ref_2, u, x1,x2); + tgr += new_thread (&U::virtual_ref_foo_const_ref_2_const, u, x1,x2); + tgr += new_thread (&U::virtual_ref_foo_ref_2, u, x1,x2); + tgr += new_thread (&U::virtual_ref_foo_ref_2_const, u, x1,x2); + tg += new_thread (&U::virtual_foo_2, u, x1,x2); + tg += new_thread (&U::virtual_foo_2_const, u, x1,x2); + tg += new_thread (&U::virtual_foo_const_ref_2, u, x1,x2); + tg += new_thread (&U::virtual_foo_const_ref_2_const, u, x1,x2); + tg += new_thread (&U::virtual_foo_ref_2, u, x1,x2); + tg += new_thread (&U::virtual_foo_ref_2_const, u, x1,x2); - tgr += new_thread (&U::static_ref_foo_2,x1,x2); - tgr += new_thread (&U::static_ref_foo_const_ref_2,x1,x2); - tgr += new_thread (&U::static_ref_foo_ref_2,x1,x2); - tgcr += new_thread (&U::static_const_ref_foo_2,x1,x2); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_2,x1,x2); - tgcr += new_thread (&U::static_const_ref_foo_ref_2,x1,x2); - tg += new_thread (&U::static_foo_2,x1,x2); - tg += new_thread (&U::static_foo_const_ref_2,x1,x2); - tg += new_thread (&U::static_foo_ref_2,x1,x2); - tgr += new_thread (&U::ref_foo_3, u, x1,x2,x3); - tgr += new_thread (&U::ref_foo_3_const, u, x1,x2,x3); - tgr += new_thread (&U::ref_foo_const_ref_3, u, x1,x2,x3); - tgr += new_thread (&U::ref_foo_const_ref_3_const, u, x1,x2,x3); - tgr += new_thread (&U::ref_foo_ref_3, u, x1,x2,x3); - tgr += new_thread (&U::ref_foo_ref_3_const, u, x1,x2,x3); - tgcr += new_thread (&U::const_ref_foo_3, u, x1,x2,x3); - tgcr += new_thread (&U::const_ref_foo_3_const, u, x1,x2,x3); - tgcr += new_thread (&U::const_ref_foo_const_ref_3, u, x1,x2,x3); - tgcr += new_thread (&U::const_ref_foo_const_ref_3_const, u, x1,x2,x3); - tgcr += new_thread (&U::const_ref_foo_ref_3, u, x1,x2,x3); - tgcr += new_thread (&U::const_ref_foo_ref_3_const, u, x1,x2,x3); - tgcr += new_thread (&U::virtual_const_ref_foo_3, u, x1,x2,x3); - tgcr += new_thread (&U::virtual_const_ref_foo_3_const, u, x1,x2,x3); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_3, u, x1,x2,x3); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_3_const, u, x1,x2,x3); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_3, u, x1,x2,x3); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_3_const, u, x1,x2,x3); - tg += new_thread (&U::foo_3, u, x1,x2,x3); - tg += new_thread (&U::foo_3_const, u, x1,x2,x3); - tg += new_thread (&U::foo_const_ref_3, u, x1,x2,x3); - tg += new_thread (&U::foo_const_ref_3_const, u, x1,x2,x3); - tg += new_thread (&U::foo_ref_3, u, x1,x2,x3); - tg += new_thread (&U::foo_ref_3_const, u, x1,x2,x3); - tgr += new_thread (&U::virtual_ref_foo_3, u, x1,x2,x3); - tgr += new_thread (&U::virtual_ref_foo_3_const, u, x1,x2,x3); - tgr += new_thread (&U::virtual_ref_foo_const_ref_3, u, x1,x2,x3); - tgr += new_thread (&U::virtual_ref_foo_const_ref_3_const, u, x1,x2,x3); - tgr += new_thread (&U::virtual_ref_foo_ref_3, u, x1,x2,x3); - tgr += new_thread (&U::virtual_ref_foo_ref_3_const, u, x1,x2,x3); - tg += new_thread (&U::virtual_foo_3, u, x1,x2,x3); - tg += new_thread (&U::virtual_foo_3_const, u, x1,x2,x3); - tg += new_thread (&U::virtual_foo_const_ref_3, u, x1,x2,x3); - tg += new_thread (&U::virtual_foo_const_ref_3_const, u, x1,x2,x3); - tg += new_thread (&U::virtual_foo_ref_3, u, x1,x2,x3); - tg += new_thread (&U::virtual_foo_ref_3_const, u, x1,x2,x3); + tgr += new_thread (&U::static_ref_foo_2,x1,x2); + tgr += new_thread (&U::static_ref_foo_const_ref_2,x1,x2); + tgr += new_thread (&U::static_ref_foo_ref_2,x1,x2); + tgcr += new_thread (&U::static_const_ref_foo_2,x1,x2); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_2,x1,x2); + tgcr += new_thread (&U::static_const_ref_foo_ref_2,x1,x2); + tg += new_thread (&U::static_foo_2,x1,x2); + tg += new_thread (&U::static_foo_const_ref_2,x1,x2); + tg += new_thread (&U::static_foo_ref_2,x1,x2); + tgr += new_thread (&U::ref_foo_3, u, x1,x2,x3); + tgr += new_thread (&U::ref_foo_3_const, u, x1,x2,x3); + tgr += new_thread (&U::ref_foo_const_ref_3, u, x1,x2,x3); + tgr += new_thread (&U::ref_foo_const_ref_3_const, u, x1,x2,x3); + tgr += new_thread (&U::ref_foo_ref_3, u, x1,x2,x3); + tgr += new_thread (&U::ref_foo_ref_3_const, u, x1,x2,x3); + tgcr += new_thread (&U::const_ref_foo_3, u, x1,x2,x3); + tgcr += new_thread (&U::const_ref_foo_3_const, u, x1,x2,x3); + tgcr += new_thread (&U::const_ref_foo_const_ref_3, u, x1,x2,x3); + tgcr += new_thread (&U::const_ref_foo_const_ref_3_const, u, x1,x2,x3); + tgcr += new_thread (&U::const_ref_foo_ref_3, u, x1,x2,x3); + tgcr += new_thread (&U::const_ref_foo_ref_3_const, u, x1,x2,x3); + tgcr += new_thread (&U::virtual_const_ref_foo_3, u, x1,x2,x3); + tgcr += new_thread (&U::virtual_const_ref_foo_3_const, u, x1,x2,x3); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_3, u, x1,x2,x3); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_3_const, u, x1,x2,x3); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_3, u, x1,x2,x3); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_3_const, u, x1,x2,x3); + tg += new_thread (&U::foo_3, u, x1,x2,x3); + tg += new_thread (&U::foo_3_const, u, x1,x2,x3); + tg += new_thread (&U::foo_const_ref_3, u, x1,x2,x3); + tg += new_thread (&U::foo_const_ref_3_const, u, x1,x2,x3); + tg += new_thread (&U::foo_ref_3, u, x1,x2,x3); + tg += new_thread (&U::foo_ref_3_const, u, x1,x2,x3); + tgr += new_thread (&U::virtual_ref_foo_3, u, x1,x2,x3); + tgr += new_thread (&U::virtual_ref_foo_3_const, u, x1,x2,x3); + tgr += new_thread (&U::virtual_ref_foo_const_ref_3, u, x1,x2,x3); + tgr += new_thread (&U::virtual_ref_foo_const_ref_3_const, u, x1,x2,x3); + tgr += new_thread (&U::virtual_ref_foo_ref_3, u, x1,x2,x3); + tgr += new_thread (&U::virtual_ref_foo_ref_3_const, u, x1,x2,x3); + tg += new_thread (&U::virtual_foo_3, u, x1,x2,x3); + tg += new_thread (&U::virtual_foo_3_const, u, x1,x2,x3); + tg += new_thread (&U::virtual_foo_const_ref_3, u, x1,x2,x3); + tg += new_thread (&U::virtual_foo_const_ref_3_const, u, x1,x2,x3); + tg += new_thread (&U::virtual_foo_ref_3, u, x1,x2,x3); + tg += new_thread (&U::virtual_foo_ref_3_const, u, x1,x2,x3); - tgr += new_thread (&U::static_ref_foo_3,x1,x2,x3); - tgr += new_thread (&U::static_ref_foo_const_ref_3,x1,x2,x3); - tgr += new_thread (&U::static_ref_foo_ref_3,x1,x2,x3); - tgcr += new_thread (&U::static_const_ref_foo_3,x1,x2,x3); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_3,x1,x2,x3); - tgcr += new_thread (&U::static_const_ref_foo_ref_3,x1,x2,x3); - tg += new_thread (&U::static_foo_3,x1,x2,x3); - tg += new_thread (&U::static_foo_const_ref_3,x1,x2,x3); - tg += new_thread (&U::static_foo_ref_3,x1,x2,x3); - tgr += new_thread (&U::ref_foo_4, u, x1,x2,x3,x4); - tgr += new_thread (&U::ref_foo_4_const, u, x1,x2,x3,x4); - tgr += new_thread (&U::ref_foo_const_ref_4, u, x1,x2,x3,x4); - tgr += new_thread (&U::ref_foo_const_ref_4_const, u, x1,x2,x3,x4); - tgr += new_thread (&U::ref_foo_ref_4, u, x1,x2,x3,x4); - tgr += new_thread (&U::ref_foo_ref_4_const, u, x1,x2,x3,x4); - tgcr += new_thread (&U::const_ref_foo_4, u, x1,x2,x3,x4); - tgcr += new_thread (&U::const_ref_foo_4_const, u, x1,x2,x3,x4); - tgcr += new_thread (&U::const_ref_foo_const_ref_4, u, x1,x2,x3,x4); - tgcr += new_thread (&U::const_ref_foo_const_ref_4_const, u, x1,x2,x3,x4); - tgcr += new_thread (&U::const_ref_foo_ref_4, u, x1,x2,x3,x4); - tgcr += new_thread (&U::const_ref_foo_ref_4_const, u, x1,x2,x3,x4); - tgcr += new_thread (&U::virtual_const_ref_foo_4, u, x1,x2,x3,x4); - tgcr += new_thread (&U::virtual_const_ref_foo_4_const, u, x1,x2,x3,x4); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_4, u, x1,x2,x3,x4); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_4_const, u, x1,x2,x3,x4); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_4, u, x1,x2,x3,x4); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_4_const, u, x1,x2,x3,x4); - tg += new_thread (&U::foo_4, u, x1,x2,x3,x4); - tg += new_thread (&U::foo_4_const, u, x1,x2,x3,x4); - tg += new_thread (&U::foo_const_ref_4, u, x1,x2,x3,x4); - tg += new_thread (&U::foo_const_ref_4_const, u, x1,x2,x3,x4); - tg += new_thread (&U::foo_ref_4, u, x1,x2,x3,x4); - tg += new_thread (&U::foo_ref_4_const, u, x1,x2,x3,x4); - tgr += new_thread (&U::virtual_ref_foo_4, u, x1,x2,x3,x4); - tgr += new_thread (&U::virtual_ref_foo_4_const, u, x1,x2,x3,x4); - tgr += new_thread (&U::virtual_ref_foo_const_ref_4, u, x1,x2,x3,x4); - tgr += new_thread (&U::virtual_ref_foo_const_ref_4_const, u, x1,x2,x3,x4); - tgr += new_thread (&U::virtual_ref_foo_ref_4, u, x1,x2,x3,x4); - tgr += new_thread (&U::virtual_ref_foo_ref_4_const, u, x1,x2,x3,x4); - tg += new_thread (&U::virtual_foo_4, u, x1,x2,x3,x4); - tg += new_thread (&U::virtual_foo_4_const, u, x1,x2,x3,x4); - tg += new_thread (&U::virtual_foo_const_ref_4, u, x1,x2,x3,x4); - tg += new_thread (&U::virtual_foo_const_ref_4_const, u, x1,x2,x3,x4); - tg += new_thread (&U::virtual_foo_ref_4, u, x1,x2,x3,x4); - tg += new_thread (&U::virtual_foo_ref_4_const, u, x1,x2,x3,x4); + tgr += new_thread (&U::static_ref_foo_3,x1,x2,x3); + tgr += new_thread (&U::static_ref_foo_const_ref_3,x1,x2,x3); + tgr += new_thread (&U::static_ref_foo_ref_3,x1,x2,x3); + tgcr += new_thread (&U::static_const_ref_foo_3,x1,x2,x3); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_3,x1,x2,x3); + tgcr += new_thread (&U::static_const_ref_foo_ref_3,x1,x2,x3); + tg += new_thread (&U::static_foo_3,x1,x2,x3); + tg += new_thread (&U::static_foo_const_ref_3,x1,x2,x3); + tg += new_thread (&U::static_foo_ref_3,x1,x2,x3); + tgr += new_thread (&U::ref_foo_4, u, x1,x2,x3,x4); + tgr += new_thread (&U::ref_foo_4_const, u, x1,x2,x3,x4); + tgr += new_thread (&U::ref_foo_const_ref_4, u, x1,x2,x3,x4); + tgr += new_thread (&U::ref_foo_const_ref_4_const, u, x1,x2,x3,x4); + tgr += new_thread (&U::ref_foo_ref_4, u, x1,x2,x3,x4); + tgr += new_thread (&U::ref_foo_ref_4_const, u, x1,x2,x3,x4); + tgcr += new_thread (&U::const_ref_foo_4, u, x1,x2,x3,x4); + tgcr += new_thread (&U::const_ref_foo_4_const, u, x1,x2,x3,x4); + tgcr += new_thread (&U::const_ref_foo_const_ref_4, u, x1,x2,x3,x4); + tgcr += new_thread (&U::const_ref_foo_const_ref_4_const, u, x1,x2,x3,x4); + tgcr += new_thread (&U::const_ref_foo_ref_4, u, x1,x2,x3,x4); + tgcr += new_thread (&U::const_ref_foo_ref_4_const, u, x1,x2,x3,x4); + tgcr += new_thread (&U::virtual_const_ref_foo_4, u, x1,x2,x3,x4); + tgcr += new_thread (&U::virtual_const_ref_foo_4_const, u, x1,x2,x3,x4); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_4, u, x1,x2,x3,x4); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_4_const, u, x1,x2,x3,x4); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_4, u, x1,x2,x3,x4); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_4_const, u, x1,x2,x3,x4); + tg += new_thread (&U::foo_4, u, x1,x2,x3,x4); + tg += new_thread (&U::foo_4_const, u, x1,x2,x3,x4); + tg += new_thread (&U::foo_const_ref_4, u, x1,x2,x3,x4); + tg += new_thread (&U::foo_const_ref_4_const, u, x1,x2,x3,x4); + tg += new_thread (&U::foo_ref_4, u, x1,x2,x3,x4); + tg += new_thread (&U::foo_ref_4_const, u, x1,x2,x3,x4); + tgr += new_thread (&U::virtual_ref_foo_4, u, x1,x2,x3,x4); + tgr += new_thread (&U::virtual_ref_foo_4_const, u, x1,x2,x3,x4); + tgr += new_thread (&U::virtual_ref_foo_const_ref_4, u, x1,x2,x3,x4); + tgr += new_thread (&U::virtual_ref_foo_const_ref_4_const, u, x1,x2,x3,x4); + tgr += new_thread (&U::virtual_ref_foo_ref_4, u, x1,x2,x3,x4); + tgr += new_thread (&U::virtual_ref_foo_ref_4_const, u, x1,x2,x3,x4); + tg += new_thread (&U::virtual_foo_4, u, x1,x2,x3,x4); + tg += new_thread (&U::virtual_foo_4_const, u, x1,x2,x3,x4); + tg += new_thread (&U::virtual_foo_const_ref_4, u, x1,x2,x3,x4); + tg += new_thread (&U::virtual_foo_const_ref_4_const, u, x1,x2,x3,x4); + tg += new_thread (&U::virtual_foo_ref_4, u, x1,x2,x3,x4); + tg += new_thread (&U::virtual_foo_ref_4_const, u, x1,x2,x3,x4); - tgr += new_thread (&U::static_ref_foo_4,x1,x2,x3,x4); - tgr += new_thread (&U::static_ref_foo_const_ref_4,x1,x2,x3,x4); - tgr += new_thread (&U::static_ref_foo_ref_4,x1,x2,x3,x4); - tgcr += new_thread (&U::static_const_ref_foo_4,x1,x2,x3,x4); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_4,x1,x2,x3,x4); - tgcr += new_thread (&U::static_const_ref_foo_ref_4,x1,x2,x3,x4); - tg += new_thread (&U::static_foo_4,x1,x2,x3,x4); - tg += new_thread (&U::static_foo_const_ref_4,x1,x2,x3,x4); - tg += new_thread (&U::static_foo_ref_4,x1,x2,x3,x4); - tgr += new_thread (&U::ref_foo_5, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::ref_foo_5_const, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::ref_foo_const_ref_5, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::ref_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::ref_foo_ref_5, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::ref_foo_ref_5_const, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::const_ref_foo_5, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::const_ref_foo_5_const, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::const_ref_foo_const_ref_5, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::const_ref_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::const_ref_foo_ref_5, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::const_ref_foo_ref_5_const, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::virtual_const_ref_foo_5, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::virtual_const_ref_foo_5_const, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_5, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_5, u, x1,x2,x3,x4,x5); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_5_const, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::foo_5, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::foo_5_const, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::foo_const_ref_5, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::foo_const_ref_5_const, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::foo_ref_5, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::foo_ref_5_const, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::virtual_ref_foo_5, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::virtual_ref_foo_5_const, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::virtual_ref_foo_const_ref_5, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::virtual_ref_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::virtual_ref_foo_ref_5, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::virtual_ref_foo_ref_5_const, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::virtual_foo_5, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::virtual_foo_5_const, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::virtual_foo_const_ref_5, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::virtual_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::virtual_foo_ref_5, u, x1,x2,x3,x4,x5); - tg += new_thread (&U::virtual_foo_ref_5_const, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::static_ref_foo_4,x1,x2,x3,x4); + tgr += new_thread (&U::static_ref_foo_const_ref_4,x1,x2,x3,x4); + tgr += new_thread (&U::static_ref_foo_ref_4,x1,x2,x3,x4); + tgcr += new_thread (&U::static_const_ref_foo_4,x1,x2,x3,x4); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_4,x1,x2,x3,x4); + tgcr += new_thread (&U::static_const_ref_foo_ref_4,x1,x2,x3,x4); + tg += new_thread (&U::static_foo_4,x1,x2,x3,x4); + tg += new_thread (&U::static_foo_const_ref_4,x1,x2,x3,x4); + tg += new_thread (&U::static_foo_ref_4,x1,x2,x3,x4); + tgr += new_thread (&U::ref_foo_5, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::ref_foo_5_const, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::ref_foo_const_ref_5, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::ref_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::ref_foo_ref_5, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::ref_foo_ref_5_const, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::const_ref_foo_5, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::const_ref_foo_5_const, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::const_ref_foo_const_ref_5, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::const_ref_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::const_ref_foo_ref_5, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::const_ref_foo_ref_5_const, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::virtual_const_ref_foo_5, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::virtual_const_ref_foo_5_const, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_5, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_5, u, x1,x2,x3,x4,x5); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_5_const, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::foo_5, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::foo_5_const, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::foo_const_ref_5, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::foo_const_ref_5_const, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::foo_ref_5, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::foo_ref_5_const, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::virtual_ref_foo_5, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::virtual_ref_foo_5_const, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::virtual_ref_foo_const_ref_5, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::virtual_ref_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::virtual_ref_foo_ref_5, u, x1,x2,x3,x4,x5); + tgr += new_thread (&U::virtual_ref_foo_ref_5_const, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::virtual_foo_5, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::virtual_foo_5_const, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::virtual_foo_const_ref_5, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::virtual_foo_const_ref_5_const, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::virtual_foo_ref_5, u, x1,x2,x3,x4,x5); + tg += new_thread (&U::virtual_foo_ref_5_const, u, x1,x2,x3,x4,x5); - tgr += new_thread (&U::static_ref_foo_5,x1,x2,x3,x4,x5); - tgr += new_thread (&U::static_ref_foo_const_ref_5,x1,x2,x3,x4,x5); - tgr += new_thread (&U::static_ref_foo_ref_5,x1,x2,x3,x4,x5); - tgcr += new_thread (&U::static_const_ref_foo_5,x1,x2,x3,x4,x5); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_5,x1,x2,x3,x4,x5); - tgcr += new_thread (&U::static_const_ref_foo_ref_5,x1,x2,x3,x4,x5); - tg += new_thread (&U::static_foo_5,x1,x2,x3,x4,x5); - tg += new_thread (&U::static_foo_const_ref_5,x1,x2,x3,x4,x5); - tg += new_thread (&U::static_foo_ref_5,x1,x2,x3,x4,x5); - tgr += new_thread (&U::ref_foo_6, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::ref_foo_6_const, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::ref_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::ref_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::ref_foo_ref_6, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::ref_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::const_ref_foo_6, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::const_ref_foo_6_const, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::const_ref_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::const_ref_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::const_ref_foo_ref_6, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::const_ref_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::virtual_const_ref_foo_6, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::virtual_const_ref_foo_6_const, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_6, u, x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::foo_6, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::foo_6_const, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::foo_ref_6, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::virtual_ref_foo_6, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::virtual_ref_foo_6_const, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::virtual_ref_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::virtual_ref_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::virtual_ref_foo_ref_6, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::virtual_ref_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::virtual_foo_6, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::virtual_foo_6_const, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::virtual_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::virtual_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::virtual_foo_ref_6, u, x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::virtual_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::static_ref_foo_5,x1,x2,x3,x4,x5); + tgr += new_thread (&U::static_ref_foo_const_ref_5,x1,x2,x3,x4,x5); + tgr += new_thread (&U::static_ref_foo_ref_5,x1,x2,x3,x4,x5); + tgcr += new_thread (&U::static_const_ref_foo_5,x1,x2,x3,x4,x5); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_5,x1,x2,x3,x4,x5); + tgcr += new_thread (&U::static_const_ref_foo_ref_5,x1,x2,x3,x4,x5); + tg += new_thread (&U::static_foo_5,x1,x2,x3,x4,x5); + tg += new_thread (&U::static_foo_const_ref_5,x1,x2,x3,x4,x5); + tg += new_thread (&U::static_foo_ref_5,x1,x2,x3,x4,x5); + tgr += new_thread (&U::ref_foo_6, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::ref_foo_6_const, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::ref_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::ref_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::ref_foo_ref_6, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::ref_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::const_ref_foo_6, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::const_ref_foo_6_const, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::const_ref_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::const_ref_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::const_ref_foo_ref_6, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::const_ref_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::virtual_const_ref_foo_6, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::virtual_const_ref_foo_6_const, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_6, u, x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::foo_6, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::foo_6_const, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::foo_ref_6, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::virtual_ref_foo_6, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::virtual_ref_foo_6_const, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::virtual_ref_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::virtual_ref_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::virtual_ref_foo_ref_6, u, x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::virtual_ref_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::virtual_foo_6, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::virtual_foo_6_const, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::virtual_foo_const_ref_6, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::virtual_foo_const_ref_6_const, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::virtual_foo_ref_6, u, x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::virtual_foo_ref_6_const, u, x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::static_ref_foo_6,x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::static_ref_foo_const_ref_6,x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::static_ref_foo_ref_6,x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::static_const_ref_foo_6,x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_6,x1,x2,x3,x4,x5,x6); - tgcr += new_thread (&U::static_const_ref_foo_ref_6,x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::static_foo_6,x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::static_foo_const_ref_6,x1,x2,x3,x4,x5,x6); - tg += new_thread (&U::static_foo_ref_6,x1,x2,x3,x4,x5,x6); - tgr += new_thread (&U::ref_foo_7, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::ref_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::ref_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::ref_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::ref_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::ref_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::const_ref_foo_7, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::const_ref_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::const_ref_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::const_ref_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::const_ref_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::const_ref_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::virtual_const_ref_foo_7, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::virtual_const_ref_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::foo_7, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::virtual_ref_foo_7, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::virtual_ref_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::virtual_ref_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::virtual_ref_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::virtual_ref_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::virtual_ref_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::virtual_foo_7, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::virtual_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::virtual_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::virtual_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::virtual_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::virtual_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::static_ref_foo_6,x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::static_ref_foo_const_ref_6,x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::static_ref_foo_ref_6,x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::static_const_ref_foo_6,x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_6,x1,x2,x3,x4,x5,x6); + tgcr += new_thread (&U::static_const_ref_foo_ref_6,x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::static_foo_6,x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::static_foo_const_ref_6,x1,x2,x3,x4,x5,x6); + tg += new_thread (&U::static_foo_ref_6,x1,x2,x3,x4,x5,x6); + tgr += new_thread (&U::ref_foo_7, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::ref_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::ref_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::ref_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::ref_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::ref_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::const_ref_foo_7, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::const_ref_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::const_ref_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::const_ref_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::const_ref_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::const_ref_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::virtual_const_ref_foo_7, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::virtual_const_ref_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::foo_7, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::virtual_ref_foo_7, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::virtual_ref_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::virtual_ref_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::virtual_ref_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::virtual_ref_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::virtual_ref_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::virtual_foo_7, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::virtual_foo_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::virtual_foo_const_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::virtual_foo_const_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::virtual_foo_ref_7, u, x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::virtual_foo_ref_7_const, u, x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::static_ref_foo_7,x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::static_ref_foo_const_ref_7,x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::static_ref_foo_ref_7,x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::static_const_ref_foo_7,x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_7,x1,x2,x3,x4,x5,x6,x7); - tgcr += new_thread (&U::static_const_ref_foo_ref_7,x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::static_foo_7,x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::static_foo_const_ref_7,x1,x2,x3,x4,x5,x6,x7); - tg += new_thread (&U::static_foo_ref_7,x1,x2,x3,x4,x5,x6,x7); - tgr += new_thread (&U::ref_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::ref_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::ref_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::ref_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::ref_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::ref_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::const_ref_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::const_ref_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::const_ref_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::const_ref_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::const_ref_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::const_ref_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::virtual_const_ref_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::virtual_const_ref_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::virtual_const_ref_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::virtual_ref_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::virtual_ref_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::virtual_ref_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::virtual_ref_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::virtual_ref_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::virtual_ref_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::virtual_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::virtual_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::virtual_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::virtual_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::virtual_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::virtual_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::static_ref_foo_7,x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::static_ref_foo_const_ref_7,x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::static_ref_foo_ref_7,x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::static_const_ref_foo_7,x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_7,x1,x2,x3,x4,x5,x6,x7); + tgcr += new_thread (&U::static_const_ref_foo_ref_7,x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::static_foo_7,x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::static_foo_const_ref_7,x1,x2,x3,x4,x5,x6,x7); + tg += new_thread (&U::static_foo_ref_7,x1,x2,x3,x4,x5,x6,x7); + tgr += new_thread (&U::ref_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::ref_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::ref_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::ref_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::ref_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::ref_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::const_ref_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::const_ref_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::const_ref_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::const_ref_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::const_ref_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::const_ref_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::virtual_const_ref_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::virtual_const_ref_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::virtual_const_ref_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::virtual_const_ref_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::virtual_ref_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::virtual_ref_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::virtual_ref_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::virtual_ref_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::virtual_ref_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::virtual_ref_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::virtual_foo_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::virtual_foo_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::virtual_foo_const_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::virtual_foo_const_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::virtual_foo_ref_8, u, x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::virtual_foo_ref_8_const, u, x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::static_ref_foo_8,x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::static_ref_foo_const_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); - tgr += new_thread (&U::static_ref_foo_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::static_const_ref_foo_8,x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::static_const_ref_foo_const_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); - tgcr += new_thread (&U::static_const_ref_foo_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::static_foo_8,x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::static_foo_const_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); - tg += new_thread (&U::static_foo_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::static_ref_foo_8,x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::static_ref_foo_const_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); + tgr += new_thread (&U::static_ref_foo_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::static_const_ref_foo_8,x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::static_const_ref_foo_const_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); + tgcr += new_thread (&U::static_const_ref_foo_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::static_foo_8,x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::static_foo_const_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); + tg += new_thread (&U::static_foo_ref_8,x1,x2,x3,x4,x5,x6,x7,x8); tg.join_all(); tgr.join_all(); tgcr.join_all(); diff --git a/tests/base/time_stepping_01.cc b/tests/base/time_stepping_01.cc index fbb9008c72..ba3358daa1 100644 --- a/tests/base/time_stepping_01.cc +++ b/tests/base/time_stepping_01.cc @@ -19,8 +19,8 @@ #include // test Runge-Kutta methods -Vector f1(double const t, Vector const &y) -{ +Vector f1(double const t, Vector const &y) +{ Vector values(y); for (unsigned int i=0; i f1(double const t, Vector const &y) return values; } -Vector f2(double const t, Vector const &y) -{ +Vector f2(double const t, Vector const &y) +{ Vector values(y); for (unsigned int i=0; i f3(double const t, Vector const &y) -{ +Vector f3(double const t, Vector const &y) +{ Vector values(y); for (unsigned int i=0; i f4(double const t, Vector const &y) -{ +Vector f4(double const t, Vector const &y) +{ Vector values(y); for (unsigned int i=0; i f5(double const t, Vector const &y) +Vector f5(double const t, Vector const &y) { Vector values(y); for (unsigned int i=0; i id_minus_tau_J_inv1(double const t, double const tau, Vector const &y) +Vector id_minus_tau_J_inv1(double const t, double const tau, Vector const &y) { return y; } -Vector id_minus_tau_J_inv2(double const t, double const tau, Vector const &y) +Vector id_minus_tau_J_inv2(double const t, double const tau, Vector const &y) { return y; } -Vector id_minus_tau_J_inv3(double const t, double const tau, Vector const &y) +Vector id_minus_tau_J_inv3(double const t, double const tau, Vector const &y) { return y; } -Vector id_minus_tau_J_inv4(double const t, double const tau, Vector const &y) +Vector id_minus_tau_J_inv4(double const t, double const tau, Vector const &y) { return y; } -Vector id_minus_tau_J_inv5(double const t, double const tau, Vector const &y) +Vector id_minus_tau_J_inv5(double const t, double const tau, Vector const &y) { return y; } -double my1(double const t) -{ - return t; +double my1(double const t) +{ + return t; } -double my2(double const t) -{ - return t*t; +double my2(double const t) +{ + return t*t; } -double my3(double const t) -{ - return t*t*t; +double my3(double const t) +{ + return t*t*t; } -double my4(double const t) -{ - return t*t*t*t; +double my4(double const t) +{ + return t*t*t*t; } -double my5(double const t) -{ - return t*t*t*t*t; +double my5(double const t) +{ + return t*t*t*t*t; } void test(TimeStepping::RungeKutta > &solver, - std_cxx11::function (double const, Vector const &)> f, - std_cxx11::function (double const, double const, Vector const &)> id_minus_tau_J_inv, - std_cxx11::function my) + std_cxx11::function (double const, Vector const &)> f, + std_cxx11::function (double const, double const, Vector const &)> id_minus_tau_J_inv, + std_cxx11::function my) { unsigned int n_time_steps = 1; unsigned int size = 1; @@ -127,10 +127,10 @@ void test(TimeStepping::RungeKutta > &solver, Vector solution(size); Vector exact_solution(size); for (unsigned int i=0; i > &solver, } void test2(TimeStepping::EmbeddedExplicitRungeKutta > &solver, - std_cxx11::function (double const, Vector const &)> f, - std_cxx11::function (double const, double const, Vector const &)> id_minus_tau_J_inv, - std_cxx11::function my) + std_cxx11::function (double const, Vector const &)> f, + std_cxx11::function (double const, double const, Vector const &)> id_minus_tau_J_inv, + std_cxx11::function my) { double initial_time = 0.0, final_time = 1.0; double time_step = 1.0; @@ -154,19 +154,19 @@ void test2(TimeStepping::EmbeddedExplicitRungeKutta > &solver, Vector solution(size); Vector exact_solution(size); for (unsigned int i=0; ifinal_time) - time_step = final_time - time; - time = solver.evolve_one_time_step(f,id_minus_tau_J_inv,time,time_step,solution); - time_step = solver.get_status().delta_t_guess; - } + { + if (time+time_step>final_time) + time_step = final_time - time; + time = solver.evolve_one_time_step(f,id_minus_tau_J_inv,time,time_step,solution); + time_step = solver.get_status().delta_t_guess; + } Vector error(exact_solution); error.sadd(1.0,-1.0,solution); diff --git a/tests/base/timer_02.cc b/tests/base/timer_02.cc index 1a1a67f976..62bf44b037 100644 --- a/tests/base/timer_02.cc +++ b/tests/base/timer_02.cc @@ -35,7 +35,7 @@ int main () deallog.threshold_double(1.e-1); { - + // use std::cout so that no output is saved to the logfile, because it // is difficult to test (timing) TimerOutput t(std::cout, TimerOutput::summary, TimerOutput::cpu_times); diff --git a/tests/base/utilities_09.cc b/tests/base/utilities_09.cc index 01749e4aad..6eaf4804fa 100644 --- a/tests/base/utilities_09.cc +++ b/tests/base/utilities_09.cc @@ -32,9 +32,9 @@ void test () { const char *p = ""; deallog << Utilities::split_string_list (p).size() - << std::endl; + << std::endl; deallog << Utilities::split_string_list (p, ' ').size() - << std::endl; + << std::endl; } // also test a string that consists only of whitespace. this should @@ -43,9 +43,9 @@ void test () { const char *p = " "; deallog << Utilities::split_string_list (p).size() - << std::endl; + << std::endl; deallog << Utilities::split_string_list (p, ' ').size() - << std::endl; + << std::endl; } } diff --git a/tests/base/utilities_10.cc b/tests/base/utilities_10.cc index 61272f03fe..b32f277be7 100644 --- a/tests/base/utilities_10.cc +++ b/tests/base/utilities_10.cc @@ -31,35 +31,35 @@ void test () // verify the documented behavior of eating trailing delimiters { deallog << Utilities::split_string_list (",").size() - << std::endl; + << std::endl; deallog << Utilities::split_string_list (" , ").size() - << std::endl; + << std::endl; } { deallog << Utilities::split_string_list (",,").size() - << std::endl; + << std::endl; deallog << Utilities::split_string_list (" , , ").size() - << std::endl; + << std::endl; } // try some more esoteric cases: { deallog << Utilities::split_string_list (" , , ", ' ').size() - << std::endl; + << std::endl; } { deallog << Utilities::split_string_list (" ", ' ').size() - << std::endl; + << std::endl; deallog << Utilities::split_string_list (" ", ' ').size() - << std::endl; + << std::endl; } Assert (Utilities::split_string_list(" ; ", ';').size() == 1, - ExcInternalError()); + ExcInternalError()); Assert (Utilities::split_string_list(" ; ", ';')[0] == "", - ExcInternalError()); + ExcInternalError()); } diff --git a/tests/base/utilities_trim.cc b/tests/base/utilities_trim.cc index 7b2014cdcd..4a0a0972ee 100644 --- a/tests/base/utilities_trim.cc +++ b/tests/base/utilities_trim.cc @@ -25,7 +25,7 @@ #include -void check(const std::string & input, const std::string & expected) +void check(const std::string &input, const std::string &expected) { deallog << "trim(\"" << input << "\") = \"" << Utilities::trim(input) << "\"" << std::endl; Assert(Utilities::trim(input) == expected, ExcInternalError()); diff --git a/tests/base/work_stream_04.cc b/tests/base/work_stream_04.cc index ccaaeb9371..767ae556bc 100644 --- a/tests/base/work_stream_04.cc +++ b/tests/base/work_stream_04.cc @@ -30,12 +30,12 @@ struct ScratchData void foo (const std::vector::iterator, - ScratchData&, - unsigned int&) + ScratchData &, + unsigned int &) { } -void bar (const unsigned int&) +void bar (const unsigned int &) { } @@ -48,14 +48,14 @@ void test () // first run with only a worker WorkStream::run (v.begin(), v.end(), &foo, - std_cxx11::function(), + std_cxx11::function(), ScratchData(), 0U); - + // next run with only a copier WorkStream::run (v.begin(), v.end(), std_cxx11::function::iterator, - ScratchData&,unsigned int&)>(), + ScratchData &,unsigned int &)>(), &bar, ScratchData(), 0U); diff --git a/tests/bits/cone_02.cc b/tests/bits/cone_02.cc index 1a5dd1a258..ea05ece2fc 100644 --- a/tests/bits/cone_02.cc +++ b/tests/bits/cone_02.cc @@ -40,7 +40,7 @@ template void check () { deallog << "dim=" << dim << std::endl; - + Triangulation triangulation; double r1 = 0.5, r2 = 1.0, halfl = 0.25; GridGenerator::truncated_cone (triangulation, r1, r2, halfl); diff --git a/tests/bits/data_out_08.cc b/tests/bits/data_out_08.cc index e740472f68..dfb8812937 100644 --- a/tests/bits/data_out_08.cc +++ b/tests/bits/data_out_08.cc @@ -20,7 +20,7 @@ 466: -------------------------------------------------------- 466: An error occurred in line <306> of file in function 466: void dealii::DataOut::build_one_patch(const std::pair::cell_iterator, unsigned int>*, dealii::internal::DataOut::ParallelData&, dealii::DataOutBase::Patch&, dealii::DataOut::CurvedCellRegion, std::vector >&) [with int dim = 2, DH = dealii::DoFHandler<2>, typename dealii::DataOut_DoFData::cell_iterator = dealii::TriaIterator >] -466: The violated condition was: +466: The violated condition was: 466: cell_and_index->second < patches.size() 466: The name and call sequence of the exception was: 466: ExcInternalError() @@ -42,46 +42,46 @@ std::string output_file_name = "output"; template - class FilteredDataOut : public DataOut +class FilteredDataOut : public DataOut +{ +public: + FilteredDataOut (const unsigned int subdomain_id) + : + subdomain_id (subdomain_id) + {} + + virtual typename DataOut::cell_iterator + first_cell () + { + typename DataOut::active_cell_iterator + cell = this->dofs->begin_active(); + while ((cell != this->dofs->end()) && + (cell->subdomain_id() != subdomain_id)) + ++cell; + + return cell; + } + + virtual typename DataOut::cell_iterator + next_cell (const typename DataOut::cell_iterator &old_cell) { - public: - FilteredDataOut (const unsigned int subdomain_id) - : - subdomain_id (subdomain_id) - {} - - virtual typename DataOut::cell_iterator - first_cell () - { - typename DataOut::active_cell_iterator - cell = this->dofs->begin_active(); - while ((cell != this->dofs->end()) && - (cell->subdomain_id() != subdomain_id)) - ++cell; - - return cell; - } - - virtual typename DataOut::cell_iterator - next_cell (const typename DataOut::cell_iterator &old_cell) - { - if (old_cell != this->dofs->end()) - { - const IteratorFilters::SubdomainEqualTo - predicate(subdomain_id); - - return - ++(FilteredIterator - ::active_cell_iterator> - (predicate,old_cell)); - } - else - return old_cell; - } - - private: - const unsigned int subdomain_id; - }; + if (old_cell != this->dofs->end()) + { + const IteratorFilters::SubdomainEqualTo + predicate(subdomain_id); + + return + ++(FilteredIterator + ::active_cell_iterator> + (predicate,old_cell)); + } + else + return old_cell; + } + +private: + const unsigned int subdomain_id; +}; template @@ -93,7 +93,7 @@ check () tria.refine_global (1); Vector cell_data(4); - for (unsigned int i=0;i<4;++i) + for (unsigned int i=0; i<4; ++i) cell_data(i)=i*1.0; // this should skip the first cell @@ -129,8 +129,8 @@ main(int argc, char **argv) deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + check<2>(); - + return 0; } diff --git a/tests/bits/data_out_09.cc b/tests/bits/data_out_09.cc index 62c3f16569..31b329be01 100644 --- a/tests/bits/data_out_09.cc +++ b/tests/bits/data_out_09.cc @@ -42,7 +42,7 @@ void test() Triangulation<2> tria; GridGenerator::hyper_cube (tria); tria.refine_global(1); - + FE_DGQ<2> fe(0); DoFHandler<2> dof_handler(tria); dof_handler.distribute_dofs(fe); @@ -52,13 +52,13 @@ void test() renumbering[1]=2; renumbering[2]=1; renumbering[3]=0; - + dof_handler.renumber_dofs(renumbering); - + Vector v_node(dof_handler.n_dofs()); Vector v_cell(dof_handler.n_dofs()); - for (unsigned int i=0;i data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (v_node, "node_data", DataOut<2>::type_dof_data); @@ -78,7 +78,7 @@ void test() //only tria, output correctly deallog << "*** Check cell data only:" << std::endl; - { + { DataOut<2> data_out; data_out.attach_triangulation (tria); data_out.add_data_vector (v_cell, "cell_data"); @@ -86,19 +86,19 @@ void test() data_out.write_vtk (deallog.get_file_stream()); } - + //error if both deallog << "*** should fail:" << std::endl; try - { - DataOut<2> data_out; - data_out.attach_dof_handler (dof_handler); - data_out.add_data_vector (v_cell, "cell_data"); - data_out.build_patches (); + { + DataOut<2> data_out; + data_out.attach_dof_handler (dof_handler); + data_out.add_data_vector (v_cell, "cell_data"); + data_out.build_patches (); - data_out.write_vtk (deallog.get_file_stream()); - } + data_out.write_vtk (deallog.get_file_stream()); + } catch (...) { deallog << "exception" << std::endl; @@ -106,7 +106,7 @@ void test() // works if we use the other add_data_vector: deallog << "*** Check node data only:" << std::endl; - { + { DataOut<2> data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (dof_handler, v_node, "node_data"); @@ -114,9 +114,9 @@ void test() data_out.write_vtk (deallog.get_file_stream()); } - - - + + + } @@ -125,6 +125,6 @@ int main() deal_II_exceptions::disable_abort_on_exception(); initlog(); test(); - + } diff --git a/tests/bits/data_out_multi_dh_03.cc b/tests/bits/data_out_multi_dh_03.cc index 6a255c8a66..f10cfe3f43 100644 --- a/tests/bits/data_out_multi_dh_03.cc +++ b/tests/bits/data_out_multi_dh_03.cc @@ -53,7 +53,7 @@ test () DataOut data_out; data_out.add_data_vector (dof1, v1, "scalar"); std::vector - component_interpretation(dim,DataComponentInterpretation::component_is_part_of_vector); + component_interpretation(dim,DataComponentInterpretation::component_is_part_of_vector); data_out.add_data_vector (dof2, v2, std::vector(dim,"vector"), component_interpretation); data_out.build_patches (); diff --git a/tests/bits/data_out_multi_dh_05.cc b/tests/bits/data_out_multi_dh_05.cc index bc4df59739..2dc1b271cc 100644 --- a/tests/bits/data_out_multi_dh_05.cc +++ b/tests/bits/data_out_multi_dh_05.cc @@ -54,7 +54,7 @@ test () for (unsigned int i=0; i - component_interpretation(dim,DataComponentInterpretation::component_is_part_of_vector); + component_interpretation(dim,DataComponentInterpretation::component_is_part_of_vector); DataOut data_out; data_out.add_data_vector (dof1, v1, "scalar1"); data_out.add_data_vector (dof2, v2, std::vector(dim,"vector1"), diff --git a/tests/bits/data_out_stack_01.cc b/tests/bits/data_out_stack_01.cc index dab5ca0a38..47e8635383 100644 --- a/tests/bits/data_out_stack_01.cc +++ b/tests/bits/data_out_stack_01.cc @@ -27,8 +27,8 @@ std::string output_file_name = "output"; template void check_this (const DoFHandler &, - const Vector &, - const Vector &) + const Vector &, + const Vector &) { // 3d would generate 4d data, which // we don't presently support @@ -46,7 +46,7 @@ check_this<1> (const DoFHandler<1> &dof_handler, const Vector &v_cell) { const unsigned int dim = 1; - + DataOutStack data_out_stack; data_out_stack.declare_data_vector ("node_data", DataOutStack::dof_vector); diff --git a/tests/bits/data_out_stack_02.cc b/tests/bits/data_out_stack_02.cc index 4bf8c4a327..2c19e26fb0 100644 --- a/tests/bits/data_out_stack_02.cc +++ b/tests/bits/data_out_stack_02.cc @@ -30,8 +30,8 @@ std::string output_file_name = "output"; template void check_this (const DoFHandler &, - const Vector &, - const Vector &) + const Vector &, + const Vector &) { // 3d would generate 4d data, which // we don't presently support @@ -49,7 +49,7 @@ check_this<1> (const DoFHandler<1> &dof_handler, const Vector &v_cell) { const unsigned int dim = 1; - + DataOutStack data_out_stack; data_out_stack.declare_data_vector ("node_data", DataOutStack::dof_vector); diff --git a/tests/bits/deal_solver_04.cc b/tests/bits/deal_solver_04.cc index ee108412eb..40a1ad990f 100644 --- a/tests/bits/deal_solver_04.cc +++ b/tests/bits/deal_solver_04.cc @@ -40,8 +40,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/bits/deal_solver_05.cc b/tests/bits/deal_solver_05.cc index 05c46a9ca5..eea0ad83f0 100644 --- a/tests/bits/deal_solver_05.cc +++ b/tests/bits/deal_solver_05.cc @@ -39,8 +39,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/bits/distorted_cells_02.cc b/tests/bits/distorted_cells_02.cc index 1deb686af9..bd808738fa 100644 --- a/tests/bits/distorted_cells_02.cc +++ b/tests/bits/distorted_cells_02.cc @@ -41,7 +41,7 @@ void check () GridIn gi; std::ifstream in (dim == 2 ? SOURCE_DIR "/grids/2d" : - SOURCE_DIR "/grids/3d"); + SOURCE_DIR "/grids/3d"); gi.attach_triangulation (coarse_grid); diff --git a/tests/bits/dof_tools_21_b_x.cc b/tests/bits/dof_tools_21_b_x.cc index 61f598a92f..52f22c10fe 100644 --- a/tests/bits/dof_tools_21_b_x.cc +++ b/tests/bits/dof_tools_21_b_x.cc @@ -139,11 +139,11 @@ void print_matching(DoFHandler &dof_handler) deallog << "DoFs of face_1:" << std::endl; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) deallog << dofs_1[i] << " is located at " - << support_points[dofs_1[i]] << std::endl; + << support_points[dofs_1[i]] << std::endl; deallog << "DoFs of face_2:" << std::endl; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) deallog << dofs_2[i] << " is located at " - << support_points[dofs_2[i]] << std::endl; + << support_points[dofs_2[i]] << std::endl; std::bitset<3> orientation; diff --git a/tests/bits/dof_tools_21_b_x_q3.cc b/tests/bits/dof_tools_21_b_x_q3.cc index e13c50cbc4..0ce1569e7b 100644 --- a/tests/bits/dof_tools_21_b_x_q3.cc +++ b/tests/bits/dof_tools_21_b_x_q3.cc @@ -173,11 +173,11 @@ void print_matching(DoFHandler &dof_handler) deallog << "DoFs of face_1:" << std::endl; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) deallog << dofs_1[i] << " is located at " - << support_points[dofs_1[i]] << std::endl; + << support_points[dofs_1[i]] << std::endl; deallog << "DoFs of face_2:" << std::endl; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) deallog << dofs_2[i] << " is located at " - << support_points[dofs_2[i]] << std::endl; + << support_points[dofs_2[i]] << std::endl; std::bitset<3> orientation; diff --git a/tests/bits/dof_tools_21_b_y.cc b/tests/bits/dof_tools_21_b_y.cc index 417b586e24..8a5d89bd6b 100644 --- a/tests/bits/dof_tools_21_b_y.cc +++ b/tests/bits/dof_tools_21_b_y.cc @@ -138,11 +138,11 @@ void print_matching(DoFHandler &dof_handler) deallog << "DoFs of face_1:" << std::endl; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) deallog << dofs_1[i] << " is located at " - << support_points[dofs_1[i]] << std::endl; + << support_points[dofs_1[i]] << std::endl; deallog << "DoFs of face_2:" << std::endl; for (unsigned int i = 0; i < fe.dofs_per_face; ++i) deallog << dofs_2[i] << " is located at " - << support_points[dofs_2[i]] << std::endl; + << support_points[dofs_2[i]] << std::endl; std::bitset<3> orientation; diff --git a/tests/bits/dynamic_sparsity_pattern_iterator_02.cc b/tests/bits/dynamic_sparsity_pattern_iterator_02.cc index 1c58e9969d..a8db04d9c2 100644 --- a/tests/bits/dynamic_sparsity_pattern_iterator_02.cc +++ b/tests/bits/dynamic_sparsity_pattern_iterator_02.cc @@ -39,7 +39,7 @@ void test () i = sp.begin(1); deallog << i->row() << ' ' << i->column() << std::endl; - deallog << "OK" << std::endl; + deallog << "OK" << std::endl; } diff --git a/tests/bits/dynamic_sparsity_pattern_iterator_03.cc b/tests/bits/dynamic_sparsity_pattern_iterator_03.cc index f3d67e8043..1b90ad9b5f 100644 --- a/tests/bits/dynamic_sparsity_pattern_iterator_03.cc +++ b/tests/bits/dynamic_sparsity_pattern_iterator_03.cc @@ -44,7 +44,7 @@ void test () i = sp.begin(1); deallog << i->row() << ' ' << i->column() << std::endl; - deallog << "OK" << std::endl; + deallog << "OK" << std::endl; } diff --git a/tests/bits/dynamic_sparsity_pattern_iterator_04.cc b/tests/bits/dynamic_sparsity_pattern_iterator_04.cc index 37ed68dc60..23082eb87e 100644 --- a/tests/bits/dynamic_sparsity_pattern_iterator_04.cc +++ b/tests/bits/dynamic_sparsity_pattern_iterator_04.cc @@ -19,7 +19,7 @@ /* crash: -/usr/include/c++/4.8/debug/safe_iterator.h:506:error: attempt to compare a +/usr/include/c++/4.8/debug/safe_iterator.h:506:error: attempt to compare a singular iterator to a singular iterator. Objects involved in the operation: @@ -57,16 +57,16 @@ void iterate(DynamicSparsityPattern &sp) { for (unsigned int row=0; row ePos; ePos(0) = 0.0653630060373507487669897386695; ePos(1) = 1125.59175030825804242340382189; @@ -103,12 +103,12 @@ void test() create_coarse_grid(triangulation); // first Tria with just one cell Triangulation<2>::active_cell_iterator it = triangulation.begin(); - + Point<2> p; p = mapping.transform_real_to_unit_cell(it, ePos); deallog << "A: " << p << std::endl; - // throws: + // throws: p = mapping2.transform_real_to_unit_cell(it, ePos); deallog << "B: " << p << std::endl; diff --git a/tests/bits/find_cell_11.cc b/tests/bits/find_cell_11.cc index 0297c9c006..efbc5b159e 100644 --- a/tests/bits/find_cell_11.cc +++ b/tests/bits/find_cell_11.cc @@ -51,13 +51,13 @@ void test() { Triangulation<2> tr; GridGenerator::hyper_cube(tr); - + Point< 2 > p; p(0) = -0.1; p(1) = 0.5; MappingQ<2> mapping(1); - + try { GridTools::find_active_cell_around_point (mapping, tr, p); diff --git a/tests/bits/find_cell_12.cc b/tests/bits/find_cell_12.cc index 65027d8d71..190f5a569d 100644 --- a/tests/bits/find_cell_12.cc +++ b/tests/bits/find_cell_12.cc @@ -59,20 +59,22 @@ void test() GridGenerator::subdivided_hyper_rectangle(triangulation, - n_cells, - left_bottom, - right_top, - true); + n_cells, + left_bottom, + right_top, + true); typename Triangulation<2>::active_cell_iterator - cell = triangulation.begin_active(), - endc = triangulation.end(); - for (; cell!=endc; ++cell){ - Point<2> cell_center = cell->center(); - if (abs(cell_center(0) - 1500) < 550){ - cell->set_refine_flag (); + cell = triangulation.begin_active(), + endc = triangulation.end(); + for (; cell!=endc; ++cell) + { + Point<2> cell_center = cell->center(); + if (abs(cell_center(0) - 1500) < 550) + { + cell->set_refine_flag (); + } } - } triangulation.execute_coarsening_and_refinement (); @@ -81,10 +83,10 @@ void test() try { std::pair::active_cell_iterator, Point<2> > current_cell = - GridTools::find_active_cell_around_point(MappingQ1<2>(), triangulation, test_point); + GridTools::find_active_cell_around_point(MappingQ1<2>(), triangulation, test_point); deallog << "cell: index = " << current_cell.first->index() - << " level = " << current_cell.first->level() << std::endl; + << " level = " << current_cell.first->level() << std::endl; deallog << " pos: " << current_cell.second << std::endl; } catch (GridTools::ExcPointNotFound<2> &e) diff --git a/tests/bits/make_boundary_constraints_03.cc b/tests/bits/make_boundary_constraints_03.cc index ac8727aa20..f88ba7c3af 100644 --- a/tests/bits/make_boundary_constraints_03.cc +++ b/tests/bits/make_boundary_constraints_03.cc @@ -48,13 +48,13 @@ void test () GridGenerator::hyper_cube (triangulation, -1, 1); FESystem fe(FE_Q<2>(1),1,FE_Q<2>(2),2); - + deallog << "Number of cells: " << triangulation.n_active_cells() << std::endl; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - //DoFRenumbering::component_wise(dof_handler); + //DoFRenumbering::component_wise(dof_handler); deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl; @@ -67,7 +67,7 @@ void test () constraints.close(); deallog << "Number of Constraints: " << constraints.n_constraints()< quadrature_formula(fe.get_unit_support_points()); + Quadrature<2> quadrature_formula(fe.get_unit_support_points()); FEValues<2> fe_values (fe, quadrature_formula, update_values | update_gradients | update_JxW_values|update_q_points); @@ -85,14 +85,14 @@ void test () cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; i #include -void check (const char * content, double &v1, double &v2) +void check (const char *content, double &v1, double &v2) { ParameterHandler foo; foo.enter_subsection("bar"); diff --git a/tests/bits/parameter_handler_17.cc b/tests/bits/parameter_handler_17.cc index cabd0996c6..a1df95a2ea 100644 --- a/tests/bits/parameter_handler_17.cc +++ b/tests/bits/parameter_handler_17.cc @@ -29,7 +29,7 @@ void check () { ParameterHandler prm; prm.declare_entry ("a", "this that and the other", Patterns::Anything(), - ""); + ""); try { prm.get_double ("a"); @@ -56,7 +56,7 @@ void check () { deallog << "get_bool() detected the mistake" << std::endl; } - + } diff --git a/tests/bits/parameter_handler_18.cc b/tests/bits/parameter_handler_18.cc index 7a11f675cc..fa3c84c8ae 100644 --- a/tests/bits/parameter_handler_18.cc +++ b/tests/bits/parameter_handler_18.cc @@ -36,7 +36,7 @@ void test () bool okay = foo.read_input(SOURCE_DIR "/parameter_handler_18.prm"); Assert(okay, ExcMessage("read_input failed")); - + foo.enter_subsection("bar"); deallog << foo.get ("val") << std::endl; foo.leave_subsection(); diff --git a/tests/bits/parameter_handler_19.cc b/tests/bits/parameter_handler_19.cc index 88f2d38c71..a74f206973 100644 --- a/tests/bits/parameter_handler_19.cc +++ b/tests/bits/parameter_handler_19.cc @@ -75,9 +75,9 @@ void check () std::string s = "set x=5\n"; bool success = prm.read_input_from_string (s.c_str()); deallog << "success? " - << success - << " (should work), x correct? " - << (prm.get_integer("x")==5) << std::endl; + << success + << " (should work), x correct? " + << (prm.get_integer("x")==5) << std::endl; prm.leave_subsection(); } diff --git a/tests/bits/parameter_handler_1_exception.cc b/tests/bits/parameter_handler_1_exception.cc index 1f29f392f3..d4794bf3d9 100644 --- a/tests/bits/parameter_handler_1_exception.cc +++ b/tests/bits/parameter_handler_1_exception.cc @@ -30,7 +30,7 @@ void check (const char *p) try { prm.declare_entry ("test_1", "abc", - Patterns::List(Patterns::Integer(-1,1),2,3)); + Patterns::List(Patterns::Integer(-1,1),2,3)); } catch (const ParameterHandler::ExcValueDoesNotMatchPattern &) { diff --git a/tests/bits/parameter_handler_1_include_fail.cc b/tests/bits/parameter_handler_1_include_fail.cc index efc5097546..369b2a8afc 100644 --- a/tests/bits/parameter_handler_1_include_fail.cc +++ b/tests/bits/parameter_handler_1_include_fail.cc @@ -32,7 +32,7 @@ void check (const char *p) std::ifstream in(p); bool status = prm.read_input (in); Assert (status == false, ExcInternalError()); - + deallog << "test_1=" << prm.get ("test_1") << std::endl; } diff --git a/tests/bits/parameter_handler_20.cc b/tests/bits/parameter_handler_20.cc index 5691a8ab39..dfedda0d22 100644 --- a/tests/bits/parameter_handler_20.cc +++ b/tests/bits/parameter_handler_20.cc @@ -23,7 +23,7 @@ #include #include -void check (const char * content) +void check (const char *content) { deallog << "* check" << std::endl; ParameterHandler foo; diff --git a/tests/bits/parameter_handler_21.cc b/tests/bits/parameter_handler_21.cc index 3adef5e166..9bad274779 100644 --- a/tests/bits/parameter_handler_21.cc +++ b/tests/bits/parameter_handler_21.cc @@ -23,18 +23,18 @@ #include #include -void check (const char *defaults, const char* defined, const char *input) +void check (const char *defaults, const char *defined, const char *input) { ParameterHandler prm; prm.declare_entry ("v", defaults, Patterns::MultipleSelection(defined), ""); - + std::stringstream in(input); prm.read_input (in); deallog << "defaults='" << defaults - << "' defined='" << defined - << "' input='" << input - << "' result='" << prm.get("v") << "'" << std::endl; + << "' defined='" << defined + << "' input='" << input + << "' result='" << prm.get("v") << "'" << std::endl; } void test() diff --git a/tests/bits/parameter_handler_3_with_alias_01.cc b/tests/bits/parameter_handler_3_with_alias_01.cc index 7083f24014..056aaa60af 100644 --- a/tests/bits/parameter_handler_3_with_alias_01.cc +++ b/tests/bits/parameter_handler_3_with_alias_01.cc @@ -50,7 +50,7 @@ int main () Patterns::Double(), "docs 3"); prm.declare_alias ("int", - "int_alias"); + "int_alias"); prm.leave_subsection (); // read and then write parameters diff --git a/tests/bits/parameter_handler_3_with_alias_02.cc b/tests/bits/parameter_handler_3_with_alias_02.cc index 08d7b5ea9c..8b7b3ddd4e 100644 --- a/tests/bits/parameter_handler_3_with_alias_02.cc +++ b/tests/bits/parameter_handler_3_with_alias_02.cc @@ -50,7 +50,7 @@ int main () Patterns::Double(), "docs 3"); prm.declare_alias ("int_alias", - "int"); + "int"); prm.leave_subsection (); // read and then write parameters diff --git a/tests/bits/parameter_handler_3_with_alias_03.cc b/tests/bits/parameter_handler_3_with_alias_03.cc index b4eb3525ec..8857dd425c 100644 --- a/tests/bits/parameter_handler_3_with_alias_03.cc +++ b/tests/bits/parameter_handler_3_with_alias_03.cc @@ -48,7 +48,7 @@ int main () Patterns::Double(), "docs 3"); prm.declare_alias ("int_alias", - "int"); + "int"); prm.leave_subsection (); // read and then write parameters diff --git a/tests/bits/parameter_handler_3_with_alias_04.cc b/tests/bits/parameter_handler_3_with_alias_04.cc index 87d2ea669c..9f407c5d18 100644 --- a/tests/bits/parameter_handler_3_with_alias_04.cc +++ b/tests/bits/parameter_handler_3_with_alias_04.cc @@ -48,7 +48,7 @@ int main () Patterns::Double(), "docs 3"); prm.declare_alias ("int_alias", - "int"); + "int"); prm.leave_subsection (); // read and then write parameters diff --git a/tests/bits/parameter_handler_4a_with_alias_deprecated.cc b/tests/bits/parameter_handler_4a_with_alias_deprecated.cc index 7e120cdf42..f532ea82c1 100644 --- a/tests/bits/parameter_handler_4a_with_alias_deprecated.cc +++ b/tests/bits/parameter_handler_4a_with_alias_deprecated.cc @@ -69,7 +69,7 @@ int main () "docs 3"); prm.declare_alias ("double", "double_alias", - true); + true); } prm.leave_subsection (); diff --git a/tests/bits/periodicity_05.cc b/tests/bits/periodicity_05.cc index b6b82be57b..ea97f5f1c2 100644 --- a/tests/bits/periodicity_05.cc +++ b/tests/bits/periodicity_05.cc @@ -89,7 +89,7 @@ private: }; Deal2PeriodicBug::Deal2PeriodicBug() -: fe(2), dof_handler(triangulation) + : fe(2), dof_handler(triangulation) {} diff --git a/tests/bits/refine_and_coarsen_for_active_cell_index.cc b/tests/bits/refine_and_coarsen_for_active_cell_index.cc index 0bb066d89d..c0b9275f1b 100644 --- a/tests/bits/refine_and_coarsen_for_active_cell_index.cc +++ b/tests/bits/refine_and_coarsen_for_active_cell_index.cc @@ -35,7 +35,7 @@ void check (const Triangulation &tria) { unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); - cell!=tria.end(); ++cell, ++index) + cell!=tria.end(); ++cell, ++index) Assert (cell->active_cell_index() == index, ExcInternalError()); } diff --git a/tests/bits/refine_and_coarsen_for_active_cell_index_02.cc b/tests/bits/refine_and_coarsen_for_active_cell_index_02.cc index 91be163f3d..5ef85261b9 100644 --- a/tests/bits/refine_and_coarsen_for_active_cell_index_02.cc +++ b/tests/bits/refine_and_coarsen_for_active_cell_index_02.cc @@ -37,7 +37,7 @@ void check (const Triangulation &tria) { unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); - cell!=tria.end(); ++cell, ++index) + cell!=tria.end(); ++cell, ++index) Assert (cell->active_cell_index() == index, ExcInternalError()); } diff --git a/tests/bits/refine_and_coarsen_for_active_cell_index_03.cc b/tests/bits/refine_and_coarsen_for_active_cell_index_03.cc index 28779bc067..c310172bb9 100644 --- a/tests/bits/refine_and_coarsen_for_active_cell_index_03.cc +++ b/tests/bits/refine_and_coarsen_for_active_cell_index_03.cc @@ -36,7 +36,7 @@ void check (const Triangulation &tria) { unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); - cell!=tria.end(); ++cell, ++index) + cell!=tria.end(); ++cell, ++index) Assert (cell->active_cell_index() == index, ExcInternalError()); } diff --git a/tests/bits/refine_and_coarsen_for_active_cell_index_04.cc b/tests/bits/refine_and_coarsen_for_active_cell_index_04.cc index a746f73798..c7b594be27 100644 --- a/tests/bits/refine_and_coarsen_for_active_cell_index_04.cc +++ b/tests/bits/refine_and_coarsen_for_active_cell_index_04.cc @@ -39,7 +39,7 @@ void check (const Triangulation &tria) { unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); - cell!=tria.end(); ++cell, ++index) + cell!=tria.end(); ++cell, ++index) Assert (cell->active_cell_index() == index, ExcInternalError()); } diff --git a/tests/bits/refine_and_coarsen_for_active_cell_index_05.cc b/tests/bits/refine_and_coarsen_for_active_cell_index_05.cc index e6b3041f50..d36096993f 100644 --- a/tests/bits/refine_and_coarsen_for_active_cell_index_05.cc +++ b/tests/bits/refine_and_coarsen_for_active_cell_index_05.cc @@ -42,7 +42,7 @@ void check (const Triangulation &tria) { unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); - cell!=tria.end(); ++cell, ++index) + cell!=tria.end(); ++cell, ++index) Assert (cell->active_cell_index() == index, ExcInternalError()); } @@ -108,7 +108,7 @@ void check () check (tria); { Triangulation x; - + // save data to archive std::ostringstream oss; { @@ -122,7 +122,7 @@ void check () // restore triangulation ia >> x; } - + check(x); } @@ -137,7 +137,7 @@ void check () check (tria); { Triangulation x; - + // save data to archive std::ostringstream oss; { @@ -151,7 +151,7 @@ void check () // restore triangulation ia >> x; } - + check(x); } diff --git a/tests/bits/step-10-high-order.cc b/tests/bits/step-10-high-order.cc index b8a7774d74..3ad7ab94d1 100644 --- a/tests/bits/step-10-high-order.cc +++ b/tests/bits/step-10-high-order.cc @@ -84,8 +84,8 @@ void compute_pi_by_area () long double area = 0; typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); for (; cell!=endc; ++cell) { x_fe_values.reinit (cell); @@ -150,8 +150,8 @@ void compute_pi_by_perimeter () dof_handler.distribute_dofs (fe); typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); long double perimeter = 0; for (; cell!=endc; ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) diff --git a/tests/bits/step-13.cc b/tests/bits/step-13.cc index 4b38ec0a49..36184da48d 100644 --- a/tests/bits/step-13.cc +++ b/tests/bits/step-13.cc @@ -368,10 +368,10 @@ namespace LaplaceSolver Threads::ThreadGroup<> threads; for (unsigned int thread=0; thread::assemble_matrix, *this, - linear_system, - thread_ranges[thread].first, - thread_ranges[thread].second, - mutex); + linear_system, + thread_ranges[thread].first, + thread_ranges[thread].second, + mutex); assemble_rhs (linear_system.rhs); linear_system.hanging_node_constraints.condense (linear_system.rhs); @@ -449,8 +449,8 @@ namespace LaplaceSolver = &DoFTools::make_hanging_node_constraints; Threads::Thread<> - mhnc_thread = Threads::new_thread (mhnc_p, dof_handler, - hanging_node_constraints); + mhnc_thread = Threads::new_thread (mhnc_p, dof_handler, + hanging_node_constraints); sparsity_pattern.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), diff --git a/tests/bits/step-14.cc b/tests/bits/step-14.cc index ecac8d547a..7807b5b313 100644 --- a/tests/bits/step-14.cc +++ b/tests/bits/step-14.cc @@ -206,7 +206,7 @@ namespace Evaluation { fe_values.reinit (cell); fe_values.get_function_gradients (solution, - solution_gradients); + solution_gradients); unsigned int q_point = 0; for (; q_point - mhnc_thread = Threads::new_thread (mhnc_p,dof_handler, hanging_node_constraints); + mhnc_thread = Threads::new_thread (mhnc_p,dof_handler, hanging_node_constraints); sparsity_pattern.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), @@ -1815,7 +1815,7 @@ namespace LaplaceSolver ->value_list (cell_data.fe_values.get_quadrature_points(), cell_data.rhs_values); cell_data.fe_values.get_function_hessians (primal_solution, - cell_data.cell_grad_grads); + cell_data.cell_grad_grads); cell_data.fe_values.get_function_values (dual_weights, cell_data.dual_weights); @@ -1844,7 +1844,7 @@ namespace LaplaceSolver face_data.fe_face_values_cell.reinit (cell, face_no); face_data.fe_face_values_cell.get_function_gradients (primal_solution, - face_data.cell_grads); + face_data.cell_grads); Assert (cell->neighbor(face_no).state() == IteratorState::valid, ExcInternalError()); @@ -1853,7 +1853,7 @@ namespace LaplaceSolver const active_cell_iterator neighbor = cell->neighbor(face_no); face_data.fe_face_values_neighbor.reinit (neighbor, neighbor_neighbor); face_data.fe_face_values_neighbor.get_function_gradients (primal_solution, - face_data.neighbor_grads); + face_data.neighbor_grads); for (unsigned int p=0; p::assemble_multigrid () std::vector local_dof_indices (dofs_per_cell); typename DoFHandler::cell_iterator cell = mg_dof_handler.begin(), - endc = mg_dof_handler.end(); + endc = mg_dof_handler.end(); for (; cell!=endc; ++cell) { const unsigned int level = cell->level(); diff --git a/tests/bits/step-16b.cc b/tests/bits/step-16b.cc index a2fc9aedec..60f53ea165 100644 --- a/tests/bits/step-16b.cc +++ b/tests/bits/step-16b.cc @@ -207,7 +207,7 @@ void LaplaceProblem::assemble_multigrid () std::vector local_dof_indices (dofs_per_cell); typename DoFHandler::cell_iterator cell = mg_dof_handler.begin(), - endc = mg_dof_handler.end(); + endc = mg_dof_handler.end(); for (; cell!=endc; ++cell) { const unsigned int level = cell->level(); diff --git a/tests/bits/step-51.cc b/tests/bits/step-51.cc index 250b215223..3b8568568b 100644 --- a/tests/bits/step-51.cc +++ b/tests/bits/step-51.cc @@ -73,27 +73,27 @@ namespace Step51 template <> const Point<1> SolutionBase<1>::source_centers[SolutionBase<1>::n_source_centers] - = { Point<1>(-1.0 / 3.0), - Point<1>(0.0), - Point<1>(+1.0 / 3.0) - }; + = { Point<1>(-1.0 / 3.0), + Point<1>(0.0), + Point<1>(+1.0 / 3.0) + }; template <> const Point<2> SolutionBase<2>::source_centers[SolutionBase<2>::n_source_centers] - = { Point<2>(-0.5, +0.5), - Point<2>(-0.5, -0.5), - Point<2>(+0.5, -0.5) - }; + = { Point<2>(-0.5, +0.5), + Point<2>(-0.5, -0.5), + Point<2>(+0.5, -0.5) + }; template <> const Point<3> SolutionBase<3>::source_centers[SolutionBase<3>::n_source_centers] - = { Point<3>(-0.5, +0.5, 0.25), - Point<3>(-0.6, -0.5, -0.125), - Point<3>(+0.5, -0.5, 0.5) - }; + = { Point<3>(-0.5, +0.5, 0.25), + Point<3>(-0.6, -0.5, -0.125), + Point<3>(+0.5, -0.5, 0.5) + }; template const double SolutionBase::width = 1./5.; @@ -598,9 +598,9 @@ namespace Step51 for (unsigned int q=0; q convection - = scratch.convection_velocity.value(scratch.fe_values_local.quadrature_point(q)); + = scratch.convection_velocity.value(scratch.fe_values_local.quadrature_point(q)); const double JxW = scratch.fe_values_local.JxW(q); for (unsigned int k=0; k normal = scratch.fe_face_values.normal_vector(q); const Tensor<1,dim> convection - = scratch.convection_velocity.value(quadrature_point); + = scratch.convection_velocity.value(quadrature_point); const double tau_stab = (5. + std::abs(convection * normal)); @@ -711,7 +711,7 @@ namespace Step51 const unsigned int jj=scratch.fe_local_support_on_face[face][j]; scratch.ll_matrix(ii,jj) += tau_stab * scratch.u_phi[i] * scratch.u_phi[j] * JxW; } - + if (task_data.trace_reconstruct) for (unsigned int i=0; i const Point<1> SolutionBase<1>::source_centers[SolutionBase<1>::n_source_centers] - = { Point<1>(-1.0 / 3.0), - Point<1>(0.0), - Point<1>(+1.0 / 3.0) - }; + = { Point<1>(-1.0 / 3.0), + Point<1>(0.0), + Point<1>(+1.0 / 3.0) + }; template <> const Point<2> SolutionBase<2>::source_centers[SolutionBase<2>::n_source_centers] - = { Point<2>(-0.5, +0.5), - Point<2>(-0.5, -0.5), - Point<2>(+0.5, -0.5) - }; + = { Point<2>(-0.5, +0.5), + Point<2>(-0.5, -0.5), + Point<2>(+0.5, -0.5) + }; template <> const Point<3> SolutionBase<3>::source_centers[SolutionBase<3>::n_source_centers] - = { Point<3>(-0.5, +0.5, 0.25), - Point<3>(-0.6, -0.5, -0.125), - Point<3>(+0.5, -0.5, 0.5) - }; + = { Point<3>(-0.5, +0.5, 0.25), + Point<3>(-0.6, -0.5, -0.125), + Point<3>(+0.5, -0.5, 0.5) + }; template const double SolutionBase::width = 1./5.; @@ -598,9 +598,9 @@ namespace Step51 for (unsigned int q=0; q convection - = scratch.convection_velocity.value(scratch.fe_values_local.quadrature_point(q)); + = scratch.convection_velocity.value(scratch.fe_values_local.quadrature_point(q)); const double JxW = scratch.fe_values_local.JxW(q); for (unsigned int k=0; k normal = scratch.fe_face_values.normal_vector(q); const Tensor<1,dim> convection - = scratch.convection_velocity.value(quadrature_point); + = scratch.convection_velocity.value(quadrature_point); const double tau_stab = (5. + std::abs(convection * normal)); @@ -711,7 +711,7 @@ namespace Step51 const unsigned int jj=scratch.fe_local_support_on_face[face][j]; scratch.ll_matrix(ii,jj) += tau_stab * scratch.u_phi[i] * scratch.u_phi[j] * JxW; } - + if (task_data.trace_reconstruct) for (unsigned int i=0; i::refine_grid () estimated_error_per_cell); GridRefinement::refine_and_coarsen_optimize (triangulation, - estimated_error_per_cell, - 5); + estimated_error_per_cell, + 5); triangulation.execute_coarsening_and_refinement (); } diff --git a/tests/bits/step-6-racoptimize.cc b/tests/bits/step-6-racoptimize.cc index 7e9132be81..cbb1604ca5 100644 --- a/tests/bits/step-6-racoptimize.cc +++ b/tests/bits/step-6-racoptimize.cc @@ -300,7 +300,7 @@ void LaplaceProblem::refine_grid () estimated_error_per_cell); GridRefinement::refine_and_coarsen_optimize (triangulation, - estimated_error_per_cell); + estimated_error_per_cell); triangulation.execute_coarsening_and_refinement (); } diff --git a/tests/codim_one/boundary_indicator_01.cc b/tests/codim_one/boundary_indicator_01.cc index 7ed0b80088..b1487350bf 100644 --- a/tests/codim_one/boundary_indicator_01.cc +++ b/tests/codim_one/boundary_indicator_01.cc @@ -91,7 +91,7 @@ int main () std::set boundary_ids; boundary_ids.insert (0); GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh, - boundary_ids); + boundary_ids); deallog << volume_mesh.n_active_cells () << std::endl; deallog << boundary_mesh.n_active_cells () << std::endl; diff --git a/tests/codim_one/data_out_03.cc b/tests/codim_one/data_out_03.cc index c4bb944aa5..83f14d0d67 100644 --- a/tests/codim_one/data_out_03.cc +++ b/tests/codim_one/data_out_03.cc @@ -94,7 +94,7 @@ int main () boundary_ids.insert(0); GridGenerator::extract_boundary_mesh (volume_mesh, tria, - boundary_ids); + boundary_ids); // test for the position MappingQ<2,3> mapping(mapping_degree,true); diff --git a/tests/codim_one/extract_boundary_mesh_00.cc b/tests/codim_one/extract_boundary_mesh_00.cc index 15916d1d74..1e85de7926 100644 --- a/tests/codim_one/extract_boundary_mesh_00.cc +++ b/tests/codim_one/extract_boundary_mesh_00.cc @@ -179,7 +179,7 @@ int main () surface_to_volume_mapping = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh, - boundary_ids); + boundary_ids); if (test_vertices_orientation(boundary_mesh, surface_to_volume_mapping)) deallog << "Passed."; diff --git a/tests/codim_one/extract_boundary_mesh_07.cc b/tests/codim_one/extract_boundary_mesh_07.cc index 5a6f6245ad..db0699d7eb 100644 --- a/tests/codim_one/extract_boundary_mesh_07.cc +++ b/tests/codim_one/extract_boundary_mesh_07.cc @@ -89,8 +89,8 @@ namespace Step38 typename DoFHandler::face_iterator> element_assignment = GridGenerator::extract_boundary_mesh(space_dof_handler, - contact_dof_handler, - boundary_ids); + contact_dof_handler, + boundary_ids); contact_dof_handler.distribute_dofs(boundary_fe); diff --git a/tests/codim_one/integrate_log_2.cc b/tests/codim_one/integrate_log_2.cc index b61706d466..8c2b423c40 100644 --- a/tests/codim_one/integrate_log_2.cc +++ b/tests/codim_one/integrate_log_2.cc @@ -99,16 +99,19 @@ int main() { double qpow = pow(quad.point(q)[0], (double) power); approx_integral += qpow * quad.weight(q); - double factor = log(abs( (factored_quad.point(q)-origins[nos])[0] )/alphas[nas] ); - // This code cannot work if factor is equal to - // zero. In this case, just pass the other - // quadrature formula, which should be valid anyway. - if(factor != 0.0) { - qpow *= factor; - approx_integral_factored += qpow * factored_quad.weight(q); - } else { - approx_integral_factored += qpow * quad.weight(q); - } + double factor = log(abs( (factored_quad.point(q)-origins[nos])[0] )/alphas[nas] ); + // This code cannot work if factor is equal to + // zero. In this case, just pass the other + // quadrature formula, which should be valid anyway. + if (factor != 0.0) + { + qpow *= factor; + approx_integral_factored += qpow * factored_quad.weight(q); + } + else + { + approx_integral_factored += qpow * quad.weight(q); + } } deallog << " Error(n=" << quad.size() diff --git a/tests/codim_one/integrate_one_over_r_telles.cc b/tests/codim_one/integrate_one_over_r_telles.cc index 8ac58cab57..84d40f17ff 100644 --- a/tests/codim_one/integrate_one_over_r_telles.cc +++ b/tests/codim_one/integrate_one_over_r_telles.cc @@ -39,8 +39,8 @@ using namespace dealii; double exact_integral_one_over_r ( - const unsigned int i, const unsigned int j, - const unsigned int vertex_index); + const unsigned int i, const unsigned int j, + const unsigned int vertex_index); ofstream logfile("output"); @@ -66,62 +66,62 @@ main () << " =============================== " << endl; deallog << " ============================================================ " << endl; unsigned int index=0; - { - deallog << " ===============Vertex: " << vertices[index] - << " ============================= " << endl; - QTelles<2> quad(m, vertices[index]); - QGaussOneOverR<2> quad2(m, vertices[index]); + { + deallog << " ===============Vertex: " << vertices[index] + << " ============================= " << endl; + QTelles<2> quad(m, vertices[index]); + QGaussOneOverR<2> quad2(m, vertices[index]); - for (unsigned int i = 0; i < 6; ++i) - { - for (unsigned int j = 0; j < 6; ++j) - { + for (unsigned int i = 0; i < 6; ++i) + { + for (unsigned int j = 0; j < 6; ++j) + { - double exact_integral = exact_integral_one_over_r(index, i,j); - double approx_integral = 0; - double approx_integral_2 = 0; + double exact_integral = exact_integral_one_over_r(index, i,j); + double approx_integral = 0; + double approx_integral_2 = 0; - for (unsigned int q=0; q< quad.size(); ++q) - { - double x = quad.point(q)[0]; - double y = quad.point(q)[1]; - double R = sqrt(x*x+y*y); - approx_integral += ( pow(x, (double)i) * - pow(y, (double)j) / R * - quad.weight(q) ); - } + for (unsigned int q=0; q< quad.size(); ++q) + { + double x = quad.point(q)[0]; + double y = quad.point(q)[1]; + double R = sqrt(x*x+y*y); + approx_integral += ( pow(x, (double)i) * + pow(y, (double)j) / R * + quad.weight(q) ); + } - for (unsigned int q=0; q< quad2.size(); ++q) - { - double x = quad2.point(q)[0]; - double y = quad2.point(q)[1]; - double R = sqrt(x*x+y*y); - approx_integral_2 += ( pow(x, (double)i) * - pow(y, (double)j) * - quad2.weight(q) ); - } + for (unsigned int q=0; q< quad2.size(); ++q) + { + double x = quad2.point(q)[0]; + double y = quad2.point(q)[1]; + double R = sqrt(x*x+y*y); + approx_integral_2 += ( pow(x, (double)i) * + pow(y, (double)j) * + quad2.weight(q) ); + } - deallog << "f(x,y) = x^" << i - << " y^" << j - << ", Errors = " - << approx_integral - exact_integral - << ", " - << approx_integral_2 - exact_integral - << std::endl; - } - } - } - } + deallog << "f(x,y) = x^" << i + << " y^" << j + << ", Errors = " + << approx_integral - exact_integral + << ", " + << approx_integral_2 - exact_integral + << std::endl; + } + } + } } +} double exact_integral_one_over_r(const unsigned int vertex_index, - const unsigned int i, - const unsigned int j) - { - Assert(vertex_index < 4, ExcInternalError()); - Assert(i<6, ExcNotImplemented()); - Assert(j<6, ExcNotImplemented()); + const unsigned int i, + const unsigned int j) +{ + Assert(vertex_index < 4, ExcInternalError()); + Assert(i<6, ExcNotImplemented()); + Assert(j<6, ExcNotImplemented()); // The integrals are computed using the following maple snippet of // code: @@ -147,156 +147,158 @@ double exact_integral_one_over_r(const unsigned int vertex_index, // end do; // C(v) - static double v[4][6][6] = - { - { - { 0}}}; - if (v[0][0][0] == 0) - { - v[0][0][0] = 0.17627471740390860505e1; - v[0][0][1] = 0.64779357469631903702e0; - v[0][0][2] = 0.38259785823210634567e0; - v[0][0][3] = 0.26915893322379450224e0; - v[0][0][4] = 0.20702239737104695572e0; - v[0][0][5] = 0.16800109713227567467e0; - v[0][1][0] = 0.64779357469631903702e0; - v[0][1][1] = 0.27614237491539669920e0; - v[0][1][2] = 0.17015838751246776515e0; - v[0][1][3] = 0.12189514164974600651e0; - v[0][1][4] = 0.94658660368131133694e-1; - v[0][1][5] = 0.77263794021029438797e-1; - v[0][2][0] = 0.38259785823210634567e0; - v[0][2][1] = 0.17015838751246776515e0; - v[0][2][2] = 0.10656799507071040471e0; - v[0][2][3] = 0.76947022258735165920e-1; - v[0][2][4] = 0.60022626787495395021e-1; - v[0][2][5] = 0.49131622931360879320e-1; - v[0][3][0] = 0.26915893322379450224e0; - v[0][3][1] = 0.12189514164974600651e0; - v[0][3][2] = 0.76947022258735165919e-1; - v[0][3][3] = 0.55789184535895709637e-1; - v[0][3][4] = 0.43625068213915842136e-1; - v[0][3][5] = 0.35766126849971778500e-1; - v[0][4][0] = 0.20702239737104695572e0; - v[0][4][1] = 0.94658660368131133694e-1; - v[0][4][2] = 0.60022626787495395021e-1; - v[0][4][3] = 0.43625068213915842137e-1; - v[0][4][4] = 0.34164088852375945192e-1; - v[0][4][5] = 0.28037139560980277614e-1; - v[0][5][0] = 0.16800109713227567467e0; - v[0][5][1] = 0.77263794021029438797e-1; - v[0][5][2] = 0.49131622931360879320e-1; - v[0][5][3] = 0.35766126849971778501e-1; - v[0][5][4] = 0.28037139560980277614e-1; - v[0][5][5] = 0.23024181049838367777e-1; - v[1][0][0] = 0.17627471740390860505e1; - v[1][0][1] = 0.64779357469631903702e0; - v[1][0][2] = 0.38259785823210634567e0; - v[1][0][3] = 0.26915893322379450224e0; - v[1][0][4] = 0.20702239737104695572e0; - v[1][0][5] = 0.16800109713227567467e0; - v[1][1][0] = 0.11149535993427670134e1; - v[1][1][1] = 0.37165119978092233782e0; - v[1][1][2] = 0.21243947071963858053e0; - v[1][1][3] = 0.14726379157404849573e0; - v[1][1][4] = 0.11236373700291582202e0; - v[1][1][5] = 0.90737303111246235871e-1; - v[1][2][0] = 0.84975788287855432210e0; - v[1][2][1] = 0.26566721237799340376e0; - v[1][2][2] = 0.14884907827788122009e0; - v[1][2][3] = 0.10231567218303765515e0; - v[1][2][4] = 0.77727703422280083352e-1; - v[1][2][5] = 0.62605132021577676395e-1; - v[1][3][0] = 0.69800109142265347423e0; - v[1][3][1] = 0.20794647083778622837e0; - v[1][3][2] = 0.11487965864809909847e0; - v[1][3][3] = 0.78525390514866270852e-1; - v[1][3][4] = 0.59489228415223897572e-1; - v[1][3][5] = 0.47838457013298217744e-1; - v[1][4][0] = 0.59754668912231692323e0; - v[1][4][1] = 0.17125249387868593878e0; - v[1][4][2] = 0.93606816359052444729e-1; - v[1][4][3] = 0.63728830247554475330e-1; - v[1][4][4] = 0.48187332620207367724e-1; - v[1][4][5] = 0.38708290797416359020e-1; - v[1][5][0] = 0.52527944036356840363e0; - v[1][5][1] = 0.14574366656617935708e0; - v[1][5][2] = 0.78997159795636003667e-1; - v[1][5][3] = 0.53620816423066464705e-1; - v[1][5][4] = 0.40487985967086264433e-1; - v[1][5][5] = 0.32498604596082509165e-1; - v[2][0][0] = 0.17627471740390860505e1; - v[2][0][1] = 0.11149535993427670134e1; - v[2][0][2] = 0.84975788287855432210e0; - v[2][0][3] = 0.69800109142265347419e0; - v[2][0][4] = 0.59754668912231692318e0; - v[2][0][5] = 0.52527944036356840362e0; - v[2][1][0] = 0.64779357469631903702e0; - v[2][1][1] = 0.37165119978092233782e0; - v[2][1][2] = 0.26566721237799340376e0; - v[2][1][3] = 0.20794647083778622835e0; - v[2][1][4] = 0.17125249387868593876e0; - v[2][1][5] = 0.14574366656617935708e0; - v[2][2][0] = 0.38259785823210634567e0; - v[2][2][1] = 0.21243947071963858053e0; - v[2][2][2] = 0.14884907827788122009e0; - v[2][2][3] = 0.11487965864809909845e0; - v[2][2][4] = 0.93606816359052444712e-1; - v[2][2][5] = 0.78997159795636003667e-1; - v[2][3][0] = 0.26915893322379450223e0; - v[2][3][1] = 0.14726379157404849572e0; - v[2][3][2] = 0.10231567218303765514e0; - v[2][3][3] = 0.78525390514866270835e-1; - v[2][3][4] = 0.63728830247554475311e-1; - v[2][3][5] = 0.53620816423066464702e-1; - v[2][4][0] = 0.20702239737104695572e0; - v[2][4][1] = 0.11236373700291582202e0; - v[2][4][2] = 0.77727703422280083352e-1; - v[2][4][3] = 0.59489228415223897563e-1; - v[2][4][4] = 0.48187332620207367713e-1; - v[2][4][5] = 0.40487985967086264434e-1; - v[2][5][0] = 0.16800109713227567468e0; - v[2][5][1] = 0.90737303111246235879e-1; - v[2][5][2] = 0.62605132021577676399e-1; - v[2][5][3] = 0.47838457013298217740e-1; - v[2][5][4] = 0.38708290797416359014e-1; - v[2][5][5] = 0.32498604596082509169e-1; - v[3][0][0] = 0.17627471740390860505e1; - v[3][0][1] = 0.11149535993427670134e1; - v[3][0][2] = 0.84975788287855432210e0; - v[3][0][3] = 0.69800109142265347419e0; - v[3][0][4] = 0.59754668912231692318e0; - v[3][0][5] = 0.52527944036356840362e0; - v[3][1][0] = 0.11149535993427670134e1; - v[3][1][1] = 0.74330239956184467563e0; - v[3][1][2] = 0.58409067050056091834e0; - v[3][1][3] = 0.49005462058486724584e0; - v[3][1][4] = 0.42629419524363098443e0; - v[3][1][5] = 0.37953577379738904654e0; - v[3][2][0] = 0.84975788287855432210e0; - v[3][2][1] = 0.58409067050056091834e0; - v[3][2][2] = 0.46727253640044873467e0; - v[3][2][3] = 0.39698780839518011595e0; - v[3][2][4] = 0.34864851772399749038e0; - v[3][2][5] = 0.31278926702684569312e0; - v[3][3][0] = 0.69800109142265347423e0; - v[3][3][1] = 0.49005462058486724586e0; - v[3][3][2] = 0.39698780839518011599e0; - v[3][3][3] = 0.34027526433872581371e0; - v[3][3][4] = 0.30088082631586196583e0; - v[3][3][5] = 0.27141910362887187844e0; - v[3][4][0] = 0.59754668912231692323e0; - v[3][4][1] = 0.42629419524363098445e0; - v[3][4][2] = 0.34864851772399749044e0; - v[3][4][3] = 0.30088082631586196576e0; - v[3][4][4] = 0.26744962339187730308e0; - v[3][4][5] = 0.24229245314748740295e0; - v[3][5][0] = 0.52527944036356840363e0; - v[3][5][1] = 0.37953577379738904655e0; - v[3][5][2] = 0.31278926702684569301e0; - v[3][5][3] = 0.27141910362887187862e0; - v[3][5][4] = 0.24229245314748740263e0; - v[3][5][5] = 0.22026586649771582089e0; - } - return v[vertex_index][i][j]; - } + static double v[4][6][6] = + { + { + { 0} + } + }; + if (v[0][0][0] == 0) + { + v[0][0][0] = 0.17627471740390860505e1; + v[0][0][1] = 0.64779357469631903702e0; + v[0][0][2] = 0.38259785823210634567e0; + v[0][0][3] = 0.26915893322379450224e0; + v[0][0][4] = 0.20702239737104695572e0; + v[0][0][5] = 0.16800109713227567467e0; + v[0][1][0] = 0.64779357469631903702e0; + v[0][1][1] = 0.27614237491539669920e0; + v[0][1][2] = 0.17015838751246776515e0; + v[0][1][3] = 0.12189514164974600651e0; + v[0][1][4] = 0.94658660368131133694e-1; + v[0][1][5] = 0.77263794021029438797e-1; + v[0][2][0] = 0.38259785823210634567e0; + v[0][2][1] = 0.17015838751246776515e0; + v[0][2][2] = 0.10656799507071040471e0; + v[0][2][3] = 0.76947022258735165920e-1; + v[0][2][4] = 0.60022626787495395021e-1; + v[0][2][5] = 0.49131622931360879320e-1; + v[0][3][0] = 0.26915893322379450224e0; + v[0][3][1] = 0.12189514164974600651e0; + v[0][3][2] = 0.76947022258735165919e-1; + v[0][3][3] = 0.55789184535895709637e-1; + v[0][3][4] = 0.43625068213915842136e-1; + v[0][3][5] = 0.35766126849971778500e-1; + v[0][4][0] = 0.20702239737104695572e0; + v[0][4][1] = 0.94658660368131133694e-1; + v[0][4][2] = 0.60022626787495395021e-1; + v[0][4][3] = 0.43625068213915842137e-1; + v[0][4][4] = 0.34164088852375945192e-1; + v[0][4][5] = 0.28037139560980277614e-1; + v[0][5][0] = 0.16800109713227567467e0; + v[0][5][1] = 0.77263794021029438797e-1; + v[0][5][2] = 0.49131622931360879320e-1; + v[0][5][3] = 0.35766126849971778501e-1; + v[0][5][4] = 0.28037139560980277614e-1; + v[0][5][5] = 0.23024181049838367777e-1; + v[1][0][0] = 0.17627471740390860505e1; + v[1][0][1] = 0.64779357469631903702e0; + v[1][0][2] = 0.38259785823210634567e0; + v[1][0][3] = 0.26915893322379450224e0; + v[1][0][4] = 0.20702239737104695572e0; + v[1][0][5] = 0.16800109713227567467e0; + v[1][1][0] = 0.11149535993427670134e1; + v[1][1][1] = 0.37165119978092233782e0; + v[1][1][2] = 0.21243947071963858053e0; + v[1][1][3] = 0.14726379157404849573e0; + v[1][1][4] = 0.11236373700291582202e0; + v[1][1][5] = 0.90737303111246235871e-1; + v[1][2][0] = 0.84975788287855432210e0; + v[1][2][1] = 0.26566721237799340376e0; + v[1][2][2] = 0.14884907827788122009e0; + v[1][2][3] = 0.10231567218303765515e0; + v[1][2][4] = 0.77727703422280083352e-1; + v[1][2][5] = 0.62605132021577676395e-1; + v[1][3][0] = 0.69800109142265347423e0; + v[1][3][1] = 0.20794647083778622837e0; + v[1][3][2] = 0.11487965864809909847e0; + v[1][3][3] = 0.78525390514866270852e-1; + v[1][3][4] = 0.59489228415223897572e-1; + v[1][3][5] = 0.47838457013298217744e-1; + v[1][4][0] = 0.59754668912231692323e0; + v[1][4][1] = 0.17125249387868593878e0; + v[1][4][2] = 0.93606816359052444729e-1; + v[1][4][3] = 0.63728830247554475330e-1; + v[1][4][4] = 0.48187332620207367724e-1; + v[1][4][5] = 0.38708290797416359020e-1; + v[1][5][0] = 0.52527944036356840363e0; + v[1][5][1] = 0.14574366656617935708e0; + v[1][5][2] = 0.78997159795636003667e-1; + v[1][5][3] = 0.53620816423066464705e-1; + v[1][5][4] = 0.40487985967086264433e-1; + v[1][5][5] = 0.32498604596082509165e-1; + v[2][0][0] = 0.17627471740390860505e1; + v[2][0][1] = 0.11149535993427670134e1; + v[2][0][2] = 0.84975788287855432210e0; + v[2][0][3] = 0.69800109142265347419e0; + v[2][0][4] = 0.59754668912231692318e0; + v[2][0][5] = 0.52527944036356840362e0; + v[2][1][0] = 0.64779357469631903702e0; + v[2][1][1] = 0.37165119978092233782e0; + v[2][1][2] = 0.26566721237799340376e0; + v[2][1][3] = 0.20794647083778622835e0; + v[2][1][4] = 0.17125249387868593876e0; + v[2][1][5] = 0.14574366656617935708e0; + v[2][2][0] = 0.38259785823210634567e0; + v[2][2][1] = 0.21243947071963858053e0; + v[2][2][2] = 0.14884907827788122009e0; + v[2][2][3] = 0.11487965864809909845e0; + v[2][2][4] = 0.93606816359052444712e-1; + v[2][2][5] = 0.78997159795636003667e-1; + v[2][3][0] = 0.26915893322379450223e0; + v[2][3][1] = 0.14726379157404849572e0; + v[2][3][2] = 0.10231567218303765514e0; + v[2][3][3] = 0.78525390514866270835e-1; + v[2][3][4] = 0.63728830247554475311e-1; + v[2][3][5] = 0.53620816423066464702e-1; + v[2][4][0] = 0.20702239737104695572e0; + v[2][4][1] = 0.11236373700291582202e0; + v[2][4][2] = 0.77727703422280083352e-1; + v[2][4][3] = 0.59489228415223897563e-1; + v[2][4][4] = 0.48187332620207367713e-1; + v[2][4][5] = 0.40487985967086264434e-1; + v[2][5][0] = 0.16800109713227567468e0; + v[2][5][1] = 0.90737303111246235879e-1; + v[2][5][2] = 0.62605132021577676399e-1; + v[2][5][3] = 0.47838457013298217740e-1; + v[2][5][4] = 0.38708290797416359014e-1; + v[2][5][5] = 0.32498604596082509169e-1; + v[3][0][0] = 0.17627471740390860505e1; + v[3][0][1] = 0.11149535993427670134e1; + v[3][0][2] = 0.84975788287855432210e0; + v[3][0][3] = 0.69800109142265347419e0; + v[3][0][4] = 0.59754668912231692318e0; + v[3][0][5] = 0.52527944036356840362e0; + v[3][1][0] = 0.11149535993427670134e1; + v[3][1][1] = 0.74330239956184467563e0; + v[3][1][2] = 0.58409067050056091834e0; + v[3][1][3] = 0.49005462058486724584e0; + v[3][1][4] = 0.42629419524363098443e0; + v[3][1][5] = 0.37953577379738904654e0; + v[3][2][0] = 0.84975788287855432210e0; + v[3][2][1] = 0.58409067050056091834e0; + v[3][2][2] = 0.46727253640044873467e0; + v[3][2][3] = 0.39698780839518011595e0; + v[3][2][4] = 0.34864851772399749038e0; + v[3][2][5] = 0.31278926702684569312e0; + v[3][3][0] = 0.69800109142265347423e0; + v[3][3][1] = 0.49005462058486724586e0; + v[3][3][2] = 0.39698780839518011599e0; + v[3][3][3] = 0.34027526433872581371e0; + v[3][3][4] = 0.30088082631586196583e0; + v[3][3][5] = 0.27141910362887187844e0; + v[3][4][0] = 0.59754668912231692323e0; + v[3][4][1] = 0.42629419524363098445e0; + v[3][4][2] = 0.34864851772399749044e0; + v[3][4][3] = 0.30088082631586196576e0; + v[3][4][4] = 0.26744962339187730308e0; + v[3][4][5] = 0.24229245314748740295e0; + v[3][5][0] = 0.52527944036356840363e0; + v[3][5][1] = 0.37953577379738904655e0; + v[3][5][2] = 0.31278926702684569301e0; + v[3][5][3] = 0.27141910362887187862e0; + v[3][5][4] = 0.24229245314748740263e0; + v[3][5][5] = 0.22026586649771582089e0; + } + return v[vertex_index][i][j]; +} diff --git a/tests/codim_one/mapping_fe_field_01.cc b/tests/codim_one/mapping_fe_field_01.cc index 1fd7259ce8..0b5fedca95 100644 --- a/tests/codim_one/mapping_fe_field_01.cc +++ b/tests/codim_one/mapping_fe_field_01.cc @@ -45,11 +45,12 @@ template void test(const unsigned int refs, - const unsigned int degree, - const unsigned int subdivisions) { + const unsigned int degree, + const unsigned int subdivisions) +{ const unsigned int id = degree+10*refs+100*subdivisions; - + Triangulation triangulation; FE_Q fe(degree); @@ -78,13 +79,13 @@ void test(const unsigned int refs, scal_sol.reinit (dof_handler.n_dofs()); scal_sol = 1; VectorTools::get_position_vector(map_dh,euler_vec); - + MappingFEField mapping(map_dh,euler_vec);; DataOut > data_out_scal; data_out_scal.attach_dof_handler (dof_handler); data_out_scal.add_data_vector (scal_sol, "scalar_data", - DataOut >::type_dof_data); + DataOut >::type_dof_data); data_out_scal.build_patches(mapping, subdivisions, @@ -104,10 +105,10 @@ void test(const unsigned int refs, data_out_euler.attach_dof_handler (map_dh); data_out_euler.add_data_vector (euler_vec, "euler_vec", - DataOut >::type_dof_data, data_component_interpretation); + DataOut >::type_dof_data, data_component_interpretation); data_out_euler.build_patches(mapping, - degree, - DataOut >::curved_inner_cells); + degree, + DataOut >::curved_inner_cells); std::string filename_euler = ( "euler_check_"+ Utilities::int_to_string(id) + ".vtu" ); std::ofstream file_euler(filename_euler.c_str()); diff --git a/tests/codim_one/transform_01.cc b/tests/codim_one/transform_01.cc index f8e67c3792..eef6b16745 100644 --- a/tests/codim_one/transform_01.cc +++ b/tests/codim_one/transform_01.cc @@ -73,7 +73,7 @@ int main () boundary_ids.insert(0); GridGenerator::extract_boundary_mesh (volume_mesh, triangulation, - boundary_ids); + boundary_ids); triangulation.set_boundary (0); GridTools::transform (&warp<3>, triangulation); diff --git a/tests/distributed_grids/2d_refinement_05.cc b/tests/distributed_grids/2d_refinement_05.cc index 7513211f00..0dd238b89e 100644 --- a/tests/distributed_grids/2d_refinement_05.cc +++ b/tests/distributed_grids/2d_refinement_05.cc @@ -87,8 +87,8 @@ void test(std::ostream & /*out*/) << tr2.n_active_cells() << std::endl; deallog << "Checksum: " - << tr.get_checksum () - << std::endl; + << tr.get_checksum () + << std::endl; assert_tria_equal(tr, tr2); diff --git a/tests/distributed_grids/3d_coarse_grid_02.cc b/tests/distributed_grids/3d_coarse_grid_02.cc index 67cc78b628..29869a1565 100644 --- a/tests/distributed_grids/3d_coarse_grid_02.cc +++ b/tests/distributed_grids/3d_coarse_grid_02.cc @@ -34,7 +34,7 @@ template void test(const char *filename) { - const char * p = strrchr(filename,'/'); + const char *p = strrchr(filename,'/'); deallog.push (p); parallel::distributed::Triangulation tr(MPI_COMM_WORLD); diff --git a/tests/distributed_grids/3d_coarsening_03.cc b/tests/distributed_grids/3d_coarsening_03.cc index 126a2d5c5c..753ed308b6 100644 --- a/tests/distributed_grids/3d_coarsening_03.cc +++ b/tests/distributed_grids/3d_coarsening_03.cc @@ -45,7 +45,7 @@ void test(std::ostream & /*out*/) gi.attach_triangulation (tr); std::ifstream in (SOURCE_DIR "/../grid/grid_in_3d/4.in"); gi.read_xda (in); - //tr.refine_global (1); + //tr.refine_global (1); } { @@ -53,7 +53,7 @@ void test(std::ostream & /*out*/) gi.attach_triangulation (tr2); std::ifstream in (SOURCE_DIR "/../grid/grid_in_3d/4.in"); gi.read_xda (in); - //tr2.refine_global (1); + //tr2.refine_global (1); } Assert (tr.n_active_cells() == tr2.n_active_cells(), diff --git a/tests/distributed_grids/3d_refinement_05.cc b/tests/distributed_grids/3d_refinement_05.cc index ff3fada586..4b40e43cf5 100644 --- a/tests/distributed_grids/3d_refinement_05.cc +++ b/tests/distributed_grids/3d_refinement_05.cc @@ -88,8 +88,8 @@ void test(std::ostream & /*out*/) << tr2.n_active_cells() << std::endl; deallog << "Checksum: " - << tr.get_checksum () - << std::endl; + << tr.get_checksum () + << std::endl; assert_tria_equal(tr, tr2); diff --git a/tests/distributed_grids/codim_01.cc b/tests/distributed_grids/codim_01.cc index 611254ec37..475116443c 100644 --- a/tests/distributed_grids/codim_01.cc +++ b/tests/distributed_grids/codim_01.cc @@ -51,6 +51,6 @@ int main(int argc, char *argv[]) initlog(); deallog.push("2-3"); - test<2,3>(deallog.get_file_stream()); + test<2,3>(deallog.get_file_stream()); deallog.pop(); } diff --git a/tests/dofs/range_based_for_step-6.cc b/tests/dofs/range_based_for_step-6.cc index 109f802821..046de68a14 100644 --- a/tests/dofs/range_based_for_step-6.cc +++ b/tests/dofs/range_based_for_step-6.cc @@ -242,10 +242,10 @@ void Step6::assemble_system () cell->get_dof_indices (local_dof_indices); constraints.distribute_local_to_global (cell_matrix, - cell_rhs, - local_dof_indices, - system_matrix, - system_rhs); + cell_rhs, + local_dof_indices, + system_matrix, + system_rhs); } } @@ -327,14 +327,14 @@ void Step6::run () deallog << " Number of active cells: " - << triangulation.n_active_cells() - << std::endl; + << triangulation.n_active_cells() + << std::endl; setup_system (); deallog << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; + << dof_handler.n_dofs() + << std::endl; assemble_system (); solve (); diff --git a/tests/fail/hp-step-14.cc b/tests/fail/hp-step-14.cc index 1faeab62ae..481251052e 100644 --- a/tests/fail/hp-step-14.cc +++ b/tests/fail/hp-step-14.cc @@ -206,7 +206,7 @@ namespace Evaluation { fe_values.reinit (cell); fe_values.get_present_fe_values().get_function_gradients (solution, - solution_gradients); + solution_gradients); unsigned int q_point = 0; for (; q_point threads; for (unsigned int thread=0; thread::assemble_matrix, *this, - linear_system, - thread_ranges[thread].first, - thread_ranges[thread].second, - mutex); + threads += Threads::new_thread (&Solver::assemble_matrix, *this, + linear_system, + thread_ranges[thread].first, + thread_ranges[thread].second, + mutex); assemble_rhs (linear_system.rhs); linear_system.hanging_node_constraints.condense (linear_system.rhs); @@ -532,7 +532,7 @@ namespace LaplaceSolver = &DoFTools::make_hanging_node_constraints; Threads::Thread<> - mhnc_thread = Threads::new_thread (mhnc_p, dof_handler, hanging_node_constraints); + mhnc_thread = Threads::new_thread (mhnc_p, dof_handler, hanging_node_constraints); sparsity_pattern.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), @@ -1688,11 +1688,11 @@ namespace LaplaceSolver Threads::ThreadGroup<> threads; for (unsigned int i=0; i::estimate_some, *this, - primal_solution, - dual_weights, - n_threads, i, - error_indicators, - face_integrals); + primal_solution, + dual_weights, + n_threads, i, + error_indicators, + face_integrals); threads.join_all(); unsigned int present_cell=0; diff --git a/tests/fail/hp-step-15.cc b/tests/fail/hp-step-15.cc index 93a7cc13ba..bf9e455704 100644 --- a/tests/fail/hp-step-15.cc +++ b/tests/fail/hp-step-15.cc @@ -218,7 +218,7 @@ void MinimizationProblem::assemble_step () fe_values.get_present_fe_values().get_function_values (present_solution, local_solution_values); fe_values.get_present_fe_values().get_function_gradients (present_solution, - local_solution_grads); + local_solution_grads); for (unsigned int q_point=0; q_point::energy (const hp::DoFHandler &dof_handler, fe_values.get_present_fe_values().get_function_values (function, local_solution_values); fe_values.get_present_fe_values().get_function_gradients (function, - local_solution_grads); + local_solution_grads); for (unsigned int q_point=0; q_point fe_rt(degree); deallog.push(fe_rt.get_name()); - + const unsigned int div=2; for (unsigned int mz=0; mz<=((dim>2) ? div : 0) ; ++mz) for (unsigned int my=0; my<=((dim>1) ? div : 0) ; ++my) @@ -95,7 +95,7 @@ main() plot_shape_functions<2>(degree); plot_shape_functions<3>(degree); } - + return 0; } diff --git a/tests/fe/bdm_2.cc b/tests/fe/bdm_2.cc index e2cd6a9f12..9d63baa003 100644 --- a/tests/fe/bdm_2.cc +++ b/tests/fe/bdm_2.cc @@ -57,26 +57,26 @@ transform_grid (Triangulation<2> &tria, { switch (transform) { - // first round: take - // original grid + // first round: take + // original grid case 0: break; - // second round: rotate - // triangulation + // second round: rotate + // triangulation case 1: GridTools::rotate (3.14159265358/2, tria); break; - // third round: inflate - // by a factor of 2 + // third round: inflate + // by a factor of 2 case 2: GridTools::scale (2, tria); break; - // third round: scale - // back, rotate back, - // stretch + // third round: scale + // back, rotate back, + // stretch case 3: GridTools::scale (.5, tria); GridTools::rotate (-3.14159265358/2, tria); @@ -175,6 +175,6 @@ main() { plot_shape_functions<2>(degree); } - + return 0; } diff --git a/tests/fe/bdm_3.cc b/tests/fe/bdm_3.cc index ae9e9095d0..42cb74e1c1 100644 --- a/tests/fe/bdm_3.cc +++ b/tests/fe/bdm_3.cc @@ -64,7 +64,7 @@ main() test<2>(degree); test<3>(degree); } - + return 0; } diff --git a/tests/fe/bdm_8.cc b/tests/fe/bdm_8.cc index 28eec39574..b0b6e34f9f 100644 --- a/tests/fe/bdm_8.cc +++ b/tests/fe/bdm_8.cc @@ -110,7 +110,7 @@ main() test<2>(i); test<3>(i); } - + return 0; } diff --git a/tests/fe/bdm_9.cc b/tests/fe/bdm_9.cc index 050b40e782..fde01e73c6 100644 --- a/tests/fe/bdm_9.cc +++ b/tests/fe/bdm_9.cc @@ -101,7 +101,7 @@ main() test<2>(i); test<3>(i); } - + return 0; } diff --git a/tests/fe/crash_01.cc b/tests/fe/crash_01.cc index a51707876f..996b2c3d11 100644 --- a/tests/fe/crash_01.cc +++ b/tests/fe/crash_01.cc @@ -21,17 +21,17 @@ #2 0x00007ffff4f95895 in dealii::deal_II_exceptions::internals::abort (exc=..., nothrow=false) at /ssd/deal-trunk/deal.II/source/base/exceptions.cc:323 #3 0x00007ffff18ef959 in dealii::deal_II_exceptions::internals::issue_error ( - handling=dealii::deal_II_exceptions::internals::abort_on_exception, file=0x7ffff6035000 "/ssd/deal-trunk/deal.II/source/fe/fe.cc", - line=557, - function=0x7ffff6039240 "unsigned int dealii::FiniteElement::face_to_cell_index(unsigned int, unsigned int, bool, bool, bool) const [with int dim = 3, int spacedim = 3]", cond=0x7ffff6035db0 "face_index < this->dofs_per_face", + handling=dealii::deal_II_exceptions::internals::abort_on_exception, file=0x7ffff6035000 "/ssd/deal-trunk/deal.II/source/fe/fe.cc", + line=557, + function=0x7ffff6039240 "unsigned int dealii::FiniteElement::face_to_cell_index(unsigned int, unsigned int, bool, bool, bool) const [with int dim = 3, int spacedim = 3]", cond=0x7ffff6035db0 "face_index < this->dofs_per_face", exc_name=0x7ffff6035d78 "ExcIndexRange(face_index, 0, this->dofs_per_face)", e=...) at /ssd/deal-trunk/deal.II/include/deal.II/base/exceptions.h:272 -#4 0x00007ffff31708c1 in dealii::FiniteElement<3, 3>::face_to_cell_index (this=0xa16f70, face_index=4, face=0, face_orientation=true, +#4 0x00007ffff31708c1 in dealii::FiniteElement<3, 3>::face_to_cell_index (this=0xa16f70, face_index=4, face=0, face_orientation=true, face_flip=false, face_rotation=false) at /ssd/deal-trunk/deal.II/source/fe/fe.cc:556 -#5 0x00007ffff2d7fe1c in dealii::VectorTools::internals::compute_edge_projection, false> > > (cell=..., face=0, line=3, hp_fe_values=..., boundary_function=..., first_vector_component=0, +#5 0x00007ffff2d7fe1c in dealii::VectorTools::internals::compute_edge_projection, false> > > (cell=..., face=0, line=3, hp_fe_values=..., boundary_function=..., first_vector_component=0, dof_values=std::vector of length 8, capacity 8 = {...}, dofs_processed=std::vector of length 8, capacity 64 = {...}) at /ssd/deal-trunk/deal.II/include/deal.II/numerics/vector_tools.templates.h:2944 -#6 0x00007ffff2d77846 in dealii::VectorTools::project_boundary_values_curl_conforming<3> (dof_handler=..., first_vector_component=0, +#6 0x00007ffff2d77846 in dealii::VectorTools::project_boundary_values_curl_conforming<3> (dof_handler=..., first_vector_component=0, boundary_function=..., boundary_component=0 '\000', constraints=..., mapping=...) at /ssd/deal-trunk/deal.II/include/deal.II/numerics/vector_tools.templates.h:3543 #7 0x000000000042b479 in test<3> (fe=...) at /ssd/deal-trunk/tests/fe/crash_01.cc:74 diff --git a/tests/fe/curl_curl_01.cc b/tests/fe/curl_curl_01.cc index eaf24dca04..05a29cdd97 100644 --- a/tests/fe/curl_curl_01.cc +++ b/tests/fe/curl_curl_01.cc @@ -17,22 +17,22 @@ /* Test by Ross Kynch: - + Solves curl(curl(u)) + u = f in 2D - + exact solution is given by: u(0) = cos(pi*x)*sin(pi*y) + C u(1) = -sin(pi*x)*cos(pi(y) + C - + f(0) = (2*pi^2 + 1)*cos(pi*x)*sin(pi*x) + C f(1) = -(2*pi^2 + 1)*sin(pi*x)*cos(pi(y) + C - + where C is some constant. (To change C, edit bc_constant in ExactSolution and RightHandSide classes.) The test solves these equations using the Nedelec element of higher order and computes the error. - + */ #include "../tests.h" #include @@ -69,47 +69,47 @@ template class MaxwellProblem { public: - MaxwellProblem (const unsigned int order); - ~MaxwellProblem (); - void run (); + MaxwellProblem (const unsigned int order); + ~MaxwellProblem (); + void run (); private: - double dotprod(const Tensor<1,dim> &A, const Tensor<1,dim> &B) const; - double dotprod(const Tensor<1,dim> &A, const Vector &B) const; - void setup_system (); - void assemble_system (); - void solve (); - void process_solution(const unsigned int cycle); - Triangulation triangulation; - DoFHandler dof_handler; - FE_Nedelec fe; - ConstraintMatrix constraints; - SparsityPattern sparsity_pattern; - SparseMatrix system_matrix; - Vector solution; - Vector system_rhs; - - unsigned int p_order; - unsigned int quad_order; - - ConvergenceTable convergence_table; + double dotprod(const Tensor<1,dim> &A, const Tensor<1,dim> &B) const; + double dotprod(const Tensor<1,dim> &A, const Vector &B) const; + void setup_system (); + void assemble_system (); + void solve (); + void process_solution(const unsigned int cycle); + Triangulation triangulation; + DoFHandler dof_handler; + FE_Nedelec fe; + ConstraintMatrix constraints; + SparsityPattern sparsity_pattern; + SparseMatrix system_matrix; + Vector solution; + Vector system_rhs; + + unsigned int p_order; + unsigned int quad_order; + + ConvergenceTable convergence_table; }; // EXACT SOLUTION CLASS template class ExactSolution : public Function { public: - ExactSolution() : Function() {} - virtual double value (const Point &p, - const unsigned int component) const; - virtual void vector_value (const Point &p, - Vector &result) const; - virtual void value_list (const std::vector > &points, - std::vector &values, - const unsigned int component) const; - virtual void vector_value_list (const std::vector > &points, - std::vector > &values) const; + ExactSolution() : Function() {} + virtual double value (const Point &p, + const unsigned int component) const; + virtual void vector_value (const Point &p, + Vector &result) const; + virtual void value_list (const std::vector > &points, + std::vector &values, + const unsigned int component) const; + virtual void vector_value_list (const std::vector > &points, + std::vector > &values) const; private: - static const double bc_constant; + static const double bc_constant; }; template const double ExactSolution::bc_constant = 0.1; @@ -119,13 +119,13 @@ template class RightHandSide : public Function { public: - RightHandSide (); - virtual void vector_value (const Point &p, - Vector &values) const; - virtual void vector_value_list (const std::vector > &points, - std::vector > &value_list) const; + RightHandSide (); + virtual void vector_value (const Point &p, + Vector &values) const; + virtual void vector_value_list (const std::vector > &points, + std::vector > &value_list) const; private: - static const double bc_constant; + static const double bc_constant; }; template const double RightHandSide::bc_constant = 0.1; @@ -134,42 +134,45 @@ template double ExactSolution::value(const Point &p, const unsigned int component) const { - Assert (dim >= 2, ExcNotImplemented()); - AssertIndexRange(component, dim); - - double val = -1000; - switch(component) { - case 0: val = cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; - case 1: val = -sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; + Assert (dim >= 2, ExcNotImplemented()); + AssertIndexRange(component, dim); + + double val = -1000; + switch (component) + { + case 0: + val = cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; + case 1: + val = -sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; } - return val; - + return val; + } template void ExactSolution::vector_value(const Point &p, Vector &result) const { - Assert(dim >= 2, ExcNotImplemented()); - result(0) = cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; - result(1) = -sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; - + Assert(dim >= 2, ExcNotImplemented()); + result(0) = cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; + result(1) = -sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; + } template void ExactSolution::value_list (const std::vector > &points, std::vector &values, const unsigned int component) const { - Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); - AssertIndexRange(component, dim); - for (unsigned int i=0; i &p = points[i]; - switch(component) + const Point &p = points[i]; + switch (component) { - case 0: - values[i] = cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; - case 1: - values[i] = -sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; + case 0: + values[i] = cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; + case 1: + values[i] = -sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; } } } @@ -177,14 +180,14 @@ template void ExactSolution::vector_value_list (const std::vector > &points, std::vector > &values) const { - Assert (dim >= 2, ExcNotImplemented()); - Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); - - for (unsigned int i=0; i= 2, ExcNotImplemented()); + Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); + + for (unsigned int i=0; i &p = points[i]; - values[i](0) = cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; - values[i](1) = -sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; + const Point &p = points[i]; + values[i](0) = cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; + values[i](1) = -sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; } } // END EXACT SOLUTION MEMBERS @@ -192,147 +195,151 @@ void ExactSolution::vector_value_list (const std::vector > &poin // DEFINE RIGHT HAND SIDE MEMBERS template RightHandSide::RightHandSide () : -Function (dim) + Function (dim) {} template inline void RightHandSide::vector_value (const Point &p, Vector &values) const { - Assert (values.size() == dim, ExcDimensionMismatch (values.size(), dim)); - Assert (dim >= 2, ExcNotImplemented()); - - //2D solution - values(0) = (2*numbers::PI*numbers::PI + 1)*cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; - values(1) = -(2*numbers::PI*numbers::PI + 1)*sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; + Assert (values.size() == dim, ExcDimensionMismatch (values.size(), dim)); + Assert (dim >= 2, ExcNotImplemented()); + + //2D solution + values(0) = (2*numbers::PI*numbers::PI + 1)*cos(numbers::PI*p(0))*sin(numbers::PI*p(1)) + bc_constant; + values(1) = -(2*numbers::PI*numbers::PI + 1)*sin(numbers::PI*p(0))*cos(numbers::PI*p(1)) + bc_constant; } template void RightHandSide::vector_value_list (const std::vector > &points, std::vector > &value_list) const { - Assert (value_list.size() == points.size(), ExcDimensionMismatch (value_list.size(), points.size())); - const unsigned int n_points = points.size(); - for (unsigned int p=0; p::vector_value (points[p], value_list[p]); + RightHandSide::vector_value (points[p], value_list[p]); } } // END RIGHT HAND SIDE MEMBERS template MaxwellProblem::MaxwellProblem (const unsigned int order) -: -dof_handler (triangulation), -fe (order) + : + dof_handler (triangulation), + fe (order) { - p_order = order; - quad_order = p_order+2; + p_order = order; + quad_order = p_order+2; } template MaxwellProblem::~MaxwellProblem () { - dof_handler.clear (); + dof_handler.clear (); } template double MaxwellProblem::dotprod(const Tensor<1,dim> &A, const Tensor<1,dim> &B) const { - double return_val = 0; - for(unsigned int k = 0; k < dim; k++) { - return_val += A[k]*B[k]; + double return_val = 0; + for (unsigned int k = 0; k < dim; k++) + { + return_val += A[k]*B[k]; } - return return_val; + return return_val; } template double MaxwellProblem::dotprod(const Tensor<1,dim> &A, const Vector &B) const { - double return_val = 0; - for(unsigned int k = 0; k < dim; k++) { - return_val += A[k]*B(k); + double return_val = 0; + for (unsigned int k = 0; k < dim; k++) + { + return_val += A[k]*B(k); } - return return_val; + return return_val; } template void MaxwellProblem::setup_system () { - dof_handler.distribute_dofs (fe); - solution.reinit (dof_handler.n_dofs()); - system_rhs.reinit (dof_handler.n_dofs()); - constraints.clear (); - DoFTools::make_hanging_node_constraints (dof_handler, - constraints); - // FE_Nedelec boundary condition. - VectorTools::project_boundary_values_curl_conforming(dof_handler, 0, ExactSolution(), 0, constraints); - - constraints.close (); - CompressedSparsityPattern c_sparsity(dof_handler.n_dofs()); - DoFTools::make_sparsity_pattern(dof_handler, - c_sparsity, - constraints,false); - - sparsity_pattern.copy_from(c_sparsity); - system_matrix.reinit (sparsity_pattern); + dof_handler.distribute_dofs (fe); + solution.reinit (dof_handler.n_dofs()); + system_rhs.reinit (dof_handler.n_dofs()); + constraints.clear (); + DoFTools::make_hanging_node_constraints (dof_handler, + constraints); + // FE_Nedelec boundary condition. + VectorTools::project_boundary_values_curl_conforming(dof_handler, 0, ExactSolution(), 0, constraints); + + constraints.close (); + CompressedSparsityPattern c_sparsity(dof_handler.n_dofs()); + DoFTools::make_sparsity_pattern(dof_handler, + c_sparsity, + constraints,false); + + sparsity_pattern.copy_from(c_sparsity); + system_matrix.reinit (sparsity_pattern); } template void MaxwellProblem::assemble_system () { - const QGauss quadrature_formula(quad_order); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_quadrature_points | update_JxW_values); - FEValuesViews::Vector fe_views(fe_values, 0); - const unsigned int dofs_per_cell = fe.dofs_per_cell; - const unsigned int n_q_points = quadrature_formula.size(); - FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); - Vector cell_rhs (dofs_per_cell); - std::vector local_dof_indices (dofs_per_cell); - - RightHandSide right_hand_side; - std::vector > rhs_values (n_q_points, - Vector(dim)); - Tensor<1,dim> value_i, value_j; - - typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - for (; cell!=endc; ++cell) + const QGauss quadrature_formula(quad_order); + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_quadrature_points | update_JxW_values); + FEValuesViews::Vector fe_views(fe_values, 0); + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.size(); + FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); + Vector cell_rhs (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); + + RightHandSide right_hand_side; + std::vector > rhs_values (n_q_points, + Vector(dim)); + Tensor<1,dim> value_i, value_j; + + typename DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + for (; cell!=endc; ++cell) { - cell_matrix = 0; - cell_rhs = 0; - fe_values.reinit (cell); - right_hand_side.vector_value_list (fe_values.get_quadrature_points(), - rhs_values); - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - constraints.distribute_local_to_global(cell_matrix, - cell_rhs, - local_dof_indices, - system_matrix, system_rhs); + cell->get_dof_indices (local_dof_indices); + constraints.distribute_local_to_global(cell_matrix, + cell_rhs, + local_dof_indices, + system_matrix, system_rhs); } } template @@ -347,49 +354,49 @@ void MaxwellProblem::solve () preconditioner); constraints.distribute (solution); */ - - SparseDirectUMFPACK A_direct; - A_direct.initialize(system_matrix); - - A_direct.vmult (solution, system_rhs); - constraints.distribute (solution); - + + SparseDirectUMFPACK A_direct; + A_direct.initialize(system_matrix); + + A_direct.vmult (solution, system_rhs); + constraints.distribute (solution); + } template void MaxwellProblem::process_solution(const unsigned int cycle) { - const ExactSolution exact_solution; - Vector diff_per_cell(triangulation.n_active_cells()); - VectorTools::integrate_difference(dof_handler, solution, exact_solution, - diff_per_cell, QGauss(quad_order), VectorTools::L2_norm); - const double L2_error = diff_per_cell.l2_norm(); - - convergence_table.add_value("cycle", cycle); - convergence_table.add_value("cells", triangulation.n_active_cells()); - convergence_table.add_value("dofs", dof_handler.n_dofs()); - convergence_table.add_value("L2 Error", L2_error); + const ExactSolution exact_solution; + Vector diff_per_cell(triangulation.n_active_cells()); + VectorTools::integrate_difference(dof_handler, solution, exact_solution, + diff_per_cell, QGauss(quad_order), VectorTools::L2_norm); + const double L2_error = diff_per_cell.l2_norm(); + + convergence_table.add_value("cycle", cycle); + convergence_table.add_value("cells", triangulation.n_active_cells()); + convergence_table.add_value("dofs", dof_handler.n_dofs()); + convergence_table.add_value("L2 Error", L2_error); } template void MaxwellProblem::run () { - for (unsigned int cycle=0; cycle<3; ++cycle) + for (unsigned int cycle=0; cycle<3; ++cycle) { - if (cycle == 0) + if (cycle == 0) { - GridGenerator::hyper_cube (triangulation, -1, 1); - triangulation.refine_global (2); + GridGenerator::hyper_cube (triangulation, -1, 1); + triangulation.refine_global (2); } - else - triangulation.refine_global (1); - setup_system (); - assemble_system (); - solve (); - process_solution (cycle); + else + triangulation.refine_global (1); + setup_system (); + assemble_system (); + solve (); + process_solution (cycle); } - convergence_table.set_precision("L2 Error",8); - convergence_table.set_scientific("L2 Error",true); - convergence_table.write_text(deallog.get_file_stream()); + convergence_table.set_precision("L2 Error",8); + convergence_table.set_scientific("L2 Error",true); + convergence_table.write_text(deallog.get_file_stream()); } int main () diff --git a/tests/fe/face_to_cell_q1_2d.cc b/tests/fe/face_to_cell_q1_2d.cc index e8b9f3658a..ada27c5a44 100644 --- a/tests/fe/face_to_cell_q1_2d.cc +++ b/tests/fe/face_to_cell_q1_2d.cc @@ -36,17 +36,17 @@ void test() deallog << "Face=" << face << std::endl; for (int flip=0; flip<2; ++flip) - { - deallog << " flip=" << (flip == 0 ? "false" : "true") - << std::endl - << " "; - for (unsigned int i = 0; i < dofs_per_face; ++i) - deallog << fe.face_to_cell_index(i, face, - true, - (flip == 0 ? false : true), - false) << " - "; - deallog << std::endl; - } + { + deallog << " flip=" << (flip == 0 ? "false" : "true") + << std::endl + << " "; + for (unsigned int i = 0; i < dofs_per_face; ++i) + deallog << fe.face_to_cell_index(i, face, + true, + (flip == 0 ? false : true), + false) << " - "; + deallog << std::endl; + } } } diff --git a/tests/fe/face_to_cell_q2_2d.cc b/tests/fe/face_to_cell_q2_2d.cc index 25e9671dff..21af3aaf40 100644 --- a/tests/fe/face_to_cell_q2_2d.cc +++ b/tests/fe/face_to_cell_q2_2d.cc @@ -36,17 +36,17 @@ void test() deallog << "Face=" << face << std::endl; for (int flip=0; flip<2; ++flip) - { - deallog << " flip=" << (flip == 0 ? "false" : "true") - << std::endl - << " "; - for (unsigned int i = 0; i < dofs_per_face; ++i) - deallog << fe.face_to_cell_index(i, face, - true, - (flip == 0 ? false : true), - false) << " - "; - deallog << std::endl; - } + { + deallog << " flip=" << (flip == 0 ? "false" : "true") + << std::endl + << " "; + for (unsigned int i = 0; i < dofs_per_face; ++i) + deallog << fe.face_to_cell_index(i, face, + true, + (flip == 0 ? false : true), + false) << " - "; + deallog << std::endl; + } } } diff --git a/tests/fe/face_to_cell_q2xq2_2d.cc b/tests/fe/face_to_cell_q2xq2_2d.cc index 100df4cd17..ba44a4cda3 100644 --- a/tests/fe/face_to_cell_q2xq2_2d.cc +++ b/tests/fe/face_to_cell_q2xq2_2d.cc @@ -30,7 +30,7 @@ template void test() { FESystem fe(FE_Q(2), 1, - FE_Q(2), 1); + FE_Q(2), 1); const unsigned int dofs_per_face = fe.dofs_per_face; for (unsigned int face=0; face<4; ++face) @@ -38,17 +38,17 @@ void test() deallog << "Face=" << face << std::endl; for (int flip=0; flip<2; ++flip) - { - deallog << " flip=" << (flip == 0 ? "false" : "true") - << std::endl - << " "; - for (unsigned int i = 0; i < dofs_per_face; ++i) - deallog << fe.face_to_cell_index(i, face, - true, - (flip == 0 ? false : true), - false) << " - "; - deallog << std::endl; - } + { + deallog << " flip=" << (flip == 0 ? "false" : "true") + << std::endl + << " "; + for (unsigned int i = 0; i < dofs_per_face; ++i) + deallog << fe.face_to_cell_index(i, face, + true, + (flip == 0 ? false : true), + false) << " - "; + deallog << std::endl; + } } } diff --git a/tests/fe/face_to_cell_q3_2d.cc b/tests/fe/face_to_cell_q3_2d.cc index d862c53425..b84a1381c0 100644 --- a/tests/fe/face_to_cell_q3_2d.cc +++ b/tests/fe/face_to_cell_q3_2d.cc @@ -36,17 +36,17 @@ void test() deallog << "Face=" << face << std::endl; for (int flip=0; flip<2; ++flip) - { - deallog << " flip=" << (flip == 0 ? "false" : "true") - << std::endl - << " "; - for (unsigned int i = 0; i < dofs_per_face; ++i) - deallog << fe.face_to_cell_index(i, face, - true, - (flip == 0 ? false : true), - false) << " - "; - deallog << std::endl; - } + { + deallog << " flip=" << (flip == 0 ? "false" : "true") + << std::endl + << " "; + for (unsigned int i = 0; i < dofs_per_face; ++i) + deallog << fe.face_to_cell_index(i, face, + true, + (flip == 0 ? false : true), + false) << " - "; + deallog << std::endl; + } } } diff --git a/tests/fe/face_to_cell_q3xq4_2d.cc b/tests/fe/face_to_cell_q3xq4_2d.cc index 53a2ec611e..7f32d06b87 100644 --- a/tests/fe/face_to_cell_q3xq4_2d.cc +++ b/tests/fe/face_to_cell_q3xq4_2d.cc @@ -30,7 +30,7 @@ template void test() { FESystem fe(FE_Q(3), 1, - FE_Q(4), 1); + FE_Q(4), 1); const unsigned int dofs_per_face = fe.dofs_per_face; for (unsigned int face=0; face<4; ++face) @@ -38,17 +38,17 @@ void test() deallog << "Face=" << face << std::endl; for (int flip=0; flip<2; ++flip) - { - deallog << " flip=" << (flip == 0 ? "false" : "true") - << std::endl - << " "; - for (unsigned int i = 0; i < dofs_per_face; ++i) - deallog << fe.face_to_cell_index(i, face, - true, - (flip == 0 ? false : true), - false) << " - "; - deallog << std::endl; - } + { + deallog << " flip=" << (flip == 0 ? "false" : "true") + << std::endl + << " "; + for (unsigned int i = 0; i < dofs_per_face; ++i) + deallog << fe.face_to_cell_index(i, face, + true, + (flip == 0 ? false : true), + false) << " - "; + deallog << std::endl; + } } } diff --git a/tests/fe/face_to_cell_q4_2d.cc b/tests/fe/face_to_cell_q4_2d.cc index 9d15086209..674191fca9 100644 --- a/tests/fe/face_to_cell_q4_2d.cc +++ b/tests/fe/face_to_cell_q4_2d.cc @@ -36,17 +36,17 @@ void test() deallog << "Face=" << face << std::endl; for (int flip=0; flip<2; ++flip) - { - deallog << " flip=" << (flip == 0 ? "false" : "true") - << std::endl - << " "; - for (unsigned int i = 0; i < dofs_per_face; ++i) - deallog << fe.face_to_cell_index(i, face, - true, - (flip == 0 ? false : true), - false) << " - "; - deallog << std::endl; - } + { + deallog << " flip=" << (flip == 0 ? "false" : "true") + << std::endl + << " "; + for (unsigned int i = 0; i < dofs_per_face; ++i) + deallog << fe.face_to_cell_index(i, face, + true, + (flip == 0 ? false : true), + false) << " - "; + deallog << std::endl; + } } } diff --git a/tests/fe/fe_abf_gradient_divergence_theorem.cc b/tests/fe/fe_abf_gradient_divergence_theorem.cc index 57bf5d8212..14ae322d11 100644 --- a/tests/fe/fe_abf_gradient_divergence_theorem.cc +++ b/tests/fe/fe_abf_gradient_divergence_theorem.cc @@ -43,97 +43,97 @@ template Tensor<1,dim> ones () { - Tensor<1,dim> result; - for(unsigned int i=0; i result; + for (unsigned int i=0; i void test (const Triangulation &tr, - const FiniteElement &fe, - const double tolerance) + const FiniteElement &fe, + const double tolerance) { - DoFHandler dof(tr); - dof.distribute_dofs(fe); - - std::stringstream ss; - - deallog << "FE=" << fe.get_name() << std::endl; - - const QGauss quadrature(4); - FEValues fe_values (fe, quadrature, update_gradients - | update_quadrature_points - | update_JxW_values); - - const QGauss face_quadrature(4); - FEFaceValues fe_face_values (fe, face_quadrature, - update_values - | update_quadrature_points - | update_normal_vectors - | update_JxW_values); - - for(typename DoFHandler::active_cell_iterator cell = dof.begin_active(); - cell != dof.end(); - ++cell) - { - fe_values.reinit (cell); - - deallog << "Cell nodes:" << std::endl; - for(unsigned int i=0; i::vertices_per_cell; ++i) - { - deallog << i << ": ( "; - for (unsigned int d=0; dvertex(i)[d] << " "; - deallog << ")" << std::endl; - } - - bool cell_ok = true; - - for (unsigned int c=0; c dof(tr); + dof.distribute_dofs(fe); + + std::stringstream ss; + + deallog << "FE=" << fe.get_name() << std::endl; + + const QGauss quadrature(4); + FEValues fe_values (fe, quadrature, update_gradients + | update_quadrature_points + | update_JxW_values); + + const QGauss face_quadrature(4); + FEFaceValues fe_face_values (fe, face_quadrature, + update_values + | update_quadrature_points + | update_normal_vectors + | update_JxW_values); + + for (typename DoFHandler::active_cell_iterator cell = dof.begin_active(); + cell != dof.end(); + ++cell) + { + fe_values.reinit (cell); + + deallog << "Cell nodes:" << std::endl; + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + deallog << i << ": ( "; + for (unsigned int d=0; dvertex(i)[d] << " "; + deallog << ")" << std::endl; + } + + bool cell_ok = true; + + for (unsigned int c=0; c &tr, template void test_hyper_cube(const double tolerance) { - Triangulation tr; - GridGenerator::hyper_cube (tr); - - typename Triangulation::active_cell_iterator cell = tr.begin_active(); - for (unsigned int i=0; i::vertices_per_cell; ++i) - { - Point &point = cell->vertex(i); - if (std::abs(point(dim-1)-1.0)<1e-5) - point(dim-1) += 0.15; - } - - FE_ABF fe(1); - test(tr, fe, tolerance); + Triangulation tr; + GridGenerator::hyper_cube (tr); + + typename Triangulation::active_cell_iterator cell = tr.begin_active(); + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + Point &point = cell->vertex(i); + if (std::abs(point(dim-1)-1.0)<1e-5) + point(dim-1) += 0.15; + } + + FE_ABF fe(1); + test(tr, fe, tolerance); } int main() { - std::ofstream logfile ("output"); - deallog << std::setprecision (3); + std::ofstream logfile ("output"); + deallog << std::setprecision (3); - deallog.attach(logfile); - deallog.depth_console (0); - deallog.threshold_double(1.e-7); + deallog.attach(logfile); + deallog.depth_console (0); + deallog.threshold_double(1.e-7); - test_hyper_cube<2>(1e-6); + test_hyper_cube<2>(1e-6); - deallog << "done..." << std::endl; + deallog << "done..." << std::endl; } diff --git a/tests/fe/fe_data_test.cc b/tests/fe/fe_data_test.cc index 52de5466a6..acdf35b962 100644 --- a/tests/fe/fe_data_test.cc +++ b/tests/fe/fe_data_test.cc @@ -44,7 +44,7 @@ template void test_2d_3d (std::vector *> &fe_datas) { - // Vector DG elements + // Vector DG elements fe_datas.push_back(new FE_DGRaviartThomas(0)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back(new FE_DGRaviartThomas(1)); @@ -58,7 +58,7 @@ void test_2d_3d (std::vector *> &fe_datas) fe_datas.push_back(new FE_DGNedelec(1)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; - // Hdiv elements + // Hdiv elements FE_RaviartThomas *rt0 = new FE_RaviartThomas(0); fe_datas.push_back(rt0); deallog << (*fe_datas.rbegin())->get_name() << std::endl; @@ -70,7 +70,7 @@ void test_2d_3d (std::vector *> &fe_datas) fe_datas.push_back(new FE_RaviartThomas(2)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back(new FESystem(*rt1, 1, - FE_DGQ (1), 1)); + FE_DGQ (1), 1)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back(new FE_BDM(1)); @@ -78,7 +78,7 @@ void test_2d_3d (std::vector *> &fe_datas) fe_datas.push_back(new FE_BDM(2)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; - // Hcurl elements + // Hcurl elements FE_Nedelec *ned0 = new FE_Nedelec(0); fe_datas.push_back(ned0); deallog << (*fe_datas.rbegin())->get_name() << std::endl; @@ -131,14 +131,14 @@ void test_fe_datas() FE_Q (2), 1)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; - // Face Q elements + // Face Q elements fe_datas.push_back(new FE_FaceQ (0)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back(new FE_FaceQ (1)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back(new FE_FaceQ (3)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; - // Face P elements + // Face P elements fe_datas.push_back(new FE_FaceP (0)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back(new FE_FaceP (1)); diff --git a/tests/fe/fe_dgq_gradient_divergence_theorem.cc b/tests/fe/fe_dgq_gradient_divergence_theorem.cc index 53bf0c9009..ad36f141ac 100644 --- a/tests/fe/fe_dgq_gradient_divergence_theorem.cc +++ b/tests/fe/fe_dgq_gradient_divergence_theorem.cc @@ -42,97 +42,97 @@ template Tensor<1,dim> ones () { - Tensor<1,dim> result; - for(unsigned int i=0; i result; + for (unsigned int i=0; i void test (const Triangulation &tr, - const FiniteElement &fe, - const double tolerance) + const FiniteElement &fe, + const double tolerance) { - DoFHandler dof(tr); - dof.distribute_dofs(fe); - - std::stringstream ss; - - deallog << "FE=" << fe.get_name() << std::endl; - - const QGauss quadrature(3); - FEValues fe_values (fe, quadrature, update_gradients - | update_quadrature_points - | update_JxW_values); - - const QGauss face_quadrature(3); - FEFaceValues fe_face_values (fe, face_quadrature, - update_values - | update_quadrature_points - | update_normal_vectors - | update_JxW_values); - - for(typename DoFHandler::active_cell_iterator cell = dof.begin_active(); - cell != dof.end(); - ++cell) - { - fe_values.reinit (cell); - - deallog << "Cell nodes:" << std::endl; - for(unsigned int i=0; i::vertices_per_cell; ++i) - { - deallog << i << ": ( "; - for (unsigned int d=0; dvertex(i)[d] << " "; - deallog << ")" << std::endl; - } - - bool cell_ok = true; - - for (unsigned int c=0; c dof(tr); + dof.distribute_dofs(fe); + + std::stringstream ss; + + deallog << "FE=" << fe.get_name() << std::endl; + + const QGauss quadrature(3); + FEValues fe_values (fe, quadrature, update_gradients + | update_quadrature_points + | update_JxW_values); + + const QGauss face_quadrature(3); + FEFaceValues fe_face_values (fe, face_quadrature, + update_values + | update_quadrature_points + | update_normal_vectors + | update_JxW_values); + + for (typename DoFHandler::active_cell_iterator cell = dof.begin_active(); + cell != dof.end(); + ++cell) + { + fe_values.reinit (cell); + + deallog << "Cell nodes:" << std::endl; + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + deallog << i << ": ( "; + for (unsigned int d=0; dvertex(i)[d] << " "; + deallog << ")" << std::endl; + } + + bool cell_ok = true; + + for (unsigned int c=0; c &tr, template void test_hyper_ball(const double tolerance) { - Triangulation tr; - GridGenerator::hyper_ball(tr); + Triangulation tr; + GridGenerator::hyper_ball(tr); - static const HyperBallBoundary boundary; - tr.set_boundary (0, boundary); + static const HyperBallBoundary boundary; + tr.set_boundary (0, boundary); - tr.refine_global(1); + tr.refine_global(1); - FE_DGQ fe(2); - test(tr, fe, tolerance); + FE_DGQ fe(2); + test(tr, fe, tolerance); } int main() { - std::ofstream logfile ("output"); - deallog << std::setprecision (3); + std::ofstream logfile ("output"); + deallog << std::setprecision (3); - deallog.attach(logfile); - deallog.depth_console (0); - deallog.threshold_double(1.e-7); + deallog.attach(logfile); + deallog.depth_console (0); + deallog.threshold_double(1.e-7); - test_hyper_ball<2>(1e-6); - test_hyper_ball<3>(1e-6); + test_hyper_ball<2>(1e-6); + test_hyper_ball<3>(1e-6); - deallog << "done..." << std::endl; + deallog << "done..." << std::endl; } diff --git a/tests/fe/fe_dgq_hessian_divergence_theorem.cc b/tests/fe/fe_dgq_hessian_divergence_theorem.cc index 62474516a8..f117efdebd 100644 --- a/tests/fe/fe_dgq_hessian_divergence_theorem.cc +++ b/tests/fe/fe_dgq_hessian_divergence_theorem.cc @@ -42,99 +42,99 @@ template Tensor<1,dim> ones () { - Tensor<1,dim> result; - for(unsigned int i=0; i result; + for (unsigned int i=0; i void test (const Triangulation &tr, - const FiniteElement &fe, - const double tolerance) + const FiniteElement &fe, + const double tolerance) { - DoFHandler dof(tr); - dof.distribute_dofs(fe); - - std::stringstream ss; - - deallog << "FE=" << fe.get_name() << std::endl; - - const QGauss quadrature(4); - FEValues fe_values (fe, quadrature, update_hessians - | update_quadrature_points - | update_JxW_values); - - const QGauss face_quadrature(4); - FEFaceValues fe_face_values (fe, face_quadrature, - update_gradients - | update_quadrature_points - | update_normal_vectors - | update_JxW_values); - - for(typename DoFHandler::active_cell_iterator cell = dof.begin_active(); - cell != dof.end(); - ++cell) - { - fe_values.reinit (cell); - - deallog << "Cell nodes:" << std::endl; - for(unsigned int i=0; i::vertices_per_cell; ++i) - { - deallog << i << ": ( "; - for (unsigned int d=0; dvertex(i)[d] << " "; - deallog << ")" << std::endl; - } - - bool cell_ok = true; - - for (unsigned int c=0; c dof(tr); + dof.distribute_dofs(fe); + + std::stringstream ss; + + deallog << "FE=" << fe.get_name() << std::endl; + + const QGauss quadrature(4); + FEValues fe_values (fe, quadrature, update_hessians + | update_quadrature_points + | update_JxW_values); + + const QGauss face_quadrature(4); + FEFaceValues fe_face_values (fe, face_quadrature, + update_gradients + | update_quadrature_points + | update_normal_vectors + | update_JxW_values); + + for (typename DoFHandler::active_cell_iterator cell = dof.begin_active(); + cell != dof.end(); + ++cell) + { + fe_values.reinit (cell); + + deallog << "Cell nodes:" << std::endl; + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + deallog << i << ": ( "; + for (unsigned int d=0; dvertex(i)[d] << " "; + deallog << ")" << std::endl; + } + + bool cell_ok = true; + + for (unsigned int c=0; c &tr, template void test_hyper_ball(const double tolerance) { - Triangulation tr; - GridGenerator::hyper_ball(tr); + Triangulation tr; + GridGenerator::hyper_ball(tr); - static const HyperBallBoundary boundary; - tr.set_boundary (0, boundary); + static const HyperBallBoundary boundary; + tr.set_boundary (0, boundary); - tr.refine_global(1); + tr.refine_global(1); - FE_DGQ fe(2); - test(tr, fe, tolerance); + FE_DGQ fe(2); + test(tr, fe, tolerance); } int main() { - std::ofstream logfile ("output"); - deallog << std::setprecision (3); + std::ofstream logfile ("output"); + deallog << std::setprecision (3); - deallog.attach(logfile); - deallog.depth_console (0); - deallog.threshold_double(1.e-7); + deallog.attach(logfile); + deallog.depth_console (0); + deallog.threshold_double(1.e-7); - test_hyper_ball<2>(1e-6); - test_hyper_ball<3>(1e-6); + test_hyper_ball<2>(1e-6); + test_hyper_ball<3>(1e-6); - deallog << "done..." << std::endl; + deallog << "done..." << std::endl; } diff --git a/tests/fe/fe_nedelec_gradient_divergence_theorem.cc b/tests/fe/fe_nedelec_gradient_divergence_theorem.cc index 799ffab9c0..24261fc447 100644 --- a/tests/fe/fe_nedelec_gradient_divergence_theorem.cc +++ b/tests/fe/fe_nedelec_gradient_divergence_theorem.cc @@ -42,97 +42,97 @@ template Tensor<1,dim> ones () { - Tensor<1,dim> result; - for(unsigned int i=0; i result; + for (unsigned int i=0; i void test (const Triangulation &tr, - const FiniteElement &fe, - const double tolerance) + const FiniteElement &fe, + const double tolerance) { - DoFHandler dof(tr); - dof.distribute_dofs(fe); - - std::stringstream ss; - - deallog << "FE=" << fe.get_name() << std::endl; - - const QGauss quadrature(4); - FEValues fe_values (fe, quadrature, update_gradients - | update_quadrature_points - | update_JxW_values); - - const QGauss face_quadrature(4); - FEFaceValues fe_face_values (fe, face_quadrature, - update_values - | update_quadrature_points - | update_normal_vectors - | update_JxW_values); - - for(typename DoFHandler::active_cell_iterator cell = dof.begin_active(); - cell != dof.end(); - ++cell) - { - fe_values.reinit (cell); - - deallog << "Cell nodes:" << std::endl; - for(unsigned int i=0; i::vertices_per_cell; ++i) - { - deallog << i << ": ( "; - for (unsigned int d=0; dvertex(i)[d] << " "; - deallog << ")" << std::endl; - } - - bool cell_ok = true; - - for (unsigned int c=0; c dof(tr); + dof.distribute_dofs(fe); + + std::stringstream ss; + + deallog << "FE=" << fe.get_name() << std::endl; + + const QGauss quadrature(4); + FEValues fe_values (fe, quadrature, update_gradients + | update_quadrature_points + | update_JxW_values); + + const QGauss face_quadrature(4); + FEFaceValues fe_face_values (fe, face_quadrature, + update_values + | update_quadrature_points + | update_normal_vectors + | update_JxW_values); + + for (typename DoFHandler::active_cell_iterator cell = dof.begin_active(); + cell != dof.end(); + ++cell) + { + fe_values.reinit (cell); + + deallog << "Cell nodes:" << std::endl; + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + deallog << i << ": ( "; + for (unsigned int d=0; dvertex(i)[d] << " "; + deallog << ")" << std::endl; + } + + bool cell_ok = true; + + for (unsigned int c=0; c &tr, template void test_hyper_ball(const double tolerance) { - Triangulation tr; - GridGenerator::hyper_ball(tr); + Triangulation tr; + GridGenerator::hyper_ball(tr); - static const HyperBallBoundary boundary; - tr.set_boundary (0, boundary); + static const HyperBallBoundary boundary; + tr.set_boundary (0, boundary); - tr.refine_global(1); + tr.refine_global(1); - FE_Nedelec fe(2); - test(tr, fe, tolerance); + FE_Nedelec fe(2); + test(tr, fe, tolerance); } int main() { - std::ofstream logfile ("output"); - deallog << std::setprecision (3); + std::ofstream logfile ("output"); + deallog << std::setprecision (3); - deallog.attach(logfile); - deallog.depth_console (0); - deallog.threshold_double(1.e-7); + deallog.attach(logfile); + deallog.depth_console (0); + deallog.threshold_double(1.e-7); - test_hyper_ball<2>(1e-6); - test_hyper_ball<3>(1e-6); + test_hyper_ball<2>(1e-6); + test_hyper_ball<3>(1e-6); - deallog << "done..." << std::endl; + deallog << "done..." << std::endl; } diff --git a/tests/fe/fe_q_01.cc b/tests/fe/fe_q_01.cc index e214fd7460..0c6b1d2ccb 100644 --- a/tests/fe/fe_q_01.cc +++ b/tests/fe/fe_q_01.cc @@ -36,7 +36,7 @@ int main() catch (ExceptionBase &e) { deallog << e.get_exc_name() << std::endl; - } + } } diff --git a/tests/fe/fe_q_bubbles.cc b/tests/fe/fe_q_bubbles.cc index b2173db2f8..7ab2c217e2 100644 --- a/tests/fe/fe_q_bubbles.cc +++ b/tests/fe/fe_q_bubbles.cc @@ -59,13 +59,13 @@ class BubbleFunction : public Function { public: BubbleFunction - (unsigned int degree, unsigned int direction); + (unsigned int degree, unsigned int direction); virtual double value - (const Point &p, const unsigned int component = 0) const; + (const Point &p, const unsigned int component = 0) const; virtual Tensor<1,dim> gradient - (const Point &p, const unsigned int component = 0) const; + (const Point &p, const unsigned int component = 0) const; private: unsigned int m_degree; @@ -74,15 +74,15 @@ private: template BubbleFunction::BubbleFunction (unsigned int degree, - unsigned int direction) -: Function(), - m_degree(degree), - m_direction(direction) + unsigned int direction) + : Function(), + m_degree(degree), + m_direction(direction) {} template double BubbleFunction::value (const Point &p, - const unsigned int) const + const unsigned int) const { double return_value = 1.; for (unsigned int i=0; i::value (const Point &p, template Tensor<1,dim> BubbleFunction::gradient (const Point &p, - const unsigned int) const + const unsigned int) const { Tensor<1,dim> grad; for (unsigned int d=0; d=2) - { - //add \prod_{i=1}^d (1-x_i^2))(p) - double value=1.; - for (unsigned int j=0; j < dim; ++j) - value*=(1-p(j)*p(j)); - //and multiply with grad(x_i^{r-1}) + { + grad[d] = 1.; + //compute grad(\prod_{i=1}^d (1-x_i^2))(p) + for (unsigned j=0; j=2) + { + //add \prod_{i=1}^d (1-x_i^2))(p) + double value=1.; + for (unsigned int j=0; j < dim; ++j) + value*=(1-p(j)*p(j)); + //and multiply with grad(x_i^{r-1}) grad[m_direction]+=value*(m_degree-1)*std::pow(p(m_direction),m_degree-2); - } + } return grad; } @@ -218,15 +218,15 @@ void Step3::assemble_system (unsigned int i) for (unsigned int i=0; iget_dof_indices (local_dof_indices); @@ -266,7 +266,7 @@ void Step3::output_results (unsigned int i) const std::ofstream output - ((fe->get_name()+"."+Utilities::int_to_string (i,1)+".vtk").c_str()); + ((fe->get_name()+"."+Utilities::int_to_string (i,1)+".vtk").c_str()); data_out.write_vtk (output); #endif @@ -310,11 +310,11 @@ void Step3::run () make_grid (); setup_system(); for (unsigned int i=0; i *fe = new FE_Q<2>(degree); // Step3<2> laplace_problem(fe, degree); // laplace_problem.run(); // } - { - FiniteElement<2> *fe = new FE_Q_Bubbles<2>(degree); - Step3<2> laplace_problem(fe, degree); - laplace_problem.run(); - } + { + FiniteElement<2> *fe = new FE_Q_Bubbles<2>(degree); + Step3<2> laplace_problem(fe, degree); + laplace_problem.run(); + } // { // FiniteElement<3> *fe = new FE_Q<3>(degree); @@ -343,11 +343,11 @@ int main () // laplace_problem.run(); // } - { - FiniteElement<3> *fe = new FE_Q_Bubbles<3>(degree); - Step3<3> laplace_problem(fe, degree); - laplace_problem.run(); + { + FiniteElement<3> *fe = new FE_Q_Bubbles<3>(degree); + Step3<3> laplace_problem(fe, degree); + laplace_problem.run(); + } } - } return 0; } diff --git a/tests/fe/fe_q_dg0.cc b/tests/fe/fe_q_dg0.cc index b1afa19bfc..1ef3f8801c 100644 --- a/tests/fe/fe_q_dg0.cc +++ b/tests/fe/fe_q_dg0.cc @@ -148,14 +148,14 @@ namespace Step22 switch (component) { - //velocity + //velocity case 0: return 2*(x-1)*(x-1)*x*x*(y-1)*y*(2*y-1); break; case 1: return -2*(y-1)*(y-1)*y*y*(x-1)*x*(2*x-1); break; - //pressure + //pressure case 2: //discontinuous Boffi return y*(1-y)*exp((x-.5)*(x-.5))-.5+(x<.5); @@ -185,7 +185,7 @@ namespace Step22 switch (component) { - //velocity + //velocity case 0: gradient[0]=x*(x*(x*y*(y*(16*y-24)+8)+y*((36-24*y)*y-12)) +y*(y*(8*y-12)+4)); @@ -197,7 +197,7 @@ namespace Step22 gradient[1]=x*(x*(x*y*((24-16*y)*y-8)+y*(y*(24*y-36)+12)) +y*((12-8*y)*y-4)); break; - //pressure + //pressure case 2: //discontinuous Boffi gradient[0]=-exp((x-.5)*(x-.5))*(2*x-1)*(y-1)*y; @@ -227,7 +227,7 @@ namespace Step22 switch (component) { - //velocity + //velocity case 0: return x*(x*(x*(x*(24*y-12)-48*y+24) +y*(y*(48*y-72)+48)-12) diff --git a/tests/fe/fe_q_gradient_divergence_theorem.cc b/tests/fe/fe_q_gradient_divergence_theorem.cc index 473ef32be4..041f012c4d 100644 --- a/tests/fe/fe_q_gradient_divergence_theorem.cc +++ b/tests/fe/fe_q_gradient_divergence_theorem.cc @@ -42,97 +42,97 @@ template Tensor<1,dim> ones () { - Tensor<1,dim> result; - for(unsigned int i=0; i result; + for (unsigned int i=0; i void test (const Triangulation &tr, - const FiniteElement &fe, - const double tolerance) + const FiniteElement &fe, + const double tolerance) { - DoFHandler dof(tr); - dof.distribute_dofs(fe); - - std::stringstream ss; - - deallog << "FE=" << fe.get_name() << std::endl; - - const QGauss quadrature(3); - FEValues fe_values (fe, quadrature, update_gradients - | update_quadrature_points - | update_JxW_values); - - const QGauss face_quadrature(3); - FEFaceValues fe_face_values (fe, face_quadrature, - update_values - | update_quadrature_points - | update_normal_vectors - | update_JxW_values); - - for(typename DoFHandler::active_cell_iterator cell = dof.begin_active(); - cell != dof.end(); - ++cell) - { - fe_values.reinit (cell); - - deallog << "Cell nodes:" << std::endl; - for(unsigned int i=0; i::vertices_per_cell; ++i) - { - deallog << i << ": ( "; - for (unsigned int d=0; dvertex(i)[d] << " "; - deallog << ")" << std::endl; - } - - bool cell_ok = true; - - for (unsigned int c=0; c dof(tr); + dof.distribute_dofs(fe); + + std::stringstream ss; + + deallog << "FE=" << fe.get_name() << std::endl; + + const QGauss quadrature(3); + FEValues fe_values (fe, quadrature, update_gradients + | update_quadrature_points + | update_JxW_values); + + const QGauss face_quadrature(3); + FEFaceValues fe_face_values (fe, face_quadrature, + update_values + | update_quadrature_points + | update_normal_vectors + | update_JxW_values); + + for (typename DoFHandler::active_cell_iterator cell = dof.begin_active(); + cell != dof.end(); + ++cell) + { + fe_values.reinit (cell); + + deallog << "Cell nodes:" << std::endl; + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + deallog << i << ": ( "; + for (unsigned int d=0; dvertex(i)[d] << " "; + deallog << ")" << std::endl; + } + + bool cell_ok = true; + + for (unsigned int c=0; c &tr, template void test_hyper_ball(const double tolerance) { - Triangulation tr; - GridGenerator::hyper_ball(tr); + Triangulation tr; + GridGenerator::hyper_ball(tr); - static const HyperBallBoundary boundary; - tr.set_boundary (0, boundary); + static const HyperBallBoundary boundary; + tr.set_boundary (0, boundary); - tr.refine_global(1); + tr.refine_global(1); - FE_Q fe(2); - test(tr, fe, tolerance); + FE_Q fe(2); + test(tr, fe, tolerance); } int main() { - std::ofstream logfile ("output"); - deallog << std::setprecision (3); + std::ofstream logfile ("output"); + deallog << std::setprecision (3); - deallog.attach(logfile); - deallog.depth_console (0); - deallog.threshold_double(1.e-7); + deallog.attach(logfile); + deallog.depth_console (0); + deallog.threshold_double(1.e-7); - test_hyper_ball<2>(1e-6); - test_hyper_ball<3>(1e-6); + test_hyper_ball<2>(1e-6); + test_hyper_ball<3>(1e-6); - deallog << "done..." << std::endl; + deallog << "done..." << std::endl; } diff --git a/tests/fe/fe_q_hessian_divergence_theorem.cc b/tests/fe/fe_q_hessian_divergence_theorem.cc index e765ffedf6..5de647b6a1 100644 --- a/tests/fe/fe_q_hessian_divergence_theorem.cc +++ b/tests/fe/fe_q_hessian_divergence_theorem.cc @@ -42,99 +42,99 @@ template Tensor<1,dim> ones () { - Tensor<1,dim> result; - for(unsigned int i=0; i result; + for (unsigned int i=0; i void test (const Triangulation &tr, - const FiniteElement &fe, - const double tolerance) + const FiniteElement &fe, + const double tolerance) { - DoFHandler dof(tr); - dof.distribute_dofs(fe); - - std::stringstream ss; - - deallog << "FE=" << fe.get_name() << std::endl; - - const QGauss quadrature(4); - FEValues fe_values (fe, quadrature, update_hessians - | update_quadrature_points - | update_JxW_values); - - const QGauss face_quadrature(4); - FEFaceValues fe_face_values (fe, face_quadrature, - update_gradients - | update_quadrature_points - | update_normal_vectors - | update_JxW_values); - - for(typename DoFHandler::active_cell_iterator cell = dof.begin_active(); - cell != dof.end(); - ++cell) - { - fe_values.reinit (cell); - - deallog << "Cell nodes:" << std::endl; - for(unsigned int i=0; i::vertices_per_cell; ++i) - { - deallog << i << ": ( "; - for (unsigned int d=0; dvertex(i)[d] << " "; - deallog << ")" << std::endl; - } - - bool cell_ok = true; - - for (unsigned int c=0; c dof(tr); + dof.distribute_dofs(fe); + + std::stringstream ss; + + deallog << "FE=" << fe.get_name() << std::endl; + + const QGauss quadrature(4); + FEValues fe_values (fe, quadrature, update_hessians + | update_quadrature_points + | update_JxW_values); + + const QGauss face_quadrature(4); + FEFaceValues fe_face_values (fe, face_quadrature, + update_gradients + | update_quadrature_points + | update_normal_vectors + | update_JxW_values); + + for (typename DoFHandler::active_cell_iterator cell = dof.begin_active(); + cell != dof.end(); + ++cell) + { + fe_values.reinit (cell); + + deallog << "Cell nodes:" << std::endl; + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + deallog << i << ": ( "; + for (unsigned int d=0; dvertex(i)[d] << " "; + deallog << ")" << std::endl; + } + + bool cell_ok = true; + + for (unsigned int c=0; c &tr, template void test_hyper_ball(const double tolerance) { - Triangulation tr; - GridGenerator::hyper_ball(tr); + Triangulation tr; + GridGenerator::hyper_ball(tr); - static const HyperBallBoundary boundary; - tr.set_boundary (0, boundary); + static const HyperBallBoundary boundary; + tr.set_boundary (0, boundary); - tr.refine_global(1); + tr.refine_global(1); - FE_Q fe(2); - test(tr, fe, tolerance); + FE_Q fe(2); + test(tr, fe, tolerance); } int main() { - std::ofstream logfile ("output"); - deallog << std::setprecision (3); + std::ofstream logfile ("output"); + deallog << std::setprecision (3); - deallog.attach(logfile); - deallog.depth_console (0); - deallog.threshold_double(1.e-7); + deallog.attach(logfile); + deallog.depth_console (0); + deallog.threshold_double(1.e-7); - test_hyper_ball<2>(1e-6); - test_hyper_ball<3>(1e-6); + test_hyper_ball<2>(1e-6); + test_hyper_ball<3>(1e-6); - deallog << "done..." << std::endl; + deallog << "done..." << std::endl; } diff --git a/tests/fe/fe_rt_gradient_divergence_theorem.cc b/tests/fe/fe_rt_gradient_divergence_theorem.cc index d57d071e03..72c0cad987 100644 --- a/tests/fe/fe_rt_gradient_divergence_theorem.cc +++ b/tests/fe/fe_rt_gradient_divergence_theorem.cc @@ -42,97 +42,97 @@ template Tensor<1,dim> ones () { - Tensor<1,dim> result; - for(unsigned int i=0; i result; + for (unsigned int i=0; i void test (const Triangulation &tr, - const FiniteElement &fe, - const double tolerance) + const FiniteElement &fe, + const double tolerance) { - DoFHandler dof(tr); - dof.distribute_dofs(fe); - - std::stringstream ss; - - deallog << "FE=" << fe.get_name() << std::endl; - - const QGauss quadrature(4); - FEValues fe_values (fe, quadrature, update_gradients - | update_quadrature_points - | update_JxW_values); - - const QGauss face_quadrature(4); - FEFaceValues fe_face_values (fe, face_quadrature, - update_values - | update_quadrature_points - | update_normal_vectors - | update_JxW_values); - - for(typename DoFHandler::active_cell_iterator cell = dof.begin_active(); - cell != dof.end(); - ++cell) - { - fe_values.reinit (cell); - - deallog << "Cell nodes:" << std::endl; - for(unsigned int i=0; i::vertices_per_cell; ++i) - { - deallog << i << ": ( "; - for (unsigned int d=0; dvertex(i)[d] << " "; - deallog << ")" << std::endl; - } - - bool cell_ok = true; - - for (unsigned int c=0; c dof(tr); + dof.distribute_dofs(fe); + + std::stringstream ss; + + deallog << "FE=" << fe.get_name() << std::endl; + + const QGauss quadrature(4); + FEValues fe_values (fe, quadrature, update_gradients + | update_quadrature_points + | update_JxW_values); + + const QGauss face_quadrature(4); + FEFaceValues fe_face_values (fe, face_quadrature, + update_values + | update_quadrature_points + | update_normal_vectors + | update_JxW_values); + + for (typename DoFHandler::active_cell_iterator cell = dof.begin_active(); + cell != dof.end(); + ++cell) + { + fe_values.reinit (cell); + + deallog << "Cell nodes:" << std::endl; + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + deallog << i << ": ( "; + for (unsigned int d=0; dvertex(i)[d] << " "; + deallog << ")" << std::endl; + } + + bool cell_ok = true; + + for (unsigned int c=0; c &tr, template void test_hyper_cube(const double tolerance) { - Triangulation tr; - GridGenerator::hyper_cube (tr); - - typename Triangulation::active_cell_iterator cell = tr.begin_active(); - for (unsigned int i=0; i::vertices_per_cell; ++i) - { - Point &point = cell->vertex(i); - if (std::abs(point(dim-1)-1.0)<1e-5) - point(dim-1) += 0.15; - } - - FE_RaviartThomas fe(2); - test(tr, fe, tolerance); + Triangulation tr; + GridGenerator::hyper_cube (tr); + + typename Triangulation::active_cell_iterator cell = tr.begin_active(); + for (unsigned int i=0; i::vertices_per_cell; ++i) + { + Point &point = cell->vertex(i); + if (std::abs(point(dim-1)-1.0)<1e-5) + point(dim-1) += 0.15; + } + + FE_RaviartThomas fe(2); + test(tr, fe, tolerance); } int main() { - std::ofstream logfile ("output"); - deallog << std::setprecision (3); + std::ofstream logfile ("output"); + deallog << std::setprecision (3); - deallog.attach(logfile); - deallog.depth_console (0); - deallog.threshold_double(1.e-7); + deallog.attach(logfile); + deallog.depth_console (0); + deallog.threshold_double(1.e-7); - test_hyper_cube<2>(1e-6); - test_hyper_cube<3>(1e-6); + test_hyper_cube<2>(1e-6); + test_hyper_cube<3>(1e-6); - deallog << "done..." << std::endl; + deallog << "done..." << std::endl; } diff --git a/tests/fe/fe_system_from_list.cc b/tests/fe/fe_system_from_list.cc index ab903ec9ba..a092e96f41 100644 --- a/tests/fe/fe_system_from_list.cc +++ b/tests/fe/fe_system_from_list.cc @@ -40,27 +40,29 @@ template struct MyFESystem { MyFESystem (const std::vector*> &fes, - const std::vector &multiplicities) - { - deallog << "Constructing FESystem from list." << std::endl; - } + const std::vector &multiplicities) + { + deallog << "Constructing FESystem from list." << std::endl; + } }; - + template -class MySimulator { +class MySimulator +{ public: MySimulator (const unsigned int polynomial_degree); private: MyFESystem fe; - struct VectorElementDestroyer { + struct VectorElementDestroyer + { const std::vector*> data; VectorElementDestroyer (const std::vector*> &pointers); ~VectorElementDestroyer (); // destructor to delete the pointers - const std::vector*> & get_data () const; + const std::vector*> &get_data () const; }; static std::vector*> @@ -99,7 +101,7 @@ MySimulator::create_fe_multiplicities () template MySimulator::VectorElementDestroyer:: VectorElementDestroyer (const std::vector*> &pointers) -: data(pointers) + : data(pointers) {} template @@ -124,9 +126,9 @@ get_data () const template MySimulator::MySimulator (const unsigned int polynomial_degree) -: -fe (VectorElementDestroyer(create_fe_list (polynomial_degree)).get_data(), - create_fe_multiplicities ()) + : + fe (VectorElementDestroyer(create_fe_list (polynomial_degree)).get_data(), + create_fe_multiplicities ()) {} diff --git a/tests/fe/fe_tools.cc b/tests/fe/fe_tools.cc index 6322cfdcf6..29b05d6a54 100644 --- a/tests/fe/fe_tools.cc +++ b/tests/fe/fe_tools.cc @@ -201,7 +201,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test_projection<1>(logfile); test_projection<2>(logfile); test_projection<3>(logfile); diff --git a/tests/fe/fe_tools_block_renumbering.cc b/tests/fe/fe_tools_block_renumbering.cc index e8b7d297bb..e74bea30b1 100644 --- a/tests/fe/fe_tools_block_renumbering.cc +++ b/tests/fe/fe_tools_block_renumbering.cc @@ -32,7 +32,7 @@ #include -void logvec (const std::vector& v, const std::vector& w) +void logvec (const std::vector &v, const std::vector &w) { deallog << '['; for (unsigned int i=0; i &fe) { std::vector v(fe.dofs_per_cell); std::vector w(fe.n_blocks()); - + deallog << fe.get_name() << std::endl; - + FETools::compute_block_renumbering(fe, v, w, false); logvec(v,w); FETools::compute_block_renumbering(fe, v, w, true); @@ -85,7 +85,7 @@ void test_renumbering() test_renumbering(FESystem(rt1,1,q1,1)); test_renumbering(FESystem(rt1,2,q1,2)); test_renumbering(FESystem(n1,1,q1,1)); - + deallog.pop(); } diff --git a/tests/fe/fe_values_view_26.cc b/tests/fe/fe_values_view_26.cc index a6bf2794b2..3360091780 100644 --- a/tests/fe/fe_values_view_26.cc +++ b/tests/fe/fe_values_view_26.cc @@ -44,8 +44,8 @@ Tensor<1,1> curl (const Tensor<2,2> &grads) Tensor<1,3> curl (const Tensor<2,3> &grads) { return Point<3>(grads[2][1] - grads[1][2], - grads[0][2] - grads[2][0], - grads[1][0] - grads[0][1]); + grads[0][2] - grads[2][0], + grads[1][0] - grads[0][1]); } @@ -81,10 +81,10 @@ void test (const Triangulation &tr, for (unsigned int q=0; q #include @@ -34,7 +34,7 @@ template void test(const FiniteElement &fe) { deallog << fe.get_name() << std::endl; - + } @@ -67,7 +67,7 @@ main() test(fe); } - + return 0; } diff --git a/tests/fe/get_name_02.cc b/tests/fe/get_name_02.cc index 0927fa1edc..b63c83c954 100644 --- a/tests/fe/get_name_02.cc +++ b/tests/fe/get_name_02.cc @@ -16,7 +16,7 @@ // test get_name() - + #include "../tests.h" #include #include @@ -66,7 +66,7 @@ main() test(fe); } - + return 0; } diff --git a/tests/fe/interpolate_q_bubbles.cc b/tests/fe/interpolate_q_bubbles.cc index ba66333a36..7bd865f3ae 100644 --- a/tests/fe/interpolate_q_bubbles.cc +++ b/tests/fe/interpolate_q_bubbles.cc @@ -25,7 +25,7 @@ template void check_q_bubbles(const Function &f, - const unsigned int degree) + const unsigned int degree) { FE_Q_Bubbles fe(degree); deallog << fe.get_name() << ' '; diff --git a/tests/fe/jacobians.cc b/tests/fe/jacobians.cc index d5fbe9fae8..90be981df2 100644 --- a/tests/fe/jacobians.cc +++ b/tests/fe/jacobians.cc @@ -35,157 +35,157 @@ template void do_test(const Triangulation &tria, - const Mapping &mapping) + const Mapping &mapping) { - FE_Nothing dummy; - // choose a point that is not right in the - // middle of the cell so that the Jacobian - // contains many nonzero entries - Point quad_p; - for (int d=0; d quad(quad_p); - - { - deallog << dim << "D Jacobians:" << std::endl; - FEValues fe_val(mapping, dummy, quad, update_jacobians); - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - { - fe_val.reinit (cell); - - for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_inverse_jacobians); - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - { - fe_val.reinit (cell); - - for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_grads); - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - { - fe_val.reinit (cell); - - for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_pushed_forward_grads); - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - { - fe_val.reinit (cell); - - for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_2nd_derivatives); - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - { - fe_val.reinit (cell); - - for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - { - fe_val.reinit (cell); - - for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_3rd_derivatives); - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - { - fe_val.reinit (cell); - - for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - { - fe_val.reinit (cell); - - for (unsigned int d=0; d dummy; + // choose a point that is not right in the + // middle of the cell so that the Jacobian + // contains many nonzero entries + Point quad_p; + for (int d=0; d quad(quad_p); + + { + deallog << dim << "D Jacobians:" << std::endl; + FEValues fe_val(mapping, dummy, quad, update_jacobians); + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + { + fe_val.reinit (cell); + + for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_inverse_jacobians); + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + { + fe_val.reinit (cell); + + for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_grads); + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + { + fe_val.reinit (cell); + + for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_pushed_forward_grads); + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + { + fe_val.reinit (cell); + + for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_2nd_derivatives); + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + { + fe_val.reinit (cell); + + for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + { + fe_val.reinit (cell); + + for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_3rd_derivatives); + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + { + fe_val.reinit (cell); + + for (unsigned int d=0; d fe_val(mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + { + fe_val.reinit (cell); + + for (unsigned int d=0; d &tria, template void test() { - Triangulation tria; - GridGenerator::hyper_ball (tria); - static const HyperBallBoundary boundary; - tria.set_boundary (0, boundary); - - { - deallog << "========== MappingQ ==========" << std::endl; - MappingQ mapping(5); - do_test(tria, mapping); - } - - { - deallog << "========== MappingFEField ==========" << std::endl; - FESystem fe_euler(FE_Q (QGaussLobatto<1>(4)), dim); - DoFHandler map_dh(tria); - map_dh.distribute_dofs (fe_euler); - - Vector euler_vec(map_dh.n_dofs()); - VectorTools::get_position_vector(map_dh, euler_vec); - - MappingFEField mapping(map_dh, euler_vec); - do_test(tria, mapping); - } + Triangulation tria; + GridGenerator::hyper_ball (tria); + static const HyperBallBoundary boundary; + tria.set_boundary (0, boundary); + + { + deallog << "========== MappingQ ==========" << std::endl; + MappingQ mapping(5); + do_test(tria, mapping); + } + + { + deallog << "========== MappingFEField ==========" << std::endl; + FESystem fe_euler(FE_Q (QGaussLobatto<1>(4)), dim); + DoFHandler map_dh(tria); + map_dh.distribute_dofs (fe_euler); + + Vector euler_vec(map_dh.n_dofs()); + VectorTools::get_position_vector(map_dh, euler_vec); + + MappingFEField mapping(map_dh, euler_vec); + do_test(tria, mapping); + } } int main() { - std::ofstream logfile ("output"); - deallog << std::setprecision(8) << std::fixed; - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog << std::setprecision(8) << std::fixed; + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test<2>(); - test<3>(); + test<2>(); + test<3>(); - return 0; + return 0; } diff --git a/tests/fe/jacobians_face.cc b/tests/fe/jacobians_face.cc index 5992600910..9cec591f16 100644 --- a/tests/fe/jacobians_face.cc +++ b/tests/fe/jacobians_face.cc @@ -29,324 +29,324 @@ template void test() { - Triangulation tria; - GridGenerator::hyper_ball (tria); - static const HyperBallBoundary boundary; - tria.set_boundary (0, boundary); - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement(); - - MappingQ mapping(5); - FE_Nothing dummy; - // choose a point that is not right in the middle of the cell so that the - // Jacobian contains many nonzero entries - Point quad_p; - for (int d=0; d quad(quad_p); - - { - FEFaceValues fe_val (mapping, dummy, quad, update_jacobians); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobians); - - deallog << dim << "D Jacobians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_inverse_jacobians); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_inverse_jacobians); - - deallog << dim << "D inverse Jacobians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_grads); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_grads); - - deallog << dim << "D Jacobian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); - - deallog << dim << "D Jacobian pushed forward gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); - - deallog << dim << "D Jacobian hessians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); - - deallog << dim << "D Jacobian pushed forward hessians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); - - deallog << dim << "D Jacobian hessian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); - - deallog << dim << "D Jacobian pushed forward hessian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d tria; + GridGenerator::hyper_ball (tria); + static const HyperBallBoundary boundary; + tria.set_boundary (0, boundary); + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement(); + + MappingQ mapping(5); + FE_Nothing dummy; + // choose a point that is not right in the middle of the cell so that the + // Jacobian contains many nonzero entries + Point quad_p; + for (int d=0; d quad(quad_p); + + { + FEFaceValues fe_val (mapping, dummy, quad, update_jacobians); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobians); + + deallog << dim << "D Jacobians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_inverse_jacobians); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_inverse_jacobians); + + deallog << dim << "D inverse Jacobians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_grads); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_grads); + + deallog << dim << "D Jacobian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); + + deallog << dim << "D Jacobian pushed forward gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); + + deallog << dim << "D Jacobian hessians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); + + deallog << dim << "D Jacobian pushed forward hessians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); + + deallog << dim << "D Jacobian hessian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); + + deallog << dim << "D Jacobian pushed forward hessian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d(); - test<3>(); + test<2>(); + test<3>(); - return 0; + return 0; } diff --git a/tests/fe/jacobians_face_cartesian.cc b/tests/fe/jacobians_face_cartesian.cc index 87814e2241..ea9b04d457 100644 --- a/tests/fe/jacobians_face_cartesian.cc +++ b/tests/fe/jacobians_face_cartesian.cc @@ -29,323 +29,323 @@ template void test() { - Triangulation tria; - GridGenerator::hyper_cube (tria); - tria.refine_global(1); - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement(); - - MappingCartesian mapping; - FE_Nothing dummy; - // choose a point that is not right in the middle of the cell so that the - // Jacobian contains many nonzero entries - Point quad_p; - for (int d=0; d quad(quad_p); - - { - FEFaceValues fe_val (mapping, dummy, quad, update_jacobians); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobians); - - deallog << dim << "D Jacobians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_inverse_jacobians); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_inverse_jacobians); - - deallog << dim << "D inverse Jacobians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_grads); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_grads); - - deallog << dim << "D Jacobian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); - - deallog << dim << "D Jacobian pushed forward gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); - - deallog << dim << "D Jacobian hessians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); - - deallog << dim << "D Jacobian pushed forward hessians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); - - deallog << dim << "D Jacobian hessian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); - - deallog << dim << "D Jacobian pushed forward hessian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d tria; + GridGenerator::hyper_cube (tria); + tria.refine_global(1); + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement(); + + MappingCartesian mapping; + FE_Nothing dummy; + // choose a point that is not right in the middle of the cell so that the + // Jacobian contains many nonzero entries + Point quad_p; + for (int d=0; d quad(quad_p); + + { + FEFaceValues fe_val (mapping, dummy, quad, update_jacobians); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobians); + + deallog << dim << "D Jacobians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_inverse_jacobians); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_inverse_jacobians); + + deallog << dim << "D inverse Jacobians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_grads); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_grads); + + deallog << dim << "D Jacobian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); + + deallog << dim << "D Jacobian pushed forward gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); + + deallog << dim << "D Jacobian hessians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); + + deallog << dim << "D Jacobian pushed forward hessians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); + + deallog << dim << "D Jacobian hessian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); + + deallog << dim << "D Jacobian pushed forward hessian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d(); - test<3>(); + test<2>(); + test<3>(); - return 0; + return 0; } diff --git a/tests/fe/jacobians_face_fe_field.cc b/tests/fe/jacobians_face_fe_field.cc index 000b9e0816..503f45708c 100644 --- a/tests/fe/jacobians_face_fe_field.cc +++ b/tests/fe/jacobians_face_fe_field.cc @@ -35,319 +35,319 @@ template void test() { - Triangulation tria; - GridGenerator::hyper_ball (tria); - static const HyperBallBoundary boundary; - tria.set_boundary (0, boundary); - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement(); - - // create Euler vector field and MappingFEField - FESystem fe_euler(FE_Q (QGaussLobatto<1>(4)), dim); - DoFHandler map_dh(tria); - map_dh.distribute_dofs (fe_euler); - - Vector euler_vec(map_dh.n_dofs()); - VectorTools::get_position_vector(map_dh, euler_vec); - - MappingFEField mapping(map_dh, euler_vec); - - FE_Nothing dummy; - // choose a point that is not right in the middle of the cell so that the - // Jacobian contains many nonzero entries - Point quad_p; - for (int d=0; d quad(quad_p); - - { - FEFaceValues fe_val (mapping, dummy, quad, update_jacobians); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobians); - - deallog << dim << "D Jacobians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_inverse_jacobians); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_inverse_jacobians); - - deallog << dim << "D inverse Jacobians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_grads); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_grads); - - deallog << dim << "D Jacobian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); - - deallog << dim << "D Jacobian pushed forward gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); - - deallog << dim << "D Jacobian hessians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); - - deallog << dim << "D Jacobian pushed forward hessians:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); - - deallog << dim << "D Jacobian hessian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); - FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); - - deallog << dim << "D Jacobian pushed forward hessian gradients:" << std::endl; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), endc = tria.end(); - for ( ; cell != endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - { - fe_val.reinit (cell, f); - - for (unsigned int d=0; dat_boundary(f) == false && - cell->neighbor(f)->level() < cell->level()) - { - fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), - cell->neighbor_of_coarser_neighbor(f).second); - - for (unsigned int d=0; d tria; + GridGenerator::hyper_ball (tria); + static const HyperBallBoundary boundary; + tria.set_boundary (0, boundary); + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement(); + + // create Euler vector field and MappingFEField + FESystem fe_euler(FE_Q (QGaussLobatto<1>(4)), dim); + DoFHandler map_dh(tria); + map_dh.distribute_dofs (fe_euler); + + Vector euler_vec(map_dh.n_dofs()); + VectorTools::get_position_vector(map_dh, euler_vec); + + MappingFEField mapping(map_dh, euler_vec); + + FE_Nothing dummy; + // choose a point that is not right in the middle of the cell so that the + // Jacobian contains many nonzero entries + Point quad_p; + for (int d=0; d quad(quad_p); + + { + FEFaceValues fe_val (mapping, dummy, quad, update_jacobians); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobians); + + deallog << dim << "D Jacobians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_inverse_jacobians); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_inverse_jacobians); + + deallog << dim << "D inverse Jacobians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_grads); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_grads); + + deallog << dim << "D Jacobian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_grads); + + deallog << dim << "D Jacobian pushed forward gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_2nd_derivatives); + + deallog << dim << "D Jacobian hessians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_2nd_derivatives); + + deallog << dim << "D Jacobian pushed forward hessians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_3rd_derivatives); + + deallog << dim << "D Jacobian hessian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d fe_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); + FESubfaceValues fe_sub_val (mapping, dummy, quad, update_jacobian_pushed_forward_3rd_derivatives); + + deallog << dim << "D Jacobian pushed forward hessian gradients:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d(); - test<3>(); + test<2>(); + test<3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_01.cc b/tests/fe/mapping_fe_field_01.cc index 6d889f37b6..f1c56bbd75 100644 --- a/tests/fe/mapping_fe_field_01.cc +++ b/tests/fe/mapping_fe_field_01.cc @@ -43,7 +43,8 @@ #define PRECISION 2 template -void test(const unsigned int degree) { +void test(const unsigned int degree) +{ deallog << "dim = " << dim << ", spacedim = " << spacedim << std::endl; deallog << "degree = " << degree << std::endl; @@ -78,19 +79,21 @@ void test(const unsigned int degree) { cell = dof_sys.begin_active(), endc = dof_sys.end(); - for (; cell!=endc; ++cell) { - fe_values.reinit (cell); - deallog << "Cell " << cell << ": OK" << std::endl; - } + for (; cell!=endc; ++cell) + { + fe_values.reinit (cell); + deallog << "Cell " << cell << ": OK" << std::endl; + } } int main() { initlog(); - for(unsigned int d=1; d<4; ++d) { - test<2,2>(d); - test<2,3>(d); - test<3,3>(d); - } + for (unsigned int d=1; d<4; ++d) + { + test<2,2>(d); + test<2,3>(d); + test<3,3>(d); + } } diff --git a/tests/fe/mapping_fe_field_real_to_unit_b1.cc b/tests/fe/mapping_fe_field_real_to_unit_b1.cc index b3fbb16e23..7a3bb85d85 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_b1.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_b1.cc @@ -39,55 +39,55 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; - - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation); - - const unsigned int n_points = 4; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feb(1); - const FESystem fesystem(feb, spacedim); - DoFHandler dhb(triangulation); - dhb.distribute_dofs(fesystem); - Vector eulerq(dhb.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhb, eulerq, mask); - MappingFEField map(dhb, eulerq, mask); - - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + + Triangulation triangulation; + GridGenerator::hyper_cube (triangulation); + + const unsigned int n_points = 4; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feb(1); + const FESystem fesystem(feb, spacedim); + DoFHandler dhb(triangulation); + dhb.distribute_dofs(fesystem); + Vector eulerq(dhb.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhb, eulerq, mask); + MappingFEField map(dhb, eulerq, mask); + + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); //Move a vertex a little bit const unsigned int n_dx = 5; @@ -99,24 +99,24 @@ void test_real_to_unit_cell() // in a loop, make the cell more // and more distorted for (unsigned int j=0; jvertex(0) = double(j)*direction; - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - Assert (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + deallog << "Vertex displacement: " << double(j)*direction << std::endl; + cell->vertex(0) = double(j)*direction; + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + Assert (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } } - } deallog << "OK" << std::endl; } @@ -125,18 +125,18 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); - test_real_to_unit_cell<3,3>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<1,3>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<1,3>(); + test_real_to_unit_cell<2,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_b2_curved.cc b/tests/fe/mapping_fe_field_real_to_unit_b2_curved.cc index f84cdd3ab4..5def1504d9 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_b2_curved.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_b2_curved.cc @@ -45,7 +45,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -62,63 +62,63 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_indicator (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feb(2); - const FESystem fesystem(feb, spacedim); - DoFHandler dhb(triangulation); - dhb.distribute_dofs(fesystem); - Vector eulerq(dhb.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhb, eulerq, mask); - MappingFEField map(dhb, eulerq, mask); - - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); - } + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feb(2); + const FESystem fesystem(feb, spacedim); + DoFHandler dhb(triangulation); + dhb.distribute_dofs(fesystem); + Vector eulerq(dhb.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhb, eulerq, mask); + MappingFEField map(dhb, eulerq, mask); + + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } deallog << "OK" << std::endl; @@ -128,18 +128,18 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<2,3>(); - + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<2,3>(); + // test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_b2_mask.cc b/tests/fe/mapping_fe_field_real_to_unit_b2_mask.cc index e8fde030e0..d9462e9919 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_b2_mask.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_b2_mask.cc @@ -41,7 +41,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -58,61 +58,61 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_indicator (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x fesystem(FE_Q(1),1, FE_Bernstein(2),spacedim); - - DoFHandler dhb(triangulation); - dhb.distribute_dofs(fesystem); - Vector eulerq(dhb.n_dofs()); - - // Let's use only the last spacedim components - ComponentMask mask(spacedim+1, true); - mask.set(0, false); - - VectorTools::get_position_vector(dhb, eulerq, mask); - MappingFEField map(dhb, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x fesystem(FE_Q(1),1, FE_Bernstein(2),spacedim); + + DoFHandler dhb(triangulation); + dhb.distribute_dofs(fesystem); + Vector eulerq(dhb.n_dofs()); + +// Let's use only the last spacedim components + ComponentMask mask(spacedim+1, true); + mask.set(0, false); + + VectorTools::get_position_vector(dhb, eulerq, mask); + MappingFEField map(dhb, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); const Point p_unit = map.transform_real_to_unit_cell(cell,p); @@ -125,18 +125,18 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); - test_real_to_unit_cell<3,3>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<2,3>(); // test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_b3_curved.cc b/tests/fe/mapping_fe_field_real_to_unit_b3_curved.cc index 060e30504b..ccacd428d3 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_b3_curved.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_b3_curved.cc @@ -45,7 +45,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -62,63 +62,63 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_indicator (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feb(3); - const FESystem fesystem(feb, spacedim); - DoFHandler dhb(triangulation); - dhb.distribute_dofs(fesystem); - Vector eulerq(dhb.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhb, eulerq, mask); - MappingFEField map(dhb, eulerq, mask); - - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); - } + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feb(3); + const FESystem fesystem(feb, spacedim); + DoFHandler dhb(triangulation); + dhb.distribute_dofs(fesystem); + Vector eulerq(dhb.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhb, eulerq, mask); + MappingFEField map(dhb, eulerq, mask); + + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } deallog << "OK" << std::endl; @@ -128,19 +128,19 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<2,3>(); // test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_b4_curved.cc b/tests/fe/mapping_fe_field_real_to_unit_b4_curved.cc index 3e563c38f9..82f9a0b2d2 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_b4_curved.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_b4_curved.cc @@ -45,7 +45,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -62,62 +62,62 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_indicator (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feb(4); - const FESystem fesystem(feb, spacedim); - DoFHandler dhb(triangulation); - dhb.distribute_dofs(fesystem); - Vector eulerq(dhb.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhb, eulerq, mask); - MappingFEField map(dhb, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); - } + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feb(4); + const FESystem fesystem(feb, spacedim); + DoFHandler dhb(triangulation); + dhb.distribute_dofs(fesystem); + Vector eulerq(dhb.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhb, eulerq, mask); + MappingFEField map(dhb, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } deallog << "OK" << std::endl; @@ -127,19 +127,19 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<2,3>(); //test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_b5_curved.cc b/tests/fe/mapping_fe_field_real_to_unit_b5_curved.cc index 446d1bfa82..6e01469ec8 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_b5_curved.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_b5_curved.cc @@ -45,7 +45,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -62,62 +62,62 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_indicator (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feb(5); - const FESystem fesystem(feb, spacedim); - DoFHandler dhb(triangulation); - dhb.distribute_dofs(fesystem); - Vector eulerq(dhb.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhb, eulerq, mask); - MappingFEField map(dhb, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); - } + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feb(5); + const FESystem fesystem(feb, spacedim); + DoFHandler dhb(triangulation); + dhb.distribute_dofs(fesystem); + Vector eulerq(dhb.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhb, eulerq, mask); + MappingFEField map(dhb, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } deallog << "OK" << std::endl; @@ -127,13 +127,13 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); test_real_to_unit_cell<3,3>(); test_real_to_unit_cell<1,2>(); @@ -141,5 +141,5 @@ main() //test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_q1.cc b/tests/fe/mapping_fe_field_real_to_unit_q1.cc index 547147ce6e..c5a8c76b87 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_q1.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_q1.cc @@ -38,54 +38,54 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; - - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation); - - const unsigned int n_points = 4; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feq(1); - const FESystem fesystem(feq, spacedim); - DoFHandler dhq(triangulation); - dhq.distribute_dofs(fesystem); - Vector eulerq(dhq.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhq, eulerq, mask); - MappingFEField map(dhq, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + + Triangulation triangulation; + GridGenerator::hyper_cube (triangulation); + + const unsigned int n_points = 4; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feq(1); + const FESystem fesystem(feq, spacedim); + DoFHandler dhq(triangulation); + dhq.distribute_dofs(fesystem); + Vector eulerq(dhq.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhq, eulerq, mask); + MappingFEField map(dhq, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); //Move a vertex a little bit const unsigned int n_dx = 5; @@ -97,24 +97,24 @@ void test_real_to_unit_cell() // in a loop, make the cell more // and more distorted for (unsigned int j=0; jvertex(0) = double(j)*direction; - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - Assert (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + deallog << "Vertex displacement: " << double(j)*direction << std::endl; + cell->vertex(0) = double(j)*direction; + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + Assert (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } } - } deallog << "OK" << std::endl; } @@ -123,18 +123,18 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); - test_real_to_unit_cell<3,3>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<1,3>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<1,3>(); + test_real_to_unit_cell<2,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_q2_curved.cc b/tests/fe/mapping_fe_field_real_to_unit_q2_curved.cc index 9fca430dfd..99e7000f32 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_q2_curved.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_q2_curved.cc @@ -47,7 +47,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -64,62 +64,62 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_indicator (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feq(2); - const FESystem fesystem(feq, spacedim); - DoFHandler dhq(triangulation); - dhq.distribute_dofs(fesystem); - Vector eulerq(dhq.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhq, eulerq, mask); - MappingFEField map(dhq, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); - } + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feq(2); + const FESystem fesystem(feq, spacedim); + DoFHandler dhq(triangulation); + dhq.distribute_dofs(fesystem); + Vector eulerq(dhq.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhq, eulerq, mask); + MappingFEField map(dhq, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } deallog << "OK" << std::endl; @@ -129,18 +129,18 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<1,2>(); test_real_to_unit_cell<2,3>(); // test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_q2_mask.cc b/tests/fe/mapping_fe_field_real_to_unit_q2_mask.cc index 86dcba9e49..b2ac933f08 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_q2_mask.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_q2_mask.cc @@ -38,57 +38,57 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; - - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation); - - const unsigned int n_points = 4; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x fesystem(FE_Q(1),1, FE_Q(2),spacedim); - - DoFHandler dhq(triangulation); - dhq.distribute_dofs(fesystem); - Vector eulerq(dhq.n_dofs()); - - // Let's use only the last spacedim components - ComponentMask mask(spacedim+1, true); - mask.set(0, false); - - VectorTools::get_position_vector(dhq, eulerq, mask); - MappingFEField map(dhq, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + + Triangulation triangulation; + GridGenerator::hyper_cube (triangulation); + + const unsigned int n_points = 4; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x fesystem(FE_Q(1),1, FE_Q(2),spacedim); + + DoFHandler dhq(triangulation); + dhq.distribute_dofs(fesystem); + Vector eulerq(dhq.n_dofs()); + +// Let's use only the last spacedim components + ComponentMask mask(spacedim+1, true); + mask.set(0, false); + + VectorTools::get_position_vector(dhq, eulerq, mask); + MappingFEField map(dhq, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); //Move a vertex a little bit const unsigned int n_dx = 5; @@ -100,24 +100,24 @@ void test_real_to_unit_cell() // in a loop, make the cell more // and more distorted for (unsigned int j=0; jvertex(0) = double(j)*direction; - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - Assert (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + deallog << "Vertex displacement: " << double(j)*direction << std::endl; + cell->vertex(0) = double(j)*direction; + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + Assert (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } } - } deallog << "OK" << std::endl; } @@ -126,18 +126,18 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); - test_real_to_unit_cell<3,3>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<1,3>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<1,3>(); + test_real_to_unit_cell<2,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_q3_curved.cc b/tests/fe/mapping_fe_field_real_to_unit_q3_curved.cc index cbe3fb6a74..30eecaec5b 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_q3_curved.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_q3_curved.cc @@ -47,7 +47,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -64,62 +64,62 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_indicator (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feq(3); - const FESystem fesystem(feq, spacedim); - DoFHandler dhq(triangulation); - dhq.distribute_dofs(fesystem); - Vector eulerq(dhq.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhq, eulerq, mask); - MappingFEField map(dhq, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); - } + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feq(3); + const FESystem fesystem(feq, spacedim); + DoFHandler dhq(triangulation); + dhq.distribute_dofs(fesystem); + Vector eulerq(dhq.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhq, eulerq, mask); + MappingFEField map(dhq, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } deallog << "OK" << std::endl; @@ -129,19 +129,19 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<2,3>(); //test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_q4_curved.cc b/tests/fe/mapping_fe_field_real_to_unit_q4_curved.cc index 564ebbf507..4b7e0c848a 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_q4_curved.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_q4_curved.cc @@ -44,7 +44,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -61,62 +61,62 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_indicator (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feq(4); - const FESystem fesystem(feq, spacedim); - DoFHandler dhq(triangulation); - dhq.distribute_dofs(fesystem); - Vector eulerq(dhq.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhq, eulerq, mask); - MappingFEField map(dhq, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); - } + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feq(4); + const FESystem fesystem(feq, spacedim); + DoFHandler dhq(triangulation); + dhq.distribute_dofs(fesystem); + Vector eulerq(dhq.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhq, eulerq, mask); + MappingFEField map(dhq, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } deallog << "OK" << std::endl; @@ -126,19 +126,19 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<2,3>(); // test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_fe_field_real_to_unit_q5_curved.cc b/tests/fe/mapping_fe_field_real_to_unit_q5_curved.cc index 2ce4a4d9c6..cde1da3633 100644 --- a/tests/fe/mapping_fe_field_real_to_unit_q5_curved.cc +++ b/tests/fe/mapping_fe_field_real_to_unit_q5_curved.cc @@ -44,7 +44,7 @@ using namespace dealii; template void test_real_to_unit_cell() { - deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; // define a boundary that fits the // the vertices of the hyper cube @@ -61,63 +61,63 @@ void test_real_to_unit_cell() triangulation.begin_active()->face(0)->set_boundary_id (1); - const unsigned int n_points = 5; - std::vector< Point > unit_points(Utilities::fixed_power(n_points)); - - switch (dim) - { - case 1: - for (unsigned int x=0; x feq(5); - const FESystem fesystem(feq, spacedim); - DoFHandler dhq(triangulation); - dhq.distribute_dofs(fesystem); - Vector eulerq(dhq.n_dofs()); - const ComponentMask mask(spacedim, true); - - VectorTools::get_position_vector(dhq, eulerq, mask); - MappingFEField map(dhq, eulerq, mask); - - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - - for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); - const Point p_unit = map.transform_real_to_unit_cell(cell,p); - - AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); - } + const unsigned int n_points = 5; + std::vector< Point > unit_points(Utilities::fixed_power(n_points)); + + switch (dim) + { + case 1: + for (unsigned int x=0; x feq(5); + const FESystem fesystem(feq, spacedim); + DoFHandler dhq(triangulation); + dhq.distribute_dofs(fesystem); + Vector eulerq(dhq.n_dofs()); + const ComponentMask mask(spacedim, true); + + VectorTools::get_position_vector(dhq, eulerq, mask); + MappingFEField map(dhq, eulerq, mask); + + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + + for (unsigned int i=0; i p = map.transform_unit_to_real_cell(cell,unit_points[i]); + const Point p_unit = map.transform_real_to_unit_cell(cell,p); + + AssertThrow (unit_points[i].distance(p_unit) < 1e-10, ExcInternalError()); + } deallog << "OK" << std::endl; @@ -127,19 +127,19 @@ void test_real_to_unit_cell() int main() { - std::ofstream logfile ("output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); - test_real_to_unit_cell<1,1>(); - test_real_to_unit_cell<2,2>(); + test_real_to_unit_cell<1,1>(); + test_real_to_unit_cell<2,2>(); test_real_to_unit_cell<3,3>(); - test_real_to_unit_cell<1,2>(); - test_real_to_unit_cell<2,3>(); + test_real_to_unit_cell<1,2>(); + test_real_to_unit_cell<2,3>(); //test_real_to_unit_cell<1,3>(); - return 0; + return 0; } diff --git a/tests/fe/mapping_project_01.cc b/tests/fe/mapping_project_01.cc index dd85fa48da..a1115099c9 100644 --- a/tests/fe/mapping_project_01.cc +++ b/tests/fe/mapping_project_01.cc @@ -45,14 +45,14 @@ void dim2_grid () cell = triangulation.begin_active(), endc = triangulation.end(); deallog<<"The test point has real coordinates: "<::faces_per_cell; ++face) - { - deallog<<"For face: "<::faces_per_cell; ++face) - { - deallog<<"For face: "<::faces_per_cell; ++face) - { - deallog<<"For face: "< &tria, { switch (transform) { - // first round: take - // original grid + // first round: take + // original grid case 0: break; - // second round: rotate - // triangulation + // second round: rotate + // triangulation case 1: GridTools::rotate (3.14159265358/2, tria); break; - // third round: inflate - // by a factor of 2 + // third round: inflate + // by a factor of 2 case 2: GridTools::scale (2, tria); break; - // third round: scale - // back, rotate back, - // stretch + // third round: scale + // back, rotate back, + // stretch case 3: GridTools::scale (.5, tria); GridTools::rotate (-3.14159265358/2, tria); diff --git a/tests/fe/nedelec_face_interpolation.cc b/tests/fe/nedelec_face_interpolation.cc index 5d26f1ad9b..d22e1dc21a 100644 --- a/tests/fe/nedelec_face_interpolation.cc +++ b/tests/fe/nedelec_face_interpolation.cc @@ -48,8 +48,8 @@ void test (unsigned p1, unsigned p2) GridGenerator::subdivided_hyper_rectangle (triangulation, subdivisions, Point(), (dim == 3 ? - Point(2,1,1) : - Point(2,1))); + Point(2,1,1) : + Point(2,1))); (++triangulation.begin_active())->set_refine_flag (); triangulation.execute_coarsening_and_refinement (); @@ -68,26 +68,26 @@ void test (unsigned p1, unsigned p2) bool is_zero_column = true; for (unsigned int i=0; i 1e-10) - { - is_zero_column = false; - break; - } + is_zero_column = true; + for (unsigned int j=0; j 1e-10) + { + is_zero_column = false; + break; + } + } + + if (is_zero_column) + { + deallog << "Column " << i + << " has no non-zero elements." + << std::endl; + } } - if(is_zero_column) - { - deallog << "Column " << i - << " has no non-zero elements." - << std::endl; - } - } - - if(!is_zero_column) + if (!is_zero_column) deallog << "OK" << std::endl; else deallog << "Failed" << std::endl; diff --git a/tests/fe/nedelec_non_rect_2d.cc b/tests/fe/nedelec_non_rect_2d.cc index a95974753a..def3eaf33c 100644 --- a/tests/fe/nedelec_non_rect_2d.cc +++ b/tests/fe/nedelec_non_rect_2d.cc @@ -16,9 +16,9 @@ // By Ross Kynch // // Test to confirm that FE_Nedelec works on deformed elements in 2D when using -// Dirichlet boundary conditions (n x E = f, type). This is handled by the +// Dirichlet boundary conditions (n x E = f, type). This is handled by the // function project_boundary_values_curl_conforming_l2(). -// +// // This test solves the real valued curl-curl equation in 2D: // // curl(curl(E)) + E = Js @@ -79,10 +79,10 @@ namespace polytest SimplePolynomial() : Function() {} void vector_value_list (const std::vector > &points, std::vector > &values) const; - + void rhs_value_list (const std::vector > &points, - std::vector > &values) const; - + std::vector > &values) const; + }; template void SimplePolynomial::vector_value_list (const std::vector > &points, @@ -92,53 +92,53 @@ namespace polytest Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); for (unsigned int i=0; i &p = points[i]; - // non-zero curl-curl: - values[i][0] = 0.0; - values[i][1] = p[0]*p[0]; + { + const Point &p = points[i]; + // non-zero curl-curl: + values[i][0] = 0.0; + values[i][1] = p[0]*p[0]; + + } - } - } - + template void SimplePolynomial::rhs_value_list (const std::vector > &points, - std::vector > &values) const + std::vector > &values) const { Assert (dim == 2, ExcNotImplemented()); Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); - + for (unsigned int i=0; i &p = points[i]; - // non-zero curl-curl: - values[i][0] = 0.0; - values[i][1] = -2.0 + p[0]*p[0]; - } - + { + const Point &p = points[i]; + // non-zero curl-curl: + values[i][0] = 0.0; + values[i][1] = -2.0 + p[0]*p[0]; + } + } - + template class polytest { public: polytest(unsigned int degree); ~polytest (); - + void run(); - + private: void setup_system(); - void assemble_system(); + void assemble_system(); void solve(); - + void output_error(); - + unsigned int p_order; unsigned int quad_order; - + Triangulation tria; DoFHandler dof_handler; FE_Nedelec fe; @@ -149,33 +149,33 @@ namespace polytest Vector system_rhs; }; - + template polytest::polytest (unsigned int degree) - : - p_order(degree), - quad_order(2*degree + 3), - dof_handler(tria), - fe (degree) - { + : + p_order(degree), + quad_order(2*degree + 3), + dof_handler(tria), + fe (degree) + { } template polytest::~polytest () { dof_handler.clear (); } - + template void polytest::setup_system() { dof_handler.distribute_dofs (fe); solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); - - + + constraints.clear (); SimplePolynomial boundary_function; - + VectorTools::project_boundary_values_curl_conforming_l2 (dof_handler, 0, boundary_function, @@ -186,11 +186,11 @@ namespace polytest DoFTools::make_sparsity_pattern(dof_handler, c_sparsity, constraints,false); - + sparsity_pattern.copy_from(c_sparsity); system_matrix.reinit (sparsity_pattern); } - + template void polytest::assemble_system() { @@ -198,83 +198,83 @@ namespace polytest FEValues fe_values_test (fe, test_quad, update_values | update_gradients | update_quadrature_points | update_JxW_values); - + const QGauss quadrature_formula(quad_order); const unsigned int n_q_points = quadrature_formula.size(); - + const QGauss face_quadrature_formula(quad_order); const unsigned int n_face_q_points = face_quadrature_formula.size(); - + FEValues fe_values (fe, quadrature_formula, update_values | update_gradients | update_quadrature_points | update_JxW_values); - + FEFaceValues fe_face_values(fe, face_quadrature_formula, update_values | update_quadrature_points | update_normal_vectors | update_JxW_values); - + const FEValuesExtractors::Vector vec(0); - + const unsigned int dofs_per_cell = fe.dofs_per_cell; - - + + FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); - + std::vector local_dof_indices (dofs_per_cell); - + SimplePolynomial right_hand_side; std::vector > rhs_value_list(n_q_points, Vector(fe.n_components())); typename DoFHandler::active_cell_iterator cell, endc; - endc = dof_handler.end(); + endc = dof_handler.end(); cell = dof_handler.begin_active(); for (; cell!=endc; ++cell) - { - fe_values_test.reinit(cell); - fe_values.reinit (cell); - cell_matrix=0; - cell_rhs=0; - - right_hand_side.rhs_value_list(fe_values.get_quadrature_points(), rhs_value_list); - for (unsigned int q=0; q rhs_value; - for (unsigned int d=0; d rhs_value; + for (unsigned int d=0; dget_dof_indices (local_dof_indices); + constraints.distribute_local_to_global(cell_matrix, + cell_rhs, + local_dof_indices, + system_matrix, system_rhs); } - cell->get_dof_indices (local_dof_indices); - constraints.distribute_local_to_global(cell_matrix, - cell_rhs, - local_dof_indices, - system_matrix, system_rhs); - } - } - + } + template void polytest::solve() { SparseDirectUMFPACK direct; direct.initialize(system_matrix); - + direct.vmult (solution, system_rhs); - constraints.distribute (solution); - } - + constraints.distribute (solution); + } + template void polytest::output_error() { @@ -283,8 +283,8 @@ namespace polytest VectorTools::integrate_difference(dof_handler, solution, exact_solution, diff_per_cell, QGauss(quad_order), VectorTools::L2_norm); const double L2_error = diff_per_cell.l2_norm(); - - deallog << "p=" << p_order << " L2_error: " << L2_error << std::endl; + + deallog << "p=" << p_order << " L2_error: " << L2_error << std::endl; } template @@ -295,8 +295,8 @@ namespace polytest tria.refine_global(1); // DISTORT ALL: - GridTools::distort_random (0.2, tria, false); - + GridTools::distort_random (0.2, tria, false); + setup_system(); assemble_system(); solve(); @@ -306,14 +306,14 @@ namespace polytest int main () { const unsigned int dim(2); - + std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - + for (unsigned int p=0; p<3; ++p) - { - polytest::polytest poly(p); - poly.run(); - } + { + polytest::polytest poly(p); + poly.run(); + } } diff --git a/tests/fe/nedelec_non_rect_face.cc b/tests/fe/nedelec_non_rect_face.cc index 7d34b01f52..f28b7b0b63 100644 --- a/tests/fe/nedelec_non_rect_face.cc +++ b/tests/fe/nedelec_non_rect_face.cc @@ -442,10 +442,10 @@ namespace Maxwell } deallog << "p = " << p_order << std::endl; - + //convergence_table.set_precision("L2 Error",4); convergence_table.set_scientific("L2 Error",true); - + //convergence_table.set_precision("H(curl) Error",4); convergence_table.set_scientific("H(curl) Error",true); @@ -457,11 +457,11 @@ namespace Maxwell int main () { using namespace Maxwell; - + std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - + for (unsigned int p=0; p<3; ++p) { MaxwellProblem<3> (p).run(); diff --git a/tests/fe/non_primitive_2.cc b/tests/fe/non_primitive_2.cc index 529611ec0a..f3bcd68532 100644 --- a/tests/fe/non_primitive_2.cc +++ b/tests/fe/non_primitive_2.cc @@ -244,7 +244,7 @@ test (const unsigned int p) // written out a little bit, only // write every so-many-th element SparseMatrix::const_iterator p2 = A2.begin(), - p3 = A3.begin(); + p3 = A3.begin(); for (unsigned int i=0; i &fe, deallog<::isotropic_refinement - : RefinementCase::cut_x; - for (;ref_case <= RefinementCase::isotropic_refinement;++ref_case) - { - deallog << "RefinementCase " << ref_case << std::endl; - // create a respective refinement on the triangulation - Triangulation tr; - GridGenerator::hyper_cube (tr, 0, 1); - tr.begin_active()->set_refine_flag(RefinementCase(ref_case)); - tr.execute_coarsening_and_refinement(); - - DoFHandler dh(tr); - dh.distribute_dofs(fe); - - const unsigned int n_dofs = dh.n_dofs(); - - FullMatrix restriction_global(dpc,n_dofs); - FullMatrix prolongation_global(n_dofs,dpc); - - std::vector ldi (dpc); - - //now create the matrix coarse to fine (prolongation) - //and fine to coarse (restriction) with respect to all dofs - unsigned int child_no = 0; - typename dealii::DoFHandler::active_cell_iterator cell - = dh.begin_active(); - for(; cell!=dh.end(); ++cell, ++child_no) + ? RefinementCase::isotropic_refinement + : RefinementCase::cut_x; + for (; ref_case <= RefinementCase::isotropic_refinement; ++ref_case) { - FullMatrix restriction_local - = fe.get_restriction_matrix(child_no, RefinementCase(ref_case)); - FullMatrix prolongation_local - = fe.get_prolongation_matrix(child_no, RefinementCase(ref_case)); + deallog << "RefinementCase " << ref_case << std::endl; + // create a respective refinement on the triangulation + Triangulation tr; + GridGenerator::hyper_cube (tr, 0, 1); + tr.begin_active()->set_refine_flag(RefinementCase(ref_case)); + tr.execute_coarsening_and_refinement(); - cell->get_dof_indices(ldi); + DoFHandler dh(tr); + dh.distribute_dofs(fe); - for (unsigned int j=0; j restriction_global(dpc,n_dofs); + FullMatrix prolongation_global(n_dofs,dpc); + + std::vector ldi (dpc); + + //now create the matrix coarse to fine (prolongation) + //and fine to coarse (restriction) with respect to all dofs + unsigned int child_no = 0; + typename dealii::DoFHandler::active_cell_iterator cell + = dh.begin_active(); + for (; cell!=dh.end(); ++cell, ++child_no) { - prolongation_global(ldi[i],j)=prolongation_local(i,j); - restriction_global(j,ldi[i])*=add; - restriction_global(j,ldi[i])+=restriction_local(j,i); + FullMatrix restriction_local + = fe.get_restriction_matrix(child_no, RefinementCase(ref_case)); + FullMatrix prolongation_local + = fe.get_prolongation_matrix(child_no, RefinementCase(ref_case)); + + cell->get_dof_indices(ldi); + + for (unsigned int j=0; j result(dpc); - restriction_global.mmult(result, prolongation_global); + FullMatrix result(dpc); + restriction_global.mmult(result, prolongation_global); // deallog << std::endl // << "Restriction" @@ -135,21 +135,21 @@ check(const FiniteElement &fe, // } // deallog<1.e-12) - { - deallog << i << " " << j << " " << result(i,j) << std::endl; - is_identity = false; - } - } - - if(is_identity) - deallog << "OK" << std::endl; - } + bool is_identity = true; + for (unsigned int i=0; i1.e-12) + { + deallog << i << " " << j << " " << result(i,j) << std::endl; + is_identity = false; + } + } + + if (is_identity) + deallog << "OK" << std::endl; + } } @@ -160,34 +160,34 @@ int main () deallog.depth_file (1); deallog.threshold_double(1.e-10); for (unsigned int i=1; i<=3; ++i) - { - { - FE_Q<2> fe(i); - check(fe); - } - { - FE_Q<3> fe(i); - check(fe); - } - { - FE_Q_DG0<2> fe(i); - check(fe); - } - { - FE_Q_DG0<3> fe(i); - check(fe); - } - { - FE_Q_Bubbles<2> fe(i); - const unsigned int n_q_dofs = FE_Q<2>(i).dofs_per_cell; - check(fe, false, n_q_dofs); - } { - FE_Q_Bubbles<3> fe(i); - const unsigned int n_q_dofs = FE_Q<3>(i).dofs_per_cell; - check(fe, false, n_q_dofs); + { + FE_Q<2> fe(i); + check(fe); + } + { + FE_Q<3> fe(i); + check(fe); + } + { + FE_Q_DG0<2> fe(i); + check(fe); + } + { + FE_Q_DG0<3> fe(i); + check(fe); + } + { + FE_Q_Bubbles<2> fe(i); + const unsigned int n_q_dofs = FE_Q<2>(i).dofs_per_cell; + check(fe, false, n_q_dofs); + } + { + FE_Q_Bubbles<3> fe(i); + const unsigned int n_q_dofs = FE_Q<3>(i).dofs_per_cell; + check(fe, false, n_q_dofs); + } } - } return 0; } diff --git a/tests/fe/rt_2.cc b/tests/fe/rt_2.cc index 8c923588c0..870514aa10 100644 --- a/tests/fe/rt_2.cc +++ b/tests/fe/rt_2.cc @@ -57,26 +57,26 @@ transform_grid (Triangulation<2> &tria, { switch (transform) { - // first round: take - // original grid + // first round: take + // original grid case 0: break; - // second round: rotate - // triangulation + // second round: rotate + // triangulation case 1: GridTools::rotate (3.14159265358/2, tria); break; - // third round: inflate - // by a factor of 2 + // third round: inflate + // by a factor of 2 case 2: GridTools::scale (2, tria); break; - // third round: scale - // back, rotate back, - // stretch + // third round: scale + // back, rotate back, + // stretch case 3: GridTools::scale (.5, tria); GridTools::rotate (-3.14159265358/2, tria); diff --git a/tests/gla/block_mat_03.cc b/tests/gla/block_mat_03.cc index c68c1c0b17..d99498d581 100644 --- a/tests/gla/block_mat_03.cc +++ b/tests/gla/block_mat_03.cc @@ -67,11 +67,12 @@ void test () DoFRenumbering::block_wise(dof_handler); std::vector dofs_per_block (fe.n_blocks()); - std::vector sub_blocks (fe.n_blocks(), 0); sub_blocks[1] = 1; + std::vector sub_blocks (fe.n_blocks(), 0); + sub_blocks[1] = 1; DoFTools::count_dofs_per_block (dof_handler, dofs_per_block, sub_blocks); deallog << "size: " << dofs_per_block[0] << " " << dofs_per_block[1] << std::endl; - + std::vector locally_relevant_partitioning; std::vector locally_owned_partitioning; @@ -88,8 +89,8 @@ void test () locally_owned_dofs.print(deallog); deallog << "relevant: "; locally_relevant_dofs.print(deallog); - - + + ConstraintMatrix constraints(locally_relevant_dofs); constraints.close(); @@ -103,27 +104,27 @@ void test () QGauss<3> quadrature (3); FEValues<3> fe_values (fe, quadrature, update_values); - std::vector local_dof_indices (fe.dofs_per_cell); + std::vector local_dof_indices (fe.dofs_per_cell); FullMatrix local_matrix(fe.dofs_per_cell, fe.dofs_per_cell); for (DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active (); cell != dof_handler.end (); ++cell) if (cell->is_locally_owned ()) - { - fe_values.reinit (cell); - local_matrix = 0.0; - - for (unsigned int q_point = 0; q_point < fe_values.n_quadrature_points; ++q_point) { - for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) - { - for (unsigned int j = 0; j < fe.dofs_per_cell; ++j) - local_matrix (i, j) += fe_values.shape_value(i, q_point) * fe_values.shape_value(j, q_point); - } + fe_values.reinit (cell); + local_matrix = 0.0; + + for (unsigned int q_point = 0; q_point < fe_values.n_quadrature_points; ++q_point) + { + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) + { + for (unsigned int j = 0; j < fe.dofs_per_cell; ++j) + local_matrix (i, j) += fe_values.shape_value(i, q_point) * fe_values.shape_value(j, q_point); + } + } + + cell->get_dof_indices (local_dof_indices); + constraints.distribute_local_to_global (local_matrix, local_dof_indices, A); } - - cell->get_dof_indices (local_dof_indices); - constraints.distribute_local_to_global (local_matrix, local_dof_indices, A); - } A.compress(VectorOperation::add); A.print(deallog.get_file_stream()); @@ -135,7 +136,7 @@ void test () template void test_alt() { - typedef LA_Trilinos LA; + typedef LA_Trilinos LA; unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); unsigned int numproc = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD); @@ -152,11 +153,12 @@ void test_alt() DoFRenumbering::block_wise(dof_handler); std::vector dofs_per_block (fe.n_blocks()); - std::vector sub_blocks (fe.n_blocks(), 0); sub_blocks[1] = 1; + std::vector sub_blocks (fe.n_blocks(), 0); + sub_blocks[1] = 1; DoFTools::count_dofs_per_block (dof_handler, dofs_per_block, sub_blocks); deallog << "size: " << dofs_per_block[0] << " " << dofs_per_block[1] << std::endl; - + std::vector locally_relevant_partitioning; std::vector locally_owned_partitioning; @@ -173,45 +175,45 @@ void test_alt() locally_owned_dofs.print(deallog); deallog << "relevant: "; locally_relevant_dofs.print(deallog); - - + + ConstraintMatrix constraints(locally_relevant_dofs); constraints.close(); TrilinosWrappers::BlockSparsityPattern sp (locally_owned_partitioning, - MPI_COMM_WORLD); + MPI_COMM_WORLD); DoFTools::make_sparsity_pattern (dof_handler, sp, - constraints, false, - Utilities::MPI:: - this_mpi_process(MPI_COMM_WORLD)); - sp.compress(); + constraints, false, + Utilities::MPI:: + this_mpi_process(MPI_COMM_WORLD)); + sp.compress(); typename LA::MPI::BlockSparseMatrix A; -A.reinit(sp); + A.reinit(sp); QGauss<3> quadrature (3); FEValues<3> fe_values (fe, quadrature, update_values); - std::vector local_dof_indices (fe.dofs_per_cell); + std::vector local_dof_indices (fe.dofs_per_cell); FullMatrix local_matrix(fe.dofs_per_cell, fe.dofs_per_cell); for (DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active (); cell != dof_handler.end (); ++cell) if (cell->is_locally_owned ()) - { - fe_values.reinit (cell); - local_matrix = 0.0; - - for (unsigned int q_point = 0; q_point < fe_values.n_quadrature_points; ++q_point) { - for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) - { - for (unsigned int j = 0; j < fe.dofs_per_cell; ++j) - local_matrix (i, j) += fe_values.shape_value(i, q_point) * fe_values.shape_value(j, q_point); - } + fe_values.reinit (cell); + local_matrix = 0.0; + + for (unsigned int q_point = 0; q_point < fe_values.n_quadrature_points; ++q_point) + { + for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) + { + for (unsigned int j = 0; j < fe.dofs_per_cell; ++j) + local_matrix (i, j) += fe_values.shape_value(i, q_point) * fe_values.shape_value(j, q_point); + } + } + + cell->get_dof_indices (local_dof_indices); + constraints.distribute_local_to_global (local_matrix, local_dof_indices, A); } - - cell->get_dof_indices (local_dof_indices); - constraints.distribute_local_to_global (local_matrix, local_dof_indices, A); - } A.compress(VectorOperation::add); //A.print(deallog.get_file_stream()); diff --git a/tests/gla/block_vec_03.cc b/tests/gla/block_vec_03.cc index 7ece1ff57f..6d84246f63 100644 --- a/tests/gla/block_vec_03.cc +++ b/tests/gla/block_vec_03.cc @@ -53,7 +53,7 @@ void test () std::vector relevant = partitioning; relevant[0].add_index(0); relevant[1].add_range(0,numproc); - + typename LA::MPI::BlockVector v(partitioning, MPI_COMM_WORLD); typename LA::MPI::BlockVector v2(partitioning, relevant, MPI_COMM_WORLD); @@ -70,7 +70,7 @@ void test () Assert(v.block(1).has_ghost_elements(), ExcInternalError()); v.reinit(partitioning, MPI_COMM_WORLD); Assert(!v.has_ghost_elements(), ExcInternalError()); - + typename LA::MPI::BlockVector v3 = v2; Assert(v3.has_ghost_elements(), ExcInternalError()); @@ -80,7 +80,7 @@ void test () typename LA::MPI::Vector x = v2.block(0); Assert(x.has_ghost_elements(), ExcInternalError()); - + // done if (myid==0) deallog << "OK" << std::endl; diff --git a/tests/gla/block_vec_04.cc b/tests/gla/block_vec_04.cc index 909f5ca573..86c2f2cd4a 100644 --- a/tests/gla/block_vec_04.cc +++ b/tests/gla/block_vec_04.cc @@ -54,7 +54,7 @@ void test () std::vector relevant = partitioning; relevant[0].add_index(0); relevant[1].add_range(0,numproc); - + typename LA::MPI::BlockVector v_2(partitioning, MPI_COMM_WORLD); { @@ -68,16 +68,16 @@ void test () { deal_II_exceptions::disable_abort_on_exception(); try - { - typename LA::MPI::BlockVector x=v_1; - x=v_2; // error + { + typename LA::MPI::BlockVector x=v_1; + x=v_2; // error } catch (const ExceptionBase &e) { - deallog << "Exception: " << e.get_exc_name() << std::endl; + deallog << "Exception: " << e.get_exc_name() << std::endl; } } - + // done if (myid==0) deallog << "OK" << std::endl; diff --git a/tests/gla/gla.h b/tests/gla/gla.h index 568be07523..e84f6c38c5 100644 --- a/tests/gla/gla.h +++ b/tests/gla/gla.h @@ -69,11 +69,11 @@ public: void compress(VectorOperation::values op) {} - bool all_zero() - { - return false; - } - + bool all_zero() + { + return false; + } + bool has_ghost_elements() { return false; diff --git a/tests/gla/mat_05.cc b/tests/gla/mat_05.cc index ff583fef39..a3b091d3ab 100644 --- a/tests/gla/mat_05.cc +++ b/tests/gla/mat_05.cc @@ -72,7 +72,7 @@ void test () deallog << "l1-norm: " << mat.l1_norm() << std::endl; if (myid==0) deallog << "mat(0,1): " << mat(0,1) << std::endl; - + { // disabled: //typename LA::MPI::SparseMatrix mat2(mat); @@ -82,7 +82,7 @@ void test () //typename LA::MPI::SparseMatrix mat2; //mat2 = mat; } - + { deallog << "* reinit(other):" << std::endl; typename LA::MPI::SparseMatrix mat2; diff --git a/tests/gla/mat_06.cc b/tests/gla/mat_06.cc index b6711c0836..70bed13d00 100644 --- a/tests/gla/mat_06.cc +++ b/tests/gla/mat_06.cc @@ -82,7 +82,7 @@ void test () deallog << "l1-norm: " << mat.l1_norm() << std::endl; if (myid==0) deallog << "mat(0,1): " << mat(0,1) << std::endl; - + if (myid==0) deallog << "OK" << std::endl; } diff --git a/tests/gla/vec_04.cc b/tests/gla/vec_04.cc index 34698b380d..6b20d56680 100644 --- a/tests/gla/vec_04.cc +++ b/tests/gla/vec_04.cc @@ -63,18 +63,18 @@ void test () Assert(!vb.has_ghost_elements(), ExcInternalError()); Assert(v.has_ghost_elements(), ExcInternalError()); - + typename LA::MPI::Vector test; Assert(!test.has_ghost_elements(), ExcInternalError()); - { + { typename LA::MPI::Vector x; x=v; // x is empty so it should copy layout(with ghosts) and data Assert(x.has_ghost_elements(), ExcInternalError()); deallog << "ghosted value: " << x(1) << std::endl; x=vb; // import, so keep ghost elements Assert(x.has_ghost_elements(), ExcInternalError()); - deallog << "ghosted value: " << x(1) << std::endl; + deallog << "ghosted value: " << x(1) << std::endl; } { typename LA::MPI::Vector x; diff --git a/tests/gla/vec_05.cc b/tests/gla/vec_05.cc index 33ab5f198f..e4e3ec3067 100644 --- a/tests/gla/vec_05.cc +++ b/tests/gla/vec_05.cc @@ -59,7 +59,7 @@ void test () IndexSet local_active_big(numproc*3); local_active_big.add_range(myid*3,myid*3+3); typename LA::MPI::Vector big(local_active_big, MPI_COMM_WORLD); - + typename LA::MPI::Vector x; Assert(!x.has_ghost_elements(), ExcInternalError()); Assert(x.size()==0, ExcInternalError()); @@ -83,7 +83,7 @@ void test () x.reinit(v); Assert(!x.has_ghost_elements(), ExcInternalError()); Assert(x.size()==v.size(), ExcInternalError()); - + // done if (myid==0) deallog << "OK" << std::endl; diff --git a/tests/gla/vec_06.cc b/tests/gla/vec_06.cc index 52fbded4d4..bb0a3b8f2b 100644 --- a/tests/gla/vec_06.cc +++ b/tests/gla/vec_06.cc @@ -57,16 +57,16 @@ void test () vb.compress(VectorOperation::insert); v=vb; - { + { typename LA::MPI::Vector x; typename LA::MPI::Vector y; x=y; } - { + { typename LA::MPI::Vector x; x=v; } - { + { typename LA::MPI::Vector x; x=vb; } diff --git a/tests/gla/vec_all_zero_01.cc b/tests/gla/vec_all_zero_01.cc index 30deb4d458..382971be5c 100644 --- a/tests/gla/vec_all_zero_01.cc +++ b/tests/gla/vec_all_zero_01.cc @@ -45,7 +45,7 @@ void test () local_relevant.add_range(1,2); - typename LA::MPI::Vector x; + typename LA::MPI::Vector x; x.reinit(local_active, MPI_COMM_WORLD); x=0; typename LA::MPI::Vector g(local_active, local_relevant, MPI_COMM_WORLD); @@ -56,7 +56,7 @@ void test () x.compress(VectorOperation::insert); g=x; deallog << "all_zero? " << g.all_zero() << " (should be false)" << std::endl; - + // done if (myid==0) deallog << "OK" << std::endl; diff --git a/tests/grid/extrude_orientation_01.cc b/tests/grid/extrude_orientation_01.cc index 964b38678c..f093c2d63f 100644 --- a/tests/grid/extrude_orientation_01.cc +++ b/tests/grid/extrude_orientation_01.cc @@ -44,10 +44,10 @@ void test(std::ostream &out) c!=tr.end(); ++c) { deallog << "2d cell " << c << " has the following face orientations:" - << std::endl; + << std::endl; for (unsigned int l=0; l::faces_per_cell; ++l) - deallog << " " << (c->face_orientation(l) ? "true" : "false") - << std::endl; + deallog << " " << (c->face_orientation(l) ? "true" : "false") + << std::endl; } Triangulation<3> tr3; @@ -57,15 +57,15 @@ void test(std::ostream &out) c!=tr3.end(); ++c) { deallog << "3d cell " << c << " has the following face orientation/flips and edge orientations:" - << std::endl; + << std::endl; for (unsigned int f=0; f::faces_per_cell; ++f) - deallog << " face=" << f - << (c->face_orientation(f) ? " -> true" : " -> false") - << (c->face_flip(f) ? "/true" : "/false") - << std::endl; + deallog << " face=" << f + << (c->face_orientation(f) ? " -> true" : " -> false") + << (c->face_flip(f) ? "/true" : "/false") + << std::endl; for (unsigned int e=0; e::lines_per_cell; ++e) - deallog << " edge=" << e << (c->line_orientation(e) ? " -> true" : " -> false") - << std::endl; + deallog << " edge=" << e << (c->line_orientation(e) ? " -> true" : " -> false") + << std::endl; } } diff --git a/tests/grid/extrude_orientation_02.cc b/tests/grid/extrude_orientation_02.cc index 5c8452aeec..56d8030e3b 100644 --- a/tests/grid/extrude_orientation_02.cc +++ b/tests/grid/extrude_orientation_02.cc @@ -44,10 +44,10 @@ void test(std::ostream &out) c!=tr.end(); ++c) { deallog << "2d cell " << c << " has the following face orientations:" - << std::endl; + << std::endl; for (unsigned int l=0; l::faces_per_cell; ++l) - deallog << " " << (c->face_orientation(l) ? "true" : "false") - << std::endl; + deallog << " " << (c->face_orientation(l) ? "true" : "false") + << std::endl; } Triangulation<3> tr3; @@ -57,15 +57,15 @@ void test(std::ostream &out) c!=tr3.end(); ++c) { deallog << "3d cell " << c << " has the following face orientation/flips and edge orientations:" - << std::endl; + << std::endl; for (unsigned int f=0; f::faces_per_cell; ++f) - deallog << " face=" << f - << (c->face_orientation(f) ? " -> true" : " -> false") - << (c->face_flip(f) ? "/true" : "/false") - << std::endl; + deallog << " face=" << f + << (c->face_orientation(f) ? " -> true" : " -> false") + << (c->face_flip(f) ? "/true" : "/false") + << std::endl; for (unsigned int e=0; e::lines_per_cell; ++e) - deallog << " edge=" << e << (c->line_orientation(e) ? " -> true" : " -> false") - << std::endl; + deallog << " edge=" << e << (c->line_orientation(e) ? " -> true" : " -> false") + << std::endl; } } diff --git a/tests/grid/flatten_grid_01.cc b/tests/grid/flatten_grid_01.cc index 14f4bd92fe..c0955c2b25 100644 --- a/tests/grid/flatten_grid_01.cc +++ b/tests/grid/flatten_grid_01.cc @@ -21,16 +21,17 @@ #include #include -template -void test() { +template +void test() +{ deallog << "Testing <" << dim << "," << spacedim1 - << "> VS <" << dim << "," << spacedim2 - << ">" << std::endl; - + << "> VS <" << dim << "," << spacedim2 + << ">" << std::endl; + Triangulation tria1; GridGenerator::hyper_cube(tria1); tria1.refine_global(1); - + Triangulation tria2; GridGenerator::flatten_triangulation(tria1, tria2); GridOut go; @@ -43,11 +44,11 @@ int main() test<1,1,1>(); test<1,1,2>(); test<1,1,3>(); - // + // test<1,2,1>(); test<1,2,2>(); test<1,2,3>(); - // + // test<1,3,1>(); test<1,3,2>(); test<1,3,3>(); diff --git a/tests/grid/grid_generator_04.cc b/tests/grid/grid_generator_04.cc index d40dd4d17c..fa16fb143f 100644 --- a/tests/grid/grid_generator_04.cc +++ b/tests/grid/grid_generator_04.cc @@ -64,7 +64,7 @@ void test(std::ostream &out) << "Inner radius = " << radii[i] << std::endl << "Outer radius = " << radiiext[i] << std::endl << "Depth = " << Ls[k] << std::endl - << "Nzs = " << Nzs[l] << std::endl + << "Nzs = " << Nzs[l] << std::endl << "No colorize ====================" << std::endl; // No colorize diff --git a/tests/grid/grid_generator_07.cc b/tests/grid/grid_generator_07.cc index e6c0976755..ed70e8e717 100644 --- a/tests/grid/grid_generator_07.cc +++ b/tests/grid/grid_generator_07.cc @@ -40,14 +40,14 @@ void test(std::ostream &out) // remove all cells but the first. this is the hardest case to handle as it // makes a bunch of vertices unused std::set::active_cell_iterator> - cells_to_remove; + cells_to_remove; for (typename Triangulation::active_cell_iterator - cell = ++triangulation.begin_active(); + cell = ++triangulation.begin_active(); cell != triangulation.end(); ++cell) cells_to_remove.insert (cell); - + GridGenerator::create_triangulation_with_removed_cells(triangulation, - cells_to_remove, tr); + cells_to_remove, tr); GridOut go; go.write_gnuplot(tr, out); } diff --git a/tests/grid/grid_generator_cheese.cc b/tests/grid/grid_generator_cheese.cc index 3e50b30388..9ee764bcb3 100644 --- a/tests/grid/grid_generator_cheese.cc +++ b/tests/grid/grid_generator_cheese.cc @@ -26,11 +26,11 @@ #include -void dim2(std::ostream& os) +void dim2(std::ostream &os) { const unsigned int d=2; Triangulation tr; - + std::vector holes(d); holes[0] = 3; holes[1] = 2; @@ -40,11 +40,11 @@ void dim2(std::ostream& os) gout.write_vtk(tr, os); } -void dim3(std::ostream& os) +void dim3(std::ostream &os) { const unsigned int d=3; Triangulation tr; - + std::vector holes(d); holes[0] = 3; holes[1] = 2; @@ -59,7 +59,7 @@ void dim3(std::ostream& os) int main() { initlog(true); - std::ostream& logfile = deallog.get_file_stream(); + std::ostream &logfile = deallog.get_file_stream(); dim2(logfile); dim3(logfile); } diff --git a/tests/grid/grid_generator_hyper_cross.cc b/tests/grid/grid_generator_hyper_cross.cc index 4a24e97e65..8c75ed3b60 100644 --- a/tests/grid/grid_generator_hyper_cross.cc +++ b/tests/grid/grid_generator_hyper_cross.cc @@ -26,11 +26,11 @@ #include -void dim2(std::ostream& os) +void dim2(std::ostream &os) { const unsigned int d=2; Triangulation tr; - + std::vector sizes(2*d); sizes[0] = 3; sizes[1] = 0; @@ -42,11 +42,11 @@ void dim2(std::ostream& os) gout.write_vtk(tr, os); } -void dim3(std::ostream& os) +void dim3(std::ostream &os) { const unsigned int d=3; Triangulation tr; - + std::vector sizes(2*d); sizes[0] = 5; sizes[1] = 1; @@ -64,7 +64,7 @@ void dim3(std::ostream& os) int main() { initlog(true); - std::ostream& logfile = deallog.get_file_stream(); + std::ostream &logfile = deallog.get_file_stream(); dim2(logfile); dim3(logfile); } diff --git a/tests/grid/grid_generator_simplex.cc b/tests/grid/grid_generator_simplex.cc index ef9a67a079..bac70f44fb 100644 --- a/tests/grid/grid_generator_simplex.cc +++ b/tests/grid/grid_generator_simplex.cc @@ -26,11 +26,11 @@ #include -void dim2(std::ostream& os) +void dim2(std::ostream &os) { const unsigned int d=2; Triangulation tr; - + std::vector > vertices(d+1); vertices[1](0) = 0.5; vertices[1](1) = .85; @@ -42,11 +42,11 @@ void dim2(std::ostream& os) gout.write_vtk(tr, os); } -void dim3(std::ostream& os) +void dim3(std::ostream &os) { const unsigned int d=3; Triangulation tr; - + std::vector > vertices(d+1); vertices[0](0) = 1.; vertices[0](1) = 0.; @@ -70,7 +70,7 @@ void dim3(std::ostream& os) int main() { initlog(true); - std::ostream& logfile = deallog.get_file_stream(); + std::ostream &logfile = deallog.get_file_stream(); dim2(logfile); dim3(logfile); } diff --git a/tests/grid/grid_hyper_shell.cc b/tests/grid/grid_hyper_shell.cc index c095d8f3a4..3bf9b0d1da 100644 --- a/tests/grid/grid_hyper_shell.cc +++ b/tests/grid/grid_hyper_shell.cc @@ -53,10 +53,10 @@ void check (double r1, double r2, unsigned int n) if (dim==3) for (typename Triangulation::active_cell_iterator c=tria.begin_active(); c!=tria.end(); ++c) for (unsigned int f=0; f::faces_per_cell; ++f) - if (c->face(f)->at_boundary()) - for (unsigned int e=0; e::lines_per_face; ++e) - c->face(f)->line(e)->set_boundary_id(0); - + if (c->face(f)->at_boundary()) + for (unsigned int e=0; e::lines_per_face; ++e) + c->face(f)->line(e)->set_boundary_id(0); + static const HyperShellBoundary boundary(center); tria.set_boundary(0, boundary); diff --git a/tests/grid/grid_in_msh_02.cc b/tests/grid/grid_in_msh_02.cc index cfa014f4e3..2feec89a8e 100644 --- a/tests/grid/grid_in_msh_02.cc +++ b/tests/grid/grid_in_msh_02.cc @@ -50,12 +50,12 @@ void check_file () for (Triangulation<1>::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { for (unsigned int face = 0; face < 2; ++face) - { - if (cell->at_boundary(face)) - deallog << "vertex " << cell->face_index(face) - << " has boundary indicator " << (int)cell->face(face)->boundary_indicator() - << std::endl; - } + { + if (cell->at_boundary(face)) + deallog << "vertex " << cell->face_index(face) + << " has boundary indicator " << (int)cell->face(face)->boundary_indicator() + << std::endl; + } } } diff --git a/tests/grid/grid_in_msh_02_13.cc b/tests/grid/grid_in_msh_02_13.cc index 57d9004ee3..6eccdd1359 100644 --- a/tests/grid/grid_in_msh_02_13.cc +++ b/tests/grid/grid_in_msh_02_13.cc @@ -54,12 +54,12 @@ void check_file () for (Triangulation<1,3>::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { for (unsigned int face = 0; face < 2; ++face) - { - if (cell->at_boundary(face)) - deallog << "vertex " << cell->face_index(face) - << " has boundary indicator " << (int)cell->face(face)->boundary_indicator() - << std::endl; - } + { + if (cell->at_boundary(face)) + deallog << "vertex " << cell->face_index(face) + << " has boundary indicator " << (int)cell->face(face)->boundary_indicator() + << std::endl; + } } } diff --git a/tests/grid/grid_out_07.cc b/tests/grid/grid_out_07.cc index 0f107d7f94..234f6978f8 100644 --- a/tests/grid/grid_out_07.cc +++ b/tests/grid/grid_out_07.cc @@ -33,7 +33,7 @@ template -void test (std::ostream& logfile) +void test (std::ostream &logfile) { Triangulation tria; std::vector legs(2*dim, 1); diff --git a/tests/grid/grid_out_08.cc b/tests/grid/grid_out_08.cc index 17a3f93a06..1ef361362e 100644 --- a/tests/grid/grid_out_08.cc +++ b/tests/grid/grid_out_08.cc @@ -41,30 +41,31 @@ void test () const unsigned int dim = 1; static const Point<3> vertices_1[] - = { - Point<3>(0,0,0), Point<3>(1,0,0), Point<3>(1,0,0), Point<3>(1,1,0), - Point<3>(1,1,0), Point<3>(0,1,0), Point<3>(0,1,0), Point<3>(0,0,0), - Point<3>(0,0,1), Point<3>(1,0,1), Point<3>(1,0,1), Point<3>(1,1,1), - Point<3>(1,1,1), Point<3>(0,1,1), Point<3>(0,1,1), Point<3>(0,0,1), - Point<3>(0,0,0), Point<3>(0,0,1), Point<3>(1,0,0), Point<3>(1,0,1), - Point<3>(1,1,0), Point<3>(1,1,1), Point<3>(0,1,0), Point<3>(0,1,1) + = + { + Point<3>(0,0,0), Point<3>(1,0,0), Point<3>(1,0,0), Point<3>(1,1,0), + Point<3>(1,1,0), Point<3>(0,1,0), Point<3>(0,1,0), Point<3>(0,0,0), + Point<3>(0,0,1), Point<3>(1,0,1), Point<3>(1,0,1), Point<3>(1,1,1), + Point<3>(1,1,1), Point<3>(0,1,1), Point<3>(0,1,1), Point<3>(0,0,1), + Point<3>(0,0,0), Point<3>(0,0,1), Point<3>(1,0,0), Point<3>(1,0,1), + Point<3>(1,1,0), Point<3>(1,1,1), Point<3>(0,1,0), Point<3>(0,1,1) }; const unsigned int n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); const std::vector > vertices (&vertices_1[0], &vertices_1[n_vertices]); static const int cell_vertices[][GeometryInfo::vertices_per_cell] - = { { 0, 1}, - { 2, 3}, - { 4, 5}, - { 6, 7}, - { 8, 9}, - { 10, 11}, - { 12, 13}, - { 14, 15}, - { 16, 17}, - { 18, 19}, - { 20, 21}, - { 22, 23} + = { { 0, 1}, + { 2, 3}, + { 4, 5}, + { 6, 7}, + { 8, 9}, + { 10, 11}, + { 12, 13}, + { 14, 15}, + { 16, 17}, + { 18, 19}, + { 20, 21}, + { 22, 23} }; const unsigned int n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); std::vector > cells (n_cells, CellData()); @@ -72,14 +73,14 @@ void test () for (unsigned int i=0; i::vertices_per_cell; - ++j) - cells[i].vertices[j] = cell_vertices[i][j]; + j::vertices_per_cell; + ++j) + cells[i].vertices[j] = cell_vertices[i][j]; cells[i].material_id = 0; } tria.create_triangulation ( vertices, - cells, - SubCellData()); + cells, + SubCellData()); tria.refine_global (1); diff --git a/tests/grid/grid_out_09.cc b/tests/grid/grid_out_09.cc index ed124f3ebc..7eeb7cc233 100644 --- a/tests/grid/grid_out_09.cc +++ b/tests/grid/grid_out_09.cc @@ -41,30 +41,31 @@ void test () const unsigned int dim = 1; static const Point<3> vertices_1[] - = { - Point<3>(0,0,0), Point<3>(1,0,0), Point<3>(1,0,0), Point<3>(1,1,0), - Point<3>(1,1,0), Point<3>(0,1,0), Point<3>(0,1,0), Point<3>(0,0,0), - Point<3>(0,0,1), Point<3>(1,0,1), Point<3>(1,0,1), Point<3>(1,1,1), - Point<3>(1,1,1), Point<3>(0,1,1), Point<3>(0,1,1), Point<3>(0,0,1), - Point<3>(0,0,0), Point<3>(0,0,1), Point<3>(1,0,0), Point<3>(1,0,1), - Point<3>(1,1,0), Point<3>(1,1,1), Point<3>(0,1,0), Point<3>(0,1,1) + = + { + Point<3>(0,0,0), Point<3>(1,0,0), Point<3>(1,0,0), Point<3>(1,1,0), + Point<3>(1,1,0), Point<3>(0,1,0), Point<3>(0,1,0), Point<3>(0,0,0), + Point<3>(0,0,1), Point<3>(1,0,1), Point<3>(1,0,1), Point<3>(1,1,1), + Point<3>(1,1,1), Point<3>(0,1,1), Point<3>(0,1,1), Point<3>(0,0,1), + Point<3>(0,0,0), Point<3>(0,0,1), Point<3>(1,0,0), Point<3>(1,0,1), + Point<3>(1,1,0), Point<3>(1,1,1), Point<3>(0,1,0), Point<3>(0,1,1) }; const unsigned int n_vertices = sizeof(vertices_1) / sizeof(vertices_1[0]); const std::vector > vertices (&vertices_1[0], &vertices_1[n_vertices]); static const int cell_vertices[][GeometryInfo::vertices_per_cell] - = { { 0, 1}, - { 2, 3}, - { 4, 5}, - { 6, 7}, - { 8, 9}, - { 10, 11}, - { 12, 13}, - { 14, 15}, - { 16, 17}, - { 18, 19}, - { 20, 21}, - { 22, 23} + = { { 0, 1}, + { 2, 3}, + { 4, 5}, + { 6, 7}, + { 8, 9}, + { 10, 11}, + { 12, 13}, + { 14, 15}, + { 16, 17}, + { 18, 19}, + { 20, 21}, + { 22, 23} }; const unsigned int n_cells = sizeof(cell_vertices) / sizeof(cell_vertices[0]); std::vector > cells (n_cells, CellData()); @@ -72,14 +73,14 @@ void test () for (unsigned int i=0; i::vertices_per_cell; - ++j) - cells[i].vertices[j] = cell_vertices[i][j]; + j::vertices_per_cell; + ++j) + cells[i].vertices[j] = cell_vertices[i][j]; cells[i].material_id = 0; } tria.create_triangulation ( vertices, - cells, - SubCellData()); + cells, + SubCellData()); tria.refine_global (1); diff --git a/tests/grid/grid_out_svg_02.cc b/tests/grid/grid_out_svg_02.cc index 254d9a675c..42349f5776 100644 --- a/tests/grid/grid_out_svg_02.cc +++ b/tests/grid/grid_out_svg_02.cc @@ -39,29 +39,29 @@ Triangulation<2,2> create_grid() GridGenerator::hyper_cube_with_cylindrical_hole(triangulation, inner_radius, outer_radius); triangulation.refine_global(1); - for (unsigned int l=0;l<3;++l) + for (unsigned int l=0; l<3; ++l) { Triangulation<2>::active_cell_iterator - cell = triangulation.begin_active(), - endc = triangulation.end(); - + cell = triangulation.begin_active(), + endc = triangulation.end(); + for (; cell!=endc; ++cell) - { - for (unsigned int v=0; v < GeometryInfo<2>::vertices_per_cell; ++v) - { - const double distance_from_center = center.distance(cell->vertex(v)); - - if (std::fabs(distance_from_center - inner_radius) < .25) - { - cell->set_refine_flag(); - break; - } - } - } - + { + for (unsigned int v=0; v < GeometryInfo<2>::vertices_per_cell; ++v) + { + const double distance_from_center = center.distance(cell->vertex(v)); + + if (std::fabs(distance_from_center - inner_radius) < .25) + { + cell->set_refine_flag(); + break; + } + } + } + triangulation.execute_coarsening_and_refinement(); } - + return triangulation; } diff --git a/tests/grid/grid_out_vtk_01.cc b/tests/grid/grid_out_vtk_01.cc index 8719e7de34..ad198bda75 100644 --- a/tests/grid/grid_out_vtk_01.cc +++ b/tests/grid/grid_out_vtk_01.cc @@ -33,7 +33,7 @@ template -void test (std::ostream& logfile) +void test (std::ostream &logfile) { Triangulation tria; std::vector legs(2*dim, 1); diff --git a/tests/grid/grid_out_vtk_02.cc b/tests/grid/grid_out_vtk_02.cc index bb643300ae..2e6624f057 100644 --- a/tests/grid/grid_out_vtk_02.cc +++ b/tests/grid/grid_out_vtk_02.cc @@ -37,7 +37,7 @@ #include template -void output(parallel::distributed::Triangulation &tr, std::ostream& stream) +void output(parallel::distributed::Triangulation &tr, std::ostream &stream) { GridOut out; out.write_vtk(tr, stream); @@ -61,9 +61,9 @@ void test() // const std::string // filename = ("mesh" + Utilities::int_to_string(dim) - // + "d." + - // Utilities::int_to_string(tr.locally_owned_subdomain(), 4) + - // ".vtk"); + // + "d." + + // Utilities::int_to_string(tr.locally_owned_subdomain(), 4) + + // ".vtk"); // std::ofstream stream(filename.c_str()); output(tr, deallog.get_file_stream()); diff --git a/tests/grid/grid_tools_05.cc b/tests/grid/grid_tools_05.cc index cde2ad0ecd..5f30979d6f 100644 --- a/tests/grid/grid_tools_05.cc +++ b/tests/grid/grid_tools_05.cc @@ -206,7 +206,7 @@ int main() typedef std::vector > FaceVector2; FaceVector2 test2; GridTools::collect_periodic_faces - (triangulation2, 42, 1, test2, dealii::Tensor<1,2>()); + (triangulation2, 42, 1, test2, dealii::Tensor<1,2>()); for (FaceVector2::iterator it = test2.begin(); it != test2.end(); ++it) print_match(it->cell[0]->face(it->face_idx[0]), @@ -225,7 +225,7 @@ int main() typedef std::vector > FaceVector3; FaceVector3 test3; GridTools::collect_periodic_faces - (triangulation3, 42, 2, test3, dealii::Tensor<1,3>()); + (triangulation3, 42, 2, test3, dealii::Tensor<1,3>()); for (FaceVector3::iterator it = test3.begin(); it != test3.end(); ++it) print_match(it->cell[0]->face(it->face_idx[0]), diff --git a/tests/grid/grid_tools_06.cc b/tests/grid/grid_tools_06.cc index 560cb366f6..c3009695cd 100644 --- a/tests/grid/grid_tools_06.cc +++ b/tests/grid/grid_tools_06.cc @@ -223,10 +223,10 @@ int main() typedef Triangulation<2>::cell_iterator CellIterator; typedef std::vector > - FaceVector; + FaceVector; FaceVector test; GridTools::collect_periodic_faces - (triangulation, 42, 43, 1, test, dealii::Tensor<1,2>()); + (triangulation, 42, 43, 1, test, dealii::Tensor<1,2>()); deallog << "Triangulation: " << i << std::endl; @@ -247,10 +247,10 @@ int main() typedef Triangulation<3>::cell_iterator CellIterator; typedef std::vector > - FaceVector; + FaceVector; FaceVector test; GridTools::collect_periodic_faces - (triangulation, 42, 43, 2, test, dealii::Tensor<1,3>()); + (triangulation, 42, 43, 2, test, dealii::Tensor<1,3>()); deallog << "Triangulation: " << i << std::endl; diff --git a/tests/grid/grid_tools_halo_layer_01.cc b/tests/grid/grid_tools_halo_layer_01.cc index f02f5962d7..ffca1dab7d 100644 --- a/tests/grid/grid_tools_halo_layer_01.cc +++ b/tests/grid/grid_tools_halo_layer_01.cc @@ -24,27 +24,27 @@ template bool -pred_mat_id(const typename Triangulation::active_cell_iterator & cell) +pred_mat_id(const typename Triangulation::active_cell_iterator &cell) { return cell->material_id() == 2; } template void -write_mat_id_to_file (const Triangulation & tria) +write_mat_id_to_file (const Triangulation &tria) { - int count = 0; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), - endc = tria.end(); - for (; cell != endc; ++cell, ++count) + int count = 0; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), + endc = tria.end(); + for (; cell != endc; ++cell, ++count) { deallog - << count << " " - << static_cast(cell->material_id()) - << std::endl; + << count << " " + << static_cast(cell->material_id()) + << std::endl; } - deallog << std::endl; + deallog << std::endl; } @@ -64,20 +64,20 @@ void test () cell = tria.begin_active(), endc = tria.end(); for (; cell != endc; ++cell) - { - bool mark = true; - for (unsigned int d=0; d < dim; ++d) - if (cell->center()[d] > 0.5) - { - mark = false; - break; - } - - if (mark == true) - cell->set_material_id(2); - else - cell->set_material_id(1); - } + { + bool mark = true; + for (unsigned int d=0; d < dim; ++d) + if (cell->center()[d] > 0.5) + { + mark = false; + break; + } + + if (mark == true) + cell->set_material_id(2); + else + cell->set_material_id(1); + } deallog << "Grid without halo:" << std::endl; write_mat_id_to_file(tria); @@ -98,9 +98,9 @@ void test () for (typename std::vector::const_iterator it = active_halo_layer.begin(); it != active_halo_layer.end(); ++it) - { - (*it)->set_material_id(3); - } + { + (*it)->set_material_id(3); + } deallog << "Grid with halo:" << std::endl; write_mat_id_to_file(tria); diff --git a/tests/grid/grid_tools_halo_layer_02.cc b/tests/grid/grid_tools_halo_layer_02.cc index f1a91555ac..92e07ff048 100644 --- a/tests/grid/grid_tools_halo_layer_02.cc +++ b/tests/grid/grid_tools_halo_layer_02.cc @@ -25,20 +25,20 @@ template void -write_mat_id_to_file (const Triangulation & tria) +write_mat_id_to_file (const Triangulation &tria) { - int count = 0; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), - endc = tria.end(); - for (; cell != endc; ++cell, ++count) + int count = 0; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), + endc = tria.end(); + for (; cell != endc; ++cell, ++count) { deallog - << count << " " - << static_cast(cell->material_id()) - << std::endl; + << count << " " + << static_cast(cell->material_id()) + << std::endl; } - deallog << std::endl; + deallog << std::endl; } @@ -58,20 +58,20 @@ void test () cell = tria.begin_active(), endc = tria.end(); for (; cell != endc; ++cell) - { - bool mark = true; - for (unsigned int d=0; d < dim; ++d) - if (cell->center()[d] > 0.5) - { - mark = false; - break; - } - - if (mark == true) - cell->set_material_id(2); - else - cell->set_material_id(1); - } + { + bool mark = true; + for (unsigned int d=0; d < dim; ++d) + if (cell->center()[d] > 0.5) + { + mark = false; + break; + } + + if (mark == true) + cell->set_material_id(2); + else + cell->set_material_id(1); + } deallog << "Grid without halo:" << std::endl; write_mat_id_to_file(tria); @@ -91,9 +91,9 @@ void test () for (typename std::vector::const_iterator it = active_halo_layer.begin(); it != active_halo_layer.end(); ++it) - { - (*it)->set_material_id(3); - } + { + (*it)->set_material_id(3); + } deallog << "Grid with halo:" << std::endl; write_mat_id_to_file(tria); diff --git a/tests/grid/grid_tools_halo_layer_03.cc b/tests/grid/grid_tools_halo_layer_03.cc index 2ffa877d8e..c2e56decf9 100644 --- a/tests/grid/grid_tools_halo_layer_03.cc +++ b/tests/grid/grid_tools_halo_layer_03.cc @@ -25,20 +25,20 @@ template void -write_mat_id_to_file (const Triangulation & tria) +write_mat_id_to_file (const Triangulation &tria) { - int count = 0; - typename Triangulation::active_cell_iterator - cell = tria.begin_active(), - endc = tria.end(); - for (; cell != endc; ++cell, ++count) + int count = 0; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), + endc = tria.end(); + for (; cell != endc; ++cell, ++count) { deallog - << count << " " - << static_cast(cell->material_id()) - << std::endl; + << count << " " + << static_cast(cell->material_id()) + << std::endl; } - deallog << std::endl; + deallog << std::endl; } @@ -58,25 +58,25 @@ void test () cell = tria.begin_active(), endc = tria.end(); for (; cell != endc; ++cell) - { - bool mark = true; - for (unsigned int d=0; d < dim; ++d) - if (cell->center()[d] > 0.5) - { - mark = false; - break; - } - - if (mark == true) { - if (cell->center()[0] < 0.25) - cell->set_material_id(2); + bool mark = true; + for (unsigned int d=0; d < dim; ++d) + if (cell->center()[d] > 0.5) + { + mark = false; + break; + } + + if (mark == true) + { + if (cell->center()[0] < 0.25) + cell->set_material_id(2); + else + cell->set_material_id(3); + } else - cell->set_material_id(3); + cell->set_material_id(1); } - else - cell->set_material_id(1); - } deallog << "Grid without halo:" << std::endl; write_mat_id_to_file(tria); @@ -99,9 +99,9 @@ void test () for (typename std::vector::const_iterator it = active_halo_layer.begin(); it != active_halo_layer.end(); ++it) - { - (*it)->set_material_id(4); - } + { + (*it)->set_material_id(4); + } deallog << "Grid with halo:" << std::endl; write_mat_id_to_file(tria); diff --git a/tests/grid/grid_tools_halo_layer_04.cc b/tests/grid/grid_tools_halo_layer_04.cc index 4e2f76c517..faf1eba7ac 100644 --- a/tests/grid/grid_tools_halo_layer_04.cc +++ b/tests/grid/grid_tools_halo_layer_04.cc @@ -26,25 +26,25 @@ template void -write_active_fe_index_to_file (const hp::DoFHandler & dof_handler) +write_active_fe_index_to_file (const hp::DoFHandler &dof_handler) { int count = 0; typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell != endc; ++cell, ++count) - { - deallog - << count << " " - << cell->active_fe_index() - << std::endl; - } + { + deallog + << count << " " + << cell->active_fe_index() + << std::endl; + } deallog << std::endl; } template void -write_vtk (const hp::DoFHandler & dof_handler, const std::string filename) +write_vtk (const hp::DoFHandler &dof_handler, const std::string filename) { Vector active_fe_index (dof_handler.get_tria().n_active_cells()); int count = 0; @@ -52,9 +52,9 @@ write_vtk (const hp::DoFHandler & dof_handler, const std::string filename) cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell != endc; ++cell, ++count) - { - active_fe_index[count] = cell->active_fe_index(); - } + { + active_fe_index[count] = cell->active_fe_index(); + } const std::vector data_component_interpretation @@ -90,20 +90,20 @@ void test () cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell != endc; ++cell) - { - bool mark = true; - for (unsigned int d=0; d < dim; ++d) - if (cell->center()[d] > 0.5) - { - mark = false; - break; - } - - if (mark == true) - cell->set_active_fe_index(2); - else - cell->set_active_fe_index(1); - } + { + bool mark = true; + for (unsigned int d=0; d < dim; ++d) + if (cell->center()[d] > 0.5) + { + mark = false; + break; + } + + if (mark == true) + cell->set_active_fe_index(2); + else + cell->set_active_fe_index(1); + } deallog << "Grid without halo:" << std::endl; write_active_fe_index_to_file(dof_handler); @@ -122,9 +122,9 @@ void test () for (typename std::vector::iterator it = active_halo_layer.begin(); it != active_halo_layer.end(); ++it) - { - (*it)->set_active_fe_index(3); - } + { + (*it)->set_active_fe_index(3); + } deallog << "Grid with halo:" << std::endl; write_active_fe_index_to_file(dof_handler); diff --git a/tests/grid/grid_tools_halo_layer_05.cc b/tests/grid/grid_tools_halo_layer_05.cc index e034596e72..eb50bd861f 100644 --- a/tests/grid/grid_tools_halo_layer_05.cc +++ b/tests/grid/grid_tools_halo_layer_05.cc @@ -26,25 +26,25 @@ template void -write_active_fe_index_to_file (const hp::DoFHandler & dof_handler) +write_active_fe_index_to_file (const hp::DoFHandler &dof_handler) { int count = 0; typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell != endc; ++cell, ++count) - { - deallog - << count << " " - << cell->active_fe_index() - << std::endl; - } + { + deallog + << count << " " + << cell->active_fe_index() + << std::endl; + } deallog << std::endl; } template void -write_vtk (const hp::DoFHandler & dof_handler, const std::string filename) +write_vtk (const hp::DoFHandler &dof_handler, const std::string filename) { Vector active_fe_index (dof_handler.get_tria().n_active_cells()); int count = 0; @@ -52,9 +52,9 @@ write_vtk (const hp::DoFHandler & dof_handler, const std::string filename) cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell != endc; ++cell, ++count) - { - active_fe_index[count] = cell->active_fe_index(); - } + { + active_fe_index[count] = cell->active_fe_index(); + } const std::vector data_component_interpretation @@ -90,26 +90,26 @@ void test () cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell != endc; ++cell) - { - bool mark = true; - for (unsigned int d=0; d < dim; ++d) - if (cell->center()[d] > 0.5) - { - mark = false; - break; - } - - if (mark == true) { - - if (cell->center()[0] < 0.25) - cell->set_active_fe_index(2); + bool mark = true; + for (unsigned int d=0; d < dim; ++d) + if (cell->center()[d] > 0.5) + { + mark = false; + break; + } + + if (mark == true) + { + + if (cell->center()[0] < 0.25) + cell->set_active_fe_index(2); + else + cell->set_active_fe_index(3); + } else - cell->set_active_fe_index(3); + cell->set_active_fe_index(1); } - else - cell->set_active_fe_index(1); - } deallog << "Grid without halo:" << std::endl; write_active_fe_index_to_file(dof_handler); @@ -131,9 +131,9 @@ void test () for (typename std::vector::iterator it = active_halo_layer.begin(); it != active_halo_layer.end(); ++it) - { - (*it)->set_active_fe_index(4); - } + { + (*it)->set_active_fe_index(4); + } deallog << "Grid with halo:" << std::endl; write_active_fe_index_to_file(dof_handler); diff --git a/tests/grid/grid_tools_halo_layer_ghost_cells.cc b/tests/grid/grid_tools_halo_layer_ghost_cells.cc index 7eae0972b0..10dcc6b53e 100644 --- a/tests/grid/grid_tools_halo_layer_ghost_cells.cc +++ b/tests/grid/grid_tools_halo_layer_ghost_cells.cc @@ -43,10 +43,10 @@ void test () cell = tria.begin_active(), endc = tria.end(); for (; cell != endc; ++cell) - { - if (cell->is_ghost() == true) - ghost_cells_tria.push_back(cell); - } + { + if (cell->is_ghost() == true) + ghost_cells_tria.push_back(cell); + } std::sort(ghost_cells_tria.begin(), ghost_cells_tria.end()); @@ -60,28 +60,28 @@ void test () ghost_cell_halo_layer.end()); for (unsigned int proc = 0; proc < Utilities::MPI::n_mpi_processes(mpi_communicator); ++proc) - { - if (proc == Utilities::MPI::this_mpi_process(mpi_communicator)) { - for (typename std::vector::const_iterator - it_1 = ghost_cells_tria.begin(), - it_2 = ghost_cell_halo_layer.begin(); - it_1 != ghost_cells_tria.end() && - it_2 != ghost_cell_halo_layer.end(); - ++it_1, ++it_2) - { - const cell_iterator & cell_1 = *it_1; - const cell_iterator & cell_2 = *it_2; - AssertThrow(cell_1->is_ghost() == true, ExcMessage("Cell is not a ghost cell!")); - AssertThrow(cell_2->is_ghost() == true, ExcMessage("Halo cell is not a ghost cell!")); - deallog - << "Ghost " << cell_1->level() << " " << cell_1->index() << " " << cell_1->id() << " " << cell_1->id().to_string() << " " - << "Halo " << cell_2->level() << " " << cell_2->index() << " " << cell_2->id() << " " << cell_2->id().to_string() - << std::endl; - AssertThrow(cell_2 == cell_1, ExcMessage("Halo cell is not identical to ghost cell.")); - } + if (proc == Utilities::MPI::this_mpi_process(mpi_communicator)) + { + for (typename std::vector::const_iterator + it_1 = ghost_cells_tria.begin(), + it_2 = ghost_cell_halo_layer.begin(); + it_1 != ghost_cells_tria.end() && + it_2 != ghost_cell_halo_layer.end(); + ++it_1, ++it_2) + { + const cell_iterator &cell_1 = *it_1; + const cell_iterator &cell_2 = *it_2; + AssertThrow(cell_1->is_ghost() == true, ExcMessage("Cell is not a ghost cell!")); + AssertThrow(cell_2->is_ghost() == true, ExcMessage("Halo cell is not a ghost cell!")); + deallog + << "Ghost " << cell_1->level() << " " << cell_1->index() << " " << cell_1->id() << " " << cell_1->id().to_string() << " " + << "Halo " << cell_2->level() << " " << cell_2->index() << " " << cell_2->id() << " " << cell_2->id().to_string() + << std::endl; + AssertThrow(cell_2 == cell_1, ExcMessage("Halo cell is not identical to ghost cell.")); + } + } } - } } diff --git a/tests/grid/grid_tools_transform_01.cc b/tests/grid/grid_tools_transform_01.cc index 0f6c762a69..cb3d6a30bf 100644 --- a/tests/grid/grid_tools_transform_01.cc +++ b/tests/grid/grid_tools_transform_01.cc @@ -26,16 +26,16 @@ #include template -Point trans_func(Point & p); +Point trans_func(Point &p); template<> -Point<2> trans_func(Point<2> & p) +Point<2> trans_func(Point<2> &p) { Point<2> r(p(0)+p(1)*p(1),p(1)); return r; } template<> -Point<3> trans_func(Point<3> & p) +Point<3> trans_func(Point<3> &p) { Point<3> r(p(0)+p(1)*p(1),p(1),p(2)); return r; @@ -47,13 +47,13 @@ template void test () { deallog << "dim = " << dim << std::endl; - + Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(1); tria.begin_active()->set_refine_flag(); tria.execute_coarsening_and_refinement(); - + deallog << "Unchanged grid:" << std::endl; GridOut().write_gnuplot (tria, deallog.get_file_stream()); @@ -64,7 +64,7 @@ void test () } GridTools::transform(trans_func, tria); - + deallog << "transformed grid:" << std::endl; GridOut().write_gnuplot (tria, deallog.get_file_stream()); { diff --git a/tests/grid/grid_transform_02.cc b/tests/grid/grid_transform_02.cc index ebea4830a8..08c098259e 100644 --- a/tests/grid/grid_transform_02.cc +++ b/tests/grid/grid_transform_02.cc @@ -41,28 +41,29 @@ int main () { const int dim = 2; - Triangulation< dim > tria; + Triangulation< dim > tria; std::map< unsigned int, Point< dim > > new_points; const unsigned int N = 16; GridGenerator::subdivided_hyper_cube (tria, N, -5, 5); // find the vertex at the origin Triangulation::active_cell_iterator - cell = GridTools::find_active_cell_around_point (tria,Point()); + cell = GridTools::find_active_cell_around_point (tria,Point()); unsigned int best_vertex = cell->vertex_index(0);//vertex number on local triangulation Point best_pos = cell->vertex(0); double best_dist = Point().distance(best_pos); - for (unsigned int vertex_no = 1; vertex_no < GeometryInfo::vertices_per_cell; vertex_no++) { - const double dist = Point().distance(cell->vertex(vertex_no)); - if (dist < best_dist) - { - best_pos = cell->vertex(vertex_no); - best_vertex = cell->vertex_index(vertex_no); - best_dist = dist; - } - } + for (unsigned int vertex_no = 1; vertex_no < GeometryInfo::vertices_per_cell; vertex_no++) + { + const double dist = Point().distance(cell->vertex(vertex_no)); + if (dist < best_dist) + { + best_pos = cell->vertex(vertex_no); + best_vertex = cell->vertex_index(vertex_no); + best_dist = dist; + } + } // move the point at the origin by 2 units to the right new_points[best_vertex] = Point(); new_points[best_vertex][0] += 2; @@ -73,15 +74,16 @@ int main () for ( ; cell != endc; ++cell) if (cell->at_boundary() == true) - for (unsigned int face = 0; face < GeometryInfo::faces_per_cell;++face) - if (cell->face(face)->at_boundary() == true) - for (unsigned int v=0; v < GeometryInfo::vertices_per_face;++v) { - unsigned int vertex_number = cell->face(face)->vertex_index(v); - new_points[vertex_number] = cell->face(face)->vertex(v); - } + for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) + if (cell->face(face)->at_boundary() == true) + for (unsigned int v=0; v < GeometryInfo::vertices_per_face; ++v) + { + unsigned int vertex_number = cell->face(face)->vertex_index(v); + new_points[vertex_number] = cell->face(face)->vertex(v); + } // then compute new point locations and output the result - GridTools::laplace_transform (new_points,tria); + GridTools::laplace_transform (new_points,tria); std::ofstream out ("output"); GridOut grid_out; grid_out.write_eps (tria, out); diff --git a/tests/grid/grid_transform_coefficient.cc b/tests/grid/grid_transform_coefficient.cc index 0741f9f92a..ac2e9134ec 100644 --- a/tests/grid/grid_transform_coefficient.cc +++ b/tests/grid/grid_transform_coefficient.cc @@ -35,10 +35,10 @@ class Coefficient : public Function { public: virtual double value (const Point &p, - const unsigned int) const - { - return (p[0]>0 ? 10 : 1); - } + const unsigned int) const + { + return (p[0]>0 ? 10 : 1); + } }; diff --git a/tests/grid/measure_of_3d_face_01.cc b/tests/grid/measure_of_3d_face_01.cc index 19b8890f95..e0b2992b67 100644 --- a/tests/grid/measure_of_3d_face_01.cc +++ b/tests/grid/measure_of_3d_face_01.cc @@ -29,9 +29,9 @@ // move backward two adjacent vertices of the top face up by one // unit. all faces remain flat this way -Point<3> distort_planar(Point<3> p) +Point<3> distort_planar(Point<3> p) { - if (p(1) > 0.5 && p(2) > 0.5) + if (p(1) > 0.5 && p(2) > 0.5) { p(1) += 1; } @@ -41,9 +41,9 @@ Point<3> distort_planar(Point<3> p) // lift two opposite vertices of the top face up by one unit to create // a saddle surface -Point<3> distort_twisted(Point<3> p) +Point<3> distort_twisted(Point<3> p) { - if (p(2) > 0.5 && (p(0) > 0.5 ^ p(1) > 0.5)) + if (p(2) > 0.5 && (p(0) > 0.5 ^ p(1) > 0.5)) { p(2) += 1; } @@ -70,7 +70,7 @@ void test () double m = cell->face(i)->measure(); deallog << i << '\t' << measure_planar[i] << '\t' << m << std::endl; } - + deallog << "Twisted\n"; tria.clear(); GridGenerator::hyper_cube(tria); @@ -84,13 +84,13 @@ void test () { double m; try - { - m = cell->face(i)->measure(); - } + { + m = cell->face(i)->measure(); + } catch (...) - { - m = std::numeric_limits::quiet_NaN(); - } + { + m = std::numeric_limits::quiet_NaN(); + } deallog << i << '\t' << measure_twisted[i] << '\t' << m << std::endl; } @@ -112,7 +112,7 @@ int main() // out, but we'd still like to print and check the data for the // remaining faces deal_II_exceptions::disable_abort_on_exception(); - + test (); } diff --git a/tests/grid/merge_triangulations_02.cc b/tests/grid/merge_triangulations_02.cc index 7490bd89f4..c53bc511b7 100644 --- a/tests/grid/merge_triangulations_02.cc +++ b/tests/grid/merge_triangulations_02.cc @@ -41,16 +41,16 @@ template void mesh_info(const Triangulation &tria) { deallog << "Mesh info:" << std::endl - << " dimension: " << dim << std::endl - << " no. of cells: " << tria.n_active_cells() << std::endl; + << " dimension: " << dim << std::endl + << " no. of cells: " << tria.n_active_cells() << std::endl; // Next loop over all faces of all cells and find how often each boundary // indicator is used: { std::map boundary_count; typename Triangulation::active_cell_iterator - cell = tria.begin_active(), - endc = tria.end(); + cell = tria.begin_active(), + endc = tria.end(); for (; cell!=endc; ++cell) { for (unsigned int face=0; face::faces_per_cell; ++face) @@ -81,7 +81,7 @@ void make_grid () { Triangulation<2> tria1; GridGenerator::hyper_cube_with_cylindrical_hole (tria1, 0.25, 1.0); - + Triangulation<2> tria3; GridGenerator::hyper_cube_with_cylindrical_hole (tria3, 0.25, 1.0); GridTools::shift (Point<2>(0,-2), tria3); @@ -93,11 +93,11 @@ void make_grid () mesh_info(triangulation2); deallog << "Number of active cells: " - << triangulation2.n_active_cells() - << std::endl; + << triangulation2.n_active_cells() + << std::endl; deallog << "Total number of cells: " - << triangulation2.n_cells() - << std::endl; + << triangulation2.n_cells() + << std::endl; } diff --git a/tests/grid/merge_triangulations_03.cc b/tests/grid/merge_triangulations_03.cc index a924ae7522..3c83564364 100644 --- a/tests/grid/merge_triangulations_03.cc +++ b/tests/grid/merge_triangulations_03.cc @@ -13,7 +13,7 @@ // // --------------------------------------------------------------------- -// This script reproduces an issue with merging a hyper ball within a +// This script reproduces an issue with merging a hyper ball within a // hyper shell using dealII-8.0.0. // // Test by Bamdad Hosseini (see mail to mailing @@ -45,31 +45,32 @@ void flatten_triangulation( Triangulation &tria_in, Triangulation &tri // created from the vertices of the input { - // we start by extracting the number of vertices and cell is + // we start by extracting the number of vertices and cell is // the original triangulation unsigned int n_vertices = tria_in.n_vertices(); unsigned int n_cells = tria_in.n_cells(); unsigned int n_active_cells = tria_in.n_active_cells(); - - // also get all vertices + + // also get all vertices const std::vector< Point > vertices = tria_in.get_vertices(); // now we need to loop over all cells and extract the cell data. typename Triangulation::active_cell_iterator - cell=tria_in.begin_active(), - endc=tria_in.end(); + cell=tria_in.begin_active(), + endc=tria_in.end(); std::vector< CellData > cells(n_active_cells, CellData()); unsigned int cell_counter = 0; - for(; cell!=endc; ++cell) + for (; cell!=endc; ++cell) { - for (unsigned int j=0; - j < GeometryInfo::vertices_per_cell; - ++j) { - cells[cell_counter].vertices[j] = cell->vertex_index(j); - } + for (unsigned int j=0; + j < GeometryInfo::vertices_per_cell; + ++j) + { + cells[cell_counter].vertices[j] = cell->vertex_index(j); + } cells[cell_counter].material_id=0; ++cell_counter; } @@ -78,41 +79,41 @@ void flatten_triangulation( Triangulation &tria_in, Triangulation &tri tria_out.create_triangulation(vertices, cells, SubCellData() ); } -// this is a function to provide some basic information about the -// triangulations. The code inside can be ignored. It produces an -// eps image of the mesh so we can see the nodes are at the right +// this is a function to provide some basic information about the +// triangulations. The code inside can be ignored. It produces an +// eps image of the mesh so we can see the nodes are at the right // place. template -void mesh_info(const Triangulation &tria, - const std::string &filename) +void mesh_info(const Triangulation &tria, + const std::string &filename) { deallog << "Mesh info for " << filename << ":" << std::endl - << " dimension: " << dim << std::endl - << " no. of cells: " << tria.n_active_cells() << std::endl; + << " dimension: " << dim << std::endl + << " no. of cells: " << tria.n_active_cells() << std::endl; { std::map boundary_count; typename Triangulation::active_cell_iterator - cell = tria.begin_active(), - endc = tria.end(); + cell = tria.begin_active(), + endc = tria.end(); for (; cell!=endc; ++cell) { - for (unsigned int face=0; - face::faces_per_cell; - ++face) - { - if (cell->face(face)->at_boundary()) - boundary_count[cell->face(face)->boundary_id()]++; - } + for (unsigned int face=0; + face::faces_per_cell; + ++face) + { + if (cell->face(face)->at_boundary()) + boundary_count[cell->face(face)->boundary_id()]++; + } } deallog << " boundary indicators: "; - for (std::map::iterator it=boundary_count.begin(); - it!=boundary_count.end(); - ++it) + for (std::map::iterator it=boundary_count.begin(); + it!=boundary_count.end(); + ++it) { - deallog << it->first << "(" << it->second << " times) "; + deallog << it->first << "(" << it->second << " times) "; } deallog << std::endl; } @@ -120,9 +121,9 @@ void mesh_info(const Triangulation &tria, void test () -{ +{ Point<2> center; - + Triangulation<2> ball; Triangulation<2> flat_ball; Triangulation<2> shell; @@ -132,26 +133,26 @@ void test () GridGenerator::hyper_ball( ball, center, 0.5 ); GridGenerator::hyper_shell(shell, center, 0.5, 1, 8, true); //colorize flag set to true so outer bnd is 1 and inner is 0 - // set boundaries - static const HyperBallBoundary<2> inner_bnd(center, 0.5); + // set boundaries + static const HyperBallBoundary<2> inner_bnd(center, 0.5); static const HyperBallBoundary<2> outer_bnd(center, 1); ball.set_boundary(0, inner_bnd); shell.set_boundary(0, inner_bnd); shell.set_boundary(1, outer_bnd); - // first we need to refine the ball once to get the right + // first we need to refine the ball once to get the right // nodes to merge the meshes ball.refine_global(1); - - // flatten the refined ball so we have a coarse mesh to merge + + // flatten the refined ball so we have a coarse mesh to merge flatten_triangulation( ball, flat_ball ); mesh_info( shell, "shell.eps" ); mesh_info( ball, "ball.eps" ); mesh_info( flat_ball, "flat_ball.eps" ); - // now we merge (this throws an exception with no error messages + // now we merge (this throws an exception with no error messages GridGenerator::merge_triangulations( flat_ball, shell, tria_out ); mesh_info(tria_out, "tria_out.eps"); } @@ -166,6 +167,6 @@ int main () deallog.threshold_double(1.e-10); test (); - + return 0; } diff --git a/tests/grid/tria_last.cc b/tests/grid/tria_last.cc index c6ed154d5f..7256465baf 100644 --- a/tests/grid/tria_last.cc +++ b/tests/grid/tria_last.cc @@ -47,15 +47,15 @@ void test () for (unsigned int i=0; i<2; ++i) { for (typename Triangulation::active_cell_iterator - cell = tria.begin_active(2); cell != tria.end(); ++cell) - cell->set_coarsen_flag (); + cell = tria.begin_active(2); cell != tria.end(); ++cell) + cell->set_coarsen_flag (); tria.execute_coarsening_and_refinement (); } deallog << tria.n_levels() << ' ' << tria.n_global_levels() << ' ' - << tria.last() << ' ' - << tria.last_active() - << std::endl; + << tria.last() << ' ' + << tria.last_active() + << std::endl; } diff --git a/tests/hp/copy_tria_bug.cc b/tests/hp/copy_tria_bug.cc index ef0f9b466b..b564231524 100644 --- a/tests/hp/copy_tria_bug.cc +++ b/tests/hp/copy_tria_bug.cc @@ -46,8 +46,8 @@ void test1() tr1.copy_triangulation(tr2); dofh.begin_active()->set_active_fe_index(0); - - + + } int main() diff --git a/tests/hp/do_function_derivatives_01.cc b/tests/hp/do_function_derivatives_01.cc index f1f67b1796..364771cd21 100644 --- a/tests/hp/do_function_derivatives_01.cc +++ b/tests/hp/do_function_derivatives_01.cc @@ -104,10 +104,10 @@ int main() { x_fe_values.reinit (cell); std::vector > > - derivatives (q[0].size(), std::vector >(cell->get_fe().n_components())); + derivatives (q[0].size(), std::vector >(cell->get_fe().n_components())); x_fe_values.get_present_fe_values().get_function_gradients (new_solution, - derivatives); + derivatives); } // we are good if we made it to here diff --git a/tests/hp/do_function_hessians_01.cc b/tests/hp/do_function_hessians_01.cc index 5633cdeb26..20ef613db2 100644 --- a/tests/hp/do_function_hessians_01.cc +++ b/tests/hp/do_function_hessians_01.cc @@ -104,10 +104,10 @@ int main() { x_fe_values.reinit (cell); std::vector > > - derivatives (q[0].size(), std::vector >(cell->get_fe().n_components())); + derivatives (q[0].size(), std::vector >(cell->get_fe().n_components())); x_fe_values.get_present_fe_values().get_function_hessians (new_solution, - derivatives); + derivatives); } // we are good if we made it to here diff --git a/tests/hp/do_function_laplacians_01.cc b/tests/hp/do_function_laplacians_01.cc index b66072605f..1baeddb3af 100644 --- a/tests/hp/do_function_laplacians_01.cc +++ b/tests/hp/do_function_laplacians_01.cc @@ -104,10 +104,10 @@ int main() { x_fe_values.reinit (cell); std::vector > - derivatives (q[0].size(), Vector(cell->get_fe().n_components())); + derivatives (q[0].size(), Vector(cell->get_fe().n_components())); x_fe_values.get_present_fe_values().get_function_laplacians (new_solution, - derivatives); + derivatives); } // we are good if we made it to here diff --git a/tests/hp/face_domination_01.cc b/tests/hp/face_domination_01.cc index 26eb855fbe..08a034113d 100644 --- a/tests/hp/face_domination_01.cc +++ b/tests/hp/face_domination_01.cc @@ -43,7 +43,7 @@ const unsigned int dim=2; void print_dofs (const hp::DoFHandler<2>::active_cell_iterator &cell) { deallog << "DoFs on cell=" << cell << ": "; - + std::vector dof_indices (cell->get_fe().dofs_per_cell); cell->get_dof_indices (dof_indices); for (unsigned int i=0; i subdivisions(dim, 1U); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle (triangulation, - subdivisions, - Point(0,0), - Point(2,1)); + subdivisions, + Point(0,0), + Point(2,1)); hp::FECollection fe_collection; fe_collection.push_back(FESystem(FE_Nothing(),1)); @@ -79,7 +79,7 @@ int main() print_dofs (dof_handler.begin_active()); print_dofs (++dof_handler.begin_active()); - + ConstraintMatrix constraints; constraints.clear(); dealii::DoFTools::make_hanging_node_constraints (dof_handler, constraints); diff --git a/tests/hp/face_domination_02.cc b/tests/hp/face_domination_02.cc index 16abe78a00..73e891a09d 100644 --- a/tests/hp/face_domination_02.cc +++ b/tests/hp/face_domination_02.cc @@ -45,7 +45,7 @@ const unsigned int dim=2; void print_dofs (const hp::DoFHandler<2>::active_cell_iterator &cell) { deallog << "DoFs on cell=" << cell << ": "; - + std::vector dof_indices (cell->get_fe().dofs_per_cell); cell->get_dof_indices (dof_indices); for (unsigned int i=0; i subdivisions(dim, 1U); subdivisions[0] = 2; GridGenerator::subdivided_hyper_rectangle (triangulation, - subdivisions, - Point(0,0), - Point(2,1)); + subdivisions, + Point(0,0), + Point(2,1)); hp::FECollection fe_collection; fe_collection.push_back(FESystem(FE_Q(1),1, @@ -83,7 +83,7 @@ int main() print_dofs (dof_handler.begin_active()); print_dofs (++dof_handler.begin_active()); - + ConstraintMatrix constraints; constraints.clear(); dealii::DoFTools::make_hanging_node_constraints (dof_handler, constraints); diff --git a/tests/hp/fe_nothing_18.cc b/tests/hp/fe_nothing_18.cc index 2ea4bf036a..8d103f7e5e 100644 --- a/tests/hp/fe_nothing_18.cc +++ b/tests/hp/fe_nothing_18.cc @@ -69,16 +69,17 @@ template class ElasticProblem { - public: +public: ElasticProblem(); ~ElasticProblem (); void run(); - private: - enum { - u_block = 0, - lambda_block = 1 +private: + enum + { + u_block = 0, + lambda_block = 1 }; - + void make_grid(); void setup_system (); @@ -124,12 +125,12 @@ get_stress_strain_tensor (const double lambda, const double mu) for (unsigned int i=0; i(dim) {} virtual void vector_value (const Point &p, - Vector &values) const; + Vector &values) const; virtual double value (const Point &p, - unsigned int compoment) const; + unsigned int compoment) const; }; template inline void BoundaryValues::vector_value (const Point &p, - Vector &values) const + Vector &values) const { values(0) = -0.001; } @@ -158,7 +159,7 @@ void BoundaryValues::vector_value (const Point &p, template inline double BoundaryValues::value (const Point &p, - unsigned int compoment) const + unsigned int compoment) const { return -0.001; } @@ -172,35 +173,35 @@ class ConstrainValues : public Function public: ConstrainValues (); //need to pass down to the base class of how many components the function consists; default - 1 virtual void vector_value (const Point &p, - Vector &values) const;//returns calculated values in the second argument; + Vector &values) const;//returns calculated values in the second argument; virtual void vector_value_list (const std::vector > &points, - std::vector > &value_list) const;//values at several points at once + std::vector > &value_list) const;//values at several points at once //prevent from calling virtual function "vector_value" to frequently }; template ConstrainValues::ConstrainValues () -: -Function (dim) /*pass down to the main class the number of components of the function*/ + : + Function (dim) /*pass down to the main class the number of components of the function*/ {} template inline void ConstrainValues::vector_value (const Point &p, - Vector &values) const + Vector &values) const { Assert (values.size() == dim, - ExcDimensionMismatch (values.size(), dim));//check is the size of "values" is correct + ExcDimensionMismatch (values.size(), dim));//check is the size of "values" is correct //Assert (dim >= 2, ExcNotImplemented());//not implemented for 1d values[0] = 0.0; } template void ConstrainValues::vector_value_list (const std::vector > &points, - std::vector > &value_list) const + std::vector > &value_list) const { Assert (value_list.size() == points.size(), - ExcDimensionMismatch (value_list.size(), points.size()));//check if input-output is consistent + ExcDimensionMismatch (value_list.size(), points.size()));//check if input-output is consistent const unsigned int n_points = points.size();//number of points at which the function is to be evaluated @@ -208,30 +209,30 @@ void ConstrainValues::vector_value_list (const std::vector > &po ConstrainValues::vector_value (points[p], value_list[p]); } - + /* constructor*/ template ElasticProblem::ElasticProblem () -: -n_blocks(2), -n_components(dim*n_blocks), -first_u_comp(0), -first_lamda_comp(dim), -degree(1), -dofs_per_block(n_blocks), -dof_handler (triangulation), /*assotiate dof_handler to the triangulation */ -elasticity_fe (FE_Q(degree), dim, //use dim FE_Q of a given degree to represent displacements - FE_Nothing(), dim // zero extension of lagrange multipliers elsewhere in the domain -), -elasticity_w_lagrange_fe( - FE_Q(degree), dim, - FE_Q(degree), dim // same for lagrange multipliers -), -u_fe(first_u_comp), -lamda_fe(first_lamda_comp), -id_of_lagrange_mult(1), -beta1(1.0) + : + n_blocks(2), + n_components(dim *n_blocks), + first_u_comp(0), + first_lamda_comp(dim), + degree(1), + dofs_per_block(n_blocks), + dof_handler (triangulation), /*assotiate dof_handler to the triangulation */ + elasticity_fe (FE_Q(degree), dim, //use dim FE_Q of a given degree to represent displacements + FE_Nothing(), dim // zero extension of lagrange multipliers elsewhere in the domain + ), + elasticity_w_lagrange_fe( + FE_Q(degree), dim, + FE_Q(degree), dim // same for lagrange multipliers + ), + u_fe(first_u_comp), + lamda_fe(first_lamda_comp), + id_of_lagrange_mult(1), + beta1(1.0) { fe.push_back (elasticity_fe);//FE index 0 fe.push_back (elasticity_w_lagrange_fe);//FE index 1 @@ -241,13 +242,13 @@ beta1(1.0) stress_strain_tensor = get_stress_strain_tensor (/*lambda = */ 9.695e10, - /*mu = */ 7.617e10); + /*mu = */ 7.617e10); } template ElasticProblem::~ElasticProblem () { - dof_handler.clear (); + dof_handler.clear (); } @@ -264,17 +265,18 @@ void ElasticProblem::make_grid () GridTools::shift(shift_vector,triangulationR); const unsigned int n_faces_per_cell = GeometryInfo< dim >::faces_per_cell; - + triangulationL.begin_active()->set_material_id(0); triangulationR.begin_active()->set_material_id(id_of_lagrange_mult); - for (unsigned int i=0;iface(i)->set_boundary_id(i); - triangulationR.begin_active()->face(i)->set_boundary_id(n_faces_per_cell+i); - } - + for (unsigned int i=0; iface(i)->set_boundary_id(i); + triangulationR.begin_active()->face(i)->set_boundary_id(n_faces_per_cell+i); + } + GridGenerator::merge_triangulations (triangulationL, triangulationR, triangulation); - + //triangulation.refine_global (2); //refine twice globally before solving } @@ -288,18 +290,21 @@ void ElasticProblem::setup_system () //(1) set active FE indices based in material id... typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); unsigned int n_lagrange_cells = 0; unsigned int n_elasticity_cells = 0; for (; cell!=endc; ++cell) //loop over all cells { - if (cell->material_id() == id_of_lagrange_mult ) { - cell->set_active_fe_index(1); // for lagrangian cells.. - n_lagrange_cells++; - } else { - cell->set_active_fe_index(0); - n_elasticity_cells++; - } + if (cell->material_id() == id_of_lagrange_mult ) + { + cell->set_active_fe_index(1); // for lagrangian cells.. + n_lagrange_cells++; + } + else + { + cell->set_active_fe_index(0); + n_elasticity_cells++; + } } deallog<<" number of cells (L/E): "<< n_lagrange_cells << "; "< 0, ExcInternalError()); //there should be at least 1 cell! Otherwise DoFHanlder crashes with 0 dofs for block 2! @@ -316,13 +321,13 @@ void ElasticProblem::setup_system () //(3) create hanging nodes constrains (also add normal diricle BC here? hanging_node_constraints.clear ();//clear all content that may left from previous calculations DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints);//fill the object representing constraints + hanging_node_constraints);//fill the object representing constraints hanging_node_constraints.close ();//close the object - sort and rearrange constraints for effective calculations //(4) create block sparsity pattern (define which elements in sparse matrix are non-zero; prescribe coupling between blocks) // following step-22 use of simple compressed block sparsity pattern for efficiency BlockCompressedSparsityPattern compressed_sparsity_pattern(n_blocks, - n_blocks); + n_blocks); compressed_sparsity_pattern.block(u_block ,u_block ).reinit(dofs_per_block[u_block] ,dofs_per_block[u_block]); compressed_sparsity_pattern.block(u_block ,lambda_block).reinit(dofs_per_block[u_block] ,dofs_per_block[lambda_block]); @@ -332,38 +337,38 @@ void ElasticProblem::setup_system () compressed_sparsity_pattern.collect_sizes(); Table<2, DoFTools::Coupling> coupling(n_components, n_components); - for (unsigned int ii = 0; ii< n_components;++ii) + for (unsigned int ii = 0; ii< n_components; ++ii) for (unsigned int jj=0; jj< n_components; ++jj) { - if ( (block_component[ii]==lambda_block) && - (block_component[jj]==lambda_block) - ) - coupling[ii][jj] = DoFTools::none;//diagonal = 0 - else - coupling[ii][jj] = DoFTools::always;//full coupling (u,u), (u,lambda) + if ( (block_component[ii]==lambda_block) && + (block_component[jj]==lambda_block) + ) + coupling[ii][jj] = DoFTools::none;//diagonal = 0 + else + coupling[ii][jj] = DoFTools::always;//full coupling (u,u), (u,lambda) } hanging_node_constraints.condense (compressed_sparsity_pattern); DoFTools::make_sparsity_pattern (dof_handler, - coupling, - compressed_sparsity_pattern, - hanging_node_constraints, - false); + coupling, + compressed_sparsity_pattern, + hanging_node_constraints, + false); compressed_sparsity_pattern.print (deallog.get_file_stream()); hanging_node_constraints.print (deallog.get_file_stream()); -} - - - +} + + + template void ElasticProblem::run () { make_grid (); setup_system (); -} - +} + int main() { diff --git a/tests/hp/fe_nothing_19.cc b/tests/hp/fe_nothing_19.cc index f302890d6a..0c5f37cb29 100644 --- a/tests/hp/fe_nothing_19.cc +++ b/tests/hp/fe_nothing_19.cc @@ -40,13 +40,13 @@ void test() triangulation.refine_global (1); FESystem elasticity_fe (FE_Q(1), 1, - FE_Nothing(), 1); + FE_Nothing(), 1); FESystem elasticity_w_lagrange_fe(FE_Q(1), 1, - FE_Q(1), 1); + FE_Q(1), 1); hp::FECollection fe; fe.push_back (elasticity_fe); fe.push_back (elasticity_w_lagrange_fe); - + hp::DoFHandler dof_handler (triangulation); typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); cell->set_active_fe_index(0); @@ -55,14 +55,14 @@ void test() dof_handler.distribute_dofs (fe); ConstraintMatrix hanging_node_constraints; DoFTools::make_hanging_node_constraints (dof_handler, - hanging_node_constraints); + hanging_node_constraints); hanging_node_constraints.close (); // print constraints. there shouldn't be any deallog << hanging_node_constraints.n_constraints() << std::endl; hanging_node_constraints.print (deallog.get_file_stream()); -} - +} + int main() { diff --git a/tests/hp/fe_nothing_20.cc b/tests/hp/fe_nothing_20.cc index af823783a7..0bf785dbbe 100644 --- a/tests/hp/fe_nothing_20.cc +++ b/tests/hp/fe_nothing_20.cc @@ -49,10 +49,10 @@ void test () triangulation.refine_global(4); hp::FECollection fe_collection; - + fe_collection.push_back (FESystem(FE_Q(2),dim, - FE_Q(1),1, - FE_Nothing(), dim)); + FE_Q(1),1, + FE_Nothing(), dim)); fe_collection.push_back (FESystem(FE_Nothing(dim+1), 1, FE_Q(2), dim)); @@ -61,7 +61,7 @@ void test () - dof_handler.distribute_dofs (fe_collection); + dof_handler.distribute_dofs (fe_collection); deallog << " Number of active cells: " << triangulation.n_active_cells() @@ -70,12 +70,12 @@ void test () << dof_handler.n_dofs() << std::endl; - + Vector solution(dof_handler.n_dofs()); VectorTools::interpolate(dof_handler, - ZeroFunction(2*dim+1), - solution); + ZeroFunction(2*dim+1), + solution); deallog << "l2_norm = " << solution.l2_norm() << std::endl; } diff --git a/tests/hp/fe_nothing_21.cc b/tests/hp/fe_nothing_21.cc index 29a85ca363..8613b57a2e 100644 --- a/tests/hp/fe_nothing_21.cc +++ b/tests/hp/fe_nothing_21.cc @@ -48,12 +48,12 @@ void test () FESystem fe(FE_Nothing(),1, FE_Q(1),1); - deallog << "n support points: " << fe.get_unit_support_points().size() << std::endl; + deallog << "n support points: " << fe.get_unit_support_points().size() << std::endl; + - DoFHandler dof_handler (triangulation); - dof_handler.distribute_dofs (fe); + dof_handler.distribute_dofs (fe); deallog << " Number of active cells: " << triangulation.n_active_cells() << std::endl @@ -61,12 +61,12 @@ void test () << dof_handler.n_dofs() << std::endl; - + Vector solution(dof_handler.n_dofs()); VectorTools::interpolate(dof_handler, - ZeroFunction(2), - solution); + ZeroFunction(2), + solution); deallog << "l2_norm = " << solution.l2_norm() << std::endl; } diff --git a/tests/hp/get_interpolated_dof_values_03.cc b/tests/hp/get_interpolated_dof_values_03.cc index 57d85a12e6..ed1f0fb00e 100644 --- a/tests/hp/get_interpolated_dof_values_03.cc +++ b/tests/hp/get_interpolated_dof_values_03.cc @@ -73,7 +73,7 @@ void test () typename hp::DoFHandler::cell_iterator cell=dof_handler.begin(0); Vector local (fe[0].dofs_per_cell); cell->get_interpolated_dof_values (solution, local, - 0); + 0); for (unsigned int i=0; iget_dof_values (solution, x); deallog << "cell =" << cell << ": "; for (unsigned int i=0; i void test(const bool apply_constrains, const unsigned int hp) { - Triangulation triangulation; - { + Triangulation triangulation; + { Triangulation triangulationL; Triangulation triangulationR; GridGenerator::hyper_cube (triangulationL, -1,0); //create a square [-1,0]^d domain @@ -41,98 +41,98 @@ void test(const bool apply_constrains, const unsigned int hp) shift_vector[0] = 1.0; GridTools::shift(shift_vector,triangulationR); GridGenerator::merge_triangulations (triangulationL, triangulationR, triangulation); - } - - hp::FECollection fe; - hp::DoFHandler dof_handler(triangulation); - ConstraintMatrix constraints; //for boundary conditions - - - // populate fe system: - fe.push_back(FE_Q_Hierarchical(2)); - fe.push_back(FE_Q_Hierarchical(4)); - - // set one cell to have different active_fe_index: - typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); - cell->set_active_fe_index(1); - - // need to distribute dofs before refinement, - // otherwise active fe index will not transfer to child cells - dof_handler.distribute_dofs(fe); - - // refine first cell (simple case) - std::string hp_string; - if (hp == 1) - { - hp_string = "_hpSimple"; - cell->set_refine_flag(); - } - // refine second cell - else if (hp == 2) - { + } + + hp::FECollection fe; + hp::DoFHandler dof_handler(triangulation); + ConstraintMatrix constraints; //for boundary conditions + + + // populate fe system: + fe.push_back(FE_Q_Hierarchical(2)); + fe.push_back(FE_Q_Hierarchical(4)); + + // set one cell to have different active_fe_index: + typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); + cell->set_active_fe_index(1); + + // need to distribute dofs before refinement, + // otherwise active fe index will not transfer to child cells + dof_handler.distribute_dofs(fe); + + // refine first cell (simple case) + std::string hp_string; + if (hp == 1) + { + hp_string = "_hpSimple"; + cell->set_refine_flag(); + } + // refine second cell + else if (hp == 2) + { hp_string = "_hpComplex"; cell++; cell->set_refine_flag(); - } + } + + triangulation.execute_coarsening_and_refinement(); - triangulation.execute_coarsening_and_refinement(); + dof_handler.distribute_dofs(fe); + constraints.clear (); + DoFTools::make_hanging_node_constraints(dof_handler, constraints); + constraints.close(); - dof_handler.distribute_dofs(fe); - constraints.clear (); - DoFTools::make_hanging_node_constraints(dof_handler, constraints); - constraints.close(); + const unsigned int n_dofs = dof_handler.n_dofs(); - const unsigned int n_dofs = dof_handler.n_dofs(); - - Vector v(n_dofs); + Vector v(n_dofs); - if (apply_constrains) - deallog << hp_string << std::endl; + if (apply_constrains) + deallog << hp_string << std::endl; - for (unsigned int i = 0; i < n_dofs; i++) - { - v = 0.; - v[i] = 1.; - if (apply_constrains) - { - constraints.distribute(v); - deallog << "i="<(true,0); - test<2>(true,1); - test<2>(true,2); - -#ifdef FEQH_DEBUG_OUTPUT - test<2>(false,0); - test<2>(false,1); - test<2>(false,2); + std::ofstream logfile ("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(2.e-15); + + test<2>(true,0); + test<2>(true,1); + test<2>(true,2); + +#ifdef FEQH_DEBUG_OUTPUT + test<2>(false,0); + test<2>(false,1); + test<2>(false,2); #endif } \ No newline at end of file diff --git a/tests/hp/integrate_difference_03.cc b/tests/hp/integrate_difference_03.cc index 0ea2bf4479..04bdd8d8ed 100644 --- a/tests/hp/integrate_difference_03.cc +++ b/tests/hp/integrate_difference_03.cc @@ -82,7 +82,7 @@ void test () // interpolate a linear function Vector vec (dof_handler.n_dofs()); VectorTools::interpolate (dof_handler, - VectorFunctionFromScalarFunctionObject (&f, 0, dim), + VectorFunctionFromScalarFunctionObject (&f, 0, dim), vec); Vector diff (tria.n_active_cells()); diff --git a/tests/hp/interpolate_nothing_01.cc b/tests/hp/interpolate_nothing_01.cc index 9803f2899a..250087b699 100644 --- a/tests/hp/interpolate_nothing_01.cc +++ b/tests/hp/interpolate_nothing_01.cc @@ -63,8 +63,8 @@ void test () // interpolate the function VectorTools::interpolate (dof_handler, - ZeroFunction(hp_fe[0].n_components()), - interpolant); + ZeroFunction(hp_fe[0].n_components()), + interpolant); deallog << interpolant.l2_norm() << std::endl; } diff --git a/tests/hp/interpolate_nothing_02.cc b/tests/hp/interpolate_nothing_02.cc index bcacb1105e..392449c934 100644 --- a/tests/hp/interpolate_nothing_02.cc +++ b/tests/hp/interpolate_nothing_02.cc @@ -57,8 +57,9 @@ public: double alen, blen, clen; private: enum - {omega1_domain_id, - omega2_domain_id + { + omega1_domain_id, + omega2_domain_id }; static bool @@ -77,32 +78,34 @@ private: FESystem omega2_fe; hp::FECollection fe_collection; hp::DoFHandler dof_handler; - QGauss quadrature_formula; - QGauss face_quadrature_formula; + QGauss quadrature_formula; + QGauss face_quadrature_formula; SparsityPattern sparsity_pattern; std::map boundary_values; - + Vector system_rhs, U, Un, dU, U0; - + //solution variables std::vector nodal_solution_names; }; // Constructor template -diffusionMechanics::diffusionMechanics (const unsigned int mech_degree, const unsigned int diff_degree): -mech_degree (mech_degree), -diff_degree (diff_degree), -omega1_fe (FE_Q(mech_degree), dim, - FE_Q(diff_degree), 1), -omega2_fe (FE_Q(mech_degree), dim, - FE_Nothing(), 1), -dof_handler (triangulation), quadrature_formula(3), face_quadrature_formula(2){ - +diffusionMechanics::diffusionMechanics (const unsigned int mech_degree, const unsigned int diff_degree): + mech_degree (mech_degree), + diff_degree (diff_degree), + omega1_fe (FE_Q(mech_degree), dim, + FE_Q(diff_degree), 1), + omega2_fe (FE_Q(mech_degree), dim, + FE_Nothing(), 1), + dof_handler (triangulation), quadrature_formula(3), face_quadrature_formula(2) +{ + //Nodal Solution names - for (unsigned int i=0; i -diffusionMechanics::~diffusionMechanics (){dof_handler.clear ();} +diffusionMechanics::~diffusionMechanics () +{ + dof_handler.clear (); +} //Initial conditions - use only if FE_Nothing not used. Else an error occurs with VectorTools::interpolate template -class InitialConditions: public Function{ +class InitialConditions: public Function +{ public: - InitialConditions (): Function(totalDOF){} - void vector_value (const Point &p, Vector &values) const{ + InitialConditions (): Function(totalDOF) {} + void vector_value (const Point &p, Vector &values) const + { Assert (values.size() == totalDOF, ExcDimensionMismatch (values.size(), totalDOF)); values(totalDOF-4)=0; // u=0 - values(totalDOF-3)=0; - values(totalDOF-2)=0; - values(totalDOF-1)=1.0; + values(totalDOF-3)=0; + values(totalDOF-2)=0; + values(totalDOF-1)=1.0; }; }; // Boolean functions for specifying sub-domains @@ -132,14 +140,14 @@ bool diffusionMechanics:: cell_is_in_omega1_domain (const typename hp::DoFHandler::cell_iterator &cell) { - return(cell->material_id() == omega1_domain_id); + return (cell->material_id() == omega1_domain_id); } template bool diffusionMechanics:: cell_is_in_omega2_domain (const typename hp::DoFHandler::cell_iterator &cell) { - return(cell->material_id() == omega2_domain_id); + return (cell->material_id() == omega2_domain_id); } // Set active fe indices in each sub-domain @@ -151,11 +159,11 @@ diffusionMechanics::set_active_fe_indices() cell != dof_handler.end(); ++cell) { if (cell_is_in_omega1_domain(cell)) - cell->set_active_fe_index(0); + cell->set_active_fe_index(0); else if (cell_is_in_omega2_domain(cell)) - cell->set_active_fe_index(1); + cell->set_active_fe_index(1); else - Assert(false, ExcNotImplemented()); + Assert(false, ExcNotImplemented()); } } @@ -172,19 +180,26 @@ diffusionMechanics::setup_dofs() //Setup template -void diffusionMechanics::setup_system(){ +void diffusionMechanics::setup_system() +{ dof_handler.distribute_dofs (fe_collection); sparsity_pattern.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); - DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); sparsity_pattern.compress(); - U.reinit (dof_handler.n_dofs()); Un.reinit (dof_handler.n_dofs()); dU.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); U0.reinit (dof_handler.n_dofs()); + DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); + sparsity_pattern.compress(); + U.reinit (dof_handler.n_dofs()); + Un.reinit (dof_handler.n_dofs()); + dU.reinit (dof_handler.n_dofs()); + system_rhs.reinit (dof_handler.n_dofs()); + U0.reinit (dof_handler.n_dofs()); deallog << " Number of active cells: " << triangulation.n_active_cells() << std::endl; - deallog << " Number of degrees of freedom: " << dof_handler.n_dofs() << std::endl; + deallog << " Number of degrees of freedom: " << dof_handler.n_dofs() << std::endl; } //Run template -void diffusionMechanics::run (){ +void diffusionMechanics::run () +{ //subdivided_hyper std::vector repetitions(3); @@ -203,12 +218,13 @@ void diffusionMechanics::run (){ else cell->set_material_id(omega2_domain_id); setup_dofs(); - setup_system(); + setup_system(); //Initial conditions - VectorTools::interpolate(dof_handler, InitialConditions(), Un); - // VectorTools::interpolate(dof_handler, ZeroFunction(fe_collection.n_components()), Un); - U=Un; U0=Un; + VectorTools::interpolate(dof_handler, InitialConditions(), Un); + // VectorTools::interpolate(dof_handler, ZeroFunction(fe_collection.n_components()), Un); + U=Un; + U0=Un; deallog << Un.l2_norm() << std::endl; } diff --git a/tests/hp/matrices.cc b/tests/hp/matrices.cc index 1401daa177..001312a700 100644 --- a/tests/hp/matrices.cc +++ b/tests/hp/matrices.cc @@ -206,9 +206,9 @@ check () // multiply matrix by 100 to // make test more sensitive for (SparseMatrix::const_iterator p=matrix.begin(); - p!=matrix.end(); ++p) - deallog.get_file_stream() << p->value() * 100 - << std::endl; + p!=matrix.end(); ++p) + deallog.get_file_stream() << p->value() * 100 + << std::endl; }; if (dim > 1) diff --git a/tests/hp/matrices_hp.cc b/tests/hp/matrices_hp.cc index b9611a9cb3..d1b3ac74c2 100644 --- a/tests/hp/matrices_hp.cc +++ b/tests/hp/matrices_hp.cc @@ -212,9 +212,9 @@ check () // multiply matrix by 100 to // make test more sensitive for (SparseMatrix::const_iterator p=matrix.begin(); - p!=matrix.end(); ++p) - deallog.get_file_stream() << p->value() * 100 - << std::endl; + p!=matrix.end(); ++p) + deallog.get_file_stream() << p->value() * 100 + << std::endl; }; if (dim > 1) diff --git a/tests/hp/n_boundary_dofs.cc b/tests/hp/n_boundary_dofs.cc index b1363dff60..8dcb97146c 100644 --- a/tests/hp/n_boundary_dofs.cc +++ b/tests/hp/n_boundary_dofs.cc @@ -53,7 +53,7 @@ void test() unsigned int index=0; for (typename hp::DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(); + cell = dof_handler.begin_active(); cell != dof_handler.end(); ++cell, ++index) cell->set_active_fe_index (index); diff --git a/tests/hp/q_vs_dgq.cc b/tests/hp/q_vs_dgq.cc index abfdf5a161..e86136a611 100644 --- a/tests/hp/q_vs_dgq.cc +++ b/tests/hp/q_vs_dgq.cc @@ -44,7 +44,7 @@ namespace Step27 private: - Triangulation triangulation; + Triangulation triangulation; hp::DoFHandler dof_handler; hp::FECollection fe_collection; @@ -52,8 +52,8 @@ namespace Step27 template MixedFECollection::MixedFECollection () - : - dof_handler (triangulation) + : + dof_handler (triangulation) { } @@ -78,18 +78,18 @@ namespace Step27 // looping over all cells and assigning the FE_DG object to the first cell typename hp::DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + cell = dof_handler.begin_active(), + endc = dof_handler.end(); for (unsigned int counter = 0; cell!=endc; ++cell, counter ++) if (counter == 0) - { - cell->set_active_fe_index (cell->active_fe_index() + 1); - } + { + cell->set_active_fe_index (cell->active_fe_index() + 1); + } dof_handler.distribute_dofs (fe_collection); deallog << " Number of active cells: " << triangulation.n_active_cells() << std::endl - << " Number of degrees of freedom: " << dof_handler.n_dofs() << std::endl; + << " Number of degrees of freedom: " << dof_handler.n_dofs() << std::endl; } } diff --git a/tests/hp/set_dof_values_by_interpolation_03.cc b/tests/hp/set_dof_values_by_interpolation_03.cc index ee7640b268..3fa4c9265a 100644 --- a/tests/hp/set_dof_values_by_interpolation_03.cc +++ b/tests/hp/set_dof_values_by_interpolation_03.cc @@ -72,7 +72,7 @@ void test () for (unsigned int i=0; iset_dof_values_by_interpolation (local, solution, - 0); + 0); // for comparison purposes, also output the values of DoFs on all cells for (typename hp::DoFHandler::active_cell_iterator cell=dof_handler.begin_active(); @@ -82,7 +82,7 @@ void test () cell->get_dof_values (solution, x); deallog << "cell =" << cell << ": "; for (unsigned int i=0; i::active_cell_iterator cell; - hp::DoFHandler<2>::active_cell_iterator endc = dof_handler.end(); + hp::DoFHandler<2>::active_cell_iterator endc = dof_handler.end(); cell = dof_handler.begin_active(); @@ -99,11 +99,12 @@ int main() triangulation.execute_coarsening_and_refinement (); // Assign FE_Q_ to all cells cell = dof_handler.begin_active(); - for( ; cell != endc; ++cell){ - cell->set_active_fe_index(0); - } + for ( ; cell != endc; ++cell) + { + cell->set_active_fe_index(0); + } dof_handler.distribute_dofs (fe_collection); - + Vector new_solution(dof_handler.n_dofs()); solultion_trans.interpolate(solution, new_solution); diff --git a/tests/hp/solution_transfer_04.cc b/tests/hp/solution_transfer_04.cc index 6f444835dc..3d5df8a8d9 100644 --- a/tests/hp/solution_transfer_04.cc +++ b/tests/hp/solution_transfer_04.cc @@ -66,7 +66,7 @@ int main() // Assign FE to cells hp::DoFHandler<2>::active_cell_iterator cell; - hp::DoFHandler<2>::active_cell_iterator endc = dof_handler.end(); + hp::DoFHandler<2>::active_cell_iterator endc = dof_handler.end(); cell = dof_handler.begin_active(); @@ -91,7 +91,7 @@ int main() triangulation.execute_coarsening_and_refinement (); dof_handler.distribute_dofs (fe_collection); - + Vector new_solution(dof_handler.n_dofs()); solultion_trans.interpolate(solution, new_solution); diff --git a/tests/hp/solution_transfer_05.cc b/tests/hp/solution_transfer_05.cc index e97e8f88e8..7c021f0504 100644 --- a/tests/hp/solution_transfer_05.cc +++ b/tests/hp/solution_transfer_05.cc @@ -66,7 +66,7 @@ int main() // Assign FE to cells hp::DoFHandler<2>::active_cell_iterator cell; - hp::DoFHandler<2>::active_cell_iterator endc = dof_handler.end(); + hp::DoFHandler<2>::active_cell_iterator endc = dof_handler.end(); cell = dof_handler.begin_active(); @@ -91,7 +91,7 @@ int main() triangulation.execute_coarsening_and_refinement (); dof_handler.distribute_dofs (fe_collection); - + Vector new_solution(dof_handler.n_dofs()); solultion_trans.interpolate(solution, new_solution); @@ -102,7 +102,7 @@ int main() data_out2.add_data_vector (new_solution, "Solution"); data_out2.build_patches(); data_out2.write_vtu(deallog.get_file_stream()); - + // we are good if we made it to here deallog << "OK" << std::endl; } diff --git a/tests/hp/solution_transfer_10.cc b/tests/hp/solution_transfer_10.cc index 60a052c296..31e877a19d 100644 --- a/tests/hp/solution_transfer_10.cc +++ b/tests/hp/solution_transfer_10.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -46,9 +46,9 @@ int main() deallog.threshold_double(1.e-10); Triangulation<2> triangulation(Triangulation<2>::none); - GridGenerator::hyper_cube (triangulation); + GridGenerator::hyper_cube (triangulation); triangulation.refine_global(1); - + hp::FECollection<2> fe_collection; fe_collection.push_back(FE_Q<2>(1)); fe_collection.push_back(FE_Nothing<2>()); @@ -57,7 +57,7 @@ int main() // Assign FEQ to all cells hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(); - hp::DoFHandler<2>::active_cell_iterator endc = dof_handler.end(); + hp::DoFHandler<2>::active_cell_iterator endc = dof_handler.end(); @@ -65,7 +65,7 @@ int main() * ----------- * | 0 | 0 | * ----------- - * | 1 | 1 | 0 - FEQ, 1 - FE_Nothing + * | 1 | 1 | 0 - FEQ, 1 - FE_Nothing * ----------- */ @@ -88,7 +88,7 @@ int main() * ----------- * | | R | * ----------- - * | R | | + * | R | | * ----------- */ diff --git a/tests/hp/step-13.cc b/tests/hp/step-13.cc index ad71eb89a6..9993f306d6 100644 --- a/tests/hp/step-13.cc +++ b/tests/hp/step-13.cc @@ -368,10 +368,10 @@ namespace LaplaceSolver Threads::ThreadGroup<> threads; for (unsigned int thread=0; thread::assemble_matrix, *this, - linear_system, - thread_ranges[thread].first, - thread_ranges[thread].second, - mutex); + linear_system, + thread_ranges[thread].first, + thread_ranges[thread].second, + mutex); assemble_rhs (linear_system.rhs); linear_system.hanging_node_constraints.condense (linear_system.rhs); @@ -449,8 +449,8 @@ namespace LaplaceSolver = &DoFTools::make_hanging_node_constraints; Threads::Thread<> - mhnc_thread = Threads::new_thread (mhnc_p,dof_handler, - hanging_node_constraints); + mhnc_thread = Threads::new_thread (mhnc_p,dof_handler, + hanging_node_constraints); sparsity_pattern.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), diff --git a/tests/hp/step-3c.cc b/tests/hp/step-3c.cc index e991e4f5b3..57e9a8c505 100644 --- a/tests/hp/step-3c.cc +++ b/tests/hp/step-3c.cc @@ -226,8 +226,8 @@ void LaplaceProblem::solve () SolverCG<> cg (solver_control); check_solver_within_range( - cg.solve(system_matrix, solution, system_rhs, PreconditionIdentity()), - solver_control.last_step(), 629, 630); + cg.solve(system_matrix, solution, system_rhs, PreconditionIdentity()), + solver_control.last_step(), 629, 630); solution.print (deallog.get_file_stream()); diff --git a/tests/integrators/advection_01.cc b/tests/integrators/advection_01.cc index 6f9248b7f7..400bba8bcf 100644 --- a/tests/integrators/advection_01.cc +++ b/tests/integrators/advection_01.cc @@ -188,9 +188,9 @@ void test_face(const FEValuesBase &fev1, w2 = 0.; fev1.get_function_values(u1, indices1, VectorSlice > >(u1val), true); upwind_face_residual(w1, w2, fev1, fev2, - make_slice(u1val), - make_slice(nullval), - vel); + make_slice(u1val), + make_slice(nullval), + vel); M11.vmult(v1,u1); w1.add(-1., v1); M21.vmult(v2,u1); @@ -211,9 +211,9 @@ void test_face(const FEValuesBase &fev1, w2 = 0.; fev2.get_function_values(u1, indices2, VectorSlice > >(u1val), true); upwind_face_residual(w1, w2, fev1, fev2, - make_slice(nullval), - make_slice(u1val), - vel); + make_slice(nullval), + make_slice(u1val), + vel); M12.vmult(v1,u1); w1.add(-1., v1); M22.vmult(v2,u1); diff --git a/tests/integrators/assembler_simple_matrix_01.cc b/tests/integrators/assembler_simple_matrix_01.cc index 463a46deb6..92629f7b66 100644 --- a/tests/integrators/assembler_simple_matrix_01.cc +++ b/tests/integrators/assembler_simple_matrix_01.cc @@ -76,7 +76,7 @@ int main() std::vector > matrices(2); MeshWorker::Assembler::MatrixSimple > ass1; ass1.initialize(matrices[0]); - + deallog.push("Single block"); test(info1, ass1); deallog.pop(); diff --git a/tests/integrators/assembler_simple_matrix_01m.cc b/tests/integrators/assembler_simple_matrix_01m.cc index a8c551e1c8..a23422ea03 100644 --- a/tests/integrators/assembler_simple_matrix_01m.cc +++ b/tests/integrators/assembler_simple_matrix_01m.cc @@ -76,7 +76,7 @@ int main() std::vector > matrices(2); MeshWorker::Assembler::MatrixSimple > ass1; ass1.initialize(matrices); - + deallog.push("Single block"); test(info1, ass1); deallog.pop(); diff --git a/tests/integrators/assembler_simple_matrix_03m.cc b/tests/integrators/assembler_simple_matrix_03m.cc index 5e405960e2..0a71ffe0cd 100644 --- a/tests/integrators/assembler_simple_matrix_03m.cc +++ b/tests/integrators/assembler_simple_matrix_03m.cc @@ -49,8 +49,8 @@ void fill_matrices(MeshWorker::LocalResults &results, bool face) for (unsigned int i=0; i= results.n_matrices()/2) entry *= -1; + number entry = base + 10*i+j; +// if (k >= results.n_matrices()/2) entry *= -1; M(i,j) = entry; if (face) results.matrix(k, true).matrix(i,j) = entry; diff --git a/tests/integrators/assembler_simple_mgmatrix_04.cc b/tests/integrators/assembler_simple_mgmatrix_04.cc index a9df1afbd4..c85c41de8b 100644 --- a/tests/integrators/assembler_simple_mgmatrix_04.cc +++ b/tests/integrators/assembler_simple_mgmatrix_04.cc @@ -15,7 +15,7 @@ /** - * @file Test whether + * @file Test whether */ #include "../tests.h" @@ -50,10 +50,10 @@ class LaplaceMatrix : public MeshWorker::LocalIntegrator { public: LaplaceMatrix(); - virtual void cell(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const; - virtual void boundary(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const; - virtual void face(MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - MeshWorker::IntegrationInfo& info1, MeshWorker::IntegrationInfo& info2) const; + virtual void cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const; + virtual void boundary(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const; + virtual void face(MeshWorker::DoFInfo &dinfo1, MeshWorker::DoFInfo &dinfo2, + MeshWorker::IntegrationInfo &info1, MeshWorker::IntegrationInfo &info2) const; }; @@ -63,82 +63,82 @@ LaplaceMatrix::LaplaceMatrix() template -void LaplaceMatrix::cell(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const +void LaplaceMatrix::cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const { Laplace::cell_matrix(dinfo.matrix(0,false).matrix, info.fe_values()); } template -void LaplaceMatrix::boundary(MeshWorker::DoFInfo& dinfo, - typename MeshWorker::IntegrationInfo& info) const +void LaplaceMatrix::boundary(MeshWorker::DoFInfo &dinfo, + typename MeshWorker::IntegrationInfo &info) const { const unsigned int deg = info.fe_values().get_fe().tensor_degree(); Laplace::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(), - Laplace::compute_penalty(dinfo, dinfo, deg, deg)); + Laplace::compute_penalty(dinfo, dinfo, deg, deg)); } template void LaplaceMatrix::face( - MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - MeshWorker::IntegrationInfo& info1, MeshWorker::IntegrationInfo& info2) const + MeshWorker::DoFInfo &dinfo1, MeshWorker::DoFInfo &dinfo2, + MeshWorker::IntegrationInfo &info1, MeshWorker::IntegrationInfo &info2) const { if (info1.fe_values().get_fe().conforms(FiniteElementData::H1)) return; - + const unsigned int deg = info1.fe_values().get_fe().tensor_degree(); - + if (info1.fe_values().get_fe().conforms(FiniteElementData::Hdiv) && - !info1.fe_values().get_fe().conforms(FiniteElementData::Hcurl)) - Laplace::ip_tangential_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, - dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, - info1.fe_values(), info2.fe_values(), - Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); - else - Laplace::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, - dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, - info1.fe_values(), info2.fe_values(), - Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); + !info1.fe_values().get_fe().conforms(FiniteElementData::Hcurl)) + Laplace::ip_tangential_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, + dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, + info1.fe_values(), info2.fe_values(), + Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); + else + Laplace::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, + dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, + info1.fe_values(), info2.fe_values(), + Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); } template -void assemble_mg_matrix(DoFHandler& dof_handler, - MeshWorker::LocalIntegrator& matrix_integrator, mg::SparseMatrixCollection& mg) +void assemble_mg_matrix(DoFHandler &dof_handler, + MeshWorker::LocalIntegrator &matrix_integrator, mg::SparseMatrixCollection &mg) { MGConstrainedDoFs mg_constraints; mg_constraints.clear(); mg_constraints.initialize(dof_handler); - + mg.set_zero(); MappingQ1 mapping; - + MeshWorker::IntegrationInfoBox info_box; UpdateFlags update_flags = update_values | update_gradients | update_hessians; info_box.add_update_flags_all(update_flags); info_box.initialize(dof_handler.get_fe(), mapping); MeshWorker::DoFInfo dof_info(dof_handler); - + MeshWorker::Assembler::MGMatrixSimple > assembler; assembler.initialize(mg_constraints); assembler.initialize(mg.matrix); assembler.initialize_interfaces(mg.matrix_in, mg.matrix_out); assembler.initialize_fluxes(mg.matrix_up, mg.matrix_down); - + MeshWorker::integration_loop ( dof_handler.begin_mg(), dof_handler.end_mg(), dof_info, info_box, matrix_integrator, assembler); const unsigned int nlevels = dof_handler.get_tria().n_levels(); - for (unsigned int level=0;level &fe) GridGenerator::subdivided_hyper_rectangle(tr, repititions, p1, p2); tr.begin_active()->set_refine_flag(); tr.execute_coarsening_and_refinement(); - + LaplaceMatrix matrix_integrator; - + DoFHandler dof(tr); dof.distribute_dofs(fe); dof.distribute_mg_dofs(fe); @@ -166,25 +166,25 @@ void test(FiniteElement &fe) mg.reinit(dof); assemble_mg_matrix(dof, matrix_integrator, mg); - for (unsigned int level=0;level0) - { - deallog << "in" << std::endl; - mg.matrix_in[level].print_formatted(deallog.get_file_stream(), prec, false, wd, "0."); - deallog << "out" << std::endl; - mg.matrix_out[level].print_formatted(deallog.get_file_stream(), prec, false, wd, "0."); - deallog << "up" << std::endl; - mg.matrix_up[level].print_formatted(deallog.get_file_stream(), prec, false, wd, "0."); - deallog << "down" << std::endl; - mg.matrix_down[level].print_formatted(deallog.get_file_stream(), prec, false, wd, "0."); - } - } + for (unsigned int level=0; level0) + { + deallog << "in" << std::endl; + mg.matrix_in[level].print_formatted(deallog.get_file_stream(), prec, false, wd, "0."); + deallog << "out" << std::endl; + mg.matrix_out[level].print_formatted(deallog.get_file_stream(), prec, false, wd, "0."); + deallog << "up" << std::endl; + mg.matrix_up[level].print_formatted(deallog.get_file_stream(), prec, false, wd, "0."); + deallog << "down" << std::endl; + mg.matrix_down[level].print_formatted(deallog.get_file_stream(), prec, false, wd, "0."); + } + } } diff --git a/tests/integrators/cochain_01.cc b/tests/integrators/cochain_01.cc index 40018c8671..eaca795436 100644 --- a/tests/integrators/cochain_01.cc +++ b/tests/integrators/cochain_01.cc @@ -110,7 +110,7 @@ test_cochain(const Triangulation &tr, const FiniteElement &fe) sparsity.reinit(dof.block_info().global().size(), dof.block_info().global().size()); BlockDynamicSparsityPattern c_sparsity(dof.block_info().global(), - dof.block_info().global()); + dof.block_info().global()); DoFTools::make_flux_sparsity_pattern(dof, c_sparsity, constraints, false); sparsity.copy_from(c_sparsity); diff --git a/tests/integrators/mesh_worker_01.cc b/tests/integrators/mesh_worker_01.cc index 19cb86f30d..db0d281949 100644 --- a/tests/integrators/mesh_worker_01.cc +++ b/tests/integrators/mesh_worker_01.cc @@ -99,13 +99,13 @@ Local::cell(MeshWorker::DoFInfo &info, CellInfo &) const template void -Local::bdry(MeshWorker::DoFInfo & , CellInfo &) const +Local::bdry(MeshWorker::DoFInfo &, CellInfo &) const {} template void -Local::face(MeshWorker::DoFInfo & , MeshWorker::DoFInfo &, +Local::face(MeshWorker::DoFInfo &, MeshWorker::DoFInfo &, CellInfo &, CellInfo &) const {} diff --git a/tests/lac/block_linear_operator_01.cc b/tests/lac/block_linear_operator_01.cc index 00bd27e9f4..1d4d6149a4 100644 --- a/tests/lac/block_linear_operator_01.cc +++ b/tests/lac/block_linear_operator_01.cc @@ -64,14 +64,16 @@ int main() dsp.block(0, 1).reinit (n_u, n_p); dsp.block(1, 1).reinit (n_p, n_p); - for (unsigned int i = 0; i < n_u; ++i) { - for (unsigned int j = 0; j < n_u; ++j) - dsp.block(0, 0).add(i, j); - for (unsigned int j = 0; j < n_p; ++j) { - dsp.block(0, 1).add(i, j); - dsp.block(1, 0).add(j, i); + for (unsigned int i = 0; i < n_u; ++i) + { + for (unsigned int j = 0; j < n_u; ++j) + dsp.block(0, 0).add(i, j); + for (unsigned int j = 0; j < n_p; ++j) + { + dsp.block(0, 1).add(i, j); + dsp.block(1, 0).add(j, i); + } } - } for (unsigned int i = 0; i < n_p; ++i) for (unsigned int j = 0; j < n_p; ++j) dsp.block(1, 1).add(i, j); @@ -85,16 +87,16 @@ int main() // Come up with some simple, but non-trivial structure: - for(unsigned int i = 0; i < a.block(0, 0).n(); ++i) + for (unsigned int i = 0; i < a.block(0, 0).n(); ++i) a.block(0, 0).set(i, i, 10.); - for(unsigned int i = 0; i < a.block(1, 1).n(); ++i) + for (unsigned int i = 0; i < a.block(1, 1).n(); ++i) a.block(1, 1).set(i, i, 5.); - for(unsigned int i = 0; i < a.block(1, 0).m(); ++i) + for (unsigned int i = 0; i < a.block(1, 0).m(); ++i) a.block(0, 1).set(i, i, 3.); - for(unsigned int i = 0; i < a.block(0, 1).n(); ++i) + for (unsigned int i = 0; i < a.block(0, 1).n(); ++i) a.block(1, 0).set(i, i, 1.); @@ -105,17 +107,19 @@ int main() auto op_b10 = linear_operator(a.block(1, 0)); auto op_b11 = linear_operator(a.block(1, 1)); - std::array, 2> temp{op_b00, op_b01, op_b10, - op_b11}; + std::array, 2> temp {op_b00, op_b01, op_b10, + op_b11 + }; auto op_b = block_operator<2, 2, BlockVector>(temp); // vmult: BlockVector u; op_a.reinit_domain_vector(u, false); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } PRINTME("u", u); @@ -174,14 +178,17 @@ int main() // And finally complicated block structures: - std::array, 3> temp2{ - op_b00, op_b01, op_b00, op_b10, op_b11, op_b10, op_b10, op_b11, op_b10}; + std::array, 3> temp2 + { + op_b00, op_b01, op_b00, op_b10, op_b11, op_b10, op_b10, op_b11, op_b10 + }; auto op_upp_x_upu = block_operator<3, 3, BlockVector>(temp2); op_upp_x_upu.reinit_domain_vector(u, false); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } PRINTME("u", u); op_upp_x_upu.reinit_range_vector(v, false); @@ -192,18 +199,19 @@ int main() op_upp_x_upu.vmult_add(v, u); PRINTME("v", v); - std::array, 3> temp3{op_b01, op_b11, op_b11}; + std::array, 3> temp3 {op_b01, op_b11, op_b11}; auto op_upp_x_p = block_operator<3, 1, BlockVector>(temp3); - std::array, 1> temp4{op_b00, op_b01, op_b00}; + std::array, 1> temp4 {op_b00, op_b01, op_b00}; auto op_u_x_upu = block_operator<1, 3, BlockVector>(temp4); auto op_long = op_u_x_upu * transpose_operator(op_upp_x_upu) * op_upp_x_p; op_long.reinit_domain_vector(u, false); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } PRINTME("u", u); op_long.reinit_range_vector(v, false); diff --git a/tests/lac/block_linear_operator_02.cc b/tests/lac/block_linear_operator_02.cc index 56b9a614e9..deb5c0aa2f 100644 --- a/tests/lac/block_linear_operator_02.cc +++ b/tests/lac/block_linear_operator_02.cc @@ -70,11 +70,11 @@ int main() // Come up with a simple structure: - for(unsigned int i = 0; i < a.block(0, 0).m(); ++i) + for (unsigned int i = 0; i < a.block(0, 0).m(); ++i) a.block(0, 0).set(i, i, 10.); - for(unsigned int i = 0; i < a.block(1, 1).m(); ++i) + for (unsigned int i = 0; i < a.block(1, 1).m(); ++i) a.block(1, 1).set(i, i, 5.); - for(unsigned int i = 0; i < a.block(2, 2).m(); ++i) + for (unsigned int i = 0; i < a.block(2, 2).m(); ++i) a.block(2, 2).set(i, i, 3.); @@ -85,7 +85,7 @@ int main() auto op_b2 = linear_operator(a.block(2, 2)); - std::array temp{op_b0, op_b1, op_b2}; + std::array temp {op_b0, op_b1, op_b2}; auto op_b = block_diagonal_operator<3, BlockVector>(temp); @@ -93,9 +93,10 @@ int main() BlockVector u; op_a.reinit_domain_vector(u, false); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } PRINTME("u", u); @@ -156,7 +157,7 @@ int main() // And finally the other block_diagonal_operator variant: - std::array temp2{op_b0, op_b0, op_b0, op_b0, op_b0}; + std::array temp2 {op_b0, op_b0, op_b0, op_b0, op_b0}; auto op_c = block_diagonal_operator<5, BlockVector>(temp2); auto op_d = block_diagonal_operator<5, BlockVector>(op_b0); @@ -164,9 +165,10 @@ int main() { BlockVector u; op_c.reinit_domain_vector(u, false); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } PRINTME("u", u); BlockVector x; diff --git a/tests/lac/block_linear_operator_04.cc b/tests/lac/block_linear_operator_04.cc index 07cbca9e8a..18771a91ef 100644 --- a/tests/lac/block_linear_operator_04.cc +++ b/tests/lac/block_linear_operator_04.cc @@ -51,15 +51,15 @@ int main() BlockSparseMatrix a (sparsity_pattern); for (unsigned int i = 0; i < 3; ++i) - { - a.block(i,i).set(0, 0, i+i +1); - for (unsigned int j = 0; j < i; ++j) - a.block(i,j).set(0, 0, 10); - } + { + a.block(i,i).set(0, 0, i+i +1); + for (unsigned int j = 0; j < i; ++j) + a.block(i,j).set(0, 0, 10); + } BlockSparseMatrix d(sparsity_pattern); for (unsigned int i = 0; i < 3; ++i) - d.block(i,i).set(0,0, 1.0 / (i+i +1) ); + d.block(i,i).set(0,0, 1.0 / (i+i +1) ); auto op_a = linear_operator>(a); @@ -67,7 +67,7 @@ int main() auto op_b2 = block_diagonal_operator(d); auto inverse_op_a = - block_forward_substitution>(op_b1, op_b2); + block_forward_substitution>(op_b1, op_b2); auto identity = inverse_op_a * op_a; @@ -77,53 +77,53 @@ int main() deallog << " -- Matrix -- " << std::endl; op_a.reinit_domain_vector(u, false); op_a.reinit_range_vector(v, false); - for(unsigned int j = 0; j<3; ++j) - { - for(unsigned int i = 0; i<3; ++i) + for (unsigned int j = 0; j<3; ++j) { - u.block(i)[0] = 0;; - v.block(i)[0] = 0; - } - u.block(j)[0] = 1; + for (unsigned int i = 0; i<3; ++i) + { + u.block(i)[0] = 0;; + v.block(i)[0] = 0; + } + u.block(j)[0] = 1; - op_a.vmult(v, u); + op_a.vmult(v, u); - PRINTME("v", v); - } + PRINTME("v", v); + } deallog << " -- Inverse -- " << std::endl; inverse_op_a.reinit_domain_vector(u, false); inverse_op_a.reinit_range_vector(v, true); - for(unsigned int j = 0; j<3; ++j) - { - for(unsigned int i = 0; i<3; ++i) + for (unsigned int j = 0; j<3; ++j) { - u.block(i)[0] = 0; - v.block(i)[0] = 0; - } - u.block(j)[0] = 1;; + for (unsigned int i = 0; i<3; ++i) + { + u.block(i)[0] = 0; + v.block(i)[0] = 0; + } + u.block(j)[0] = 1;; - inverse_op_a.vmult(v, u); + inverse_op_a.vmult(v, u); - PRINTME("v", v); - } + PRINTME("v", v); + } deallog << " -- Identity -- " << std::endl; identity.reinit_domain_vector(u, false); identity.reinit_range_vector(v, false); - for(unsigned int j = 0; j<3; ++j) - { - for(unsigned int i = 0; i<3; ++i) + for (unsigned int j = 0; j<3; ++j) { - u.block(i)[0] = 0;; - v.block(i)[0] = 0; - } - u.block(j)[0] = 1;; + for (unsigned int i = 0; i<3; ++i) + { + u.block(i)[0] = 0;; + v.block(i)[0] = 0; + } + u.block(j)[0] = 1;; - identity.vmult(v, u); + identity.vmult(v, u); - PRINTME("v", v); - } + PRINTME("v", v); + } } @@ -140,11 +140,11 @@ int main() BlockSparseMatrix a (sparsity_pattern); for (unsigned int i = 0; i < 3; ++i) - { - a.block(i,i).set(0, 0, i+i +1); - for (unsigned int j = i+1; j < 3; ++j) - a.block(i,j).set(0, 0, 10); - } + { + a.block(i,i).set(0, 0, i+i +1); + for (unsigned int j = i+1; j < 3; ++j) + a.block(i,j).set(0, 0, 10); + } BlockSparseMatrix d(sparsity_pattern); for (unsigned int i = 0; i < 3; ++i) @@ -156,7 +156,7 @@ int main() auto op_b2 = block_diagonal_operator(d); auto inverse_op_a = - block_back_substitution>(op_b1, op_b2); + block_back_substitution>(op_b1, op_b2); auto identity = inverse_op_a * op_a; @@ -166,52 +166,52 @@ int main() deallog << " -- Matrix -- " << std::endl; op_a.reinit_domain_vector(u, false); op_a.reinit_range_vector(v, false); - for(unsigned int j = 0; j<3; ++j) - { - for(unsigned int i = 0; i<3; ++i) + for (unsigned int j = 0; j<3; ++j) { - u.block(i)[0] = 0;; - v.block(i)[0] = 0; - } - u.block(j)[0] = 1; + for (unsigned int i = 0; i<3; ++i) + { + u.block(i)[0] = 0;; + v.block(i)[0] = 0; + } + u.block(j)[0] = 1; - op_a.vmult(v, u); + op_a.vmult(v, u); - PRINTME("v", v); - } + PRINTME("v", v); + } deallog << " -- Inverse -- " << std::endl; inverse_op_a.reinit_domain_vector(u, false); inverse_op_a.reinit_range_vector(v, true); - for(unsigned int j = 0; j<3; ++j) - { - for(unsigned int i = 0; i<3; ++i) + for (unsigned int j = 0; j<3; ++j) { - u.block(i)[0] = 0; - v.block(i)[0] = 0; - } - u.block(j)[0] = 1;; + for (unsigned int i = 0; i<3; ++i) + { + u.block(i)[0] = 0; + v.block(i)[0] = 0; + } + u.block(j)[0] = 1;; - inverse_op_a.vmult(v, u); + inverse_op_a.vmult(v, u); - PRINTME("v", v); - } + PRINTME("v", v); + } deallog << " -- Identity -- " << std::endl; identity.reinit_domain_vector(u, false); identity.reinit_range_vector(v, false); - for(unsigned int j = 0; j<3; ++j) - { - for(unsigned int i = 0; i<3; ++i) + for (unsigned int j = 0; j<3; ++j) { - u.block(i)[0] = 0;; - v.block(i)[0] = 0; - } - u.block(j)[0] = 1;; + for (unsigned int i = 0; i<3; ++i) + { + u.block(i)[0] = 0;; + v.block(i)[0] = 0; + } + u.block(j)[0] = 1;; - identity.vmult(v, u); + identity.vmult(v, u); - PRINTME("v", v); - } + PRINTME("v", v); + } } } diff --git a/tests/lac/block_matrices_02.cc b/tests/lac/block_matrices_02.cc index 757a56fa5e..5a3725de01 100644 --- a/tests/lac/block_matrices_02.cc +++ b/tests/lac/block_matrices_02.cc @@ -36,7 +36,7 @@ void do_set (const bool even_or_odd, - BlockSparseMatrix &bsm) + BlockSparseMatrix &bsm) { BlockSparseMatrix::size_type col_indices[5]; for (unsigned int i=0; i<5 ; ++i) diff --git a/tests/lac/block_matrices_03.cc b/tests/lac/block_matrices_03.cc index 9a56ef3a30..a43afce8fc 100644 --- a/tests/lac/block_matrices_03.cc +++ b/tests/lac/block_matrices_03.cc @@ -36,7 +36,7 @@ void do_add (const bool even_or_odd, - BlockSparseMatrix &bsm) + BlockSparseMatrix &bsm) { BlockSparseMatrix::size_type col_indices[5]; for (unsigned int i=0; i<5 ; ++i) @@ -90,7 +90,7 @@ void test () // divide whole matrix by 100 to get back to the effect of a single set bsm /= 100; - + bsm.print_formatted (deallog.get_file_stream()); } diff --git a/tests/lac/constraints_02.cc b/tests/lac/constraints_02.cc index c478fae411..60e5f9f6ce 100644 --- a/tests/lac/constraints_02.cc +++ b/tests/lac/constraints_02.cc @@ -27,7 +27,7 @@ void test() constraints.add_line(1); constraints.add_entry(1,2,1.); constraints.add_entry(1,3,1.); - + constraints.add_line(3); constraints.add_entry(3,4,1.); constraints.add_entry(3,5,1.); @@ -42,7 +42,7 @@ void test() indices[1] = 2; indices[2] = 3; indices[3] = 5; - + constraints.resolve_indices(indices); for (unsigned int i=0; i - struct Vectorization_add_v +struct Vectorization_add_v { Number *val; Number *v_val; @@ -37,8 +37,8 @@ template void operator() (const tbb::blocked_range &range) const { if (dealii::parallel::internal::EnableOpenMPSimdFor::value) - { - DEAL_II_OPENMP_SIMD_PRAGMA + { + DEAL_II_OPENMP_SIMD_PRAGMA for (size_type i=range.begin(); i for (size_type i=range.begin(); i vector_add; vector_add.val = &d1[0]; vector_add.v_val = &d2[0]; - + if (1) { //fails: tbb::parallel_for (tbb::blocked_range (0, - N, - 2), - vector_add, - tbb::auto_partitioner()); + N, + 2), + vector_add, + tbb::auto_partitioner()); } else { diff --git a/tests/lac/linear_operator_01.cc b/tests/lac/linear_operator_01.cc index 0f4f99385c..3df7c57d40 100644 --- a/tests/lac/linear_operator_01.cc +++ b/tests/lac/linear_operator_01.cc @@ -31,22 +31,22 @@ struct LeftVector typedef double value_type; value_type value; - LeftVector & operator = (value_type new_value) + LeftVector &operator = (value_type new_value) { value = new_value; return *this; } - LeftVector & operator *= (value_type scale) + LeftVector &operator *= (value_type scale) { value *= scale; return *this; } - LeftVector & operator /= (value_type scale) + LeftVector &operator /= (value_type scale) { value /= scale; return *this; } - LeftVector & operator += (const LeftVector &u) + LeftVector &operator += (const LeftVector &u) { value += u.value; return *this; @@ -66,22 +66,22 @@ struct RightVector typedef double value_type; value_type value; - RightVector & operator = (value_type new_value) + RightVector &operator = (value_type new_value) { value = new_value; return *this; } - RightVector & operator *= (value_type scale) + RightVector &operator *= (value_type scale) { value *= scale; return *this; } - RightVector & operator /= (value_type scale) + RightVector &operator /= (value_type scale) { value /= scale; return *this; } - RightVector & operator += (const RightVector &u) + RightVector &operator += (const RightVector &u) { value += u.value; return *this; diff --git a/tests/lac/linear_operator_01a.cc b/tests/lac/linear_operator_01a.cc index e1511c96e3..b51d8a099e 100644 --- a/tests/lac/linear_operator_01a.cc +++ b/tests/lac/linear_operator_01a.cc @@ -34,22 +34,22 @@ struct LeftVector typedef std::complex value_type; value_type value; - LeftVector & operator = (value_type new_value) + LeftVector &operator = (value_type new_value) { value = new_value; return *this; } - LeftVector & operator *= (value_type scale) + LeftVector &operator *= (value_type scale) { value *= scale; return *this; } - LeftVector & operator /= (value_type scale) + LeftVector &operator /= (value_type scale) { value /= scale; return *this; } - LeftVector & operator += (const LeftVector &u) + LeftVector &operator += (const LeftVector &u) { value += u.value; return *this; @@ -69,22 +69,22 @@ struct RightVector typedef std::complex value_type; value_type value; - RightVector & operator = (value_type new_value) + RightVector &operator = (value_type new_value) { value = new_value; return *this; } - RightVector & operator *= (value_type scale) + RightVector &operator *= (value_type scale) { value *= scale; return *this; } - RightVector & operator /= (value_type scale) + RightVector &operator /= (value_type scale) { value /= scale; return *this; } - RightVector & operator += (const RightVector &u) + RightVector &operator += (const RightVector &u) { value += u.value; return *this; diff --git a/tests/lac/linear_operator_02.cc b/tests/lac/linear_operator_02.cc index be5d0cd494..b22b1c55d3 100644 --- a/tests/lac/linear_operator_02.cc +++ b/tests/lac/linear_operator_02.cc @@ -83,9 +83,10 @@ int main() Vector u; op_a.reinit_domain_vector(u, true); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } deallog << "u: " << u << std::endl; diff --git a/tests/lac/linear_operator_02a.cc b/tests/lac/linear_operator_02a.cc index 4cbfbc6a87..b6d6a1c63e 100644 --- a/tests/lac/linear_operator_02a.cc +++ b/tests/lac/linear_operator_02a.cc @@ -89,9 +89,10 @@ int main() Vector> u; op_a.reinit_domain_vector(u, true); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (std::complex)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (std::complex)(i+1); + } deallog << "u: " << u << std::endl; diff --git a/tests/lac/linear_operator_03.cc b/tests/lac/linear_operator_03.cc index 3fd25df0f3..39ece04d5b 100644 --- a/tests/lac/linear_operator_03.cc +++ b/tests/lac/linear_operator_03.cc @@ -40,7 +40,7 @@ #define PRINTME(name, var) \ deallog << name << ": [block 0] " << var.block(0) \ - << " [block 1] " << var.block(1) << std::endl; + << " [block 1] " << var.block(1) << std::endl; using namespace dealii; @@ -82,11 +82,11 @@ int main() BlockSparseMatrix a (sparsity_pattern); BlockSparseMatrix b (sparsity_pattern); - for(unsigned int i = 0; i < a.n(); ++i) - { - a.set(i, i, 1.); - b.set(i, i, 5.); - } + for (unsigned int i = 0; i < a.n(); ++i) + { + a.set(i, i, 1.); + b.set(i, i, 5.); + } // Constructors and assignment: @@ -103,9 +103,10 @@ int main() BlockVector u; op_a.reinit_domain_vector(u, true); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } PRINTME("u", u); diff --git a/tests/lac/linear_operator_05.cc b/tests/lac/linear_operator_05.cc index 62346a5352..67ecd37134 100644 --- a/tests/lac/linear_operator_05.cc +++ b/tests/lac/linear_operator_05.cc @@ -24,8 +24,14 @@ class MyMatrix1 { public: - size_t m() const { return 1; }; - size_t n() const { return 1; }; + size_t m() const + { + return 1; + }; + size_t n() const + { + return 1; + }; void vmult(Vector &, const Vector &) const { @@ -42,8 +48,14 @@ public: class MyMatrix2 { public: - size_t m() const { return 1; }; - size_t n() const { return 1; }; + size_t m() const + { + return 1; + }; + size_t n() const + { + return 1; + }; void vmult(Vector &, const Vector &) const { @@ -69,8 +81,14 @@ public: class MyMatrix3 { public: - size_t m() const { return 1; }; - size_t n() const { return 1; }; + size_t m() const + { + return 1; + }; + size_t n() const + { + return 1; + }; template void vmult(OutVector &, const InVector &) const @@ -100,8 +118,14 @@ public: class MyMatrix4 { public: - size_t m() const { return 1; }; - size_t n() const { return 1; }; + size_t m() const + { + return 1; + }; + size_t n() const + { + return 1; + }; template void vmult(OutVector &, const InVector &, bool = true) const @@ -131,8 +155,14 @@ public: class MyMatrix5 { public: - size_t m() const { return 1; }; - size_t n() const { return 1; }; + size_t m() const + { + return 1; + }; + size_t n() const + { + return 1; + }; template void vmult(Vector &, const Vector &, bool = true) const @@ -162,8 +192,14 @@ public: class MyMatrix6 { public: - size_t m() const { return 1; }; - size_t n() const { return 1; }; + size_t m() const + { + return 1; + }; + size_t n() const + { + return 1; + }; template void vmult(Vector &, const Vector &, bool = true) const diff --git a/tests/lac/matrices_02.cc b/tests/lac/matrices_02.cc index 02f2c8c4ff..9573117308 100644 --- a/tests/lac/matrices_02.cc +++ b/tests/lac/matrices_02.cc @@ -197,9 +197,9 @@ check () // multiply matrix by 100 to // make test more sensitive for (SparseMatrix::const_iterator p=matrix.begin(); - p!=matrix.end(); ++p) - deallog.get_file_stream() << p->value() * 100 - << std::endl; + p!=matrix.end(); ++p) + deallog.get_file_stream() << p->value() * 100 + << std::endl; }; if (dim > 1) diff --git a/tests/lac/matrix_out_02.cc b/tests/lac/matrix_out_02.cc index 8a33aaa15f..9036334d93 100644 --- a/tests/lac/matrix_out_02.cc +++ b/tests/lac/matrix_out_02.cc @@ -52,7 +52,7 @@ int main (int argc, char **argv) for (unsigned int i=0; i<4; ++i) for (unsigned int j=0; j<8; ++j) if (i==j+1) - sparse_matrix.set(i,j, i+3*j); + sparse_matrix.set(i,j, i+3*j); MatrixOut matrix_out; matrix_out.build_patches (sparse_matrix, "sparse_matrix", diff --git a/tests/lac/matrix_out_03.cc b/tests/lac/matrix_out_03.cc index afbd8201c2..972a3131e9 100644 --- a/tests/lac/matrix_out_03.cc +++ b/tests/lac/matrix_out_03.cc @@ -50,7 +50,7 @@ int main (int argc, char **argv) for (unsigned int i=0; i<4; ++i) for (unsigned int j=0; j<8; ++j) if (i==j+1) - sparse_matrix.set(i,j, i+3*j); + sparse_matrix.set(i,j, i+3*j); sparse_matrix.compress(VectorOperation::insert); MatrixOut matrix_out; diff --git a/tests/lac/packaged_operation_01.cc b/tests/lac/packaged_operation_01.cc index 9acbc29b52..596ac14c0d 100644 --- a/tests/lac/packaged_operation_01.cc +++ b/tests/lac/packaged_operation_01.cc @@ -50,9 +50,10 @@ int main() // Tests: Vector u(25); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } deallog << "u: " << u << std::endl; diff --git a/tests/lac/packaged_operation_01a.cc b/tests/lac/packaged_operation_01a.cc index e5f54c44a2..97bd9dfdde 100644 --- a/tests/lac/packaged_operation_01a.cc +++ b/tests/lac/packaged_operation_01a.cc @@ -52,9 +52,10 @@ int main() // Tests: Vector> u(25); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } deallog << "u: " << u << std::endl; diff --git a/tests/lac/packaged_operation_02.cc b/tests/lac/packaged_operation_02.cc index 070fa4e4e9..b062df4565 100644 --- a/tests/lac/packaged_operation_02.cc +++ b/tests/lac/packaged_operation_02.cc @@ -95,9 +95,10 @@ int main() Vector u; M.reinit_domain_vector(u, true); - for (unsigned int i = 0; i < u.size(); ++i) { - u[i] = (double)(i+1); - } + for (unsigned int i = 0; i < u.size(); ++i) + { + u[i] = (double)(i+1); + } deallog << "u: " << u << std::endl; diff --git a/tests/lac/pointer_matrix_01.cc b/tests/lac/pointer_matrix_01.cc index e0eb50a2f4..90d4a8726f 100644 --- a/tests/lac/pointer_matrix_01.cc +++ b/tests/lac/pointer_matrix_01.cc @@ -22,13 +22,13 @@ #include template - void - checkConstructor1() - { - deallog << "Init with empty matrix" << std::endl; - PointerMatrix, Vector > P; - deallog << "Is matrix empty:" << P.empty() << std::endl; - } +void +checkConstructor1() +{ + deallog << "Init with empty matrix" << std::endl; + PointerMatrix, Vector > P; + deallog << "Is matrix empty:" << P.empty() << std::endl; +} int main() diff --git a/tests/lac/pointer_matrix_02.cc b/tests/lac/pointer_matrix_02.cc index 1eccb7ad9d..864527bfa7 100644 --- a/tests/lac/pointer_matrix_02.cc +++ b/tests/lac/pointer_matrix_02.cc @@ -22,13 +22,13 @@ #include template - void - checkConstructor2(FullMatrix &A) - { - deallog << "Init with matrix A" << std::endl; - PointerMatrix, Vector > P(&A); - deallog << "Is matrix empty:" << P.empty() << std::endl; - } +void +checkConstructor2(FullMatrix &A) +{ + deallog << "Init with matrix A" << std::endl; + PointerMatrix, Vector > P(&A); + deallog << "Is matrix empty:" << P.empty() << std::endl; +} int main() @@ -42,7 +42,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); A.fill(Adata); diff --git a/tests/lac/pointer_matrix_03.cc b/tests/lac/pointer_matrix_03.cc index 645a666109..374201b4c2 100644 --- a/tests/lac/pointer_matrix_03.cc +++ b/tests/lac/pointer_matrix_03.cc @@ -22,13 +22,13 @@ #include template - void - checkConstructor3(char *name) - { - deallog << "Init with matrix name" << std::endl; - PointerMatrix, Vector > P(name); - deallog << "Is matrix empty:" << P.empty() << std::endl; - } +void +checkConstructor3(char *name) +{ + deallog << "Init with matrix name" << std::endl; + PointerMatrix, Vector > P(name); + deallog << "Is matrix empty:" << P.empty() << std::endl; +} int main() diff --git a/tests/lac/pointer_matrix_04.cc b/tests/lac/pointer_matrix_04.cc index 307b06b2e0..ff36b9e529 100644 --- a/tests/lac/pointer_matrix_04.cc +++ b/tests/lac/pointer_matrix_04.cc @@ -22,13 +22,13 @@ #include template - void - checkConstructor4(const FullMatrix &A, char *name) - { - deallog << "Init with matrix name and matrix" << std::endl; - PointerMatrix, Vector > P(&A, name); - deallog << "Is matrix empty:" << P.empty() << std::endl; - } +void +checkConstructor4(const FullMatrix &A, char *name) +{ + deallog << "Init with matrix name and matrix" << std::endl; + PointerMatrix, Vector > P(&A, name); + deallog << "Is matrix empty:" << P.empty() << std::endl; +} int main() @@ -42,7 +42,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); A.fill(Adata); diff --git a/tests/lac/pointer_matrix_05.cc b/tests/lac/pointer_matrix_05.cc index 5aaa8e1779..0c1cbcdaa6 100644 --- a/tests/lac/pointer_matrix_05.cc +++ b/tests/lac/pointer_matrix_05.cc @@ -22,31 +22,31 @@ #include template - void - checkVmult(FullMatrix &A, Vector &V, char *name = - "Test Matrix") - { - deallog << "vmult" << std::endl; +void +checkVmult(FullMatrix &A, Vector &V, char *name = + "Test Matrix") +{ + deallog << "vmult" << std::endl; - PointerMatrix, Vector > P(&A, name); - Vector O(A.m()); - P.vmult(O, V); + PointerMatrix, Vector > P(&A, name); + Vector O(A.m()); + P.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=A*V - Vector O_(A.m()); - A.vmult(O_, V); + // Verifying results with Method 2: O=A*V + Vector O_(A.m()); + A.vmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -60,7 +60,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); A.fill(Adata); diff --git a/tests/lac/pointer_matrix_06.cc b/tests/lac/pointer_matrix_06.cc index f40de6a550..67105ba892 100644 --- a/tests/lac/pointer_matrix_06.cc +++ b/tests/lac/pointer_matrix_06.cc @@ -22,31 +22,31 @@ #include template - void - checkTvmult(FullMatrix &A, Vector &V, char *name = - "Test Matrix") - { - deallog << "Tvmult" << std::endl; +void +checkTvmult(FullMatrix &A, Vector &V, char *name = + "Test Matrix") +{ + deallog << "Tvmult" << std::endl; - PointerMatrix, Vector > P(&A, name); - Vector O(A.m()); - P.Tvmult(O, V); + PointerMatrix, Vector > P(&A, name); + Vector O(A.m()); + P.Tvmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=A Transpose*V - Vector O_(A.m()); - A.Tvmult(O_, V); + // Verifying results with Method 2: O=A Transpose*V + Vector O_(A.m()); + A.Tvmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -60,7 +60,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); A.fill(Adata); diff --git a/tests/lac/pointer_matrix_07.cc b/tests/lac/pointer_matrix_07.cc index 2bc7a9c84b..a18f65329d 100644 --- a/tests/lac/pointer_matrix_07.cc +++ b/tests/lac/pointer_matrix_07.cc @@ -22,40 +22,40 @@ #include template - void - checkTvmult_add(FullMatrix &A, Vector &V, char *name = - "Test Matrix") - { - deallog << "Tvmult_add" << std::endl; +void +checkTvmult_add(FullMatrix &A, Vector &V, char *name = + "Test Matrix") +{ + deallog << "Tvmult_add" << std::endl; - PointerMatrix, Vector > P(&A, name); + PointerMatrix, Vector > P(&A, name); - deallog << "Result vector set to all ones and to be added with result" - << std::endl; - Vector O(V.size()); - for (unsigned int i = 0; i < O.size(); ++i) - O(i) = 1; + deallog << "Result vector set to all ones and to be added with result" + << std::endl; + Vector O(V.size()); + for (unsigned int i = 0; i < O.size(); ++i) + O(i) = 1; - P.Tvmult_add(O, V); + P.Tvmult_add(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=O+A Transpose*V - Vector O_(V.size()); - for (unsigned int i = 0; i < O_.size(); ++i) - O_(i) = 1; + // Verifying results with Method 2: O=O+A Transpose*V + Vector O_(V.size()); + for (unsigned int i = 0; i < O_.size(); ++i) + O_(i) = 1; - A.Tvmult_add(O_, V); + A.Tvmult_add(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -69,7 +69,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); A.fill(Adata); diff --git a/tests/lac/pointer_matrix_08.cc b/tests/lac/pointer_matrix_08.cc index 22c02ce6ca..47f5dd8092 100644 --- a/tests/lac/pointer_matrix_08.cc +++ b/tests/lac/pointer_matrix_08.cc @@ -22,40 +22,40 @@ #include template - void - checkVmult_add(FullMatrix &A, Vector &V, char *name = - "Test Matrix") - { - deallog << "vmult_add" << std::endl; +void +checkVmult_add(FullMatrix &A, Vector &V, char *name = + "Test Matrix") +{ + deallog << "vmult_add" << std::endl; - PointerMatrix, Vector > P(&A, name); + PointerMatrix, Vector > P(&A, name); - deallog << "Result vector set to all ones and to be added with result" - << std::endl; - Vector O(V.size()); - for (unsigned int i = 0; i < O.size(); ++i) - O(i) = 1; + deallog << "Result vector set to all ones and to be added with result" + << std::endl; + Vector O(V.size()); + for (unsigned int i = 0; i < O.size(); ++i) + O(i) = 1; - P.vmult_add(O, V); + P.vmult_add(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=O+A*V - Vector O_(V.size()); - for (unsigned int i = 0; i < O_.size(); ++i) - O_(i) = 1; + // Verifying results with Method 2: O=O+A*V + Vector O_(V.size()); + for (unsigned int i = 0; i < O_.size(); ++i) + O_(i) = 1; - A.vmult_add(O_, V); + A.vmult_add(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -69,7 +69,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); A.fill(Adata); diff --git a/tests/lac/pointer_matrix_09.cc b/tests/lac/pointer_matrix_09.cc index 43141d23e5..021ef8b1e8 100644 --- a/tests/lac/pointer_matrix_09.cc +++ b/tests/lac/pointer_matrix_09.cc @@ -22,42 +22,42 @@ #include template - void - checkClear(FullMatrix &A) - { - deallog << "clear" << std::endl; - deallog << "Init with matrix 1" << std::endl; +void +checkClear(FullMatrix &A) +{ + deallog << "clear" << std::endl; + deallog << "Init with matrix 1" << std::endl; - PointerMatrix, Vector > P(&A); + PointerMatrix, Vector > P(&A); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(A.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(A.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; - Vector O(A.m()); - P.vmult(O, V); + Vector O(A.m()); + P.vmult(O, V); - // Check the dimensions of the result vector - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result vector + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=A*V - Vector O_(A.m()); - A.vmult(O_, V); + // Verifying results with Method 2: O=A*V + Vector O_(A.m()); + A.vmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; - deallog << "Clearing pointer matrix" << std::endl; - P.clear(); + deallog << "Clearing pointer matrix" << std::endl; + P.clear(); - deallog << "Is matrix empty:" << P.empty() << std::endl; - } + deallog << "Is matrix empty:" << P.empty() << std::endl; +} int main() @@ -71,7 +71,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); A.fill(Adata); diff --git a/tests/lac/pointer_matrix_10.cc b/tests/lac/pointer_matrix_10.cc index f9070fda42..bd327e20c0 100644 --- a/tests/lac/pointer_matrix_10.cc +++ b/tests/lac/pointer_matrix_10.cc @@ -22,69 +22,69 @@ #include template - void - checkAssign(FullMatrix &A, FullMatrix &B) - { - deallog << "=" << std::endl; - deallog << "Init with matrix 1" << std::endl; +void +checkAssign(FullMatrix &A, FullMatrix &B) +{ + deallog << "=" << std::endl; + deallog << "Init with matrix 1" << std::endl; - PointerMatrix, Vector > P(&A); + PointerMatrix, Vector > P(&A); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(A.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(A.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; - Vector O(A.m()); - P.vmult(O, V); + Vector O(A.m()); + P.vmult(O, V); - // Check the dimensions of the result vector - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result vector + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=A*V - Vector O_(A.m()); - A.vmult(O_, V); + // Verifying results with Method 2: O=A*V + Vector O_(A.m()); + A.vmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; - deallog << "Clearing pointer matrix" << std::endl; - P.clear(); + deallog << "Clearing pointer matrix" << std::endl; + P.clear(); - deallog << "Is matrix empty:" << P.empty() << std::endl; + deallog << "Is matrix empty:" << P.empty() << std::endl; - deallog << "Assigning pointer matrix to matrix 2" << std::endl; + deallog << "Assigning pointer matrix to matrix 2" << std::endl; - P = &B; + P = &B; - deallog << "Multiplying with all ones vector" << std::endl; - Vector V_(B.n()); - for (unsigned int i = 0; i < V_.size(); ++i) - V_(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector V_(B.n()); + for (unsigned int i = 0; i < V_.size(); ++i) + V_(i) = 1; - Vector OU(B.m()); - P.vmult(OU, V_); + Vector OU(B.m()); + P.vmult(OU, V_); - // Check the dimensions of the result vector - Assert(B.m() == OU.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result vector + Assert(B.m() == OU.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=B*V - Vector OU_(B.m()); - B.vmult(OU_, V_); + // Verifying results with Method 2: O=B*V + Vector OU_(B.m()); + B.vmult(OU_, V_); - Assert(OU == OU_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(OU == OU_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < OU.size(); ++i) - deallog << OU(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < OU.size(); ++i) + deallog << OU(i) << '\t'; + deallog << std::endl; +} int main() @@ -98,10 +98,10 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; FullMatrix A(2, 2); A.fill(Adata); diff --git a/tests/lac/precondition_chebyshev_01.cc b/tests/lac/precondition_chebyshev_01.cc index 9bb8d72a4c..9e15fc8eea 100644 --- a/tests/lac/precondition_chebyshev_01.cc +++ b/tests/lac/precondition_chebyshev_01.cc @@ -58,7 +58,7 @@ check() PreconditionChebyshev > prec; PreconditionChebyshev >::AdditionalData - data; + data; data.smoothing_range = 2 * size; data.degree = 3; prec.initialize(m, data); diff --git a/tests/lac/product_matrix_01.cc b/tests/lac/product_matrix_01.cc index 243fe922fb..72754fded3 100644 --- a/tests/lac/product_matrix_01.cc +++ b/tests/lac/product_matrix_01.cc @@ -26,41 +26,41 @@ #include template - void - checkConstructor1(FullMatrix &A, FullMatrix &B) - { - deallog << "Init with empty constructor" << std::endl; - GrowingVectorMemory < Vector > mem; - ProductMatrix < Vector > P; - P.initialize(A, B, mem); +void +checkConstructor1(FullMatrix &A, FullMatrix &B) +{ + deallog << "Init with empty constructor" << std::endl; + GrowingVectorMemory < Vector > mem; + ProductMatrix < Vector > P; + P.initialize(A, B, mem); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(B.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(B.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; - Vector O(A.m()); + Vector O(A.m()); - P.vmult(O, V); + P.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=(A*B)*V - FullMatrix AB_Product(A.m(), B.n()); - Vector O_(A.m()); + // Verifying results with Method 2: O=(A*B)*V + FullMatrix AB_Product(A.m(), B.n()); + Vector O_(A.m()); - A.mmult(AB_Product, B, false); - AB_Product.vmult(O_, V); + A.mmult(AB_Product, B, false); + AB_Product.vmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -73,10 +73,10 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 0, 1, 2, 3 }; + { 0, 1, 2, 3 }; FullMatrix A(2, 2); FullMatrix B(2, 2); diff --git a/tests/lac/product_matrix_02.cc b/tests/lac/product_matrix_02.cc index 3e92bee87f..be0226beee 100644 --- a/tests/lac/product_matrix_02.cc +++ b/tests/lac/product_matrix_02.cc @@ -26,40 +26,40 @@ #include template - void - checkConstructor2(FullMatrix &A, FullMatrix &B) - { - deallog << "Init with vector memory. Delayed reinit" << std::endl; - GrowingVectorMemory < Vector > mem; - ProductMatrix < Vector > P(mem); - P.reinit(A, B); +void +checkConstructor2(FullMatrix &A, FullMatrix &B) +{ + deallog << "Init with vector memory. Delayed reinit" << std::endl; + GrowingVectorMemory < Vector > mem; + ProductMatrix < Vector > P(mem); + P.reinit(A, B); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(B.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; - Vector O(A.m()); + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(B.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; + Vector O(A.m()); - P.vmult(O, V); + P.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=(A*B)*V - FullMatrix AB_Product(A.m(), B.n()); - Vector O_(A.m()); + // Verifying results with Method 2: O=(A*B)*V + FullMatrix AB_Product(A.m(), B.n()); + Vector O_(A.m()); - A.mmult(AB_Product, B, false); - AB_Product.vmult(O_, V); + A.mmult(AB_Product, B, false); + AB_Product.vmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -72,10 +72,10 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 0, 1, 2, 3 }; + { 0, 1, 2, 3 }; FullMatrix A(2, 2); FullMatrix B(2, 2); diff --git a/tests/lac/product_matrix_03.cc b/tests/lac/product_matrix_03.cc index 3aa734e7f3..05f2565526 100644 --- a/tests/lac/product_matrix_03.cc +++ b/tests/lac/product_matrix_03.cc @@ -26,39 +26,39 @@ #include template - void - checkConstructor3(FullMatrix &A, FullMatrix &B) - { - deallog << "Init with vector memory, matrix 1 and matrix 2" << std::endl; - GrowingVectorMemory < Vector > mem; - ProductMatrix < Vector > P(A, B, mem); +void +checkConstructor3(FullMatrix &A, FullMatrix &B) +{ + deallog << "Init with vector memory, matrix 1 and matrix 2" << std::endl; + GrowingVectorMemory < Vector > mem; + ProductMatrix < Vector > P(A, B, mem); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(B.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; - Vector O(A.m()); + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(B.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; + Vector O(A.m()); - P.vmult(O, V); + P.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=(A*B)*V - FullMatrix AB_Product(A.m(), B.n()); - Vector O_(A.m()); + // Verifying results with Method 2: O=(A*B)*V + FullMatrix AB_Product(A.m(), B.n()); + Vector O_(A.m()); - A.mmult(AB_Product, B, false); - AB_Product.vmult(O_, V); + A.mmult(AB_Product, B, false); + AB_Product.vmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -71,10 +71,10 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 0, 1, 2, 3 }; + { 0, 1, 2, 3 }; FullMatrix A(2, 2); FullMatrix B(2, 2); diff --git a/tests/lac/product_matrix_04.cc b/tests/lac/product_matrix_04.cc index ea1f9fbf87..1059c4367b 100644 --- a/tests/lac/product_matrix_04.cc +++ b/tests/lac/product_matrix_04.cc @@ -26,36 +26,36 @@ #include template - void - checkVmult(FullMatrix &A, FullMatrix &B, Vector &V) - { - deallog << "vmult" << std::endl; +void +checkVmult(FullMatrix &A, FullMatrix &B, Vector &V) +{ + deallog << "vmult" << std::endl; - GrowingVectorMemory < Vector > mem; - ProductMatrix < Vector > P(A, B, mem); + GrowingVectorMemory < Vector > mem; + ProductMatrix < Vector > P(A, B, mem); - Vector O(A.m()); + Vector O(A.m()); - P.vmult(O, V); + P.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=(A*B)*V - FullMatrix AB_Product(A.m(), B.n()); - Vector O_(A.m()); + // Verifying results with Method 2: O=(A*B)*V + FullMatrix AB_Product(A.m(), B.n()); + Vector O_(A.m()); - A.mmult(AB_Product, B, false); - AB_Product.vmult(O_, V); + A.mmult(AB_Product, B, false); + AB_Product.vmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -68,10 +68,10 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 0, 1, 2, 3 }; + { 0, 1, 2, 3 }; FullMatrix A(2, 2); FullMatrix B(2, 2); diff --git a/tests/lac/product_matrix_05.cc b/tests/lac/product_matrix_05.cc index 944a0df087..810a13c960 100644 --- a/tests/lac/product_matrix_05.cc +++ b/tests/lac/product_matrix_05.cc @@ -26,43 +26,43 @@ #include template - void - checkVmult_add(FullMatrix &A, FullMatrix &B, - Vector &V) - { - deallog << "vmult_add" << std::endl; - GrowingVectorMemory < Vector > mem; - ProductMatrix < Vector > P(A, B, mem); - - deallog - << "Result vector set to all ones and to be added with product result vector" - << std::endl; - Vector O(V.size()); - for (unsigned int i = 0; i < O.size(); ++i) - O(i) = 1; - - P.vmult_add(O, V); - - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; - - // Verifying results with Method 2: O=(A*B)*V - FullMatrix AB_Product(A.m(), B.n()); - Vector O_(A.m()); - for (unsigned int i = 0; i < O_.size(); ++i) - O_(i) = 1; - - A.mmult(AB_Product, B, false); - AB_Product.vmult_add(O_, V); - - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; - - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } +void +checkVmult_add(FullMatrix &A, FullMatrix &B, + Vector &V) +{ + deallog << "vmult_add" << std::endl; + GrowingVectorMemory < Vector > mem; + ProductMatrix < Vector > P(A, B, mem); + + deallog + << "Result vector set to all ones and to be added with product result vector" + << std::endl; + Vector O(V.size()); + for (unsigned int i = 0; i < O.size(); ++i) + O(i) = 1; + + P.vmult_add(O, V); + + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; + + // Verifying results with Method 2: O=(A*B)*V + FullMatrix AB_Product(A.m(), B.n()); + Vector O_(A.m()); + for (unsigned int i = 0; i < O_.size(); ++i) + O_(i) = 1; + + A.mmult(AB_Product, B, false); + AB_Product.vmult_add(O_, V); + + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; + + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -75,10 +75,10 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 0, 1, 2, 3 }; + { 0, 1, 2, 3 }; FullMatrix A(2, 2); FullMatrix B(2, 2); diff --git a/tests/lac/product_matrix_06.cc b/tests/lac/product_matrix_06.cc index 9bb30b599d..ce27977869 100644 --- a/tests/lac/product_matrix_06.cc +++ b/tests/lac/product_matrix_06.cc @@ -26,35 +26,35 @@ #include template - void - checkTvmult(FullMatrix &A, FullMatrix &B, Vector &V) - { - deallog << "Tvmult" << std::endl; - GrowingVectorMemory < Vector > mem; - ProductMatrix < Vector > P(A, B, mem); +void +checkTvmult(FullMatrix &A, FullMatrix &B, Vector &V) +{ + deallog << "Tvmult" << std::endl; + GrowingVectorMemory < Vector > mem; + ProductMatrix < Vector > P(A, B, mem); - Vector O(V.size()); + Vector O(V.size()); - P.Tvmult(O, V); + P.Tvmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=(A*B)*V - FullMatrix AB_Product(A.m(), B.n()); - Vector O_(A.m()); + // Verifying results with Method 2: O=(A*B)*V + FullMatrix AB_Product(A.m(), B.n()); + Vector O_(A.m()); - A.mmult(AB_Product, B, false); - AB_Product.Tvmult(O_, V); + A.mmult(AB_Product, B, false); + AB_Product.Tvmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -67,10 +67,10 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 0, 1, 2, 3 }; + { 0, 1, 2, 3 }; FullMatrix A(2, 2); FullMatrix B(2, 2); diff --git a/tests/lac/product_matrix_07.cc b/tests/lac/product_matrix_07.cc index a512095df5..e6626ec108 100644 --- a/tests/lac/product_matrix_07.cc +++ b/tests/lac/product_matrix_07.cc @@ -26,43 +26,43 @@ #include template - void - checkTvmult_add(FullMatrix &A, FullMatrix &B, - Vector &V) - { - deallog << "Tvmult_add" << std::endl; - GrowingVectorMemory < Vector > mem; - ProductMatrix < Vector > P(A, B, mem); - - deallog - << "Result vector set to all ones and to be added with product result vector" - << std::endl; - Vector O(V.size()); - for (unsigned int i = 0; i < O.size(); ++i) - O(i) = 1; - - P.Tvmult_add(O, V); - - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; - - // Verifying results with Method 2: O=(A*B)*V - FullMatrix AB_Product(A.m(), B.n()); - Vector O_(A.m()); - for (unsigned int i = 0; i < O_.size(); ++i) - O_(i) = 1; - - A.mmult(AB_Product, B, false); - AB_Product.Tvmult_add(O_, V); - - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; - - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } +void +checkTvmult_add(FullMatrix &A, FullMatrix &B, + Vector &V) +{ + deallog << "Tvmult_add" << std::endl; + GrowingVectorMemory < Vector > mem; + ProductMatrix < Vector > P(A, B, mem); + + deallog + << "Result vector set to all ones and to be added with product result vector" + << std::endl; + Vector O(V.size()); + for (unsigned int i = 0; i < O.size(); ++i) + O(i) = 1; + + P.Tvmult_add(O, V); + + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; + + // Verifying results with Method 2: O=(A*B)*V + FullMatrix AB_Product(A.m(), B.n()); + Vector O_(A.m()); + for (unsigned int i = 0; i < O_.size(); ++i) + O_(i) = 1; + + A.mmult(AB_Product, B, false); + AB_Product.Tvmult_add(O_, V); + + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; + + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -75,10 +75,10 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 0, 1, 2, 3 }; + { 0, 1, 2, 3 }; FullMatrix A(2, 2); FullMatrix B(2, 2); diff --git a/tests/lac/product_matrix_08.cc b/tests/lac/product_matrix_08.cc index 3436b840fc..44e2f0eb0c 100644 --- a/tests/lac/product_matrix_08.cc +++ b/tests/lac/product_matrix_08.cc @@ -26,76 +26,76 @@ #include template - void - checkClear(FullMatrix &A, FullMatrix &B, - FullMatrix &C, FullMatrix &D) - { - deallog << "clear" << std::endl; - deallog << "Init with vector memory, matrix 1 and matrix 2" << std::endl; - GrowingVectorMemory < Vector > mem; - ProductMatrix < Vector > P(A, B, mem); +void +checkClear(FullMatrix &A, FullMatrix &B, + FullMatrix &C, FullMatrix &D) +{ + deallog << "clear" << std::endl; + deallog << "Init with vector memory, matrix 1 and matrix 2" << std::endl; + GrowingVectorMemory < Vector > mem; + ProductMatrix < Vector > P(A, B, mem); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(B.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(B.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; - Vector O(A.m()); + Vector O(A.m()); - P.vmult(O, V); + P.vmult(O, V); - // Check the dimensions of the result vector - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result vector + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: O=(A*B)*V - FullMatrix AB_Product(A.m(), B.n()); - Vector O_(A.m()); + // Verifying results with Method 2: O=(A*B)*V + FullMatrix AB_Product(A.m(), B.n()); + Vector O_(A.m()); - A.mmult(AB_Product, B, false); - AB_Product.vmult(O_, V); + A.mmult(AB_Product, B, false); + AB_Product.vmult(O_, V); - Assert(O == O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(O == O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; - deallog << "Clearing product matrix" << std::endl; - P.clear(); + deallog << "Clearing product matrix" << std::endl; + P.clear(); - deallog << "Reinitializing product matrix with matrix 3 and matrix 4" - << std::endl; - P.reinit(C, D); + deallog << "Reinitializing product matrix with matrix 3 and matrix 4" + << std::endl; + P.reinit(C, D); - deallog << "Multiplying with all ones vector" << std::endl; - Vector _V(D.n()); - for (unsigned int i = 0; i < _V.size(); ++i) - _V(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector _V(D.n()); + for (unsigned int i = 0; i < _V.size(); ++i) + _V(i) = 1; - Vector _O(C.m()); + Vector _O(C.m()); - P.vmult(_O, _V); + P.vmult(_O, _V); - // Check the dimensions of the result vector - Assert(C.m() == _O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result vector + Assert(C.m() == _O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - // Verifying results with Method 2: _O=(C*D)*_V - FullMatrix CD_Product(C.m(), D.n()); - Vector _O_(C.m()); + // Verifying results with Method 2: _O=(C*D)*_V + FullMatrix CD_Product(C.m(), D.n()); + Vector _O_(C.m()); - C.mmult(CD_Product, D, false); - CD_Product.vmult(_O_, _V); + C.mmult(CD_Product, D, false); + CD_Product.vmult(_O_, _V); - Assert(_O == _O_, ExcInternalError()); - deallog << "Result vector data verified" << std::endl; + Assert(_O == _O_, ExcInternalError()); + deallog << "Result vector data verified" << std::endl; - for (unsigned int i = 0; i < _O.size(); ++i) - deallog << _O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < _O.size(); ++i) + deallog << _O(i) << '\t'; + deallog << std::endl; +} int main() @@ -108,16 +108,16 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; const double Bdata[] = - { 0, 1, 2, 3 }; + { 0, 1, 2, 3 }; const double Cdata[] = - { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; const double Ddata[] = - { 10, 11, 12, 13, 14, 15, 16, 17, 18 }; + { 10, 11, 12, 13, 14, 15, 16, 17, 18 }; FullMatrix A(2, 2); FullMatrix B(2, 2); diff --git a/tests/lac/shifted_matrix_01.cc b/tests/lac/shifted_matrix_01.cc index 2302f60907..91acac4e37 100644 --- a/tests/lac/shifted_matrix_01.cc +++ b/tests/lac/shifted_matrix_01.cc @@ -26,30 +26,30 @@ #include template - void - checkConstructor(FullMatrix &A, double sigma) - { - deallog << "constructor" << std::endl; +void +checkConstructor(FullMatrix &A, double sigma) +{ + deallog << "constructor" << std::endl; - ShiftedMatrix < FullMatrix > S(A, sigma); + ShiftedMatrix < FullMatrix > S(A, sigma); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(A.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(A.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; - Vector O(A.m()); + Vector O(A.m()); - S.vmult(O, V); + S.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -62,7 +62,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); diff --git a/tests/lac/shifted_matrix_02.cc b/tests/lac/shifted_matrix_02.cc index 018a383cca..7484c677df 100644 --- a/tests/lac/shifted_matrix_02.cc +++ b/tests/lac/shifted_matrix_02.cc @@ -26,24 +26,24 @@ #include template - void - checkVmult(FullMatrix &A, double sigma, Vector &V) - { - deallog << "vmult" << std::endl; +void +checkVmult(FullMatrix &A, double sigma, Vector &V) +{ + deallog << "vmult" << std::endl; - ShiftedMatrix < FullMatrix > S(A, sigma); - Vector O(A.m()); + ShiftedMatrix < FullMatrix > S(A, sigma); + Vector O(A.m()); - S.vmult(O, V); + S.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -56,7 +56,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); diff --git a/tests/lac/shifted_matrix_03.cc b/tests/lac/shifted_matrix_03.cc index 7553d181af..e19e01713b 100644 --- a/tests/lac/shifted_matrix_03.cc +++ b/tests/lac/shifted_matrix_03.cc @@ -26,30 +26,30 @@ #include template - void - checkResidual(FullMatrix &A, double sigma, Vector &V, - Vector &R) - { - deallog << "residual" << std::endl; +void +checkResidual(FullMatrix &A, double sigma, Vector &V, + Vector &R) +{ + deallog << "residual" << std::endl; - ShiftedMatrix < FullMatrix > S(A, sigma); - Vector O(A.m()); - double residual; + ShiftedMatrix < FullMatrix > S(A, sigma); + Vector O(A.m()); + double residual; - residual = S.residual(O, V, R); + residual = S.residual(O, V, R); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - deallog << "Residual vector" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; + deallog << "Residual vector" << std::endl; + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; - deallog << "Residual value" << std::endl; - deallog << residual << std::endl; - } + deallog << "Residual value" << std::endl; + deallog << residual << std::endl; +} int main() @@ -62,7 +62,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); diff --git a/tests/lac/shifted_matrix_04.cc b/tests/lac/shifted_matrix_04.cc index e8585fad57..df3df5aa66 100644 --- a/tests/lac/shifted_matrix_04.cc +++ b/tests/lac/shifted_matrix_04.cc @@ -26,45 +26,45 @@ #include template - void - checkSetSigma(FullMatrix &A, double sigma) - { - deallog << "shift(sigma)" << std::endl; +void +checkSetSigma(FullMatrix &A, double sigma) +{ + deallog << "shift(sigma)" << std::endl; - deallog << "Init ShiftedMatrix with sigma=0" << std::endl; - ShiftedMatrix < FullMatrix > S(A, 0); + deallog << "Init ShiftedMatrix with sigma=0" << std::endl; + ShiftedMatrix < FullMatrix > S(A, 0); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(A.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(A.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; - Vector O(A.m()); + Vector O(A.m()); - S.vmult(O, V); + S.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; - deallog << "Setting new sigma value" << std::endl; - S.shift(sigma); + deallog << "Setting new sigma value" << std::endl; + S.shift(sigma); - deallog << "Multiplying with all ones vector" << std::endl; - S.vmult(O, V); + deallog << "Multiplying with all ones vector" << std::endl; + S.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -77,7 +77,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); diff --git a/tests/lac/shifted_matrix_05.cc b/tests/lac/shifted_matrix_05.cc index 8bce110cd7..625480fab1 100644 --- a/tests/lac/shifted_matrix_05.cc +++ b/tests/lac/shifted_matrix_05.cc @@ -26,54 +26,54 @@ #include template - void - checkGetSigma(FullMatrix &A) - { - deallog << "shift()" << std::endl; +void +checkGetSigma(FullMatrix &A) +{ + deallog << "shift()" << std::endl; - deallog << "Init ShiftedMatrix with sigma=0" << std::endl; - ShiftedMatrix < FullMatrix > S(A, 0); + deallog << "Init ShiftedMatrix with sigma=0" << std::endl; + ShiftedMatrix < FullMatrix > S(A, 0); - deallog << "Multiplying with all ones vector" << std::endl; - Vector V(A.n()); - for (unsigned int i = 0; i < V.size(); ++i) - V(i) = 1; + deallog << "Multiplying with all ones vector" << std::endl; + Vector V(A.n()); + for (unsigned int i = 0; i < V.size(); ++i) + V(i) = 1; - Vector O(A.m()); + Vector O(A.m()); - S.vmult(O, V); + S.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; - deallog << "Setting new sigma value by incrementing old value by 1" - << std::endl; + deallog << "Setting new sigma value by incrementing old value by 1" + << std::endl; - deallog << "Old sigma value" << std::endl; - double sigma = S.shift(); - deallog << sigma << std::endl; - sigma = sigma + 1; - deallog << "New sigma value" << std::endl; - deallog << sigma << std::endl; + deallog << "Old sigma value" << std::endl; + double sigma = S.shift(); + deallog << sigma << std::endl; + sigma = sigma + 1; + deallog << "New sigma value" << std::endl; + deallog << sigma << std::endl; - S.shift(sigma); + S.shift(sigma); - deallog << "Multiplying with all ones vector" << std::endl; - S.vmult(O, V); + deallog << "Multiplying with all ones vector" << std::endl; + S.vmult(O, V); - // Check the dimensions of the result matrix - Assert(A.m() == O.size(), ExcInternalError()); - deallog << "Dimensions of result vector verified" << std::endl; + // Check the dimensions of the result matrix + Assert(A.m() == O.size(), ExcInternalError()); + deallog << "Dimensions of result vector verified" << std::endl; - for (unsigned int i = 0; i < O.size(); ++i) - deallog << O(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < O.size(); ++i) + deallog << O(i) << '\t'; + deallog << std::endl; +} int main() @@ -86,7 +86,7 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 2, 3, 4, 5 }; + { 2, 3, 4, 5 }; FullMatrix A(2, 2); diff --git a/tests/lac/solver_monitor.cc b/tests/lac/solver_monitor.cc index aff175969f..d693975c69 100644 --- a/tests/lac/solver_monitor.cc +++ b/tests/lac/solver_monitor.cc @@ -37,8 +37,8 @@ SolverControl::State monitor_norm (const unsigned int iteration, - const double check_value, - const Vector ¤t_iterate) + const double check_value, + const Vector ¤t_iterate) { deallog << " -- " << iteration << ' ' << check_value << std::endl; deallog << " Norm=" << current_iterate.l2_norm() << std::endl; @@ -47,8 +47,8 @@ SolverControl::State monitor_norm (const unsigned int iteration, SolverControl::State monitor_mean (const unsigned int iteration, - const double check_value, - const Vector ¤t_iterate) + const double check_value, + const Vector ¤t_iterate) { deallog << " Mean=" << current_iterate.mean_value() << std::endl; return SolverControl::success; @@ -89,11 +89,11 @@ int main() // create CG and GMRES solvers and attach monitors to it SolverCG<> cg(control, mem); cg.connect (&monitor_norm); - cg.connect (&monitor_mean); + cg.connect (&monitor_mean); SolverGMRES<> gmres(control, mem, 8); gmres.connect (&monitor_norm); - gmres.connect (&monitor_mean); + gmres.connect (&monitor_mean); for (unsigned int size=4; size <= 30; size *= 3) { diff --git a/tests/lac/solver_monitor_disconnect.cc b/tests/lac/solver_monitor_disconnect.cc index eeef090818..c405de2544 100644 --- a/tests/lac/solver_monitor_disconnect.cc +++ b/tests/lac/solver_monitor_disconnect.cc @@ -38,8 +38,8 @@ SolverControl::State monitor_norm (const unsigned int iteration, - const double check_value, - const Vector ¤t_iterate) + const double check_value, + const Vector ¤t_iterate) { deallog << " -- " << iteration << ' ' << check_value << std::endl; deallog << " Norm=" << current_iterate.l2_norm() << std::endl; @@ -48,8 +48,8 @@ SolverControl::State monitor_norm (const unsigned int iteration, SolverControl::State monitor_mean (const unsigned int iteration, - const double check_value, - const Vector ¤t_iterate) + const double check_value, + const Vector ¤t_iterate) { deallog << " Mean=" << current_iterate.mean_value() << std::endl; return SolverControl::success; @@ -90,7 +90,7 @@ int main() // create CG and GMRES solvers and attach monitors to it SolverCG<> cg(control, mem); boost::signals2::connection cg_c1 = cg.connect (&monitor_norm); - boost::signals2::connection cg_c2 = cg.connect (&monitor_mean); + boost::signals2::connection cg_c2 = cg.connect (&monitor_mean); for (unsigned int size=4; size <= 12; size *= 3) { diff --git a/tests/lac/sparse_ilu.cc b/tests/lac/sparse_ilu.cc index 9dae632427..fdfeb632d4 100644 --- a/tests/lac/sparse_ilu.cc +++ b/tests/lac/sparse_ilu.cc @@ -89,10 +89,10 @@ int main() }; ilu_pattern.compress(); - SparseILU::AdditionalData data; - data.use_this_sparsity = &ilu_pattern; + SparseILU::AdditionalData data; + data.use_this_sparsity = &ilu_pattern; SparseILU ilu; - ilu.initialize (A, data); + ilu.initialize (A, data); // now for three test vectors v // determine norm of diff --git a/tests/lac/sparse_ilu_t.cc b/tests/lac/sparse_ilu_t.cc index 06abfb0334..df7852b019 100644 --- a/tests/lac/sparse_ilu_t.cc +++ b/tests/lac/sparse_ilu_t.cc @@ -88,10 +88,10 @@ int main() Assert (false, ExcNotImplemented()); }; ilu_pattern.compress(); - SparseILU::AdditionalData data; - data.use_this_sparsity = &ilu_pattern; + SparseILU::AdditionalData data; + data.use_this_sparsity = &ilu_pattern; SparseILU ilu; - ilu.initialize (A, data); + ilu.initialize (A, data); // now for three test vectors v // determine norm of diff --git a/tests/lac/sparse_matrices.cc b/tests/lac/sparse_matrices.cc index b67f93911d..5a3ae0e5f6 100644 --- a/tests/lac/sparse_matrices.cc +++ b/tests/lac/sparse_matrices.cc @@ -287,13 +287,13 @@ int main() deallog.threshold_double(1.e-10); const unsigned int size = 5; const unsigned int row_length = 3; -/*#else - deallog.depth_console(1000); - deallog.log_execution_time(true); - deallog.log_time_differences(true); - const unsigned int size = 50; - const unsigned int row_length = 9; - #endif*/ + /*#else + deallog.depth_console(1000); + deallog.log_execution_time(true); + deallog.log_time_differences(true); + const unsigned int size = 50; + const unsigned int row_length = 9; + #endif*/ check_ez_iterator(); check_conjugate(logfile); @@ -395,7 +395,7 @@ int main() std::remove ("sparse_matrices.tmp"); SparseMatrix::const_iterator p =A.begin(), - p_tmp=A_tmp.begin(); + p_tmp=A_tmp.begin(); for (; p!=A.end(); ++p, ++p_tmp) if (std::fabs(p->value() - p_tmp->value()) <= std::fabs(1e-14*p->value())) diff --git a/tests/lac/sparse_mic.cc b/tests/lac/sparse_mic.cc index c9564baae6..54990e8d99 100644 --- a/tests/lac/sparse_mic.cc +++ b/tests/lac/sparse_mic.cc @@ -90,10 +90,10 @@ int main() Assert (false, ExcNotImplemented()); }; mic_pattern.compress(); - SparseMIC::AdditionalData data; - data.use_this_sparsity = &mic_pattern; + SparseMIC::AdditionalData data; + data.use_this_sparsity = &mic_pattern; SparseMIC mic; - mic.initialize (A, data); + mic.initialize (A, data); // now for three test vectors v // determine norm of diff --git a/tests/lac/vector_view_01.cc b/tests/lac/vector_view_01.cc index 3ac21b05c5..f1daac7820 100644 --- a/tests/lac/vector_view_01.cc +++ b/tests/lac/vector_view_01.cc @@ -24,28 +24,28 @@ #include template - void - checkReadOnlyConstructor(const Vector &V) - { - deallog << "Read-only constructor" << std::endl; - VectorView VV(V.size(), V.begin()); +void +checkReadOnlyConstructor(const Vector &V) +{ + deallog << "Read-only constructor" << std::endl; + VectorView VV(V.size(), V.begin()); - deallog << "Printing Vector" << std::endl; - for (unsigned int i = 0; i < V.size(); ++i) - deallog << V(i) << '\t'; - deallog << std::endl; + deallog << "Printing Vector" << std::endl; + for (unsigned int i = 0; i < V.size(); ++i) + deallog << V(i) << '\t'; + deallog << std::endl; - deallog << "Printing VectorView pointing to Vector" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - deallog << VV(i) << '\t'; - deallog << std::endl; + deallog << "Printing VectorView pointing to Vector" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + deallog << VV(i) << '\t'; + deallog << std::endl; - /* deallog << "Incrementing Vector elements using Read-only handle of VectorView" << std::endl; - deallog << "Function fails beyond this point" << std::endl; - for (unsigned int i=0; i elements using Read-only handle of VectorView" << std::endl; + deallog << "Function fails beyond this point" << std::endl; + for (unsigned int i=0; i template - void - checkReinit1(const size_type N, const bool fast = false) - { - deallog << "Reinit with const size and fast" << std::endl; +void +checkReinit1(const size_type N, const bool fast = false) +{ + deallog << "Reinit with const size and fast" << std::endl; - deallog - << "Creating Vector of size N+10 and filling with values 1 to N+10" - << std::endl; + deallog + << "Creating Vector of size N+10 and filling with values 1 to N+10" + << std::endl; - Vector < number > V(N + 10); - for (unsigned int i = 0; i < V.size(); i++) - V(i) = i + 1; + Vector < number > V(N + 10); + for (unsigned int i = 0; i < V.size(); i++) + V(i) = i + 1; - deallog - << "Creating VectorView of size N+10 pointing to Vector" - << std::endl; - VectorView VV(V.size(), V.begin()); + deallog + << "Creating VectorView of size N+10 pointing to Vector" + << std::endl; + VectorView VV(V.size(), V.begin()); - deallog << "Printing Vector" << std::endl; - for (unsigned int i = 0; i < V.size(); ++i) - deallog << V(i) << '\t'; - deallog << std::endl; + deallog << "Printing Vector" << std::endl; + for (unsigned int i = 0; i < V.size(); ++i) + deallog << V(i) << '\t'; + deallog << std::endl; - deallog << "Printing VectorView pointing to Vector" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - deallog << VV(i) << '\t'; - deallog << std::endl; + deallog << "Printing VectorView pointing to Vector" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + deallog << VV(i) << '\t'; + deallog << std::endl; - deallog << "Reinit VectorView to size N from N+10 with fast=" - << fast << std::endl; - VV.reinit(N, fast); + deallog << "Reinit VectorView to size N from N+10 with fast=" + << fast << std::endl; + VV.reinit(N, fast); - deallog << "Printing Vector" << std::endl; - for (unsigned int i = 0; i < V.size(); ++i) - deallog << V(i) << '\t'; - deallog << std::endl; + deallog << "Printing Vector" << std::endl; + for (unsigned int i = 0; i < V.size(); ++i) + deallog << V(i) << '\t'; + deallog << std::endl; - deallog << "Printing VectorView pointing to Vector" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - deallog << VV(i) << '\t'; - deallog << std::endl; - } + deallog << "Printing VectorView pointing to Vector" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + deallog << VV(i) << '\t'; + deallog << std::endl; +} int main() diff --git a/tests/lac/vector_view_03.cc b/tests/lac/vector_view_03.cc index d43748f50a..d77ca434eb 100644 --- a/tests/lac/vector_view_03.cc +++ b/tests/lac/vector_view_03.cc @@ -24,56 +24,56 @@ #include template - void - checkReinit3(const Vector &V) - { - deallog - << "Reinit a ReadOnly VectorView with const Vector and const size" - << std::endl; - - deallog - << "Creating dummy Vector of size V.size() and filling with zeros" - << std::endl; - - Vector _V(V.size()); - for (unsigned int i = 0; i < _V.size(); i++) - _V(i) = 0; - - deallog << "Creating VectorView pointing to dummy Vector" - << std::endl; - VectorView VV(_V.size(), _V.begin()); - - deallog << "Printing dummy Vector" << std::endl; - for (unsigned int i = 0; i < _V.size(); ++i) - deallog << _V(i) << '\t'; - deallog << std::endl; - - deallog << "Printing VectorView pointing to dummy Vector" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - deallog << VV(i) << '\t'; - deallog << std::endl; - - deallog << "Reinit VectorView to half of Vector" - << std::endl; - VV.reinit(V.size() / 2, V.begin()); - - deallog << "Printing Vector" << std::endl; - for (unsigned int i = 0; i < V.size(); ++i) - deallog << V(i) << '\t'; - deallog << std::endl; - - deallog << "Printing VectorView pointing to half of Vector" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - deallog << VV(i) << '\t'; - deallog << std::endl; - - /* deallog << "Incrementing Vector elements using Read-only handle of VectorView" << std::endl; - deallog << "Function fails beyond this point" << std::endl; - for (unsigned int i=0; i &V) +{ + deallog + << "Reinit a ReadOnly VectorView with const Vector and const size" + << std::endl; + + deallog + << "Creating dummy Vector of size V.size() and filling with zeros" + << std::endl; + + Vector _V(V.size()); + for (unsigned int i = 0; i < _V.size(); i++) + _V(i) = 0; + + deallog << "Creating VectorView pointing to dummy Vector" + << std::endl; + VectorView VV(_V.size(), _V.begin()); + + deallog << "Printing dummy Vector" << std::endl; + for (unsigned int i = 0; i < _V.size(); ++i) + deallog << _V(i) << '\t'; + deallog << std::endl; + + deallog << "Printing VectorView pointing to dummy Vector" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + deallog << VV(i) << '\t'; + deallog << std::endl; + + deallog << "Reinit VectorView to half of Vector" + << std::endl; + VV.reinit(V.size() / 2, V.begin()); + + deallog << "Printing Vector" << std::endl; + for (unsigned int i = 0; i < V.size(); ++i) + deallog << V(i) << '\t'; + deallog << std::endl; + + deallog << "Printing VectorView pointing to half of Vector" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + deallog << VV(i) << '\t'; + deallog << std::endl; + + /* deallog << "Incrementing Vector elements using Read-only handle of VectorView" << std::endl; + deallog << "Function fails beyond this point" << std::endl; + for (unsigned int i=0; i template - void - checkReinit2(Vector &V) - { - deallog - << "Reinit a ReadWrite VectorView with Vector and const size" - << std::endl; - - deallog - << "Creating dummy Vector of size V.size() and filling with zeros" - << std::endl; - - Vector _V(V.size()); - for (unsigned int i = 0; i < _V.size(); i++) - _V(i) = 0; - - deallog << "Creating VectorView pointing to dummy Vector" - << std::endl; - VectorView VV(_V.size(), _V.begin()); - - deallog << "Printing dummy Vector" << std::endl; - for (unsigned int i = 0; i < _V.size(); ++i) - deallog << _V(i) << '\t'; - deallog << std::endl; - - deallog << "Printing VectorView pointing to dummy Vector" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - deallog << VV(i) << '\t'; - deallog << std::endl; - - deallog << "Reinit VectorView to half of Vector" - << std::endl; - VV.reinit(V.size() / 2, V.begin()); - - deallog << "Printing Vector" << std::endl; - for (unsigned int i = 0; i < V.size(); ++i) - deallog << V(i) << '\t'; - deallog << std::endl; - - deallog << "Printing VectorView pointing to half of Vector" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - deallog << VV(i) << '\t'; - deallog << std::endl; - - deallog - << "Incrementing Vector elements using Read-write handle of VectorView" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - VV(i) = VV(i) + 1; - - deallog << "Printing modified Vector" << std::endl; - for (unsigned int i = 0; i < V.size(); ++i) - deallog << V(i) << '\t'; - deallog << std::endl; - } +void +checkReinit2(Vector &V) +{ + deallog + << "Reinit a ReadWrite VectorView with Vector and const size" + << std::endl; + + deallog + << "Creating dummy Vector of size V.size() and filling with zeros" + << std::endl; + + Vector _V(V.size()); + for (unsigned int i = 0; i < _V.size(); i++) + _V(i) = 0; + + deallog << "Creating VectorView pointing to dummy Vector" + << std::endl; + VectorView VV(_V.size(), _V.begin()); + + deallog << "Printing dummy Vector" << std::endl; + for (unsigned int i = 0; i < _V.size(); ++i) + deallog << _V(i) << '\t'; + deallog << std::endl; + + deallog << "Printing VectorView pointing to dummy Vector" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + deallog << VV(i) << '\t'; + deallog << std::endl; + + deallog << "Reinit VectorView to half of Vector" + << std::endl; + VV.reinit(V.size() / 2, V.begin()); + + deallog << "Printing Vector" << std::endl; + for (unsigned int i = 0; i < V.size(); ++i) + deallog << V(i) << '\t'; + deallog << std::endl; + + deallog << "Printing VectorView pointing to half of Vector" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + deallog << VV(i) << '\t'; + deallog << std::endl; + + deallog + << "Incrementing Vector elements using Read-write handle of VectorView" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + VV(i) = VV(i) + 1; + + deallog << "Printing modified Vector" << std::endl; + for (unsigned int i = 0; i < V.size(); ++i) + deallog << V(i) << '\t'; + deallog << std::endl; +} int main() diff --git a/tests/lac/vector_view_05.cc b/tests/lac/vector_view_05.cc index 60b499ab4d..73a3565c2e 100644 --- a/tests/lac/vector_view_05.cc +++ b/tests/lac/vector_view_05.cc @@ -24,34 +24,34 @@ #include template - void - checkReadWriteConstructor(Vector &V) - { - deallog << "Read-write constructor" << std::endl; - VectorView VV(V.size(), V.begin()); +void +checkReadWriteConstructor(Vector &V) +{ + deallog << "Read-write constructor" << std::endl; + VectorView VV(V.size(), V.begin()); - deallog << "Printing Vector" << std::endl; - for (unsigned int i = 0; i < V.size(); ++i) - deallog << V(i) << '\t'; - deallog << std::endl; + deallog << "Printing Vector" << std::endl; + for (unsigned int i = 0; i < V.size(); ++i) + deallog << V(i) << '\t'; + deallog << std::endl; - deallog << "Printing VectorView pointing to Vector" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - deallog << VV(i) << '\t'; - deallog << std::endl; + deallog << "Printing VectorView pointing to Vector" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + deallog << VV(i) << '\t'; + deallog << std::endl; - deallog - << "Incrementing Vector elements using Read-write handle of VectorView" - << std::endl; - for (unsigned int i = 0; i < VV.size(); ++i) - VV(i) = VV(i) + 1; + deallog + << "Incrementing Vector elements using Read-write handle of VectorView" + << std::endl; + for (unsigned int i = 0; i < VV.size(); ++i) + VV(i) = VV(i) + 1; - deallog << "Printing modified Vector" << std::endl; - for (unsigned int i = 0; i < V.size(); ++i) - deallog << V(i) << '\t'; - deallog << std::endl; - } + deallog << "Printing modified Vector" << std::endl; + for (unsigned int i = 0; i < V.size(); ++i) + deallog << V(i) << '\t'; + deallog << std::endl; +} int main() diff --git a/tests/manifold/copy_boundary_to_manifold_id_01.cc b/tests/manifold/copy_boundary_to_manifold_id_01.cc index 6d119929ba..bc1f4dd43d 100644 --- a/tests/manifold/copy_boundary_to_manifold_id_01.cc +++ b/tests/manifold/copy_boundary_to_manifold_id_01.cc @@ -26,18 +26,19 @@ #include template -void print_info(Triangulation &tria) { +void print_info(Triangulation &tria) +{ typename Triangulation::active_cell_iterator cell; for (cell = tria.begin_active(); cell != tria.end(); ++cell) { for (unsigned int f=0; f::faces_per_cell; ++f) - if(cell->face(f)->at_boundary()) - deallog << "face: " << cell->face(f) - << ", boundary_id: " - << (int)cell->face(f)->boundary_id() - << ", manifold_id: " - << (int)cell->face(f)->manifold_id() << std::endl; + if (cell->face(f)->at_boundary()) + deallog << "face: " << cell->face(f) + << ", boundary_id: " + << (int)cell->face(f)->boundary_id() + << ", manifold_id: " + << (int)cell->face(f)->manifold_id() << std::endl; } } @@ -62,7 +63,7 @@ void test() int main () { initlog(true); - + test<1,1>(); test<1,2>(); test<2,2>(); diff --git a/tests/manifold/copy_material_to_manifold_id_01.cc b/tests/manifold/copy_material_to_manifold_id_01.cc index 4427f49f7b..1cf744c01d 100644 --- a/tests/manifold/copy_material_to_manifold_id_01.cc +++ b/tests/manifold/copy_material_to_manifold_id_01.cc @@ -26,23 +26,24 @@ #include template -void print_info(Triangulation &tria) { +void print_info(Triangulation &tria) +{ typename Triangulation::active_cell_iterator cell; for (cell = tria.begin_active(); cell != tria.end(); ++cell) { - deallog << "cell: " << cell - << ", material_id: " - << (int)cell->material_id() - << ", manifold_id: " - << (int)cell->manifold_id() << std::endl; + deallog << "cell: " << cell + << ", material_id: " + << (int)cell->material_id() + << ", manifold_id: " + << (int)cell->manifold_id() << std::endl; for (unsigned int f=0; f::faces_per_cell; ++f) - deallog << "face: " << cell->face(f) - << ", boundary_id: " - << (int)cell->face(f)->boundary_id() - << ", manifold_id: " - << (int)cell->face(f)->manifold_id() << std::endl; + deallog << "face: " << cell->face(f) + << ", boundary_id: " + << (int)cell->face(f)->boundary_id() + << ", manifold_id: " + << (int)cell->face(f)->manifold_id() << std::endl; } } @@ -72,7 +73,7 @@ void test() int main () { initlog(true); - + test<1,1>(); test<1,2>(); test<2,2>(); diff --git a/tests/manifold/cylindrical_manifold_01.cc b/tests/manifold/cylindrical_manifold_01.cc index d99e48c93a..956911f734 100644 --- a/tests/manifold/cylindrical_manifold_01.cc +++ b/tests/manifold/cylindrical_manifold_01.cc @@ -29,21 +29,22 @@ template void test(unsigned int ref=1) { - deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; + deallog << "Testing dim " << dim + << ", spacedim " << spacedim << std::endl; CylindricalManifold manifold; - + Triangulation tria; GridGenerator::cylinder (tria); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - cell->set_all_manifold_ids(1); - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + cell->set_all_manifold_ids(1); + } + tria.set_manifold(1, manifold); tria.refine_global(1); - + GridOut gridout; gridout.write_msh(tria, deallog.get_file_stream()); } @@ -54,9 +55,9 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<3,3>(); - + return 0; } diff --git a/tests/manifold/cylindrical_manifold_02.cc b/tests/manifold/cylindrical_manifold_02.cc index ebc92a664e..0d095cb3cd 100644 --- a/tests/manifold/cylindrical_manifold_02.cc +++ b/tests/manifold/cylindrical_manifold_02.cc @@ -29,22 +29,23 @@ template void test(unsigned int ref=1) { - deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; - + deallog << "Testing dim " << dim + << ", spacedim " << spacedim << std::endl; + // Here the only allowed axis is z. In cylinder the default is x. CylindricalManifold manifold(2); - + Triangulation tria; GridGenerator::cylinder_shell (tria, .5, .1, .25); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - cell->set_all_manifold_ids(1); - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + cell->set_all_manifold_ids(1); + } + tria.set_manifold(1, manifold); tria.refine_global(1); - + GridOut gridout; gridout.write_msh(tria, deallog.get_file_stream()); } @@ -55,9 +56,9 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<3,3>(); - + return 0; } diff --git a/tests/manifold/flat_manifold_01.cc b/tests/manifold/flat_manifold_01.cc index 769626fb3f..2d237158fa 100644 --- a/tests/manifold/flat_manifold_01.cc +++ b/tests/manifold/flat_manifold_01.cc @@ -35,20 +35,24 @@ void test(unsigned int ref=1) GridGenerator::hyper_cube (tria); tria.refine_global(1); - typename Triangulation::active_cell_iterator - cell; - - for(cell=tria.begin_active(); cell!=tria.end(); ++cell) { + typename Triangulation::active_cell_iterator + cell; - // check that FlatManifold returns the middle of the cell. - deallog << "Cell: " << cell << std::endl; - if(cell->get_manifold().get_new_point_on_cell(cell).distance(cell->center()) > 1e-6) { - deallog << "Default manifold: " << cell->get_manifold().get_new_point_on_cell(cell) << std::endl; - deallog << "Center of cell : " << cell->center() << std::endl; - } else { - deallog << "OK!" << std::endl; - } - } + for (cell=tria.begin_active(); cell!=tria.end(); ++cell) + { + + // check that FlatManifold returns the middle of the cell. + deallog << "Cell: " << cell << std::endl; + if (cell->get_manifold().get_new_point_on_cell(cell).distance(cell->center()) > 1e-6) + { + deallog << "Default manifold: " << cell->get_manifold().get_new_point_on_cell(cell) << std::endl; + deallog << "Center of cell : " << cell->center() << std::endl; + } + else + { + deallog << "OK!" << std::endl; + } + } } int main () diff --git a/tests/manifold/flat_manifold_02.cc b/tests/manifold/flat_manifold_02.cc index 0fdc4d51e3..21524792a3 100644 --- a/tests/manifold/flat_manifold_02.cc +++ b/tests/manifold/flat_manifold_02.cc @@ -35,24 +35,29 @@ void test(unsigned int ref=1) GridGenerator::hyper_cube (tria); tria.refine_global(1); - typename Triangulation::active_cell_iterator - cell; - - for(cell=tria.begin_active(); cell!=tria.end(); ++cell) { + typename Triangulation::active_cell_iterator + cell; - // check that FlatManifold returns the middle of the cell. - deallog << "Cell: " << cell << std::endl; - for(unsigned int f=0; f::faces_per_cell; ++f) { - const typename Triangulation::face_iterator &face = cell->face(f); - if(face->get_manifold().get_new_point_on_face(face).distance(face->center()) > 1e-6) { - deallog << "Face : " << face << std::endl; - deallog << "Default manifold: " << cell->get_manifold().get_new_point_on_cell(cell) << std::endl; - deallog << "Center of cell : " << cell->center() << std::endl; - } else { - deallog << "Face " << face << " is OK!" << std::endl; - } + for (cell=tria.begin_active(); cell!=tria.end(); ++cell) + { + + // check that FlatManifold returns the middle of the cell. + deallog << "Cell: " << cell << std::endl; + for (unsigned int f=0; f::faces_per_cell; ++f) + { + const typename Triangulation::face_iterator &face = cell->face(f); + if (face->get_manifold().get_new_point_on_face(face).distance(face->center()) > 1e-6) + { + deallog << "Face : " << face << std::endl; + deallog << "Default manifold: " << cell->get_manifold().get_new_point_on_cell(cell) << std::endl; + deallog << "Center of cell : " << cell->center() << std::endl; + } + else + { + deallog << "Face " << face << " is OK!" << std::endl; + } + } } - } } int main () @@ -61,11 +66,11 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<2,2>(); test<2,3>(); test<3,3>(); - + return 0; } diff --git a/tests/manifold/flat_manifold_03.cc b/tests/manifold/flat_manifold_03.cc index cc19eb7fc6..9f200f48ab 100644 --- a/tests/manifold/flat_manifold_03.cc +++ b/tests/manifold/flat_manifold_03.cc @@ -30,17 +30,17 @@ void test(unsigned int ref=1) { deallog << "Testing dim=" << dim << ", spacedim="<< spacedim << std::endl; - + Point periodicity; periodicity[0] = 5.0; - + FlatManifold manifold(periodicity); - + Quadrature quad; std::vector > >ps(10,std::vector >(2)); Point middle; std::vector ws(2, 0.5); - + // Case 1: both points are close to left boundary of periodicity ps[0][0][0] = 1; ps[0][1][0] = 2; @@ -75,13 +75,14 @@ void test(unsigned int ref=1) // Case 10: same, opposite order ps[9][0][0] = 5+1e-10; ps[9][1][0] = -1e-10; - - for(unsigned int i=0; i(ps[i],ws); - middle = manifold.get_new_point(quad); - deallog << "P0: " << ps[i][0] << " , P1: " << ps[i][1] << " , Middle: " << middle << std::endl; - } - + + for (unsigned int i=0; i(ps[i],ws); + middle = manifold.get_new_point(quad); + deallog << "P0: " << ps[i][0] << " , P1: " << ps[i][1] << " , Middle: " << middle << std::endl; + } + } int main () @@ -90,13 +91,13 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-8); - + test<1,1>(); test<1,2>(); test<2,2>(); test<2,3>(); test<3,3>(); - + return 0; } diff --git a/tests/manifold/function_manifold_01.cc b/tests/manifold/function_manifold_01.cc index 086cc5ead8..1e2ce85127 100644 --- a/tests/manifold/function_manifold_01.cc +++ b/tests/manifold/function_manifold_01.cc @@ -29,39 +29,41 @@ template void test(unsigned int ref=1) { - deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; - + deallog << "Testing dim " << dim + << ", spacedim " << spacedim << std::endl; + // Here the only allowed axis is z. In cylinder the default is x. std::string push_forward_expression; std::string pull_back_expression; - switch(spacedim) { - case 2: - push_forward_expression = "x; y"; - pull_back_expression = "x; y"; - break; - case 3: - push_forward_expression = "x; y; z"; - pull_back_expression = "x; y; z"; - break; - default: - Assert(false, ExcInternalError()); - } - - FunctionManifold manifold(push_forward_expression, - pull_back_expression); + switch (spacedim) + { + case 2: + push_forward_expression = "x; y"; + pull_back_expression = "x; y"; + break; + case 3: + push_forward_expression = "x; y; z"; + pull_back_expression = "x; y; z"; + break; + default: + Assert(false, ExcInternalError()); + } + + FunctionManifold manifold(push_forward_expression, + pull_back_expression); Triangulation tria; GridGenerator::hyper_cube (tria, 0, 1); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - cell->set_all_manifold_ids(1); - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + cell->set_all_manifold_ids(1); + } + tria.set_manifold(1, manifold); tria.refine_global(2); - + GridOut gridout; gridout.write_msh(tria, deallog.get_file_stream()); } @@ -72,11 +74,11 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - - + + test<2,2>(); test<3,3>(); - + return 0; } diff --git a/tests/manifold/function_manifold_02.cc b/tests/manifold/function_manifold_02.cc index a62f9ff0dd..7b28794e4b 100644 --- a/tests/manifold/function_manifold_02.cc +++ b/tests/manifold/function_manifold_02.cc @@ -29,39 +29,41 @@ template void test(unsigned int ref=1) { - deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; - + deallog << "Testing dim " << dim + << ", spacedim " << spacedim << std::endl; + // Here the only allowed axis is z. In cylinder the default is x. std::string push_forward_expression; std::string pull_back_expression; - switch(spacedim) { - case 2: - push_forward_expression = "x^2; y^2"; - pull_back_expression = "sqrt(x); sqrt(y)"; - break; - case 3: - push_forward_expression = "x^2; y^2; z^2"; - pull_back_expression = "sqrt(x); sqrt(y); sqrt(z)"; - break; - default: - Assert(false, ExcInternalError()); - } - - FunctionManifold manifold(push_forward_expression, - pull_back_expression); + switch (spacedim) + { + case 2: + push_forward_expression = "x^2; y^2"; + pull_back_expression = "sqrt(x); sqrt(y)"; + break; + case 3: + push_forward_expression = "x^2; y^2; z^2"; + pull_back_expression = "sqrt(x); sqrt(y); sqrt(z)"; + break; + default: + Assert(false, ExcInternalError()); + } + + FunctionManifold manifold(push_forward_expression, + pull_back_expression); Triangulation tria; GridGenerator::hyper_cube (tria, 0, 1); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - cell->set_all_manifold_ids(1); - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + cell->set_all_manifold_ids(1); + } + tria.set_manifold(1, manifold); tria.refine_global(2); - + GridOut gridout; gridout.write_msh(tria, deallog.get_file_stream()); } @@ -72,11 +74,11 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - - + + test<2,2>(); test<3,3>(); - + return 0; } diff --git a/tests/manifold/set_all_manifold_ids_01.cc b/tests/manifold/set_all_manifold_ids_01.cc index 2b8c457835..b69d64b257 100644 --- a/tests/manifold/set_all_manifold_ids_01.cc +++ b/tests/manifold/set_all_manifold_ids_01.cc @@ -24,23 +24,24 @@ #include template -void print_info(Triangulation &tria) { +void print_info(Triangulation &tria) +{ typename Triangulation::active_cell_iterator cell; for (cell = tria.begin_active(); cell != tria.end(); ++cell) { - deallog << "cell: " << cell - << ", material_id: " - << (int)cell->material_id() - << ", manifold_id: " - << (int)cell->manifold_id() << std::endl; + deallog << "cell: " << cell + << ", material_id: " + << (int)cell->material_id() + << ", manifold_id: " + << (int)cell->manifold_id() << std::endl; for (unsigned int f=0; f::faces_per_cell; ++f) - deallog << "face: " << cell->face(f) - << ", boundary_id: " - << (int)cell->face(f)->boundary_id() - << ", manifold_id: " - << (int)cell->face(f)->manifold_id() << std::endl; + deallog << "face: " << cell->face(f) + << ", boundary_id: " + << (int)cell->face(f)->boundary_id() + << ", manifold_id: " + << (int)cell->face(f)->manifold_id() << std::endl; } } @@ -65,7 +66,7 @@ void test() int main () { initlog(true); - + test<1,1>(); test<1,2>(); test<2,2>(); diff --git a/tests/manifold/set_all_manifold_ids_02.cc b/tests/manifold/set_all_manifold_ids_02.cc index d651922c5a..686cf85934 100644 --- a/tests/manifold/set_all_manifold_ids_02.cc +++ b/tests/manifold/set_all_manifold_ids_02.cc @@ -24,23 +24,24 @@ #include template -void print_info(Triangulation &tria) { +void print_info(Triangulation &tria) +{ typename Triangulation::active_cell_iterator cell; for (cell = tria.begin_active(); cell != tria.end(); ++cell) { - deallog << "cell: " << cell - << ", material_id: " - << (int)cell->material_id() - << ", manifold_id: " - << (int)cell->manifold_id() << std::endl; + deallog << "cell: " << cell + << ", material_id: " + << (int)cell->material_id() + << ", manifold_id: " + << (int)cell->manifold_id() << std::endl; for (unsigned int f=0; f::faces_per_cell; ++f) - deallog << "face: " << cell->face(f) - << ", boundary_id: " - << (int)cell->face(f)->boundary_id() - << ", manifold_id: " - << (int)cell->face(f)->manifold_id() << std::endl; + deallog << "face: " << cell->face(f) + << ", boundary_id: " + << (int)cell->face(f)->boundary_id() + << ", manifold_id: " + << (int)cell->face(f)->manifold_id() << std::endl; } } @@ -65,7 +66,7 @@ void test() int main () { initlog(true); - + test<1,1>(); test<1,2>(); test<2,2>(); diff --git a/tests/manifold/spherical_manifold_01.cc b/tests/manifold/spherical_manifold_01.cc index 5b8c6f086a..eaa06306a5 100644 --- a/tests/manifold/spherical_manifold_01.cc +++ b/tests/manifold/spherical_manifold_01.cc @@ -29,21 +29,22 @@ template void test(unsigned int ref=1) { - deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; + deallog << "Testing dim " << dim + << ", spacedim " << spacedim << std::endl; SphericalManifold manifold; - + Triangulation tria; GridGenerator::hyper_shell (tria, Point(), .3, .6, 12); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - cell->set_all_manifold_ids(1); - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + cell->set_all_manifold_ids(1); + } + tria.set_manifold(1, manifold); tria.refine_global(1); - + GridOut gridout; gridout.write_msh(tria, deallog.get_file_stream()); @@ -59,10 +60,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<2,2>(); test<3,3>(); - + return 0; } diff --git a/tests/manifold/spherical_manifold_02.cc b/tests/manifold/spherical_manifold_02.cc index 3ff4ad390e..a7ab1e7840 100644 --- a/tests/manifold/spherical_manifold_02.cc +++ b/tests/manifold/spherical_manifold_02.cc @@ -9,7 +9,7 @@ //---------------------------- spherical_manifold_02.cc --------------------------- -// Test that the flat manifold does what it should on a sphere. +// Test that the flat manifold does what it should on a sphere. #include "../tests.h" @@ -31,23 +31,24 @@ template void test(unsigned int ref=1) { SphericalManifold manifold; - + Triangulation tria; GridGenerator::hyper_ball (tria); - + typename Triangulation::active_cell_iterator cell; - - for(cell = tria.begin_active(); cell != tria.end(); ++cell) + + for (cell = tria.begin_active(); cell != tria.end(); ++cell) cell->set_all_manifold_ids(1); - - for(cell = tria.begin_active(); cell != tria.end(); ++cell) { - if(cell->center().distance(Point()) < 1e-10) - cell->set_all_manifold_ids(0); - } - + + for (cell = tria.begin_active(); cell != tria.end(); ++cell) + { + if (cell->center().distance(Point()) < 1e-10) + cell->set_all_manifold_ids(0); + } + tria.set_manifold(1, manifold); tria.refine_global(2); - + GridOut gridout; gridout.write_msh(tria, deallog.get_file_stream()); } @@ -58,10 +59,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<2,2>(); test<3,3>(); - + return 0; } diff --git a/tests/manifold/spherical_manifold_03.cc b/tests/manifold/spherical_manifold_03.cc index c6597c6e86..10c525f3a1 100644 --- a/tests/manifold/spherical_manifold_03.cc +++ b/tests/manifold/spherical_manifold_03.cc @@ -31,10 +31,10 @@ template void test(unsigned int ref=1) { deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; + << ", spacedim " << spacedim << std::endl; SphericalManifold manifold; - + Triangulation tria; Point p0; Point p1; @@ -42,29 +42,33 @@ void test(unsigned int ref=1) p1[0] = 1; p0[1] = .1; - if(spacedim == 2) { - p1[1] = 2*numbers::PI-.1; // theta - } else if(spacedim == 3) { - p1[1] = numbers::PI-.1; - p1[2] = 2*numbers::PI-.1; - } + if (spacedim == 2) + { + p1[1] = 2*numbers::PI-.1; // theta + } + else if (spacedim == 3) + { + p1[1] = numbers::PI-.1; + p1[2] = 2*numbers::PI-.1; + } GridGenerator::hyper_rectangle (tria, p0, p1); tria.refine_global(3); - const std::vector > & vertices = tria.get_vertices(); - - for(unsigned int i=0; i p0 = manifold.push_forward(vertices[i]); - Point p1 = manifold.pull_back(p0); - - if(p1.distance(vertices[i]) > 1e-10) - deallog << "ERROR! d: " << p1.distance(vertices[i]) - << " - " << p1 << " != " << vertices[i] << std::endl; - } - - - + const std::vector > &vertices = tria.get_vertices(); + + for (unsigned int i=0; i p0 = manifold.push_forward(vertices[i]); + Point p1 = manifold.pull_back(p0); + + if (p1.distance(vertices[i]) > 1e-10) + deallog << "ERROR! d: " << p1.distance(vertices[i]) + << " - " << p1 << " != " << vertices[i] << std::endl; + } + + + } int main () @@ -73,7 +77,7 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<2,2>(); test<3,3>(); diff --git a/tests/manifold/spherical_manifold_04.cc b/tests/manifold/spherical_manifold_04.cc index 7435cf8bef..294fe7f91e 100644 --- a/tests/manifold/spherical_manifold_04.cc +++ b/tests/manifold/spherical_manifold_04.cc @@ -9,7 +9,7 @@ //---------------------------- spherical_manifold_04.cc --------------------------- -// Test that the flat manifold does what it should on a sphere surface. +// Test that the flat manifold does what it should on a sphere surface. #include "../tests.h" @@ -32,25 +32,26 @@ template void test(unsigned int ref=1) { SphericalManifold manifold; - + Triangulation volume_tria; Triangulation tria; GridGenerator::hyper_ball (volume_tria); GridGenerator::extract_boundary_mesh(volume_tria, tria); typename Triangulation::active_cell_iterator cell; - - for(cell = tria.begin_active(); cell != tria.end(); ++cell) + + for (cell = tria.begin_active(); cell != tria.end(); ++cell) cell->set_all_manifold_ids(1); - - for(cell = tria.begin_active(); cell != tria.end(); ++cell) { - if(cell->center().distance(Point()) < 1e-10) - cell->set_all_manifold_ids(0); - } - + + for (cell = tria.begin_active(); cell != tria.end(); ++cell) + { + if (cell->center().distance(Point()) < 1e-10) + cell->set_all_manifold_ids(0); + } + tria.set_manifold(1, manifold); tria.refine_global(2); - + GridOut gridout; gridout.write_msh(tria, deallog.get_file_stream()); } @@ -61,10 +62,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<1,2>(); test<2,3>(); - + return 0; } diff --git a/tests/manifold/spherical_manifold_05.cc b/tests/manifold/spherical_manifold_05.cc index 07e40d01db..77a426599b 100644 --- a/tests/manifold/spherical_manifold_05.cc +++ b/tests/manifold/spherical_manifold_05.cc @@ -9,7 +9,7 @@ //---------------------------- spherical_manifold_04.cc --------------------------- -// Test that the flat manifold does what it should on a sphere surface. +// Test that the flat manifold does what it should on a sphere surface. #include "../tests.h" @@ -38,15 +38,15 @@ template void test(unsigned int degree) { - deallog << "Testing dim=" << dim <<", degree=" - << degree << std::endl; - + deallog << "Testing dim=" << dim <<", degree=" + << degree << std::endl; + SphericalManifold manifold; Triangulation tria; GridGenerator::hyper_shell(tria, Point(), .4, .6, 6); typename Triangulation::active_cell_iterator cell; - - for(cell = tria.begin_active(); cell != tria.end(); ++cell) + + for (cell = tria.begin_active(); cell != tria.end(); ++cell) cell->set_all_manifold_ids(1); tria.set_manifold(1, manifold); @@ -56,22 +56,24 @@ void test(unsigned int degree) DoFHandler dh(tria); dh.distribute_dofs(fe); QGaussLobatto quad(degree+1); - + FEValues fe_v(mapping, fe, quad, update_quadrature_points); // char fname[50]; // sprintf(fname, "out_%d_%d.gpl", dim, degree); // std::ofstream ofile(fname); - std::ostream &ofile = deallog.get_file_stream(); - - for(typename DoFHandler::active_cell_iterator cell = dh.begin_active(); - cell != dh.end(); ++cell) { - fe_v.reinit(cell); - for(unsigned int q=0; q::active_cell_iterator cell = dh.begin_active(); + cell != dh.end(); ++cell) + { + fe_v.reinit(cell); + for (unsigned int q=0; q(d); - test<3>(d); - } + for (unsigned int d=1; d<5; ++d) + { + test<2>(d); + test<3>(d); + } return 0; } diff --git a/tests/manifold/tria_accessor_point_01.cc b/tests/manifold/tria_accessor_point_01.cc index de7e055abf..893f3e00a3 100644 --- a/tests/manifold/tria_accessor_point_01.cc +++ b/tests/manifold/tria_accessor_point_01.cc @@ -29,28 +29,30 @@ template void test(unsigned int ref=1) { - deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; + deallog << "Testing dim " << dim + << ", spacedim " << spacedim << std::endl; SphericalManifold manifold; - + Triangulation tria; GridGenerator::hyper_shell (tria, Point(), .3, .6, 12); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - cell->set_all_manifold_ids(1); - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + cell->set_all_manifold_ids(1); + } + tria.set_manifold(1, manifold); tria.refine_global(1); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - for(unsigned int f=0;f::faces_per_cell; ++f) - if(cell->face(f)->at_boundary()) - deallog << "Center: " << cell->face(f)->center(true) - << ", Norm: " << cell->face(f)->center(true).norm() << std::endl; - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->face(f)->at_boundary()) + deallog << "Center: " << cell->face(f)->center(true) + << ", Norm: " << cell->face(f)->center(true).norm() << std::endl; + } + } int main () @@ -59,10 +61,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<2,2>(); test<3,3>(); - + return 0; } diff --git a/tests/manifold/tria_accessor_point_02.cc b/tests/manifold/tria_accessor_point_02.cc index 3ea381ae0f..dc7a66386a 100644 --- a/tests/manifold/tria_accessor_point_02.cc +++ b/tests/manifold/tria_accessor_point_02.cc @@ -29,28 +29,30 @@ template void test(unsigned int ref=1) { - deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; + deallog << "Testing dim " << dim + << ", spacedim " << spacedim << std::endl; SphericalManifold manifold; - + Triangulation tria; GridGenerator::hyper_shell (tria, Point(), .3, .6, 12); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - cell->set_all_manifold_ids(1); - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + cell->set_all_manifold_ids(1); + } + tria.set_manifold(1, manifold); tria.refine_global(1); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - for(unsigned int f=0;f::faces_per_cell; ++f) - if(cell->face(f)->at_boundary()) - deallog << "Center: " << cell->face(f)->center(true, true) - << ", Norm: " << cell->face(f)->center(true, true).norm() << std::endl; - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->face(f)->at_boundary()) + deallog << "Center: " << cell->face(f)->center(true, true) + << ", Norm: " << cell->face(f)->center(true, true).norm() << std::endl; + } + } int main () @@ -59,10 +61,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<2,2>(); test<3,3>(); - + return 0; } diff --git a/tests/manifold/tria_accessor_point_03.cc b/tests/manifold/tria_accessor_point_03.cc index 3ea381ae0f..dc7a66386a 100644 --- a/tests/manifold/tria_accessor_point_03.cc +++ b/tests/manifold/tria_accessor_point_03.cc @@ -29,28 +29,30 @@ template void test(unsigned int ref=1) { - deallog << "Testing dim " << dim - << ", spacedim " << spacedim << std::endl; + deallog << "Testing dim " << dim + << ", spacedim " << spacedim << std::endl; SphericalManifold manifold; - + Triangulation tria; GridGenerator::hyper_shell (tria, Point(), .3, .6, 12); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - cell->set_all_manifold_ids(1); - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + cell->set_all_manifold_ids(1); + } + tria.set_manifold(1, manifold); tria.refine_global(1); - for(typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) { - for(unsigned int f=0;f::faces_per_cell; ++f) - if(cell->face(f)->at_boundary()) - deallog << "Center: " << cell->face(f)->center(true, true) - << ", Norm: " << cell->face(f)->center(true, true).norm() << std::endl; - } - + for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) + { + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->face(f)->at_boundary()) + deallog << "Center: " << cell->face(f)->center(true, true) + << ", Norm: " << cell->face(f)->center(true, true).norm() << std::endl; + } + } int main () @@ -59,10 +61,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + test<2,2>(); test<3,3>(); - + return 0; } diff --git a/tests/matrix_free/assemble_matrix_01.cc b/tests/matrix_free/assemble_matrix_01.cc index fb862d1dbe..5f1018f712 100644 --- a/tests/matrix_free/assemble_matrix_01.cc +++ b/tests/matrix_free/assemble_matrix_01.cc @@ -53,8 +53,8 @@ void do_test (const DoFHandler &dof) update_JxW_values); FEEvaluation - fe_eval (mapping, dof.get_fe(), QGauss<1>(fe_degree+1), - update_values | update_gradients | update_JxW_values); + fe_eval (mapping, dof.get_fe(), QGauss<1>(fe_degree+1), + update_values | update_gradients | update_JxW_values); const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); diff --git a/tests/matrix_free/assemble_matrix_02.cc b/tests/matrix_free/assemble_matrix_02.cc index 5965fa5343..9513410271 100644 --- a/tests/matrix_free/assemble_matrix_02.cc +++ b/tests/matrix_free/assemble_matrix_02.cc @@ -52,9 +52,9 @@ void do_test (const DoFHandler &dof) update_JxW_values); FEEvaluation - phi_u (mapping, dof.get_fe(), QGauss<1>(degree_p+2), - update_values | update_gradients | update_JxW_values, - 0); + phi_u (mapping, dof.get_fe(), QGauss<1>(degree_p+2), + update_values | update_gradients | update_JxW_values, + 0); FEEvaluation phi_p (dof.get_fe(), phi_u, dim); const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell; diff --git a/tests/matrix_free/assemble_matrix_03.cc b/tests/matrix_free/assemble_matrix_03.cc index 710195537e..df97ba5dd9 100644 --- a/tests/matrix_free/assemble_matrix_03.cc +++ b/tests/matrix_free/assemble_matrix_03.cc @@ -147,13 +147,13 @@ void do_test (const DoFHandler &dof) unsigned int dummy = 0; WorkStream:: - run (dof.begin_active(), dof.end(), - &assemble_on_cell, - ©_data_local_to_global, - Assembly::Scratch::Data(dof.get_fe()), - dummy, - 2*MultithreadInfo::n_threads(), - 1); + run (dof.begin_active(), dof.end(), + &assemble_on_cell, + ©_data_local_to_global, + Assembly::Scratch::Data(dof.get_fe()), + dummy, + 2*MultithreadInfo::n_threads(), + 1); deallog << "OK" << std::endl; } diff --git a/tests/matrix_free/copy_feevaluation.cc b/tests/matrix_free/copy_feevaluation.cc index 7887dc697d..6dfa224952 100644 --- a/tests/matrix_free/copy_feevaluation.cc +++ b/tests/matrix_free/copy_feevaluation.cc @@ -70,9 +70,9 @@ public: typedef VectorizedArray vector_t; // allocate FEEvaluation. This test will test proper alignment AlignedVector > velocity - (1, FEEvaluation(data, 0)); + (1, FEEvaluation(data, 0)); AlignedVector > pressure - (1, FEEvaluation(data, 1)); + (1, FEEvaluation(data, 1)); for (unsigned int cell=cell_range.first; cell evaluator(shape_sym, shape_sym, shape_sym); if (type == 0) @@ -180,4 +180,4 @@ int main () return 0; } - + diff --git a/tests/matrix_free/matrix_vector_15.cc b/tests/matrix_free/matrix_vector_15.cc index b1d2e2daae..9d12f576d4 100644 --- a/tests/matrix_free/matrix_vector_15.cc +++ b/tests/matrix_free/matrix_vector_15.cc @@ -58,11 +58,11 @@ public: VECTOR src_cpy = src; constraints.distribute(src_cpy); FEEvaluation - fe_eval(dof_handler.get_fe(), QGauss<1>(fe_degree+1), - update_gradients | update_values | update_JxW_values); + fe_eval(dof_handler.get_fe(), QGauss<1>(fe_degree+1), + update_gradients | update_values | update_JxW_values); dst = 0; typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); for ( ; cell != endc; ++cell) { fe_eval.reinit(cell); diff --git a/tests/matrix_free/matrix_vector_16.cc b/tests/matrix_free/matrix_vector_16.cc index f964918e99..8f619c10c0 100644 --- a/tests/matrix_free/matrix_vector_16.cc +++ b/tests/matrix_free/matrix_vector_16.cc @@ -58,11 +58,11 @@ public: VECTOR src_cpy = src; constraints.distribute(src_cpy); FEEvaluation fe_eval - (dof_handler.get_fe(), QGauss<1>(fe_degree+1), - update_values | update_gradients | update_JxW_values); + (dof_handler.get_fe(), QGauss<1>(fe_degree+1), + update_values | update_gradients | update_JxW_values); dst = 0; typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + endc = dof_handler.end(); for ( ; cell != endc; ++cell) { fe_eval.reinit(cell); diff --git a/tests/matrix_free/matrix_vector_hp.cc b/tests/matrix_free/matrix_vector_hp.cc index 5fb5cafb66..7e3261f2db 100644 --- a/tests/matrix_free/matrix_vector_hp.cc +++ b/tests/matrix_free/matrix_vector_hp.cc @@ -49,31 +49,31 @@ public: data.create_cell_subrange_hp (cell_range, 1); if (subrange_deg.second > subrange_deg.first) helmholtz_operator > (data, dst, src, - subrange_deg); + subrange_deg); subrange_deg = data.create_cell_subrange_hp (cell_range, 2); if (subrange_deg.second > subrange_deg.first) helmholtz_operator > (data, dst, src, - subrange_deg); + subrange_deg); subrange_deg = data.create_cell_subrange_hp (cell_range, 3); if (subrange_deg.second > subrange_deg.first) helmholtz_operator > (data, dst, src, - subrange_deg); + subrange_deg); subrange_deg = data.create_cell_subrange_hp (cell_range, 4); if (subrange_deg.second > subrange_deg.first) helmholtz_operator > (data, dst, src, - subrange_deg); + subrange_deg); subrange_deg = data.create_cell_subrange_hp (cell_range, 5); if (subrange_deg.second > subrange_deg.first) helmholtz_operator > (data, dst, src, - subrange_deg); + subrange_deg); subrange_deg = data.create_cell_subrange_hp (cell_range, 6); if (subrange_deg.second > subrange_deg.first) helmholtz_operator > (data, dst, src, - subrange_deg); + subrange_deg); subrange_deg = data.create_cell_subrange_hp (cell_range, 7); if (subrange_deg.second > subrange_deg.first) helmholtz_operator > (data, dst, src, - subrange_deg); + subrange_deg); } void vmult (Vector &dst, diff --git a/tests/matrix_free/step-48c.cc b/tests/matrix_free/step-48c.cc index d92646c60c..6bb4e58905 100644 --- a/tests/matrix_free/step-48c.cc +++ b/tests/matrix_free/step-48c.cc @@ -14,7 +14,7 @@ // --------------------------------------------------------------------- -// simplified form for step-48 test +// simplified form for step-48 test #include "../tests.h" @@ -171,7 +171,7 @@ namespace Step48 { public: InitialSolution (const unsigned int n_components = 1, - const double time = 0.) : Function(n_components, time) {} + const double time = 0.) : Function(n_components, time) {} virtual double value (const Point &p, const unsigned int component = 0) const; }; diff --git a/tests/matrix_free/thread_correctness_hp.cc b/tests/matrix_free/thread_correctness_hp.cc index f77043d0e4..fa4f127be6 100644 --- a/tests/matrix_free/thread_correctness_hp.cc +++ b/tests/matrix_free/thread_correctness_hp.cc @@ -50,9 +50,9 @@ public: // orders std::pair subrange_deg; #define CALL_METHOD(degree) \ - subrange_deg = data.create_cell_subrange_hp(cell_range, degree); \ - if (subrange_deg.second > subrange_deg.first) \ - helmholtz_operator > (data, dst, src, subrange_deg) + subrange_deg = data.create_cell_subrange_hp(cell_range, degree); \ + if (subrange_deg.second > subrange_deg.first) \ + helmholtz_operator > (data, dst, src, subrange_deg) CALL_METHOD(1); CALL_METHOD(2); diff --git a/tests/metis/metis_01a.cc b/tests/metis/metis_01a.cc index 0ee2df0c7e..7765d77cbc 100644 --- a/tests/metis/metis_01a.cc +++ b/tests/metis/metis_01a.cc @@ -41,7 +41,7 @@ void partition (const SparsityPattern &sparsity_pattern, - const unsigned int n_partitions) + const unsigned int n_partitions) { // generate the data structures for // METIS. Note that this is particularly @@ -49,10 +49,10 @@ void partition (const SparsityPattern &sparsity_pattern, // compressed row storage format. we only // have to set up a few auxiliary arrays idx_t - n = static_cast(sparsity_pattern.n_rows()), - ncon = 1, // number of balancing constraints (should be >0) - nparts = static_cast(n_partitions), // number of subdomains to create - dummy; // the numbers of edges cut by the + n = static_cast(sparsity_pattern.n_rows()), + ncon = 1, // number of balancing constraints (should be >0) + nparts = static_cast(n_partitions), // number of subdomains to create + dummy; // the numbers of edges cut by the // resulting partition // use default options for METIS @@ -69,8 +69,8 @@ void partition (const SparsityPattern &sparsity_pattern, for (SparsityPattern::size_type row=0; rowcolumn()); + col < sparsity_pattern.end(row); ++col) + int_colnums.push_back(col->column()); int_rowstart.push_back(int_colnums.size()); } @@ -90,8 +90,8 @@ void partition (const SparsityPattern &sparsity_pattern, deallog << options[i] << ' '; deallog << std::endl; deallog << sizeof(idx_t) << std::endl; - - + + // Make use of METIS' error code. int ierr; @@ -99,9 +99,9 @@ void partition (const SparsityPattern &sparsity_pattern, // create ierr = METIS_PartGraphRecursive(&n, &ncon, &int_rowstart[0], &int_colnums[0], - NULL, NULL, NULL, - &nparts,NULL,NULL,&options[0], - &dummy,&int_partition_indices[0]); + NULL, NULL, NULL, + &nparts,NULL,NULL,&options[0], + &dummy,&int_partition_indices[0]); deallog << "METIS outputs:" << std::endl; deallog << dummy << std::endl; @@ -121,7 +121,7 @@ void test () SparsityPattern cell_connectivity; GridTools::get_face_connectivity_of_cells (triangulation, cell_connectivity); - partition (cell_connectivity, 5); + partition (cell_connectivity, 5); } diff --git a/tests/mpi/active_cell_index_01.cc b/tests/mpi/active_cell_index_01.cc index f4cd1589ef..51e65896ba 100644 --- a/tests/mpi/active_cell_index_01.cc +++ b/tests/mpi/active_cell_index_01.cc @@ -36,7 +36,7 @@ void check (const parallel::distributed::Triangulation &tria) { unsigned int index = 0; for (typename Triangulation::active_cell_iterator cell=tria.begin_active(); - cell!=tria.end(); ++cell, ++index) + cell!=tria.end(); ++cell, ++index) AssertThrow (cell->active_cell_index() == index, ExcInternalError()); AssertThrow (index == tria.n_active_cells(), ExcInternalError()); diff --git a/tests/mpi/attach_data_01.cc b/tests/mpi/attach_data_01.cc index c78690f8b0..595eedee77 100644 --- a/tests/mpi/attach_data_01.cc +++ b/tests/mpi/attach_data_01.cc @@ -34,8 +34,8 @@ template void pack_function (const typename parallel::distributed::Triangulation::cell_iterator &cell, - const typename parallel::distributed::Triangulation::CellStatus status, - void *data) + const typename parallel::distributed::Triangulation::CellStatus status, + void *data) { static int some_number = 0; deallog << "packing cell " << cell->id() << " with data=" << some_number << " status="; @@ -55,8 +55,8 @@ void pack_function (const typename parallel::distributed::Triangulation { Assert(!cell->has_children(), ExcInternalError()); } - - int * intdata = reinterpret_cast(data); + + int *intdata = reinterpret_cast(data); *intdata = some_number; ++some_number; @@ -64,16 +64,16 @@ void pack_function (const typename parallel::distributed::Triangulation template void unpack_function (const typename parallel::distributed::Triangulation::cell_iterator &cell, - const typename parallel::distributed::Triangulation::CellStatus status, - const void *data) + const typename parallel::distributed::Triangulation::CellStatus status, + const void *data) { - const int * intdata = reinterpret_cast(data); + const int *intdata = reinterpret_cast(data); deallog << "unpacking cell " << cell->id() << " with data=" << (*intdata) << " status="; if (status==parallel::distributed::Triangulation::CELL_PERSIST) deallog << "PERSIST"; else if (status==parallel::distributed::Triangulation::CELL_REFINE) - deallog << "REFINE"; + deallog << "REFINE"; else if (status==parallel::distributed::Triangulation::CELL_COARSEN) deallog << "COARSEN"; deallog << std::endl; @@ -102,37 +102,37 @@ void test() GridGenerator::subdivided_hyper_cube(tr, 2); tr.refine_global(1); deallog << "cells before: " << tr.n_global_active_cells() << std::endl; - + typename Triangulation::active_cell_iterator cell; for (cell = tr.begin_active(); cell != tr.end(); ++cell) { - if (cell->id().to_string()=="0_1:0") - { - cell->set_refine_flag(); - } - else if (cell->parent()->id().to_string()=="3_0:") - cell->set_coarsen_flag(); - - if (cell->is_locally_owned()) - { - deallog << "myid=" << myid << " cellid=" << cell->id(); - if (cell->coarsen_flag_set()) - deallog << " coarsening" << std::endl; - else if (cell->refine_flag_set()) - deallog << " refining" << std::endl; - else - deallog << std::endl; - } - } + if (cell->id().to_string()=="0_1:0") + { + cell->set_refine_flag(); + } + else if (cell->parent()->id().to_string()=="3_0:") + cell->set_coarsen_flag(); + + if (cell->is_locally_owned()) + { + deallog << "myid=" << myid << " cellid=" << cell->id(); + if (cell->coarsen_flag_set()) + deallog << " coarsening" << std::endl; + else if (cell->refine_flag_set()) + deallog << " refining" << std::endl; + else + deallog << std::endl; + } + } unsigned int offset = tr.register_data_attach(sizeof(int), pack_function); deallog << "offset=" << offset << std::endl; tr.execute_coarsening_and_refinement(); - + deallog << "cells after: " << tr.n_global_active_cells() << std::endl; /* @@ -140,12 +140,12 @@ void test() cell != tr.end(); ++cell) { - if (cell->is_locally_owned()) - deallog << "myid=" << myid << " cellid=" << cell->id() << std::endl; - }*/ + if (cell->is_locally_owned()) + deallog << "myid=" << myid << " cellid=" << cell->id() << std::endl; + }*/ + + tr.notify_ready_to_unpack(offset, unpack_function); - tr.notify_ready_to_unpack(offset, unpack_function); - const unsigned int checksum = tr.get_checksum (); deallog << "Checksum: " << checksum diff --git a/tests/mpi/cell_weights_01.cc b/tests/mpi/cell_weights_01.cc index 85dcdda137..44b83468de 100644 --- a/tests/mpi/cell_weights_01.cc +++ b/tests/mpi/cell_weights_01.cc @@ -41,8 +41,8 @@ void test() unsigned int numproc = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD); parallel::distributed::Triangulation tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::subdivided_hyper_cube(tr, 16); tr.refine_global(1); @@ -55,10 +55,10 @@ void test() if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::subdivided_hyper_cube(tr, 16); tr.refine_global(1); @@ -63,15 +63,15 @@ void test() weights[i] = 1; tr.repartition (weights); } - + if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::subdivided_hyper_cube(tr, 16); tr.refine_global(1); @@ -59,15 +59,15 @@ void test() { tr.repartition (); } - + if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::subdivided_hyper_cube(tr, 16); tr.refine_global(1); @@ -55,10 +55,10 @@ void test() if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::subdivided_hyper_cube(tr, 16); tr.refine_global(1); @@ -51,46 +51,46 @@ void test() // repartition the mesh; attach different weights to all cells std::vector weights (tr.n_active_cells()); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) + cell = tr.begin_active(); cell != tr.end(); ++cell) weights[cell->active_cell_index()] = (cell->center()[0] < 0.5 - || - cell->center()[1] < 0.5 - ? - 1 - : - 4); + || + cell->center()[1] < 0.5 + ? + 1 + : + 4); tr.repartition (weights); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p integrated_weights (numproc, 0.0); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) + cell = tr.begin_active(); cell != tr.end(); ++cell) if (cell->is_locally_owned()) integrated_weights[myid] - += (cell->center()[0] < 0.5 - || - cell->center()[1] < 0.5 - ? - 1 - : - 4); + += (cell->center()[0] < 0.5 + || + cell->center()[1] < 0.5 + ? + 1 + : + 4); Utilities::MPI::sum (integrated_weights, MPI_COMM_WORLD, integrated_weights); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::subdivided_hyper_cube(tr, 16); tr.refine_global(1); @@ -50,46 +50,46 @@ void test() // repartition the mesh; attach different weights to all cells std::vector weights (tr.n_active_cells()); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) + cell = tr.begin_active(); cell != tr.end(); ++cell) weights[cell->active_cell_index()] = (cell->center()[0] < 0.5 - || - cell->center()[1] < 0.5 - ? - 1 - : - 1000); + || + cell->center()[1] < 0.5 + ? + 1 + : + 1000); tr.repartition (weights); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p integrated_weights (numproc, 0.0); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) + cell = tr.begin_active(); cell != tr.end(); ++cell) if (cell->is_locally_owned()) integrated_weights[myid] - += (cell->center()[0] < 0.5 - || - cell->center()[1] < 0.5 - ? - 1 - : - 1000); + += (cell->center()[0] < 0.5 + || + cell->center()[1] < 0.5 + ? + 1 + : + 1000); Utilities::MPI::sum (integrated_weights, MPI_COMM_WORLD, integrated_weights); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); // create a 16x16 or 16x16x16 mesh where each cell has size 1x1 ir 1x1x1 GridGenerator::subdivided_hyper_cube(tr, 16, 0, 16); - + // repartition the mesh; attach different weights to all cells std::vector weights (tr.n_active_cells()); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) + cell = tr.begin_active(); cell != tr.end(); ++cell) weights[cell->active_cell_index()] = ( - // bottom left corner - (cell->center()[0] < 1) - && - (cell->center()[1] < 1) - && - (dim == 3 ? - (cell->center()[2] < 1) : - true) - ? - // one cell has more weight than all others together - tr.n_global_active_cells() - : - 1); + // bottom left corner + (cell->center()[0] < 1) + && + (cell->center()[1] < 1) + && + (dim == 3 ? + (cell->center()[2] < 1) : + true) + ? + // one cell has more weight than all others together + tr.n_global_active_cells() + : + 1); tr.repartition (weights); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p integrated_weights (numproc, 0.0); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) + cell = tr.begin_active(); cell != tr.end(); ++cell) if (cell->is_locally_owned()) integrated_weights[myid] - += ( - // bottom left corner - (cell->center()[0] < 1) - && - (cell->center()[1] < 1) - && - (dim == 3 ? - (cell->center()[2] < 1) : - true) - ? - tr.n_global_active_cells() - : - 1); + += ( + // bottom left corner + (cell->center()[0] < 1) + && + (cell->center()[1] < 1) + && + (dim == 3 ? + (cell->center()[2] < 1) : + true) + ? + tr.n_global_active_cells() + : + 1); Utilities::MPI::sum (integrated_weights, MPI_COMM_WORLD, integrated_weights); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); // create a 16x16 or 16x16x16 mesh where each cell has size 1x1 ir 1x1x1 GridGenerator::subdivided_hyper_cube(tr, 8, 0, 16); @@ -58,59 +58,59 @@ void test() // repartition the mesh; attach different weights to all cells std::vector weights (tr.n_active_cells()); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) + cell = tr.begin_active(); cell != tr.end(); ++cell) weights[cell->active_cell_index()] = ( - // bottom left corner - (cell->center()[0] < 1) - && - (cell->center()[1] < 1) - && - (dim == 3 ? - (cell->center()[2] < 1) : - true) - ? - // one cell has more weight than all others together - tr.n_global_active_cells() - : - 1); + // bottom left corner + (cell->center()[0] < 1) + && + (cell->center()[1] < 1) + && + (dim == 3 ? + (cell->center()[2] < 1) : + true) + ? + // one cell has more weight than all others together + tr.n_global_active_cells() + : + 1); tr.repartition (weights); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p integrated_weights (numproc, 0.0); for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); cell != tr.end(); ++cell) + cell = tr.begin_active(); cell != tr.end(); ++cell) if (cell->is_locally_owned()) integrated_weights[myid] - += ( - // bottom left corner - (cell->center()[0] < 1) - && - (cell->center()[1] < 1) - && - (dim == 3 ? - (cell->center()[2] < 1) : - true) - ? - tr.n_global_active_cells() - : - 1); + += ( + // bottom left corner + (cell->center()[0] < 1) + && + (cell->center()[1] < 1) + && + (dim == 3 ? + (cell->center()[2] < 1) : + true) + ? + tr.n_global_active_cells() + : + 1); Utilities::MPI::sum (integrated_weights, MPI_COMM_WORLD, integrated_weights); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) for (unsigned int p=0; p &tria, cat_file((std::string(filename) + "_0000.vtu").c_str()); } else if (myid==1) - cat_file((std::string(filename) + "_0001.vtu").c_str()); + cat_file((std::string(filename) + "_0001.vtu").c_str()); else if (myid==2) - cat_file((std::string(filename) + "_0002.vtu").c_str()); + cat_file((std::string(filename) + "_0002.vtu").c_str()); else AssertThrow(false, ExcNotImplemented()); - + } template @@ -80,21 +80,21 @@ void test(std::ostream & /*out*/) deallog << "dofs " << dh.n_dofs() << std::endl; DataOut > data_out; - data_out.attach_triangulation (tr); - Vector subdomain (tr.n_active_cells()); - for (unsigned int i=0; i subdomain (tr.n_active_cells()); + for (unsigned int i=0; i values(2); values[0] = 1.5; diff --git a/tests/mpi/collective_02_dealii_vector_in_place.cc b/tests/mpi/collective_02_dealii_vector_in_place.cc index 0f5c65f914..262601ac0f 100644 --- a/tests/mpi/collective_02_dealii_vector_in_place.cc +++ b/tests/mpi/collective_02_dealii_vector_in_place.cc @@ -41,7 +41,7 @@ void test() if (myid==0) deallog << sums[0] << ' ' << sums[1] << std::endl; } - + { Vector sums(2); sums[0] = 1.5; diff --git a/tests/mpi/communicate_moved_vertices_01.cc b/tests/mpi/communicate_moved_vertices_01.cc index 6d69845499..77bed69e17 100644 --- a/tests/mpi/communicate_moved_vertices_01.cc +++ b/tests/mpi/communicate_moved_vertices_01.cc @@ -46,16 +46,16 @@ void test() const std::vector locally_owned_vertices = GridTools::get_locally_owned_vertices (tr); - + if (myid == 0) deallog << "#vertices = " - << tr.n_vertices() - << std::endl - << "#locally_owned_vertices = " - << std::count (locally_owned_vertices.begin(), - locally_owned_vertices.end(), - true) - << std::endl; + << tr.n_vertices() + << std::endl + << "#locally_owned_vertices = " + << std::count (locally_owned_vertices.begin(), + locally_owned_vertices.end(), + true) + << std::endl; // now do the move Point shift; @@ -66,15 +66,15 @@ void test() for (unsigned int v=0; v&>(tr.get_vertices()[v]) += shift; - ++n_vertices_moved; + // maybe not the most elegant way to do it, but it works for the purpose + // of the test... + const_cast&>(tr.get_vertices()[v]) += shift; + ++n_vertices_moved; } Assert (Utilities::MPI::sum (n_vertices_moved, MPI_COMM_WORLD) - == - (dim==2 ? 25 : 125), - ExcInternalError()); + == + (dim==2 ? 25 : 125), + ExcInternalError()); tr.communicate_locally_moved_vertices (locally_owned_vertices); @@ -92,14 +92,14 @@ void test() { for (unsigned int i=0; i::active_cell_iterator cell = triangulation.begin_active (); if (cell->is_locally_owned ()) cell->set_refine_flag (); - + triangulation.execute_coarsening_and_refinement (); if (myid == 0) deallog << "#cells = " << triangulation.n_global_active_cells() << std::endl; @@ -78,7 +78,7 @@ void test() vec = 1; vec_ghosted = vec; vec = -1; - + constraints.condense (vec_ghosted, vec); vec.print(deallog.get_file_stream()); diff --git a/tests/mpi/constraint_matrix_crash_01.cc b/tests/mpi/constraint_matrix_crash_01.cc index c4fdced228..00bc024316 100644 --- a/tests/mpi/constraint_matrix_crash_01.cc +++ b/tests/mpi/constraint_matrix_crash_01.cc @@ -35,7 +35,7 @@ void test () IndexSet local_active_together(3); local_active_together.add_range(0,3); //local_active_together.compress(); - + ConstraintMatrix cm(local_active_together); cm.add_line(1); cm.close(); diff --git a/tests/mpi/crash_05.cc b/tests/mpi/crash_05.cc index dae7a0d0ab..3fe15b28e9 100644 --- a/tests/mpi/crash_05.cc +++ b/tests/mpi/crash_05.cc @@ -21,11 +21,11 @@ 905: -------------------------------------------------------- 905: An error occurred in line <1898> of file in function 905: void dealii::ConstraintMatrix::add_line(dealii::ConstraintMatrix::size_type) -905: The violated condition was: +905: The violated condition was: 905: line != numbers::invalid_size_type 905: The name and call sequence of the exception was: 905: ExcInternalError() -905: Additional Information: +905: Additional Information: 905: (none) 905: -------------------------------------------------------- */ @@ -53,45 +53,45 @@ template void test() { - parallel::distributed::Triangulation triangulation(MPI_COMM_WORLD); - GridGenerator::hyper_ball(triangulation); - - if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0) - { - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - //cell->set_refine_flag (); - (++cell)->set_refine_flag (); - } - - triangulation.execute_coarsening_and_refinement(); - deallog << "n_cells: " << triangulation.n_global_active_cells() << std::endl; - FE_RaviartThomas fe(0); // crashing - //FESystem fe(FE_Q(2), 1); // working - DoFHandler dof_handler(triangulation); - - dof_handler.distribute_dofs(fe); - - ConstraintMatrix constraints; - DoFTools::make_hanging_node_constraints(dof_handler, constraints); - - IndexSet relevant_set; - DoFTools::extract_locally_relevant_dofs (dof_handler, relevant_set); - deallog << "relevant set:" << std::endl; - relevant_set.print(deallog.get_file_stream()); - deallog << "constraints:" << std::endl; - constraints.print(deallog.get_file_stream()); - - if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) - deallog << "OK" << std::endl; + parallel::distributed::Triangulation triangulation(MPI_COMM_WORLD); + GridGenerator::hyper_ball(triangulation); + + if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0) + { + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + //cell->set_refine_flag (); + (++cell)->set_refine_flag (); + } + + triangulation.execute_coarsening_and_refinement(); + deallog << "n_cells: " << triangulation.n_global_active_cells() << std::endl; + FE_RaviartThomas fe(0); // crashing + //FESystem fe(FE_Q(2), 1); // working + DoFHandler dof_handler(triangulation); + + dof_handler.distribute_dofs(fe); + + ConstraintMatrix constraints; + DoFTools::make_hanging_node_constraints(dof_handler, constraints); + + IndexSet relevant_set; + DoFTools::extract_locally_relevant_dofs (dof_handler, relevant_set); + deallog << "relevant set:" << std::endl; + relevant_set.print(deallog.get_file_stream()); + deallog << "constraints:" << std::endl; + constraints.print(deallog.get_file_stream()); + + if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) + deallog << "OK" << std::endl; } int main(int argc, char *argv[]) -{ +{ Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1); MPILogInitAll log; test<2>(); - + } diff --git a/tests/mpi/crash_06.cc b/tests/mpi/crash_06.cc index af00417806..e240e02cb8 100644 --- a/tests/mpi/crash_06.cc +++ b/tests/mpi/crash_06.cc @@ -45,31 +45,31 @@ template void test(FiniteElement &fe) { deallog << "dim=" << dim << std::endl; - - parallel::distributed::Triangulation triangulation(MPI_COMM_WORLD); - GridGenerator::hyper_ball(triangulation); - triangulation.refine_global(1); - - if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0) - { - typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - for (;cell!=triangulation.end();++cell) - if (Testing::rand()%2) - cell->set_refine_flag (); - } - - triangulation.execute_coarsening_and_refinement(); - deallog << "n_cells: " << triangulation.n_global_active_cells() << std::endl; - DoFHandler dof_handler(triangulation); - - dof_handler.distribute_dofs(fe); - - ConstraintMatrix constraints; - DoFTools::make_hanging_node_constraints(dof_handler, constraints); - - if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) - deallog << "OK" << std::endl; + + parallel::distributed::Triangulation triangulation(MPI_COMM_WORLD); + GridGenerator::hyper_ball(triangulation); + triangulation.refine_global(1); + + if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0) + { + typename Triangulation::active_cell_iterator + cell = triangulation.begin_active(); + for (; cell!=triangulation.end(); ++cell) + if (Testing::rand()%2) + cell->set_refine_flag (); + } + + triangulation.execute_coarsening_and_refinement(); + deallog << "n_cells: " << triangulation.n_global_active_cells() << std::endl; + DoFHandler dof_handler(triangulation); + + dof_handler.distribute_dofs(fe); + + ConstraintMatrix constraints; + DoFTools::make_hanging_node_constraints(dof_handler, constraints); + + if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) + deallog << "OK" << std::endl; } template @@ -84,17 +84,17 @@ void testit() fes.push_back(std_cxx11::shared_ptr >(new FE_DGQ(2))); fes.push_back(std_cxx11::shared_ptr >(new FE_Q_DG0(2))); - for (unsigned int i=0;iget_name() << std::endl; test(*fes[i]); } - + } int main(int argc, char *argv[]) -{ +{ Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1); MPILogInitAll log; diff --git a/tests/mpi/derivative_approximation_01.cc b/tests/mpi/derivative_approximation_01.cc index 3583982eee..d59dd59224 100644 --- a/tests/mpi/derivative_approximation_01.cc +++ b/tests/mpi/derivative_approximation_01.cc @@ -80,9 +80,9 @@ void test() MappingQ1 mapping; Vector indicators(tr.n_active_cells()); DerivativeApproximation::approximate_gradient (mapping, - dofh, - vec_rel, - indicators); + dofh, + vec_rel, + indicators); // we got here, so no exception. if (myid == 0) diff --git a/tests/mpi/derivative_approximation_02.cc b/tests/mpi/derivative_approximation_02.cc index 0545659997..1e94c57c44 100644 --- a/tests/mpi/derivative_approximation_02.cc +++ b/tests/mpi/derivative_approximation_02.cc @@ -45,9 +45,9 @@ class Quadratic : { public: double value (const Point &p, const unsigned int) const - { - return p*p; - } + { + return p*p; + } }; @@ -68,7 +68,7 @@ void test() IndexSet locally_relevant_set; DoFTools::extract_locally_relevant_dofs (dofh, - locally_relevant_set); + locally_relevant_set); // create a vector representing a function that is independent of the number // of processors involved @@ -83,8 +83,8 @@ void test() Vector indicators(tr.n_active_cells()); DerivativeApproximation::approximate_gradient (dofh, - vec_rel, - indicators); + vec_rel, + indicators); // what we get must be a set of derivative indicators, one for each // cell of the distributed mesh. they need to be the same, no matter diff --git a/tests/mpi/distort_random_01.cc b/tests/mpi/distort_random_01.cc index 3bc2eb437c..fccf2ce53a 100644 --- a/tests/mpi/distort_random_01.cc +++ b/tests/mpi/distort_random_01.cc @@ -50,7 +50,7 @@ void test1 (const bool keep_boundary) filename += Utilities::int_to_string(dim); std::ofstream logfile - ((filename+ "-" + Utilities::int_to_string(my_id,2)).c_str()); + ((filename+ "-" + Utilities::int_to_string(my_id,2)).c_str()); GridOut().write_gnuplot (tria, logfile); MPI_Barrier(MPI_COMM_WORLD); @@ -58,10 +58,10 @@ void test1 (const bool keep_boundary) if (my_id==0) for (unsigned int i=0; i (true); - test1<2> (false); - test1<3> (true); - test1<3> (false); - } + { + std::ofstream logfile("output"); + deallog << std::setprecision(4); + logfile << std::setprecision(4); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test1<2> (true); + test1<2> (false); + test1<3> (true); + test1<3> (false); + } else - { - test1<2> (true); - test1<2> (false); - test1<3> (true); - test1<3> (false); - } + { + test1<2> (true); + test1<2> (false); + test1<3> (true); + test1<3> (false); + } return 0; } diff --git a/tests/mpi/distort_random_02.cc b/tests/mpi/distort_random_02.cc index 5d4a57dcfc..15283f6dff 100644 --- a/tests/mpi/distort_random_02.cc +++ b/tests/mpi/distort_random_02.cc @@ -42,14 +42,14 @@ void test1 (const bool keep_boundary) for (typename Triangulation::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell) if (cell->is_locally_owned()) - { - const Point &p = cell->center(); - bool all_positive = true; - for (unsigned int d=0; dset_refine_flag(); - } + { + const Point &p = cell->center(); + bool all_positive = true; + for (unsigned int d=0; dset_refine_flag(); + } tria.execute_coarsening_and_refinement(); GridTools::distort_random (0.1, tria, keep_boundary); @@ -62,7 +62,7 @@ void test1 (const bool keep_boundary) filename += Utilities::int_to_string(dim); std::ofstream logfile - ((filename+ "-" + Utilities::int_to_string(my_id,2)).c_str()); + ((filename+ "-" + Utilities::int_to_string(my_id,2)).c_str()); GridOut().write_gnuplot (tria, logfile); MPI_Barrier(MPI_COMM_WORLD); @@ -70,10 +70,10 @@ void test1 (const bool keep_boundary) if (my_id==0) for (unsigned int i=0; i (true); - test1<2> (false); - test1<3> (true); - test1<3> (false); - } + { + std::ofstream logfile("output"); + deallog << std::setprecision(4); + logfile << std::setprecision(4); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test1<2> (true); + test1<2> (false); + test1<3> (true); + test1<3> (false); + } else - { - test1<2> (true); - test1<2> (false); - test1<3> (true); - test1<3> (false); - } + { + test1<2> (true); + test1<2> (false); + test1<3> (true); + test1<3> (false); + } return 0; } diff --git a/tests/mpi/distribute_sp_02.cc b/tests/mpi/distribute_sp_02.cc index cc8ffd5319..407a12d591 100644 --- a/tests/mpi/distribute_sp_02.cc +++ b/tests/mpi/distribute_sp_02.cc @@ -105,7 +105,7 @@ void test_mpi() bla.add_index(0); partitioning.push_back(bla); - + csp.reinit(partitioning); for (unsigned int i=0; i(csp, locally_owned_dofs_per_cpu2, MPI_COMM_WORLD, diff --git a/tests/mpi/find_active_cell_around_point_01.cc b/tests/mpi/find_active_cell_around_point_01.cc index eca1ef47e0..fdf50407e4 100644 --- a/tests/mpi/find_active_cell_around_point_01.cc +++ b/tests/mpi/find_active_cell_around_point_01.cc @@ -52,26 +52,26 @@ void test() // at the interface between cells Point p; for (unsigned int d=0; d::active_cell_iterator - cell = GridTools::find_active_cell_around_point (tr, p); + cell = GridTools::find_active_cell_around_point (tr, p); const unsigned int - n_locally_owned - = Utilities::MPI::sum (cell->is_locally_owned() ? 1 : 0, - MPI_COMM_WORLD); - + n_locally_owned + = Utilities::MPI::sum (cell->is_locally_owned() ? 1 : 0, + MPI_COMM_WORLD); + const unsigned int - n_locally_owned_or_ghost - = Utilities::MPI::sum (!cell->is_artificial() ? 1 : 0, - MPI_COMM_WORLD); - + n_locally_owned_or_ghost + = Utilities::MPI::sum (!cell->is_artificial() ? 1 : 0, + MPI_COMM_WORLD); + if (myid == 0) deallog << "Locally owned: " << n_locally_owned << std::endl - << "Locally owned or ghost: " + << "Locally owned or ghost: " << n_locally_owned_or_ghost << std::endl; } diff --git a/tests/mpi/has_active_dofs_01.cc b/tests/mpi/has_active_dofs_01.cc index d799d9dd03..e87cd58aeb 100644 --- a/tests/mpi/has_active_dofs_01.cc +++ b/tests/mpi/has_active_dofs_01.cc @@ -46,7 +46,7 @@ void test() FE_Q fe(1); DoFHandler dof_handler (tr); dof_handler.distribute_dofs (fe); - + // there are 2^(2*dim) cells to be owned by this distributed // triangulation. however, since p4est makes sure that all active // children belonging to the same parent are stored on the same @@ -56,46 +56,46 @@ void test() // cells or now by setting a bit mask that we then add up. // output which processor owns something and which don't const int cells_owned = Utilities::MPI::sum (tr.n_locally_owned_active_cells() > 0 - ? - 1 << Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) - : - 0, - MPI_COMM_WORLD); + ? + 1 << Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) + : + 0, + MPI_COMM_WORLD); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) { for (unsigned int i=0; i #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -45,8 +45,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -66,20 +66,20 @@ using namespace dealii; -//#define DISTRIBUTED +//#define DISTRIBUTED template void test_int(const unsigned int n_global = 0, const unsigned int n_local = 0) { - + MPI_Comm mpi_communicator (MPI_COMM_WORLD); const unsigned int n_mpi_processes (Utilities::MPI::n_mpi_processes(mpi_communicator)); const unsigned int this_mpi_process (Utilities::MPI::this_mpi_process(mpi_communicator)); - + ConditionalOStream pcout (std::cout, - (Utilities::MPI::this_mpi_process(mpi_communicator) - == 0)); + (Utilities::MPI::this_mpi_process(mpi_communicator) + == 0)); parallel::distributed::Triangulation tria_distrib(mpi_communicator); @@ -98,42 +98,42 @@ void test_int(const unsigned int n_global = 0, GridGenerator::merge_triangulations (triangulation1, triangulation2, tria_distrib); GridGenerator::merge_triangulations (triangulation1, triangulation2, tria_sequential); } - + tria_distrib.refine_global (n_global); tria_sequential.refine_global(n_global); - + for (unsigned int i = 0; i < n_local; i++) { // refine both the distributed and the sequential triangulation. the // following relies on the fact that the first cell of the "global" // triangulation happens to be on processor 0 if (this_mpi_process == 0) - { - for (typename Triangulation::active_cell_iterator - cell = tria_distrib.begin_active(); - cell != tria_distrib.end(); ++cell) - if (cell->is_locally_owned()) - { - cell->set_refine_flag (); - break; - } - } - - + { + for (typename Triangulation::active_cell_iterator + cell = tria_distrib.begin_active(); + cell != tria_distrib.end(); ++cell) + if (cell->is_locally_owned()) + { + cell->set_refine_flag (); + break; + } + } + + tria_sequential.begin_active()->set_refine_flag (); - - + + tria_distrib.prepare_coarsening_and_refinement (); tria_distrib.execute_coarsening_and_refinement (); - + tria_sequential.prepare_coarsening_and_refinement (); tria_sequential.execute_coarsening_and_refinement (); } - + deallog << n_global << " " << n_local - << " distrib=" << tria_distrib.has_hanging_nodes() - << "; shared=" << tria_sequential.has_hanging_nodes() - << std::endl; + << " distrib=" << tria_distrib.has_hanging_nodes() + << "; shared=" << tria_sequential.has_hanging_nodes() + << std::endl; } @@ -143,13 +143,13 @@ int main (int argc, char *argv[]) deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - + Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, testing_max_num_threads()); test_int<2>(0,0); test_int<2>(2,0); test_int<2>(3,1); - + test_int<3>(0,0); test_int<3>(2,0); - test_int<3>(3,1); + test_int<3>(3,1); } diff --git a/tests/mpi/interpolate_to_different_mesh_01.cc b/tests/mpi/interpolate_to_different_mesh_01.cc index ff099e4c27..1117921b93 100644 --- a/tests/mpi/interpolate_to_different_mesh_01.cc +++ b/tests/mpi/interpolate_to_different_mesh_01.cc @@ -39,20 +39,20 @@ public: }; template -void setup(DoFHandler & dh, - FE_Q & fe, - LA::MPI::Vector & vec, - LA::MPI::Vector & lr_vec) +void setup(DoFHandler &dh, + FE_Q &fe, + LA::MPI::Vector &vec, + LA::MPI::Vector &lr_vec) { dh.distribute_dofs (fe); vec.reinit(dh.locally_owned_dofs(), MPI_COMM_WORLD); IndexSet locally_relevant; DoFTools::extract_locally_relevant_dofs (dh, locally_relevant); - lr_vec.reinit(locally_relevant, MPI_COMM_WORLD); + lr_vec.reinit(locally_relevant, MPI_COMM_WORLD); } template -void output(DoFHandler & dh, LA::MPI::Vector & v, unsigned int loop, const std::string filename_) +void output(DoFHandler &dh, LA::MPI::Vector &v, unsigned int loop, const std::string filename_) { unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); @@ -61,26 +61,26 @@ void output(DoFHandler & dh, LA::MPI::Vector & v, unsigned int loop, const data_out.build_patches (1); std::ostringstream filename; filename << filename_ - << Utilities::int_to_string (loop, 2) - << "." - << Utilities::int_to_string (myid,2) - << ".vtu"; - + << Utilities::int_to_string (loop, 2) + << "." + << Utilities::int_to_string (myid,2) + << ".vtu"; + std::ofstream output (filename.str().c_str()); data_out.write_vtu (output); if (myid) { std::vector filenames; for (unsigned int i=0; i tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::hyper_cube(tr); tr.refine_global(2); parallel::distributed::Triangulation tr2(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::hyper_cube(tr2); tr2.refine_global(2); - + FE_Q fe(1); DoFHandler dh(tr); DoFHandler dh2(tr2); SomeFunction func; - + for (unsigned int loop = 0; loop < 5; ++loop) { @@ -117,26 +117,26 @@ void test() std::vector r_flags(tr.n_active_cells()*dim, false); std::vector c_flags(tr.n_active_cells(), false); - for (unsigned int i=0;i= 2) - { - for (unsigned int j=0;j= 2) + { + for (unsigned int j=0; j local_errors (tr.n_active_cells()); - VectorTools::integrate_difference (dh, lr_vec1, func, local_errors, - QGauss(3), VectorTools::L2_norm); - double total_local_error = local_errors.l2_norm(); - const double total_global_error - = std::sqrt (Utilities::MPI::sum (total_local_error * total_local_error, MPI_COMM_WORLD)); - if (myid == 0) - deallog << "err: " << total_global_error << std::endl; + Vector local_errors (tr.n_active_cells()); + VectorTools::integrate_difference (dh, lr_vec1, func, local_errors, + QGauss(3), VectorTools::L2_norm); + double total_local_error = local_errors.l2_norm(); + const double total_global_error + = std::sqrt (Utilities::MPI::sum (total_local_error * total_local_error, MPI_COMM_WORLD)); + if (myid == 0) + deallog << "err: " << total_global_error << std::endl; } - + //output(dh, lr_vec1, loop, "solutionA-"); //output(dh2, lr_vec2, loop, "solutionB-"); - + // also update tr2 to be the same as tr1 tr2.load_coarsen_flags(c_flags); tr2.load_refine_flags(r_flags); @@ -182,9 +182,9 @@ void test() const unsigned int checksum = tr.get_checksum (); const unsigned int checksum2 = tr2.get_checksum (); if (myid == 0) - deallog << "Checksum: " - << checksum << " " << checksum2 - << std::endl; + deallog << "Checksum: " + << checksum << " " << checksum2 + << std::endl; } } diff --git a/tests/mpi/interpolate_to_different_mesh_02.cc b/tests/mpi/interpolate_to_different_mesh_02.cc index eca7554c64..ff13a1416b 100644 --- a/tests/mpi/interpolate_to_different_mesh_02.cc +++ b/tests/mpi/interpolate_to_different_mesh_02.cc @@ -42,252 +42,252 @@ template class SeventhProblem { public: - SeventhProblem (unsigned int prob_number); - ~SeventhProblem (); - void run (unsigned int cycle); + SeventhProblem (unsigned int prob_number); + ~SeventhProblem (); + void run (unsigned int cycle); private: - void setup_system (); - void setup_second_system (); - void assemble_system (); - void solve (); - MPI_Comm mpi_communicator; - parallel::distributed::Triangulation<2>::Settings settings; - parallel::distributed::Triangulation triangulation; - DoFHandler dof_handler; - FE_Q fe; - IndexSet locally_owned_dofs; - IndexSet locally_relevant_dofs; - ConstraintMatrix constraints; - TrilinosWrappers::SparseMatrix system_matrix; - TrilinosWrappers::MPI::Vector locally_relevant_solution; - TrilinosWrappers::MPI::Vector interpolated_locally_relevant_solution; - TrilinosWrappers::MPI::Vector system_rhs; - parallel::distributed::Triangulation second_triangulation; - DoFHandler second_dof_handler; - FE_Q second_fe; - IndexSet second_locally_owned_dofs; - IndexSet second_locally_relevant_dofs; - TrilinosWrappers::MPI::Vector second_locally_relevant_solution; - ConditionalOStream pcout; - unsigned int prob_number; + void setup_system (); + void setup_second_system (); + void assemble_system (); + void solve (); + MPI_Comm mpi_communicator; + parallel::distributed::Triangulation<2>::Settings settings; + parallel::distributed::Triangulation triangulation; + DoFHandler dof_handler; + FE_Q fe; + IndexSet locally_owned_dofs; + IndexSet locally_relevant_dofs; + ConstraintMatrix constraints; + TrilinosWrappers::SparseMatrix system_matrix; + TrilinosWrappers::MPI::Vector locally_relevant_solution; + TrilinosWrappers::MPI::Vector interpolated_locally_relevant_solution; + TrilinosWrappers::MPI::Vector system_rhs; + parallel::distributed::Triangulation second_triangulation; + DoFHandler second_dof_handler; + FE_Q second_fe; + IndexSet second_locally_owned_dofs; + IndexSet second_locally_relevant_dofs; + TrilinosWrappers::MPI::Vector second_locally_relevant_solution; + ConditionalOStream pcout; + unsigned int prob_number; }; template SeventhProblem::SeventhProblem (unsigned int prob_number) -: -mpi_communicator (MPI_COMM_WORLD), -settings (parallel::distributed::Triangulation<2,2>::no_automatic_repartitioning), -triangulation (mpi_communicator, - typename Triangulation::MeshSmoothing - (Triangulation::smoothing_on_refinement | - Triangulation::smoothing_on_coarsening), - settings), -dof_handler (triangulation), -fe (2), -second_triangulation (mpi_communicator, - typename Triangulation::MeshSmoothing - (Triangulation::smoothing_on_refinement | - Triangulation::smoothing_on_coarsening), - settings), -second_dof_handler (second_triangulation), -second_fe (2), -pcout (deallog.get_file_stream(), - (Utilities::MPI::this_mpi_process(mpi_communicator) - == 0)), -prob_number(prob_number) + : + mpi_communicator (MPI_COMM_WORLD), + settings (parallel::distributed::Triangulation<2,2>::no_automatic_repartitioning), + triangulation (mpi_communicator, + typename Triangulation::MeshSmoothing + (Triangulation::smoothing_on_refinement | + Triangulation::smoothing_on_coarsening), + settings), + dof_handler (triangulation), + fe (2), + second_triangulation (mpi_communicator, + typename Triangulation::MeshSmoothing + (Triangulation::smoothing_on_refinement | + Triangulation::smoothing_on_coarsening), + settings), + second_dof_handler (second_triangulation), + second_fe (2), + pcout (deallog.get_file_stream(), + (Utilities::MPI::this_mpi_process(mpi_communicator) + == 0)), + prob_number(prob_number) {} template SeventhProblem::~SeventhProblem () { - dof_handler.clear (); - second_dof_handler.clear (); + dof_handler.clear (); + second_dof_handler.clear (); } template void SeventhProblem::setup_system () { - dof_handler.distribute_dofs (fe); - locally_owned_dofs = dof_handler.locally_owned_dofs (); - DoFTools::extract_locally_relevant_dofs (dof_handler, - locally_relevant_dofs); - locally_relevant_solution.reinit (locally_owned_dofs, - locally_relevant_dofs, mpi_communicator); - system_rhs.reinit (locally_owned_dofs, mpi_communicator); - system_rhs = 0; - constraints.clear (); - constraints.reinit (locally_relevant_dofs); - DoFTools::make_hanging_node_constraints (dof_handler, constraints); - VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - constraints); - constraints.close (); - CompressedSimpleSparsityPattern csp (locally_relevant_dofs); - DoFTools::make_sparsity_pattern (dof_handler, csp, - constraints, false); - SparsityTools::distribute_sparsity_pattern (csp, - dof_handler.n_locally_owned_dofs_per_processor(), - mpi_communicator, - locally_relevant_dofs); - system_matrix.reinit (locally_owned_dofs, - locally_owned_dofs, - csp, - mpi_communicator); + dof_handler.distribute_dofs (fe); + locally_owned_dofs = dof_handler.locally_owned_dofs (); + DoFTools::extract_locally_relevant_dofs (dof_handler, + locally_relevant_dofs); + locally_relevant_solution.reinit (locally_owned_dofs, + locally_relevant_dofs, mpi_communicator); + system_rhs.reinit (locally_owned_dofs, mpi_communicator); + system_rhs = 0; + constraints.clear (); + constraints.reinit (locally_relevant_dofs); + DoFTools::make_hanging_node_constraints (dof_handler, constraints); + VectorTools::interpolate_boundary_values (dof_handler, + 0, + ZeroFunction(), + constraints); + constraints.close (); + CompressedSimpleSparsityPattern csp (locally_relevant_dofs); + DoFTools::make_sparsity_pattern (dof_handler, csp, + constraints, false); + SparsityTools::distribute_sparsity_pattern (csp, + dof_handler.n_locally_owned_dofs_per_processor(), + mpi_communicator, + locally_relevant_dofs); + system_matrix.reinit (locally_owned_dofs, + locally_owned_dofs, + csp, + mpi_communicator); } template void SeventhProblem::setup_second_system () { - second_dof_handler.distribute_dofs (fe); - second_locally_owned_dofs = second_dof_handler.locally_owned_dofs (); - DoFTools::extract_locally_relevant_dofs (second_dof_handler, - second_locally_relevant_dofs); - second_locally_relevant_solution.reinit (second_locally_owned_dofs, - second_locally_relevant_dofs, mpi_communicator); - interpolated_locally_relevant_solution.reinit(second_locally_owned_dofs, - second_locally_relevant_dofs, mpi_communicator); + second_dof_handler.distribute_dofs (fe); + second_locally_owned_dofs = second_dof_handler.locally_owned_dofs (); + DoFTools::extract_locally_relevant_dofs (second_dof_handler, + second_locally_relevant_dofs); + second_locally_relevant_solution.reinit (second_locally_owned_dofs, + second_locally_relevant_dofs, mpi_communicator); + interpolated_locally_relevant_solution.reinit(second_locally_owned_dofs, + second_locally_relevant_dofs, mpi_communicator); } template void SeventhProblem::assemble_system () { - const QGauss quadrature_formula(3); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_quadrature_points | - update_JxW_values); - const unsigned int dofs_per_cell = fe.dofs_per_cell; - const unsigned int n_q_points = quadrature_formula.size(); - FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); - Vector cell_rhs (dofs_per_cell); - std::vector local_dof_indices (dofs_per_cell); - typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - for (; cell!=endc; ++cell) - if (cell->is_locally_owned()) - { - cell_matrix = 0; - cell_rhs = 0; - fe_values.reinit (cell); - for (unsigned int q_point=0; q_point - 0.5+0.25*std::sin(4.0 * numbers::PI * - fe_values.quadrature_point(q_point)[0]) - ? 1 : -1); - for (unsigned int i=0; iget_dof_indices (local_dof_indices); - constraints.distribute_local_to_global (cell_matrix, - cell_rhs, - local_dof_indices, - system_matrix, - system_rhs); - } - system_matrix.compress (VectorOperation::add); - system_rhs.compress (VectorOperation::add); + const QGauss quadrature_formula(3); + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_quadrature_points | + update_JxW_values); + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.size(); + FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); + Vector cell_rhs (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); + typename DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + for (; cell!=endc; ++cell) + if (cell->is_locally_owned()) + { + cell_matrix = 0; + cell_rhs = 0; + fe_values.reinit (cell); + for (unsigned int q_point=0; q_point + 0.5+0.25*std::sin(4.0 * numbers::PI * + fe_values.quadrature_point(q_point)[0]) + ? 1 : -1); + for (unsigned int i=0; iget_dof_indices (local_dof_indices); + constraints.distribute_local_to_global (cell_matrix, + cell_rhs, + local_dof_indices, + system_matrix, + system_rhs); + } + system_matrix.compress (VectorOperation::add); + system_rhs.compress (VectorOperation::add); } template void SeventhProblem::solve () { - LA::MPI::Vector - completely_distributed_solution (locally_owned_dofs, mpi_communicator); - SolverControl solver_control (dof_handler.n_dofs(), 1e-12); - TrilinosWrappers::SolverCG solver(solver_control, mpi_communicator); - TrilinosWrappers::PreconditionAMG preconditioner; - TrilinosWrappers::PreconditionAMG::AdditionalData data; - preconditioner.initialize(system_matrix, data); - solver.solve (system_matrix, completely_distributed_solution, system_rhs, - preconditioner); - pcout << " Solved in " << solver_control.last_step() - << " iterations." << std::endl; - constraints.distribute (completely_distributed_solution); - locally_relevant_solution = completely_distributed_solution; + LA::MPI::Vector + completely_distributed_solution (locally_owned_dofs, mpi_communicator); + SolverControl solver_control (dof_handler.n_dofs(), 1e-12); + TrilinosWrappers::SolverCG solver(solver_control, mpi_communicator); + TrilinosWrappers::PreconditionAMG preconditioner; + TrilinosWrappers::PreconditionAMG::AdditionalData data; + preconditioner.initialize(system_matrix, data); + solver.solve (system_matrix, completely_distributed_solution, system_rhs, + preconditioner); + pcout << " Solved in " << solver_control.last_step() + << " iterations." << std::endl; + constraints.distribute (completely_distributed_solution); + locally_relevant_solution = completely_distributed_solution; } template void SeventhProblem::run (unsigned int cycle) { - if (cycle == 0) + if (cycle == 0) { - GridGenerator::hyper_cube (triangulation); - triangulation.refine_global (1); - GridGenerator::hyper_cube (second_triangulation); - second_triangulation.refine_global (1); - setup_system(); + GridGenerator::hyper_cube (triangulation); + triangulation.refine_global (1); + GridGenerator::hyper_cube (second_triangulation); + second_triangulation.refine_global (1); + setup_system(); } - else + else { - Vector estimated_error_per_cell (triangulation.n_active_cells()); - KellyErrorEstimator::estimate (dof_handler, - QGauss(3), - typename FunctionMap::type(), - locally_relevant_solution, - estimated_error_per_cell); - - parallel::distributed::GridRefinement:: - refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.5, 0.3); - std::vector r_flags; - std::vector c_flags; - triangulation.prepare_coarsening_and_refinement(); - triangulation.save_refine_flags(r_flags); - triangulation.save_coarsen_flags(c_flags); - - triangulation.execute_coarsening_and_refinement (); - - setup_system(); - pcout << " Number of active cells: " - << triangulation.n_global_active_cells() - << std::endl - << " Number of degrees of freedom: " - << dof_handler.n_dofs() - << std::endl; - assemble_system (); - solve (); - - setup_second_system(); - second_locally_relevant_solution = locally_relevant_solution; + Vector estimated_error_per_cell (triangulation.n_active_cells()); + KellyErrorEstimator::estimate (dof_handler, + QGauss(3), + typename FunctionMap::type(), + locally_relevant_solution, + estimated_error_per_cell); - VectorTools::interpolate_to_different_mesh(dof_handler, locally_relevant_solution, - second_dof_handler, interpolated_locally_relevant_solution); - second_triangulation.load_coarsen_flags(c_flags); - second_triangulation.load_refine_flags(r_flags); - second_triangulation.execute_coarsening_and_refinement(); + parallel::distributed::GridRefinement:: + refine_and_coarsen_fixed_number (triangulation, + estimated_error_per_cell, + 0.5, 0.3); + std::vector r_flags; + std::vector c_flags; + triangulation.prepare_coarsening_and_refinement(); + triangulation.save_refine_flags(r_flags); + triangulation.save_coarsen_flags(c_flags); + + triangulation.execute_coarsening_and_refinement (); + + setup_system(); + pcout << " Number of active cells: " + << triangulation.n_global_active_cells() + << std::endl + << " Number of degrees of freedom: " + << dof_handler.n_dofs() + << std::endl; + assemble_system (); + solve (); + + setup_second_system(); + second_locally_relevant_solution = locally_relevant_solution; + + VectorTools::interpolate_to_different_mesh(dof_handler, locally_relevant_solution, + second_dof_handler, interpolated_locally_relevant_solution); + second_triangulation.load_coarsen_flags(c_flags); + second_triangulation.load_refine_flags(r_flags); + second_triangulation.execute_coarsening_and_refinement(); } } void seventh_grid() { - + ConditionalOStream pcout(deallog.get_file_stream(), - (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) - == 0)); - - pcout << "7th Starting" << std::endl; - SeventhProblem<2> lap(1); - const unsigned int n_cycles = 5; - for (unsigned int cycle=0; cycle lap(1); + const unsigned int n_cycles = 5; + for (unsigned int cycle=0; cycle::boundary(MeshWorker::DoFInfo &info, CellInfo &) const template void myIntegrator::face(MeshWorker::DoFInfo &info1, MeshWorker::DoFInfo &info2, - CellInfo &, CellInfo &) const + CellInfo &, CellInfo &) const { deallog << "F cell1 = " << info1.cell->id() - << " face = " << info1.face_number - << " cell2 = " << info2.cell->id() - << " face2 = " << info2.face_number - << std::endl; + << " face = " << info1.face_number + << " cell2 = " << info2.cell->id() + << " face2 = " << info2.face_number + << std::endl; } class DoNothingAssembler { - public: - template - void initialize_info(DOFINFO &info, bool face) const {} - template - void assemble(const DOFINFO &info){} - template - void assemble(const DOFINFO &info1, - const DOFINFO &info2) {} +public: + template + void initialize_info(DOFINFO &info, bool face) const {} + template + void assemble(const DOFINFO &info) {} + template + void assemble(const DOFINFO &info1, + const DOFINFO &info2) {} - }; +}; template void @@ -113,11 +113,11 @@ test_simple(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) MeshWorker::integration_loop::active_cell_iterator, DoNothingAssembler> - (dofs.begin_active(), dofs.end(), - dof_info, info_box, - local, - assembler, - lctrl); + (dofs.begin_active(), dofs.end(), + dof_info, info_box, + local, + assembler, + lctrl); // MeshWorker::loop, MeshWorker::IntegrationInfoBox > // (dofs.begin_active(), dofs.end(), @@ -133,10 +133,10 @@ template void test_loop(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) { deallog << "* own_cells=" << lctrl.own_cells - << " ghost_cells=" << lctrl.ghost_cells - << " own_faces=" << lctrl.own_faces - << " faces_to_ghost=" << lctrl.faces_to_ghost - << std::endl; + << " ghost_cells=" << lctrl.ghost_cells + << " own_faces=" << lctrl.own_faces + << " faces_to_ghost=" << lctrl.faces_to_ghost + << std::endl; test_simple(dofs, lctrl); } @@ -151,10 +151,10 @@ test() reps.push_back(2); reps.push_back(1); GridGenerator::subdivided_hyper_rectangle (tr, reps, - Point(), Point(2.0,1.0)); + Point(), Point(2.0,1.0)); FE_DGP fe(0); - + DoFHandler dofs(tr); dofs.distribute_dofs(fe); @@ -168,21 +168,26 @@ test() lctrl.own_faces = MeshWorker::LoopControl::never; lctrl.faces_to_ghost = MeshWorker::LoopControl::never; - lctrl.own_cells = false; lctrl.ghost_cells = false; + lctrl.own_cells = false; + lctrl.ghost_cells = false; test_loop(dofs, lctrl); - lctrl.own_cells = true; lctrl.ghost_cells = false; + lctrl.own_cells = true; + lctrl.ghost_cells = false; test_loop(dofs, lctrl); - lctrl.own_cells = false; lctrl.ghost_cells = true; + lctrl.own_cells = false; + lctrl.ghost_cells = true; test_loop(dofs, lctrl); - lctrl.own_cells = true; lctrl.ghost_cells = true; + lctrl.own_cells = true; + lctrl.ghost_cells = true; test_loop(dofs, lctrl); deallog << "*** 2. FACES ***" << std::endl; - lctrl.own_cells = false; lctrl.ghost_cells = false; + lctrl.own_cells = false; + lctrl.ghost_cells = false; lctrl.own_faces = MeshWorker::LoopControl::one; lctrl.faces_to_ghost = MeshWorker::LoopControl::never; diff --git a/tests/mpi/mesh_worker_02.cc b/tests/mpi/mesh_worker_02.cc index 2054662ba9..3d727339af 100644 --- a/tests/mpi/mesh_worker_02.cc +++ b/tests/mpi/mesh_worker_02.cc @@ -64,26 +64,26 @@ myIntegrator::boundary(MeshWorker::DoFInfo &info, CellInfo &) const template void myIntegrator::face(MeshWorker::DoFInfo &info1, MeshWorker::DoFInfo &info2, - CellInfo &, CellInfo &) const + CellInfo &, CellInfo &) const { deallog << "F cell1 = " << info1.cell->id() - << " face = " << info1.face_number - << " cell2 = " << info2.cell->id() - << " face2 = " << info2.face_number - << std::endl; + << " face = " << info1.face_number + << " cell2 = " << info2.cell->id() + << " face2 = " << info2.face_number + << std::endl; } class DoNothingAssembler { - public: - template - void initialize_info(DOFINFO &info, bool face) const {} - template - void assemble(const DOFINFO &info){} - template - void assemble(const DOFINFO &info1, - const DOFINFO &info2) {} +public: + template + void initialize_info(DOFINFO &info, bool face) const {} + template + void assemble(const DOFINFO &info) {} + template + void assemble(const DOFINFO &info1, + const DOFINFO &info2) {} }; @@ -112,11 +112,11 @@ test_simple(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) MeshWorker::integration_loop::active_cell_iterator, DoNothingAssembler> - (dofs.begin_active(), dofs.end(), - dof_info, info_box, - local, - assembler, - lctrl); + (dofs.begin_active(), dofs.end(), + dof_info, info_box, + local, + assembler, + lctrl); // MeshWorker::loop, MeshWorker::IntegrationInfoBox > // (dofs.begin_active(), dofs.end(), @@ -132,10 +132,10 @@ template void test_loop(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) { deallog << "* own_cells=" << lctrl.own_cells - << " ghost_cells=" << lctrl.ghost_cells - << " own_faces=" << lctrl.own_faces - << " faces_to_ghost=" << lctrl.faces_to_ghost - << std::endl; + << " ghost_cells=" << lctrl.ghost_cells + << " own_faces=" << lctrl.own_faces + << " faces_to_ghost=" << lctrl.faces_to_ghost + << std::endl; test_simple(dofs, lctrl); } @@ -154,7 +154,7 @@ test() tr.execute_coarsening_and_refinement(); FE_DGP fe(0); - + DoFHandler dofs(tr); dofs.distribute_dofs(fe); diff --git a/tests/mpi/mesh_worker_03.cc b/tests/mpi/mesh_worker_03.cc index 4d8883530b..1f6af555cb 100644 --- a/tests/mpi/mesh_worker_03.cc +++ b/tests/mpi/mesh_worker_03.cc @@ -64,26 +64,26 @@ myIntegrator::boundary(MeshWorker::DoFInfo &info, CellInfo &) const template void myIntegrator::face(MeshWorker::DoFInfo &info1, MeshWorker::DoFInfo &info2, - CellInfo &, CellInfo &) const + CellInfo &, CellInfo &) const { deallog << "F cell1 = " << info1.cell->id() - << " face = " << info1.face_number - << " cell2 = " << info2.cell->id() - << " face2 = " << info2.face_number - << std::endl; + << " face = " << info1.face_number + << " cell2 = " << info2.cell->id() + << " face2 = " << info2.face_number + << std::endl; } class DoNothingAssembler { - public: - template - void initialize_info(DOFINFO &info, bool face) const {} - template - void assemble(const DOFINFO &info){} - template - void assemble(const DOFINFO &info1, - const DOFINFO &info2) {} +public: + template + void initialize_info(DOFINFO &info, bool face) const {} + template + void assemble(const DOFINFO &info) {} + template + void assemble(const DOFINFO &info1, + const DOFINFO &info2) {} }; @@ -112,11 +112,11 @@ test_simple(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) MeshWorker::integration_loop::active_cell_iterator, DoNothingAssembler> - (dofs.begin_active(), dofs.end(), - dof_info, info_box, - local, - assembler, - lctrl); + (dofs.begin_active(), dofs.end(), + dof_info, info_box, + local, + assembler, + lctrl); // MeshWorker::loop, MeshWorker::IntegrationInfoBox > // (dofs.begin_active(), dofs.end(), @@ -132,10 +132,10 @@ template void test_loop(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) { deallog << "* own_cells=" << lctrl.own_cells - << " ghost_cells=" << lctrl.ghost_cells - << " own_faces=" << lctrl.own_faces - << " faces_to_ghost=" << lctrl.faces_to_ghost - << std::endl; + << " ghost_cells=" << lctrl.ghost_cells + << " own_faces=" << lctrl.own_faces + << " faces_to_ghost=" << lctrl.faces_to_ghost + << std::endl; test_simple(dofs, lctrl); } @@ -152,16 +152,18 @@ test() if (myid==0) { typename parallel::distributed::Triangulation::active_cell_iterator - it = tr.begin_active(); + it = tr.begin_active(); it->set_refine_flag(); - ++it;++it;++it; + ++it; + ++it; + ++it; it->set_refine_flag(); } tr.execute_coarsening_and_refinement(); FE_DGP fe(0); - + DoFHandler dofs(tr); dofs.distribute_dofs(fe); diff --git a/tests/mpi/mesh_worker_04.cc b/tests/mpi/mesh_worker_04.cc index 093d4545fc..a9b8221b8c 100644 --- a/tests/mpi/mesh_worker_04.cc +++ b/tests/mpi/mesh_worker_04.cc @@ -65,26 +65,26 @@ myIntegrator::boundary(MeshWorker::DoFInfo &info, CellInfo &) const template void myIntegrator::face(MeshWorker::DoFInfo &info1, MeshWorker::DoFInfo &info2, - CellInfo &, CellInfo &) const + CellInfo &, CellInfo &) const { deallog << "F cell1 = " << info1.cell->id() - << " face = " << info1.face_number - << " cell2 = " << info2.cell->id() - << " face2 = " << info2.face_number - << std::endl; + << " face = " << info1.face_number + << " cell2 = " << info2.cell->id() + << " face2 = " << info2.face_number + << std::endl; } class DoNothingAssembler { - public: - template - void initialize_info(DOFINFO &info, bool face) const {} - template - void assemble(const DOFINFO &info){} - template - void assemble(const DOFINFO &info1, - const DOFINFO &info2) {} +public: + template + void initialize_info(DOFINFO &info, bool face) const {} + template + void assemble(const DOFINFO &info) {} + template + void assemble(const DOFINFO &info1, + const DOFINFO &info2) {} }; @@ -113,11 +113,11 @@ test_simple(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) MeshWorker::integration_loop::active_cell_iterator, DoNothingAssembler> - (dofs.begin_active(), dofs.end(), - dof_info, info_box, - local, - assembler, - lctrl); + (dofs.begin_active(), dofs.end(), + dof_info, info_box, + local, + assembler, + lctrl); // MeshWorker::loop, MeshWorker::IntegrationInfoBox > // (dofs.begin_active(), dofs.end(), @@ -133,10 +133,10 @@ template void test_loop(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) { deallog << "* own_cells=" << lctrl.own_cells - << " ghost_cells=" << lctrl.ghost_cells - << " own_faces=" << lctrl.own_faces - << " faces_to_ghost=" << lctrl.faces_to_ghost - << std::endl; + << " ghost_cells=" << lctrl.ghost_cells + << " own_faces=" << lctrl.own_faces + << " faces_to_ghost=" << lctrl.faces_to_ghost + << std::endl; test_simple(dofs, lctrl); } @@ -155,7 +155,7 @@ test() tr.execute_coarsening_and_refinement(); FE_DGP fe(0); - + DoFHandler dofs(tr); dofs.distribute_dofs(fe); diff --git a/tests/mpi/mesh_worker_05.cc b/tests/mpi/mesh_worker_05.cc index ed5c321f96..b5ffb62ad4 100644 --- a/tests/mpi/mesh_worker_05.cc +++ b/tests/mpi/mesh_worker_05.cc @@ -65,29 +65,29 @@ myIntegrator::boundary(MeshWorker::DoFInfo &info, CellInfo &) const template void myIntegrator::face(MeshWorker::DoFInfo &info1, MeshWorker::DoFInfo &info2, - CellInfo &, CellInfo &) const + CellInfo &, CellInfo &) const { deallog << "F cell1 = " << info1.cell->id() - << " face = " << info1.face_number - << " cell2 = " << info2.cell->id() - << " face2 = " << info2.face_number - << std::endl; + << " face = " << info1.face_number + << " cell2 = " << info2.cell->id() + << " face2 = " << info2.face_number + << std::endl; } class DoNothingAssembler { - public: - template - void initialize_info(DOFINFO &info, bool face) const {} - template - void assemble(const DOFINFO &info){} - template - void assemble(const DOFINFO &info1, - const DOFINFO &info2) {} +public: + template + void initialize_info(DOFINFO &info, bool face) const {} + template + void assemble(const DOFINFO &info) {} + template + void assemble(const DOFINFO &info1, + const DOFINFO &info2) {} - }; +}; template void @@ -114,11 +114,11 @@ test_simple(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) MeshWorker::integration_loop::active_cell_iterator, DoNothingAssembler> - (dofs.begin_active(), dofs.end(), - dof_info, info_box, - local, - assembler, - lctrl); + (dofs.begin_active(), dofs.end(), + dof_info, info_box, + local, + assembler, + lctrl); // MeshWorker::loop, MeshWorker::IntegrationInfoBox > // (dofs.begin_active(), dofs.end(), @@ -134,10 +134,10 @@ template void test_loop(DoFHandler &dofs, MeshWorker::LoopControl &lctrl) { deallog << "* own_cells=" << lctrl.own_cells - << " ghost_cells=" << lctrl.ghost_cells - << " own_faces=" << lctrl.own_faces - << " faces_to_ghost=" << lctrl.faces_to_ghost - << std::endl; + << " ghost_cells=" << lctrl.ghost_cells + << " own_faces=" << lctrl.own_faces + << " faces_to_ghost=" << lctrl.faces_to_ghost + << std::endl; test_simple(dofs, lctrl); } @@ -150,9 +150,9 @@ test() parallel::distributed::Triangulation::construct_multigrid_hierarchy*/); GridGenerator::hyper_cube(tr); tr.refine_global(2); - + FE_DGP fe(0); - + DoFHandler dofs(tr); dofs.distribute_dofs(fe); @@ -180,7 +180,8 @@ test() */ deallog << "*** 2. FACES ***" << std::endl; - lctrl.own_cells = false; lctrl.ghost_cells = false; + lctrl.own_cells = false; + lctrl.ghost_cells = false; lctrl.own_faces = MeshWorker::LoopControl::one; lctrl.faces_to_ghost = MeshWorker::LoopControl::never; diff --git a/tests/mpi/mg_05.cc b/tests/mpi/mg_05.cc index 363a603420..6a5e36dbe6 100644 --- a/tests/mpi/mg_05.cc +++ b/tests/mpi/mg_05.cc @@ -19,11 +19,11 @@ /* An error occurred in line <126> of file in function void test() [with int dim = 2] -The violated condition was: +The violated condition was: cell->neighbor(f)->level_subdomain_id()<100 The name and call sequence of the exception was: ExcInternalError() -Additional Information: +Additional Information: (none) */ @@ -93,60 +93,60 @@ void test() GridGenerator::hyper_cube(tr); tr.refine_global(3); - for (unsigned int ii=0;ii<5;++ii) + for (unsigned int ii=0; ii<5; ++ii) { typename Triangulation::active_cell_iterator - cell = tr.begin_active(), - endc = tr.end(); - + cell = tr.begin_active(), + endc = tr.end(); + for (; cell!=endc; ++cell) - if (Testing::rand()%42==1) - cell->set_refine_flag (); - + if (Testing::rand()%42==1) + cell->set_refine_flag (); + tr.execute_coarsening_and_refinement (); - + DoFHandler dofh(tr); - - //output(tr); - + + //output(tr); + static const FE_Q fe(1); dofh.distribute_dofs (fe); dofh.distribute_mg_dofs (fe); - + { - for (unsigned int lvl=0; lvl::cell_iterator - cell = dofh.begin(lvl), - endc = dofh.end(lvl); - - for (; cell!=endc; ++cell) - { - if (cell->level_subdomain_id()!=tr.locally_owned_subdomain()) - continue; - for (unsigned int f=0;f::faces_per_cell;++f) - { - if (cell->at_boundary(f)) - continue; - -// deallog << cell->neighbor(f)->level_subdomain_id() << std::endl; - // is cell level-artificial? - Assert(cell->neighbor(f)->level_subdomain_id()<100, ExcInternalError()); - - std::vector dofs(fe.n_dofs_per_cell()); - cell->neighbor(f)->get_mg_dof_indices(dofs); - for (unsigned int i=0;i::cell_iterator + cell = dofh.begin(lvl), + endc = dofh.end(lvl); + + for (; cell!=endc; ++cell) + { + if (cell->level_subdomain_id()!=tr.locally_owned_subdomain()) + continue; + for (unsigned int f=0; f::faces_per_cell; ++f) + { + if (cell->at_boundary(f)) + continue; + +// deallog << cell->neighbor(f)->level_subdomain_id() << std::endl; + // is cell level-artificial? + Assert(cell->neighbor(f)->level_subdomain_id()<100, ExcInternalError()); + + std::vector dofs(fe.n_dofs_per_cell()); + cell->neighbor(f)->get_mg_dof_indices(dofs); + for (unsigned int i=0; i of file in function void dealii::internal::DoFHandler::Policy::{anonymous}::communicate_mg_dof_indices_on_marked_cells(const dealii::DoFHandler&, const std::map >&, const std::vector&, const std::vector&, unsigned int) [with int dim = 2, int spacedim = 2] -The violated condition was: +The violated condition was: senders.find(status.MPI_SOURCE)!=senders.end() The name and call sequence of the exception was: ExcInternalError() -Additional Information: +Additional Information: (none) */ @@ -93,61 +93,61 @@ void test() GridGenerator::hyper_cube_slit(tr,-1,1); tr.refine_global(2); - for (unsigned int ii=0;ii<15;++ii) + for (unsigned int ii=0; ii<15; ++ii) { deallog << "loop " << ii << std::endl; - + typename Triangulation::active_cell_iterator - cell = tr.begin_active(), - endc = tr.end(); - + cell = tr.begin_active(), + endc = tr.end(); + for (; cell!=endc; ++cell) - if (Testing::rand()%42==1) - cell->set_refine_flag (); - + if (Testing::rand()%42==1) + cell->set_refine_flag (); + tr.execute_coarsening_and_refinement (); - + DoFHandler dofh(tr); - - //output(tr); - + + //output(tr); + static const FE_Q fe(1); dofh.distribute_dofs (fe); dofh.distribute_mg_dofs (fe); - + { - for (unsigned int lvl=0; lvl::cell_iterator - cell = dofh.begin(lvl), - endc = dofh.end(lvl); - - for (; cell!=endc; ++cell) - { - if (cell->level_subdomain_id()!=tr.locally_owned_subdomain()) - continue; - for (unsigned int f=0;f::faces_per_cell;++f) - { - if (cell->at_boundary(f)) - continue; - - //deallog << cell->neighbor(f)->level_subdomain_id() << std::endl; - // is cell level-artificial? - Assert(cell->neighbor(f)->level_subdomain_id()<100, ExcInternalError()); - - std::vector dofs(fe.n_dofs_per_cell()); - cell->neighbor(f)->get_mg_dof_indices(dofs); - for (unsigned int i=0;i::cell_iterator + cell = dofh.begin(lvl), + endc = dofh.end(lvl); + + for (; cell!=endc; ++cell) + { + if (cell->level_subdomain_id()!=tr.locally_owned_subdomain()) + continue; + for (unsigned int f=0; f::faces_per_cell; ++f) + { + if (cell->at_boundary(f)) + continue; + + //deallog << cell->neighbor(f)->level_subdomain_id() << std::endl; + // is cell level-artificial? + Assert(cell->neighbor(f)->level_subdomain_id()<100, ExcInternalError()); + + std::vector dofs(fe.n_dofs_per_cell()); + cell->neighbor(f)->get_mg_dof_indices(dofs); + for (unsigned int i=0; i(), matrix); + dof_handler, 2, 3, 1, periodicity_vector, Tensor<1, dim>(), matrix); DoFTools::make_periodicity_constraints>( - periodicity_vector, constraints, fe.component_mask(velocities)), - first_vector_components; + periodicity_vector, constraints, fe.component_mask(velocities)), + first_vector_components; #endif } @@ -725,7 +725,7 @@ namespace Step22 first_vector_components.push_back(0); GridTools::collect_periodic_faces( - triangulation, 2, 3, 1, periodicity_vector, Tensor<1, dim>(), matrix); + triangulation, 2, 3, 1, periodicity_vector, Tensor<1, dim>(), matrix); triangulation.add_periodicity(periodicity_vector); #endif diff --git a/tests/mpi/p4est_save_04.cc b/tests/mpi/p4est_save_04.cc index 2e8ace5402..907ad410c5 100644 --- a/tests/mpi/p4est_save_04.cc +++ b/tests/mpi/p4est_save_04.cc @@ -54,61 +54,61 @@ void test() // write with small com if (myid<3) - { - deallog << "writing with " << Utilities::MPI::n_mpi_processes(com_small) << std::endl; - - parallel::distributed::Triangulation tr (com_small); - GridGenerator::hyper_cube (tr); - tr.refine_global (2); - for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); - cell != tr.end(); ++cell) - if (!cell->is_ghost() && !cell->is_artificial()) - if (cell->center().norm() < 0.3) - { - cell->set_refine_flag(); - } - - tr.execute_coarsening_and_refinement (); + { + deallog << "writing with " << Utilities::MPI::n_mpi_processes(com_small) << std::endl; - FE_Q fe (1); - DoFHandler dh (tr); - dh.distribute_dofs (fe); + parallel::distributed::Triangulation tr (com_small); + GridGenerator::hyper_cube (tr); + tr.refine_global (2); + for (typename Triangulation::active_cell_iterator + cell = tr.begin_active(); + cell != tr.end(); ++cell) + if (!cell->is_ghost() && !cell->is_artificial()) + if (cell->center().norm() < 0.3) + { + cell->set_refine_flag(); + } - IndexSet locally_owned_dofs = dh.locally_owned_dofs (); - IndexSet locally_relevant_dofs; - DoFTools::extract_locally_relevant_dofs (dh, locally_relevant_dofs); + tr.execute_coarsening_and_refinement (); - PETScWrappers::MPI::Vector x (locally_owned_dofs, com_small); - PETScWrappers::MPI::Vector rel_x (locally_owned_dofs, locally_relevant_dofs, com_small); + FE_Q fe (1); + DoFHandler dh (tr); + dh.distribute_dofs (fe); - parallel::distributed::SolutionTransfer soltrans (dh); + IndexSet locally_owned_dofs = dh.locally_owned_dofs (); + IndexSet locally_relevant_dofs; + DoFTools::extract_locally_relevant_dofs (dh, locally_relevant_dofs); - for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); ++i) - { - unsigned int idx = locally_owned_dofs.nth_index_in_set (i); - x (idx) = idx; - deallog << '[' << idx << ']' << ' ' << x(idx) << std::endl; - } + PETScWrappers::MPI::Vector x (locally_owned_dofs, com_small); + PETScWrappers::MPI::Vector rel_x (locally_owned_dofs, locally_relevant_dofs, com_small); - - x.compress(VectorOperation::insert); - rel_x=x; + parallel::distributed::SolutionTransfer soltrans (dh); - soltrans.prepare_serialization (rel_x); + for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); ++i) + { + unsigned int idx = locally_owned_dofs.nth_index_in_set (i); + x (idx) = idx; + deallog << '[' << idx << ']' << ' ' << x(idx) << std::endl; + } + + + x.compress(VectorOperation::insert); + rel_x=x; + + soltrans.prepare_serialization (rel_x); + + tr.save ("file"); + // tr.write_mesh_vtk("before"); + deallog << "#cells = " << tr.n_global_active_cells() << " norm= " << x.l2_norm() << std::endl; + deallog << "Checksum: " + << tr.get_checksum () + << std::endl; + } - tr.save ("file"); - // tr.write_mesh_vtk("before"); - deallog << "#cells = " << tr.n_global_active_cells() << " norm= " << x.l2_norm() << std::endl; - deallog << "Checksum: " - << tr.get_checksum () - << std::endl; - } - MPI_Barrier (MPI_COMM_WORLD); deallog << "reading with " << Utilities::MPI::n_mpi_processes(com_all) << std::endl; - + { parallel::distributed::Triangulation tr (com_all); @@ -125,7 +125,7 @@ void test() PETScWrappers::MPI::Vector solution (locally_owned_dofs, com_all); solution = 0; - + parallel::distributed::SolutionTransfer soltrans (dh); soltrans.deserialize (solution); @@ -140,7 +140,7 @@ void test() << tr.get_checksum () << std::endl; deallog << "norm: " - << solution.l2_norm() + << solution.l2_norm() << std::endl; // tr.write_mesh_vtk("after"); } diff --git a/tests/mpi/parallel_vector_14.cc b/tests/mpi/parallel_vector_14.cc index 85c51b0359..4dc72c1b13 100644 --- a/tests/mpi/parallel_vector_14.cc +++ b/tests/mpi/parallel_vector_14.cc @@ -81,7 +81,7 @@ void test () // copy vector content to non-ghosted vectors, manually created. parallel::distributed::Vector v_dist(local_owned, MPI_COMM_WORLD), - w_dist(v_dist), u_dist(v_dist); + w_dist(v_dist), u_dist(v_dist); v_dist = v; w_dist = w; diff --git a/tests/mpi/parallel_vtu_01.cc b/tests/mpi/parallel_vtu_01.cc index 8dcaa48075..132e33157d 100644 --- a/tests/mpi/parallel_vtu_01.cc +++ b/tests/mpi/parallel_vtu_01.cc @@ -68,18 +68,18 @@ void test() data_out.write_vtu_in_parallel("output.vtu", MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD); - + if (myid==0) { std::vector filenames; filenames.push_back("output.vtu"); - { - std::ofstream master("output.pvtu"); - data_out.write_pvtu_record (master, filenames); + { + std::ofstream master("output.pvtu"); + data_out.write_pvtu_record (master, filenames); } - + cat_file("output.vtu"); - cat_file("output.pvtu"); + cat_file("output.pvtu"); } deallog << "OK" << std::endl; } diff --git a/tests/mpi/periodicity_01.cc b/tests/mpi/periodicity_01.cc index 4ce1c42b93..e81ce96e45 100644 --- a/tests/mpi/periodicity_01.cc +++ b/tests/mpi/periodicity_01.cc @@ -118,7 +118,7 @@ namespace Step40 : std::cout, (Utilities::MPI::this_mpi_process(mpi_communicator) - == 0)) + == 0)) {} @@ -202,46 +202,46 @@ namespace Step40 endc = dof_handler.end(); for (; cell!=endc; ++cell) if (cell->is_locally_owned()) - { - cell_matrix = 0; - cell_rhs = 0; - - fe_values.reinit (cell); - - for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); + constraints.distribute_local_to_global (cell_matrix, + cell_rhs, + local_dof_indices, + system_matrix, + system_rhs); } - cell->get_dof_indices (local_dof_indices); - constraints.distribute_local_to_global (cell_matrix, - cell_rhs, - local_dof_indices, - system_matrix, - system_rhs); - } - system_matrix.compress (VectorOperation::add); system_rhs.compress (VectorOperation::add); } @@ -286,16 +286,16 @@ namespace Step40 locally_relevant_solution, estimated_error_per_cell); parallel::distributed::GridRefinement:: - refine_and_coarsen_fixed_number (triangulation, - estimated_error_per_cell, - 0.3, 0.03); + refine_and_coarsen_fixed_number (triangulation, + estimated_error_per_cell, + 0.3, 0.03); triangulation.execute_coarsening_and_refinement (); } template void LaplaceProblem::get_point_value - (const Point point, const int proc, Vector &value) const + (const Point point, const int proc, Vector &value) const { typename DoFHandler::active_cell_iterator cell = GridTools::find_active_cell_around_point (dof_handler, point); @@ -311,14 +311,14 @@ namespace Step40 std::vector tmp2 (value.size()); MPI_Reduce(&(tmp[0]), &(tmp2[0]), value.size(), MPI_DOUBLE, MPI_SUM, proc, mpi_communicator); - + for (unsigned int i=0; i void LaplaceProblem::check_periodicity - (const unsigned int cycle) const + (const unsigned int cycle) const {} template <> @@ -327,33 +327,33 @@ namespace Step40 unsigned int n_points = 2; for (unsigned int i = 0; i value1(1); - Vector value2(1); - - Point <2> point1; - point1(0)=1.*i/n_points; - point1(1)=0.; - Point <2> point2; - point2(0)=1.*i/n_points; - point2(1)=1.; - - get_point_value (point1, 0, value1); - get_point_value (point2, 0, value2); - - if (Utilities::MPI::this_mpi_process(mpi_communicator)==0) { - pcout << point1 << "\t" << value1[0] << std::endl; - if (std::abs(value2[0]-value1[0])>1e-8) - { - std::cout< value1(1); + Vector value2(1); + + Point <2> point1; + point1(0)=1.*i/n_points; + point1(1)=0.; + Point <2> point2; + point2(0)=1.*i/n_points; + point2(1)=1.; + + get_point_value (point1, 0, value1); + get_point_value (point2, 0, value2); + + if (Utilities::MPI::this_mpi_process(mpi_communicator)==0) + { + pcout << point1 << "\t" << value1[0] << std::endl; + if (std::abs(value2[0]-value1[0])>1e-8) + { + std::cout< @@ -362,57 +362,57 @@ namespace Step40 unsigned int n_points = 2; for (unsigned int i = 0; i value1(1); - Vector value2(1); - Vector value3(1); - Vector value4(1); - - Point <3> point1; - point1(0)=1.*i/n_points; - point1(1)=1.*j/n_points; - point1(2)=0.; - Point <3> point2; - point2(0)=1.*i/n_points; - point2(1)=1.*j/n_points; - point2(2)=1.; - Point <3> point3; - point3(0)=1.*i/n_points; - point3(1)=0.; - point3(2)=1.*j/n_points;; - Point <3> point4; - point4(0)=1.*i/n_points; - point4(1)=1.; - point4(2)=1.*j/n_points;; - - get_point_value (point1, 0, value1); - get_point_value (point2, 0, value2); - get_point_value (point3, 0, value3); - get_point_value (point4, 0, value4); - - if (Utilities::MPI::this_mpi_process(mpi_communicator)==0) - { - pcout << point1 << "\t" << value1[0] << std::endl; - if (std::abs(value2[0]-value1[0])>1e-8) - { - std::cout<1e-8) { - std::cout< value1(1); + Vector value2(1); + Vector value3(1); + Vector value4(1); + + Point <3> point1; + point1(0)=1.*i/n_points; + point1(1)=1.*j/n_points; + point1(2)=0.; + Point <3> point2; + point2(0)=1.*i/n_points; + point2(1)=1.*j/n_points; + point2(2)=1.; + Point <3> point3; + point3(0)=1.*i/n_points; + point3(1)=0.; + point3(2)=1.*j/n_points;; + Point <3> point4; + point4(0)=1.*i/n_points; + point4(1)=1.; + point4(2)=1.*j/n_points;; + + get_point_value (point1, 0, value1); + get_point_value (point2, 0, value2); + get_point_value (point3, 0, value3); + get_point_value (point4, 0, value4); + + if (Utilities::MPI::this_mpi_process(mpi_communicator)==0) + { + pcout << point1 << "\t" << value1[0] << std::endl; + if (std::abs(value2[0]-value1[0])>1e-8) + { + std::cout<1e-8) + { + std::cout< void LaplaceProblem::output_results (const unsigned int cycle) const @@ -457,7 +457,7 @@ namespace Step40 void LaplaceProblem::run () { pcout << std::endl<< "Testing for dim="< p1(true); Point p2(true); - for (unsigned int i=0;i::cell_iterator> > - periodicity_vector; - - for(int i=1; i laplace_problem; - laplace_problem.run (); - } - { - LaplaceProblem<3> laplace_problem; - laplace_problem.run (); + std::ofstream logfile("output"); + deallog.attach(logfile, false); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + { + LaplaceProblem<2> laplace_problem; + laplace_problem.run (); + } + { + LaplaceProblem<3> laplace_problem; + laplace_problem.run (); + } } - } else - { - { - LaplaceProblem<2> laplace_problem; - laplace_problem.run (); - } { - LaplaceProblem<3> laplace_problem; - laplace_problem.run (); + { + LaplaceProblem<2> laplace_problem; + laplace_problem.run (); + } + { + LaplaceProblem<3> laplace_problem; + laplace_problem.run (); + } } - } } catch (std::exception &exc) { diff --git a/tests/mpi/periodicity_02.cc b/tests/mpi/periodicity_02.cc index 573408c8d6..8ef0f83c64 100644 --- a/tests/mpi/periodicity_02.cc +++ b/tests/mpi/periodicity_02.cc @@ -325,7 +325,7 @@ namespace Step22 DoFTools::extract_locally_relevant_dofs (dof_handler, locally_relevant_dofs); relevant_partitioning.push_back(locally_relevant_dofs.get_view(0, n_u)); relevant_partitioning.push_back(locally_relevant_dofs.get_view(n_u, n_u+n_p)); - + constraints.clear (); constraints.reinit(locally_relevant_dofs); @@ -364,11 +364,11 @@ namespace Step22 first_vector_components.push_back(0); GridTools::collect_periodic_faces( - dof_handler, 2, 3, 1, periodicity_vector, Tensor<1, dim>(), matrix); + dof_handler, 2, 3, 1, periodicity_vector, Tensor<1, dim>(), matrix); DoFTools::make_periodicity_constraints>( - periodicity_vector, constraints, fe.component_mask(velocities), - first_vector_components); + periodicity_vector, constraints, fe.component_mask(velocities), + first_vector_components); #endif } @@ -728,7 +728,7 @@ namespace Step22 first_vector_components.push_back(0); GridTools::collect_periodic_faces( - triangulation, 2, 3, 1, periodicity_vector, Tensor<1, dim>(), matrix); + triangulation, 2, 3, 1, periodicity_vector, Tensor<1, dim>(), matrix); triangulation.add_periodicity(periodicity_vector); #endif diff --git a/tests/mpi/periodicity_03.cc b/tests/mpi/periodicity_03.cc index e4c0d34f28..081383a647 100644 --- a/tests/mpi/periodicity_03.cc +++ b/tests/mpi/periodicity_03.cc @@ -219,14 +219,14 @@ namespace Step22 (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)), rot_matrix(dim) -{ - rot_matrix[0][dim-1] = -1.; - rot_matrix[dim-1][0] = 1.; - if (dim==3) - rot_matrix[1][1] = 1.; - offset[0] = 0; - offset[1] = 0; -} + { + rot_matrix[0][dim-1] = -1.; + rot_matrix[dim-1][0] = 1.; + if (dim==3) + rot_matrix[1][1] = 1.; + offset[0] = 0; + offset[1] = 0; + } @@ -256,7 +256,7 @@ namespace Step22 DoFTools::extract_locally_relevant_dofs (dof_handler, locally_relevant_dofs); relevant_partitioning.push_back(locally_relevant_dofs.get_view(0, n_u)); relevant_partitioning.push_back(locally_relevant_dofs.get_view(n_u, n_u+n_p)); - + constraints.clear (); constraints.reinit(locally_relevant_dofs); @@ -277,8 +277,8 @@ namespace Step22 rot_matrix); DoFTools::make_periodicity_constraints > - (periodicity_vector, constraints, fe.component_mask(velocities), - first_vector_components); + (periodicity_vector, constraints, fe.component_mask(velocities), + first_vector_components); VectorTools::interpolate_boundary_values (dof_handler, 1, @@ -305,7 +305,7 @@ namespace Step22 fe.component_mask(velocities)); } constraints.close (); - + { TrilinosWrappers::BlockSparsityPattern bsp (owned_partitioning, owned_partitioning, @@ -381,7 +381,7 @@ namespace Step22 { for (unsigned int j=0; j<=i; ++j) { - local_matrix(i,j) += (2 * (symgrad_phi_u[i] * symgrad_phi_u[j]) + local_matrix(i,j) += (2 * (symgrad_phi_u[i] * symgrad_phi_u[j]) - div_phi_u[i] * phi_p[j] - phi_p[i] * div_phi_u[j] + phi_p[i] * phi_p[j]) @@ -478,18 +478,18 @@ namespace Step22 (const Point point, const int proc, Vector &value) const { try - { - const typename DoFHandler::active_cell_iterator cell - = GridTools::find_active_cell_around_point (dof_handler, point); + { + const typename DoFHandler::active_cell_iterator cell + = GridTools::find_active_cell_around_point (dof_handler, point); - if (cell->is_locally_owned()) - VectorTools::point_value (dof_handler, solution, - point, value); - } + if (cell->is_locally_owned()) + VectorTools::point_value (dof_handler, solution, + point, value); + } catch (GridTools::ExcPointNotFound &p) - { - pcout<< "Point: " << point << " is not inside a cell!" < tmp (value.size()); @@ -525,33 +525,33 @@ namespace Step22 // first collect all points locally for (; cell!=endc; ++cell) - if(cell->is_locally_owned() && cell->at_boundary()) - for (unsigned int face_no=0;face_no::faces_per_cell; + if (cell->is_locally_owned() && cell->at_boundary()) + for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - const typename DoFHandler::face_iterator face = cell->face(face_no); - if (face->at_boundary()) { - if(face->boundary_id()==0) - { - fe_face_values.reinit(cell, face_no); - const std::vector > tmp_points - = fe_face_values.get_quadrature_points(); - for (unsigned int i=0; iboundary_id()==4) - { - fe_face_values.reinit(cell, face_no); - const std::vector > tmp_points - = fe_face_values.get_quadrature_points(); - for (unsigned int i=0; i::face_iterator face = cell->face(face_no); + if (face->at_boundary()) + { + if (face->boundary_id()==0) + { + fe_face_values.reinit(cell, face_no); + const std::vector > tmp_points + = fe_face_values.get_quadrature_points(); + for (unsigned int i=0; iboundary_id()==4) + { + fe_face_values.reinit(cell, face_no); + const std::vector > tmp_points + = fe_face_values.get_quadrature_points(); + for (unsigned int i=0; i global_quad_points_first; { @@ -573,7 +573,7 @@ namespace Step22 } std::vector global_quad_points_second; { - // how many elements are sent from which process? + // how many elements are sent from which process? unsigned int n_my_elements = local_quad_points_second.size(); const unsigned int n_processes = Utilities::MPI::n_mpi_processes(mpi_communicator); std::vector n_elements (n_processes); @@ -595,49 +595,49 @@ namespace Step22 // at the corresponding points on the boundary with the second indicator { for (unsigned int i=0; i value_1(dim+1); - Vector value_2(dim+1); - - Point point_1, point_2; - Vector vector_point_1(dim); - for (unsigned int c=0; c vector_point_2(dim); - rot_matrix.Tvmult(vector_point_2, vector_point_1); - for (unsigned int c=0; c value_1(dim+1); + Vector value_2(dim+1); - get_point_value (point_1, 0, value_1); - get_point_value (point_2, 0, value_2); - - if (Utilities::MPI::this_mpi_process(mpi_communicator)==0) - { - Vector vel_value_1 (dim); - Vector vel_value_2 (dim); - Vector expected_vel (dim); + Point point_1, point_2; + Vector vector_point_1(dim); for (unsigned int c=0; c error = expected_vel; - error -= vel_value_2; - if (std::abs(error.l2_norm())>1e-8) - { - pcout << "first first_rotated second" < vector_point_2(dim); + rot_matrix.Tvmult(vector_point_2, vector_point_1); + for (unsigned int c=0; c vel_value_1 (dim); + Vector vel_value_2 (dim); + Vector expected_vel (dim); + for (unsigned int c=0; c error = expected_vel; + error -= vel_value_2; + if (std::abs(error.l2_norm())>1e-8) + { + pcout << "first first_rotated second" < value_1(dim+1); - Vector value_2(dim+1); - - Point point_1, point_2; - Vector vector_point_1(dim); - for (unsigned int c=0; c vector_point_2(dim); - for (unsigned int c=0; c value_1(dim+1); + Vector value_2(dim+1); - if (Utilities::MPI::this_mpi_process(mpi_communicator)==0) - { - Vector vel_value_1 (dim); - Vector vel_value_2 (dim); - Vector expected_vel (dim); + Point point_1, point_2; + Vector vector_point_1(dim); for (unsigned int c=0; c error = expected_vel; - error -= vel_value_2; - if (std::abs(error.l2_norm())>1e-8) - { - pcout << "first first_rotated second" < vector_point_2(dim); + for (unsigned int c=0; c vel_value_1 (dim); + Vector vel_value_2 (dim); + Vector expected_vel (dim); + for (unsigned int c=0; c error = expected_vel; + error -= vel_value_2; + if (std::abs(error.l2_norm())>1e-8) + { + pcout << "first first_rotated second" < +template void set_periodicity(parallel::distributed::Triangulation &triangulation, bool reverse) { typename Triangulation::cell_iterator cell_1 = triangulation.begin(); typename Triangulation::cell_iterator cell_2 = cell_1++; typename Triangulation::face_iterator face_1; typename Triangulation::face_iterator face_2; - + // Look for the two outermost faces: for (unsigned int j=0; j::faces_per_cell; ++j) - { - if (cell_1->face(j)->center()(dim-1) > 2.9) - face_1 = cell_1->face(j); - if (cell_2->face(j)->center()(dim-1) < -2.9) - face_2 = cell_2->face(j); - } + { + if (cell_1->face(j)->center()(dim-1) > 2.9) + face_1 = cell_1->face(j); + if (cell_2->face(j)->center()(dim-1) < -2.9) + face_2 = cell_2->face(j); + } face_1->set_boundary_id(42); face_2->set_boundary_id(43); - + std::vector::cell_iterator> > periodicity_vector; - + if (reverse) GridTools::collect_periodic_faces (triangulation, 43, 42, dim-1, periodicity_vector); else GridTools::collect_periodic_faces (triangulation, 42, 43, dim-1, periodicity_vector); - + triangulation.add_periodicity(periodicity_vector); - + triangulation.refine_global(3); } @@ -104,7 +104,7 @@ void generate_grid(parallel::distributed::Triangulation<2> &triangulation, int o triangulation.create_triangulation(vertices, cells, SubCellData()); } - + /* The 3D case */ @@ -163,10 +163,10 @@ void generate_grid(parallel::distributed::Triangulation<3> &triangulation, int o triangulation.create_triangulation(vertices, cells, SubCellData()); } -template +template void check - (const unsigned int orientation, - bool reverse) +(const unsigned int orientation, + bool reverse) { dealii::parallel::distributed::Triangulation triangulation (MPI_COMM_WORLD); @@ -182,16 +182,16 @@ void check IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs(); IndexSet locally_relevant_dofs; DoFTools::extract_locally_relevant_dofs (dof_handler, locally_relevant_dofs); - + constraints.reinit(locally_relevant_dofs); { std::vector::cell_iterator> > - periodicity_vector; + periodicity_vector; GridTools::collect_periodic_faces (dof_handler, 42, 43, dim-1, periodicity_vector); DoFTools::make_periodicity_constraints > - (periodicity_vector, constraints); + (periodicity_vector, constraints); } constraints.close (); @@ -205,33 +205,33 @@ void check IndexSet constraints_lines = constraints.get_local_lines(); for (unsigned int i=0; i >* entries - = constraints.get_constraint_entries(line); - Assert(entries->size()==1, ExcInternalError()); - const Point point1 = support_points[line]; - const Point point2 = support_points[(*entries)[0].first]; - Tensor<1, dim> difference = point1-point2; - difference[dim-1] = 0.; - AssertThrow(difference.norm()<1.e-9, ExcInternalError()); - if (locally_owned_dofs.is_element(line)) - ++n_local_constraints; + const unsigned int line = constraints_lines.nth_index_in_set(i); + if (constraints.is_constrained(line)) + { + const std::vector > *entries + = constraints.get_constraint_entries(line); + Assert(entries->size()==1, ExcInternalError()); + const Point point1 = support_points[line]; + const Point point2 = support_points[(*entries)[0].first]; + Tensor<1, dim> difference = point1-point2; + difference[dim-1] = 0.; + AssertThrow(difference.norm()<1.e-9, ExcInternalError()); + if (locally_owned_dofs.is_element(line)) + ++n_local_constraints; + } } - } - const unsigned int n_constraints + const unsigned int n_constraints = Utilities::MPI::sum(n_local_constraints, MPI_COMM_WORLD); const unsigned int n_expected_constraints = Utilities::fixed_int_power<9,dim-1>::value; if (myid==0) - deallog << "n_constraints: " << n_constraints + deallog << "n_constraints: " << n_constraints << " n_expected_constraints: " << n_expected_constraints << std::endl; - AssertThrow(n_constraints == n_expected_constraints, + AssertThrow(n_constraints == n_expected_constraints, ExcDimensionMismatch(n_constraints, n_expected_constraints)); } - + int main (int argc, char *argv[]) { try @@ -248,20 +248,20 @@ int main (int argc, char *argv[]) { deallog << "Test for 2D" << std::endl << std::endl; for (int i = 0; i < 2; ++i) - { - deallog << "Triangulation: " << i << std::endl; - check<2> (i, false); - check<2> (i, true); - } - + { + deallog << "Triangulation: " << i << std::endl; + check<2> (i, false); + check<2> (i, true); + } + deallog << "Test for 3D" << std::endl << std::endl; for (int i = 0; i < 8; ++i) - { - // Generate a triangulation and match: - deallog << "Triangulation: " << i << std::endl; - check<3> (i, false); - check<3> (i, true); - } + { + // Generate a triangulation and match: + deallog << "Triangulation: " << i << std::endl; + check<3> (i, false); + check<3> (i, true); + } } } catch (std::exception &exc) diff --git a/tests/mpi/point_value_01.cc b/tests/mpi/point_value_01.cc index 9df032bee5..1f63594fa5 100644 --- a/tests/mpi/point_value_01.cc +++ b/tests/mpi/point_value_01.cc @@ -47,19 +47,19 @@ template void test() { parallel::distributed::Triangulation triangulation(MPI_COMM_WORLD); - + FE_Q fe(1); - + DoFHandler dof_handler (triangulation); - + GridGenerator::hyper_cube(triangulation); triangulation.refine_global (1); - + dof_handler.distribute_dofs (fe); IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs (); parallel::distributed::Vector locally_owned_solution - (locally_owned_dofs, MPI_COMM_WORLD); + (locally_owned_dofs, MPI_COMM_WORLD); locally_owned_solution=1; @@ -79,50 +79,50 @@ void test() Vector value(1); - for(; point_iterator!=points_end; point_iterator++) - { - try + for (; point_iterator!=points_end; point_iterator++) { - VectorTools::point_value (dof_handler, locally_owned_solution, - *point_iterator, value); - if (std::abs(value[0]-1.)>1e-8) - ExcInternalError(); + try + { + VectorTools::point_value (dof_handler, locally_owned_solution, + *point_iterator, value); + if (std::abs(value[0]-1.)>1e-8) + ExcInternalError(); + } + catch (const VectorTools::ExcPointNotAvailableHere &) + {} + + MPI_Barrier(MPI_COMM_WORLD); + + if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) + deallog << *point_iterator << " OK" << std::endl; } - catch (const VectorTools::ExcPointNotAvailableHere &) - {} - - MPI_Barrier(MPI_COMM_WORLD); - - if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) - deallog << *point_iterator << " OK" << std::endl; - } } int main(int argc, char *argv[]) { Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1); - + unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); if (myid == 0) - { - std::ofstream logfile("output"); - deallog.attach(logfile, false); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - deallog.push("2d"); - test<2>(); - deallog.pop(); - deallog.push("3d"); - test<3>(); - deallog.pop(); - } + { + std::ofstream logfile("output"); + deallog.attach(logfile, false); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + deallog.push("2d"); + test<2>(); + deallog.pop(); + deallog.push("3d"); + test<3>(); + deallog.pop(); + } else - { - test<2>(); - test<3>(); - } + { + test<2>(); + test<3>(); + } return 0; } diff --git a/tests/mpi/refine_and_coarsen_fixed_fraction_07.cc b/tests/mpi/refine_and_coarsen_fixed_fraction_07.cc index 6ab8eb3952..9798dec2f5 100644 --- a/tests/mpi/refine_and_coarsen_fixed_fraction_07.cc +++ b/tests/mpi/refine_and_coarsen_fixed_fraction_07.cc @@ -50,149 +50,149 @@ void test() subdivisions[0] = 120; subdivisions[1] = 1; GridGenerator::subdivided_hyper_rectangle (triangulation, - subdivisions, - Point<2>(), - Point<2>(1,1)); + subdivisions, + Point<2>(), + Point<2>(1,1)); // initialize the refinement indicators with a set of particular values from the original // testcase const double values[] = - { - 1.48589e-08, - 3.31859e-06, - 3.31859e-06, - 0.0025918, - 3.31859e-06, - 0.0025918, - 0.0025918, - 3.31859e-06, - 1.48589e-08, - 0.0025918, - 3.31859e-06, - 0.0025918, - 3.31859e-06, - 0.0025918, - 3.31859e-06, - 0.0025918, - 1.48589e-08, - 3.31859e-06, - 0.0025918, - 3.31859e-06, - 0.0025918, - 0.0025918, - 3.31859e-06, - 3.31859e-06, - 1.48589e-08, - 0.0025918, - 0.0025918, - 3.31859e-06, - 3.31859e-06, - 0.0025918, - 0.0025918, - 1.48589e-08, - 3.31859e-06, - 3.31859e-06, - 0.0025918, - 0.0025918, - 3.31859e-06, - 0.0025918, - 3.31859e-06, - 1.48589e-08, - 0.0025918, - 3.31859e-06, - 0.0025918, - 3.31859e-06, - 0.0025918, - 3.31859e-06, - 0.0025918, - 1.48589e-08, - 3.31859e-06, - 0.0025918, - 0.0025918, - 3.31859e-06, - 0.0025918, - 3.31859e-06, - 3.31859e-06, - 1.48589e-08, - 0.0120662, - 0.0446999, - 0.0446999, - 0.0644361, - 0.0446999, - 0.0644361, - 0.0644361, - 3.14051, - 0.0446999, - 0.0120662, - 0.0644361, - 0.0446999, - 0.0644361, - 0.0446999, - 3.14051, - 0.0644361, - 0.0446999, - 0.0644361, - 0.0120662, - 0.0446999, - 0.0644361, - 3.14051, - 0.0446999, - 0.0644361, - 0.0644361, - 0.0446999, - 0.0446999, - 0.0120662, - 3.14051, - 0.0644361, - 0.0644361, - 0.0446999, - 0.0446999, - 0.0644361, - 0.0644361, - 3.14051, - 0.0120662, - 0.0446999, - 0.0446999, - 0.0644361, - 0.0644361, - 0.0446999, - 3.14051, - 0.0644361, - 0.0446999, - 0.0120662, - 0.0644361, - 0.0446999, - 0.0644361, - 3.14051, - 0.0446999, - 0.0644361, - 0.0446999, - 0.0644361, - 0.0120662, - 0.0446999, - 3.14051, - 0.0644361, - 0.0644361, - 0.0446999, - 0.0644361, - 0.0446999, - 0.0446999, - 0.0120662 - }; - + { + 1.48589e-08, + 3.31859e-06, + 3.31859e-06, + 0.0025918, + 3.31859e-06, + 0.0025918, + 0.0025918, + 3.31859e-06, + 1.48589e-08, + 0.0025918, + 3.31859e-06, + 0.0025918, + 3.31859e-06, + 0.0025918, + 3.31859e-06, + 0.0025918, + 1.48589e-08, + 3.31859e-06, + 0.0025918, + 3.31859e-06, + 0.0025918, + 0.0025918, + 3.31859e-06, + 3.31859e-06, + 1.48589e-08, + 0.0025918, + 0.0025918, + 3.31859e-06, + 3.31859e-06, + 0.0025918, + 0.0025918, + 1.48589e-08, + 3.31859e-06, + 3.31859e-06, + 0.0025918, + 0.0025918, + 3.31859e-06, + 0.0025918, + 3.31859e-06, + 1.48589e-08, + 0.0025918, + 3.31859e-06, + 0.0025918, + 3.31859e-06, + 0.0025918, + 3.31859e-06, + 0.0025918, + 1.48589e-08, + 3.31859e-06, + 0.0025918, + 0.0025918, + 3.31859e-06, + 0.0025918, + 3.31859e-06, + 3.31859e-06, + 1.48589e-08, + 0.0120662, + 0.0446999, + 0.0446999, + 0.0644361, + 0.0446999, + 0.0644361, + 0.0644361, + 3.14051, + 0.0446999, + 0.0120662, + 0.0644361, + 0.0446999, + 0.0644361, + 0.0446999, + 3.14051, + 0.0644361, + 0.0446999, + 0.0644361, + 0.0120662, + 0.0446999, + 0.0644361, + 3.14051, + 0.0446999, + 0.0644361, + 0.0644361, + 0.0446999, + 0.0446999, + 0.0120662, + 3.14051, + 0.0644361, + 0.0644361, + 0.0446999, + 0.0446999, + 0.0644361, + 0.0644361, + 3.14051, + 0.0120662, + 0.0446999, + 0.0446999, + 0.0644361, + 0.0644361, + 0.0446999, + 3.14051, + 0.0644361, + 0.0446999, + 0.0120662, + 0.0644361, + 0.0446999, + 0.0644361, + 3.14051, + 0.0446999, + 0.0644361, + 0.0446999, + 0.0644361, + 0.0120662, + 0.0446999, + 3.14051, + 0.0644361, + 0.0644361, + 0.0446999, + 0.0644361, + 0.0446999, + 0.0446999, + 0.0120662 + }; + Vector estimated_error_per_cell(&values[0], - &values[0] + 120); - + &values[0] + 120); + deallog << "Number of cells before refinement: " << triangulation.n_active_cells() - << std::endl; - + << std::endl; + parallel::distributed::GridRefinement:: - refine_and_coarsen_fixed_fraction (triangulation, - estimated_error_per_cell, - 0.3, 0.0); + refine_and_coarsen_fixed_fraction (triangulation, + estimated_error_per_cell, + 0.3, 0.0); triangulation.execute_coarsening_and_refinement (); - + deallog << "Number of cells after refinement: " << triangulation.n_active_cells() - << std::endl; + << std::endl; } diff --git a/tests/mpi/repartition_01.cc b/tests/mpi/repartition_01.cc index 8b9745d783..a99a59afaf 100644 --- a/tests/mpi/repartition_01.cc +++ b/tests/mpi/repartition_01.cc @@ -41,28 +41,28 @@ void test() if (true) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::hyper_cube(tr); tr.refine_global(2); deallog << "locally owned cells: " << tr.n_locally_owned_active_cells() - << " / " - << tr.n_global_active_cells() - << std::endl; + << " / " + << tr.n_global_active_cells() + << std::endl; //tr.write_mesh_vtk("a"); - + tr.repartition(); - + //tr.write_mesh_vtk("b"); - + deallog << "locally owned cells: " << tr.n_locally_owned_active_cells() - << " / " - << tr.n_global_active_cells() - << std::endl; - + << " / " + << tr.n_global_active_cells() + << std::endl; + const unsigned int checksum = tr.get_checksum (); if (myid == 0) deallog << "Checksum: " diff --git a/tests/mpi/repartition_02.cc b/tests/mpi/repartition_02.cc index ab67abd8ec..1bd517d0b7 100644 --- a/tests/mpi/repartition_02.cc +++ b/tests/mpi/repartition_02.cc @@ -35,7 +35,7 @@ template void pack_function (const typename parallel::distributed::Triangulation::cell_iterator &cell, const typename parallel::distributed::Triangulation::CellStatus status, - void *data) + void *data) { static int some_number = cell->index(); deallog << "packing cell " << cell->id() << " with data=" << some_number << " status="; @@ -55,8 +55,8 @@ void pack_function (const typename parallel::distributed::Triangulation { Assert(!cell->has_children(), ExcInternalError()); } - - int * intdata = reinterpret_cast(data); + + int *intdata = reinterpret_cast(data); *intdata = some_number; ++some_number; @@ -64,16 +64,16 @@ void pack_function (const typename parallel::distributed::Triangulation template void unpack_function (const typename parallel::distributed::Triangulation::cell_iterator &cell, - const typename parallel::distributed::Triangulation::CellStatus status, - const void *data) + const typename parallel::distributed::Triangulation::CellStatus status, + const void *data) { - const int * intdata = reinterpret_cast(data); + const int *intdata = reinterpret_cast(data); deallog << "unpacking cell " << cell->id() << " with data=" << (*intdata) << " status="; if (status==parallel::distributed::Triangulation::CELL_PERSIST) deallog << "PERSIST"; else if (status==parallel::distributed::Triangulation::CELL_REFINE) - deallog << "REFINE"; + deallog << "REFINE"; else if (status==parallel::distributed::Triangulation::CELL_COARSEN) deallog << "COARSEN"; deallog << std::endl; @@ -96,50 +96,50 @@ void test() if (true) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::hyper_cube(tr); tr.refine_global(1); deallog << "locally owned cells: " << tr.n_locally_owned_active_cells() - << " / " - << tr.n_global_active_cells() - << std::endl; + << " / " + << tr.n_global_active_cells() + << std::endl; + + deallog << "* global refine:" << std::endl; - deallog << "* global refine:" << std::endl; - unsigned int offset = tr.register_data_attach(sizeof(int), pack_function); - + tr.refine_global(1); deallog << "locally owned cells: " << tr.n_locally_owned_active_cells() - << " / " - << tr.n_global_active_cells() - << std::endl; + << " / " + << tr.n_global_active_cells() + << std::endl; + + tr.notify_ready_to_unpack(offset, unpack_function); - tr.notify_ready_to_unpack(offset, unpack_function); - //tr.write_mesh_vtk("a"); - + deallog << "* repartition:" << std::endl; - + offset = tr.register_data_attach(sizeof(int), pack_function); tr.repartition(); - + //tr.write_mesh_vtk("b"); - + deallog << "locally owned cells: " << tr.n_locally_owned_active_cells() - << " / " - << tr.n_global_active_cells() - << std::endl; + << " / " + << tr.n_global_active_cells() + << std::endl; + + tr.notify_ready_to_unpack(offset, unpack_function); - tr.notify_ready_to_unpack(offset, unpack_function); - const unsigned int checksum = tr.get_checksum (); if (myid == 0) deallog << "Checksum: " diff --git a/tests/mpi/repartition_03.cc b/tests/mpi/repartition_03.cc index 8aa495d725..6f5f944842 100644 --- a/tests/mpi/repartition_03.cc +++ b/tests/mpi/repartition_03.cc @@ -33,10 +33,10 @@ #include template -void print_cells(parallel::distributed::Triangulation & tr) +void print_cells(parallel::distributed::Triangulation &tr) { for (typename Triangulation::active_cell_iterator - cell = tr.begin_active(); + cell = tr.begin_active(); cell != tr.end(); ++cell) if (cell->is_locally_owned()) deallog << cell->id() << std::endl; @@ -50,41 +50,41 @@ void test() if (true) { parallel::distributed::Triangulation tr(MPI_COMM_WORLD, - dealii::Triangulation::none, - parallel::distributed::Triangulation::no_automatic_repartitioning); + dealii::Triangulation::none, + parallel::distributed::Triangulation::no_automatic_repartitioning); GridGenerator::hyper_cube(tr); tr.refine_global(2); deallog << "*** 1. everything on one core:" << std::endl; - + deallog << "locally owned cells: " << tr.n_locally_owned_active_cells() - << " / " - << tr.n_global_active_cells() - << std::endl; + << " / " + << tr.n_global_active_cells() + << std::endl; print_cells(tr); - + deallog << "*** 2. repartition:" << std::endl; tr.repartition(); - + deallog << "locally owned cells: " << tr.n_locally_owned_active_cells() - << " / " - << tr.n_global_active_cells() - << std::endl; + << " / " + << tr.n_global_active_cells() + << std::endl; print_cells(tr); deallog << "*** 3. repartition again (noop):" << std::endl; tr.repartition(); - + deallog << "locally owned cells: " << tr.n_locally_owned_active_cells() - << " / " - << tr.n_global_active_cells() - << std::endl; + << " / " + << tr.n_global_active_cells() + << std::endl; print_cells(tr); - + const unsigned int checksum = tr.get_checksum (); if (myid == 0) deallog << "Checksum: " diff --git a/tests/mpi/step-39.cc b/tests/mpi/step-39.cc index 5763bd70db..9c8003b3a0 100644 --- a/tests/mpi/step-39.cc +++ b/tests/mpi/step-39.cc @@ -562,7 +562,7 @@ namespace Step39 SolverControl coarse_solver_control (1000, 1e-10, false, false); SolverCG coarse_solver(coarse_solver_control); PreconditionIdentity identity; - TrilinosWrappers::SparseMatrix & coarse_matrix = mg_matrix[0]; + TrilinosWrappers::SparseMatrix &coarse_matrix = mg_matrix[0]; MGCoarseGridLACIteration,TrilinosWrappers::MPI::Vector> coarse_grid_solver(coarse_solver, coarse_matrix, identity); @@ -630,9 +630,9 @@ namespace Step39 // assemble all faces adjacent to ghost cells to get the full // information for all own cells without communication lctrl.faces_to_ghost = MeshWorker::LoopControl::both; - + MeshWorker::integration_loop ( - dof_handler.begin_active(), dof_handler.end(), + dof_handler.begin_active(), dof_handler.end(), dof_info, info_box, integrator, assembler, lctrl); @@ -698,7 +698,7 @@ int main(int argc, char *argv[]) Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, testing_max_num_threads()); MPILogInitAll log; - + try { FE_DGQ<2> fe1(2); diff --git a/tests/mpi/trilinos_sadd_01.cc b/tests/mpi/trilinos_sadd_01.cc index 43a29bd470..ba20d7c789 100644 --- a/tests/mpi/trilinos_sadd_01.cc +++ b/tests/mpi/trilinos_sadd_01.cc @@ -16,7 +16,7 @@ // check correct behavior of sadd of Trilinos vectors -// if they have different Epetra maps +// if they have different Epetra maps #include "../tests.h" #include @@ -44,7 +44,7 @@ void test () const int local_begin = std::max(0, begin_index-entries_per_process/2); const int local_end = entries_per_process*n_proc; locally_relevant.add_range (local_begin, local_end); - + TrilinosWrappers::MPI::Vector ghosted, distributed; distributed.reinit(locally_owned, MPI_COMM_WORLD); ghosted.reinit (locally_owned, locally_relevant, MPI_COMM_WORLD); @@ -65,17 +65,17 @@ void test () { deallog << "Distributed:" << std::endl; for (unsigned int i=begin_index; i @@ -43,8 +43,8 @@ void test () locally_owned.add_range(begin_index, end_index); locally_relevant.add_range - (local_begin, local_end); - + (local_begin, local_end); + distributed.reinit(locally_owned, MPI_COMM_WORLD); distributed2.reinit(locally_owned, MPI_COMM_WORLD); ghosted.reinit (locally_owned, locally_relevant, MPI_COMM_WORLD); @@ -98,21 +98,21 @@ void test () int main (int argc, char **argv) { Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, testing_max_num_threads()); - + unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); deallog.push(Utilities::int_to_string(myid)); - + if (myid == 0) - { - std::ofstream logfile("output"); - deallog.attach(logfile); - deallog << std::setprecision(4); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - test(); - } + { + std::ofstream logfile("output"); + deallog.attach(logfile); + deallog << std::setprecision(4); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test(); + } else test(); - + } diff --git a/tests/mpi/trilinos_sadd_03.cc b/tests/mpi/trilinos_sadd_03.cc index 9e0d28ec68..995c68ca29 100644 --- a/tests/mpi/trilinos_sadd_03.cc +++ b/tests/mpi/trilinos_sadd_03.cc @@ -16,7 +16,7 @@ // check correct behaviour of sadd of Trilinos vectors -// if there are processes that doesn't own anything +// if there are processes that doesn't own anything #include "../tests.h" #include @@ -42,11 +42,11 @@ void test () const unsigned int local_end = entries_per_process*(n_proc-1); if (my_id != n_proc-1) - { - locally_owned.add_range(begin_index, end_index); - locally_relevant.add_range(local_begin, local_end); - } - + { + locally_owned.add_range(begin_index, end_index); + locally_relevant.add_range(local_begin, local_end); + } + distributed.reinit(locally_owned, MPI_COMM_WORLD); distributed2.reinit(locally_owned, MPI_COMM_WORLD); ghosted.reinit (locally_owned, locally_relevant, MPI_COMM_WORLD); @@ -143,21 +143,21 @@ void test () int main (int argc, char **argv) { Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, testing_max_num_threads()); - + unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); deallog.push(Utilities::int_to_string(myid)); - + if (myid == 0) - { - std::ofstream logfile("output"); - deallog.attach(logfile); - deallog << std::setprecision(4); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - test(); - } + { + std::ofstream logfile("output"); + deallog.attach(logfile); + deallog << std::setprecision(4); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test(); + } else test(); - + } diff --git a/tests/mpi/trilinos_sparse_matrix_02.cc b/tests/mpi/trilinos_sparse_matrix_02.cc index a410274d36..ae8ee3dda6 100644 --- a/tests/mpi/trilinos_sparse_matrix_02.cc +++ b/tests/mpi/trilinos_sparse_matrix_02.cc @@ -47,9 +47,9 @@ void test () { // should be { [0, 2), [2, n_rows) } if (my_id == 0) - locally_owned.add_range(0, 2); + locally_owned.add_range(0, 2); else if (my_id == 1) - locally_owned.add_range(2, n_rows); + locally_owned.add_range(2, n_rows); } else Assert (false, ExcNotImplemented()); @@ -68,25 +68,25 @@ void test () A.reinit (sp); TrilinosWrappers::SparseMatrix B; B.reinit (A); - + A.add(0, 0, 0.1); A.add(0, 2, 0.2); if ((n_procs == 1) || (my_id == 1)) - A.add(2,3, 0.3); + A.add(2,3, 0.3); double l1a = (n_procs==1) ? 0.3 : 0.4; double l1b = n_procs*1.2; - + A.compress(VectorOperation::add); deallog << "1: " << A.l1_norm() << " " << B.l1_norm() - << " (should be " << l1a << " 0.0)" << std::endl; + << " (should be " << l1a << " 0.0)" << std::endl; deallog << "set B=A..." << std::endl; - - B.copy_from(A); - + + B.copy_from(A); + deallog << "2: " << A.l1_norm() << " " << B.l1_norm() - << " (should be " << l1a << " " << l1a << ")" << std::endl; + << " (should be " << l1a << " " << l1a << ")" << std::endl; if (my_id==0) { @@ -95,13 +95,13 @@ void test () } deallog << "reassemble A..." << std::endl; - + A = 0; A.add(0, 0, -1.2); A.compress(VectorOperation::add); deallog << "3: " << A.l1_norm() << " " << B.l1_norm() - << " (should be " << l1b << " " << l1a << ")" << std::endl; - + << " (should be " << l1b << " " << l1a << ")" << std::endl; + if (my_id==0) { deallog << "A(0,0)=" << A(0,0) << std::endl; diff --git a/tests/mpi/trilinos_sparse_matrix_03.cc b/tests/mpi/trilinos_sparse_matrix_03.cc index 2a59961546..50fa6ebf1c 100644 --- a/tests/mpi/trilinos_sparse_matrix_03.cc +++ b/tests/mpi/trilinos_sparse_matrix_03.cc @@ -96,34 +96,34 @@ void test () if (my_id == 0) { for (TrilinosWrappers::SparseMatrix::iterator p=A.begin(0); - p != A.end(0); - ++p) - { - AssertThrow (p->row() == 0, ExcInternalError()); - if (p->column() == 0) - AssertThrow (p->value() == 0.1, ExcInternalError()) - else if (p->column() == 2) - AssertThrow (p->value() == 0.2, ExcInternalError()) - else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow (p->value() == 0.0, ExcInternalError()); - } + p != A.end(0); + ++p) + { + AssertThrow (p->row() == 0, ExcInternalError()); + if (p->column() == 0) + AssertThrow (p->value() == 0.1, ExcInternalError()) + else if (p->column() == 2) + AssertThrow (p->value() == 0.2, ExcInternalError()) + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow (p->value() == 0.0, ExcInternalError()); + } } else { for (TrilinosWrappers::SparseMatrix::iterator p=A.begin(2); - p != A.end(2); - ++p) - { - AssertThrow (p->row() == 2, ExcInternalError()); - if (p->column() == 3) - AssertThrow (p->value() == 0.3, ExcInternalError()) - else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow (p->value() == 0.0, ExcInternalError()); - } + p != A.end(2); + ++p) + { + AssertThrow (p->row() == 2, ExcInternalError()); + if (p->column() == 3) + AssertThrow (p->value() == 0.3, ExcInternalError()) + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow (p->value() == 0.0, ExcInternalError()); + } } // now let each of the processors write something into the memory of @@ -134,35 +134,35 @@ void test () { A.set (2, 3, 42.); for (TrilinosWrappers::SparseMatrix::iterator p=A.begin(0); - p != A.end(0); - ++p) - { - AssertThrow (p->row() == 0, ExcInternalError()); - if (p->column() == 0) - AssertThrow (p->value() == 0.1, ExcInternalError()) - else if (p->column() == 2) - AssertThrow (p->value() == 0.2, ExcInternalError()) - else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow (p->value() == 0.0, ExcInternalError()); - } + p != A.end(0); + ++p) + { + AssertThrow (p->row() == 0, ExcInternalError()); + if (p->column() == 0) + AssertThrow (p->value() == 0.1, ExcInternalError()) + else if (p->column() == 2) + AssertThrow (p->value() == 0.2, ExcInternalError()) + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow (p->value() == 0.0, ExcInternalError()); + } } else { A.set (0, 0, 108.); for (TrilinosWrappers::SparseMatrix::iterator p=A.begin(2); - p != A.end(2); - ++p) - { - AssertThrow (p->row() == 2, ExcInternalError()); - if (p->column() == 3) - AssertThrow (p->value() == 0.3, ExcInternalError()) - else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow (p->value() == 0.0, ExcInternalError()); - } + p != A.end(2); + ++p) + { + AssertThrow (p->row() == 2, ExcInternalError()); + if (p->column() == 3) + AssertThrow (p->value() == 0.3, ExcInternalError()) + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow (p->value() == 0.0, ExcInternalError()); + } } // then call compress() and ensure that we get the correct values @@ -170,36 +170,36 @@ void test () if (my_id == 0) { for (TrilinosWrappers::SparseMatrix::iterator p=A.begin(0); - p != A.end(0); - ++p) - { - AssertThrow (p->row() == 0, ExcInternalError()); - if (p->column() == 0) - AssertThrow (p->value() == 108, ExcInternalError()) - else if (p->column() == 2) - AssertThrow (p->value() == 0.2, ExcInternalError()) - else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow (p->value() == 0.0, ExcInternalError()); - } + p != A.end(0); + ++p) + { + AssertThrow (p->row() == 0, ExcInternalError()); + if (p->column() == 0) + AssertThrow (p->value() == 108, ExcInternalError()) + else if (p->column() == 2) + AssertThrow (p->value() == 0.2, ExcInternalError()) + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow (p->value() == 0.0, ExcInternalError()); + } } else { for (TrilinosWrappers::SparseMatrix::iterator p=A.begin(2); - p != A.end(2); - ++p) - { - AssertThrow (p->row() == 2, ExcInternalError()); - if (p->column() == 3) - AssertThrow (p->value() == 42, ExcInternalError()) - else - // well, we didn't write here, so the only thing that - // should be in there is a zero - AssertThrow (p->value() == 0.0, ExcInternalError()); - } - } - + p != A.end(2); + ++p) + { + AssertThrow (p->row() == 2, ExcInternalError()); + if (p->column() == 3) + AssertThrow (p->value() == 42, ExcInternalError()) + else + // well, we didn't write here, so the only thing that + // should be in there is a zero + AssertThrow (p->value() == 0.0, ExcInternalError()); + } + } + if (my_id == 0) deallog << "OK" << std::endl; } diff --git a/tests/mpi/trilinos_sparse_matrix_04.cc b/tests/mpi/trilinos_sparse_matrix_04.cc index 3507ec7667..539ed75fa7 100644 --- a/tests/mpi/trilinos_sparse_matrix_04.cc +++ b/tests/mpi/trilinos_sparse_matrix_04.cc @@ -100,17 +100,17 @@ void test () ++p) if (my_id == 0) { - deallog << "Looking at entry (" << p->row() << ',' - << p->column() << ") with value " - << p->value() - << std::endl; - AssertThrow (p->row() == 0, ExcInternalError()); + deallog << "Looking at entry (" << p->row() << ',' + << p->column() << ") with value " + << p->value() + << std::endl; + AssertThrow (p->row() == 0, ExcInternalError()); } else { - AssertThrow (p->row() == 2, ExcInternalError()); - } - + AssertThrow (p->row() == 2, ExcInternalError()); + } + if (my_id == 0) deallog << "OK" << std::endl; } diff --git a/tests/mpi/trilinos_sparse_matrix_05.cc b/tests/mpi/trilinos_sparse_matrix_05.cc index f491e95105..c39acc5437 100644 --- a/tests/mpi/trilinos_sparse_matrix_05.cc +++ b/tests/mpi/trilinos_sparse_matrix_05.cc @@ -96,7 +96,7 @@ void test () A.compress(VectorOperation::insert); const TrilinosWrappers::SparseMatrix &B = A; - + // now access elements by iterator. ensure that we can iterate over // all rows but that iterators into rows not stored locally just // look empty @@ -105,17 +105,17 @@ void test () ++p) if (my_id == 0) { - deallog << "Looking at entry (" << p->row() << ',' - << p->column() << ") with value " - << p->value() - << std::endl; - AssertThrow (p->row() == 0, ExcInternalError()); + deallog << "Looking at entry (" << p->row() << ',' + << p->column() << ") with value " + << p->value() + << std::endl; + AssertThrow (p->row() == 0, ExcInternalError()); } else { - AssertThrow (p->row() == 2, ExcInternalError()); - } - + AssertThrow (p->row() == 2, ExcInternalError()); + } + if (my_id == 0) deallog << "OK" << std::endl; } diff --git a/tests/mpi/trilinos_sparse_matrix_mmult_01.cc b/tests/mpi/trilinos_sparse_matrix_mmult_01.cc index 52abcc162c..623c9abe6e 100644 --- a/tests/mpi/trilinos_sparse_matrix_mmult_01.cc +++ b/tests/mpi/trilinos_sparse_matrix_mmult_01.cc @@ -156,17 +156,17 @@ int main (int argc, char **argv) try { if (myid == 0) - { - std::ofstream logfile("output"); - deallog.attach(logfile); - deallog << std::setprecision(4); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - test(); - } + { + std::ofstream logfile("output"); + deallog.attach(logfile); + deallog << std::setprecision(4); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test(); + } else - test(); + test(); } catch (const char *p) { diff --git a/tests/multigrid/mg_output_neumann.cc b/tests/multigrid/mg_output_neumann.cc index b25ff2a19d..7464fcd493 100644 --- a/tests/multigrid/mg_output_neumann.cc +++ b/tests/multigrid/mg_output_neumann.cc @@ -247,18 +247,18 @@ void check_simple(const FiniteElement &fe) MGTransferPrebuilt > transfer_renumbered(hnc_renumbered, mg_constrained_dofs_renumbered); transfer_renumbered.build_matrices(mgdof_renumbered); - + // Fill vector u with some cell based numbering Vector u(mgdof.n_dofs()); initialize(mgdof,u); MGLevelObject > v(0, tr.n_levels()-1); reinit_vector(mgdof, v); - + // Copy u to a multigrid vector and print transfer.copy_to_mg(mgdof, v, u); print(mgdof, v); - + // Forget everything so far and fill v with a cell based // numbering. Prolongate from coarse grid up and transfer to u. u=0; @@ -268,14 +268,14 @@ void check_simple(const FiniteElement &fe) transfer.copy_from_mg(mgdof, u, v); Vector diff = u; - + // Do the same for the renumbered mesh initialize(mgdof_renumbered,u); reinit_vector(mgdof_renumbered, v); transfer_renumbered.copy_to_mg(mgdof_renumbered, v, u); deallog << "copy_to_mg" << std::endl; print(mgdof_renumbered, v); - + // Prolongate up from coarse mesh and make sure the result does not // depend on numbering u=0; diff --git a/tests/multigrid/mg_renumbered_03.cc b/tests/multigrid/mg_renumbered_03.cc index 57e0f2406b..95960921ce 100644 --- a/tests/multigrid/mg_renumbered_03.cc +++ b/tests/multigrid/mg_renumbered_03.cc @@ -233,7 +233,7 @@ private: DoFHandler mg_dof_handler_renumbered; const unsigned int degree; - std::vector > + std::vector > boundary_indices, boundary_indices_renumbered; }; diff --git a/tests/multigrid/renumbering_04.cc b/tests/multigrid/renumbering_04.cc index e25deb1346..50f7b2827c 100644 --- a/tests/multigrid/renumbering_04.cc +++ b/tests/multigrid/renumbering_04.cc @@ -101,23 +101,23 @@ int main() initlog(__FILE__); { - FESystem<1> fe(FE_Q<1>(1), 1, FE_DGQ<1>(0), 1); - check<1> (fe); + FESystem<1> fe(FE_Q<1>(1), 1, FE_DGQ<1>(0), 1); + check<1> (fe); } { - FESystem<2> fe(FE_RaviartThomas<2>(0),1, FE_DGQ<2>(0), 1); - check<2> (fe); + FESystem<2> fe(FE_RaviartThomas<2>(0),1, FE_DGQ<2>(0), 1); + check<2> (fe); } { - FESystem<2> fe(FE_Q<2>(1), 1, FE_DGQ<2>(0), 1); - check<2> (fe); + FESystem<2> fe(FE_Q<2>(1), 1, FE_DGQ<2>(0), 1); + check<2> (fe); } { - FESystem<3> fe(FE_Q<3>(1), 1, FE_DGQ<3>(0), 1); - check<3> (fe); + FESystem<3> fe(FE_Q<3>(1), 1, FE_DGQ<3>(0), 1); + check<3> (fe); } deallog << "OK" << endl; diff --git a/tests/multigrid/step-16-02.cc b/tests/multigrid/step-16-02.cc index 9fcb182d78..31efe17a8d 100644 --- a/tests/multigrid/step-16-02.cc +++ b/tests/multigrid/step-16-02.cc @@ -74,48 +74,48 @@ class LaplaceMatrix : public MeshWorker::LocalIntegrator { public: LaplaceMatrix(); - virtual void cell(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const; - virtual void boundary(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const; - virtual void face(MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - MeshWorker::IntegrationInfo& info1, MeshWorker::IntegrationInfo& info2) const; + virtual void cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const; + virtual void boundary(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const; + virtual void face(MeshWorker::DoFInfo &dinfo1, MeshWorker::DoFInfo &dinfo2, + MeshWorker::IntegrationInfo &info1, MeshWorker::IntegrationInfo &info2) const; }; template LaplaceMatrix::LaplaceMatrix() - : - MeshWorker::LocalIntegrator(true, false, false) + : + MeshWorker::LocalIntegrator(true, false, false) {} template -void LaplaceMatrix::cell(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const +void LaplaceMatrix::cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const { - AssertDimension (dinfo.n_matrices(), 1); + AssertDimension (dinfo.n_matrices(), 1); Laplace::cell_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0)); } template -void LaplaceMatrix::boundary(MeshWorker::DoFInfo& /*dinfo*/, - typename MeshWorker::IntegrationInfo& /*info*/) const +void LaplaceMatrix::boundary(MeshWorker::DoFInfo & /*dinfo*/, + typename MeshWorker::IntegrationInfo & /*info*/) const { // const unsigned int deg = info.fe_values(0).get_fe().tensor_degree(); // Laplace::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0), -// Laplace::compute_penalty(dinfo, dinfo, deg, deg)); +// Laplace::compute_penalty(dinfo, dinfo, deg, deg)); } template void LaplaceMatrix::face( - MeshWorker::DoFInfo& /*dinfo1*/, MeshWorker::DoFInfo& /*dinfo2*/, - MeshWorker::IntegrationInfo& /*info1*/, MeshWorker::IntegrationInfo& /*info2*/) const + MeshWorker::DoFInfo & /*dinfo1*/, MeshWorker::DoFInfo & /*dinfo2*/, + MeshWorker::IntegrationInfo & /*info1*/, MeshWorker::IntegrationInfo & /*info2*/) const { // const unsigned int deg = info1.fe_values(0).get_fe().tensor_degree(); -// Laplace::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, -// dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, -// info1.fe_values(0), info2.fe_values(0), -// Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); +// Laplace::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, +// dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, +// info1.fe_values(0), info2.fe_values(0), +// Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); } template @@ -130,7 +130,7 @@ private: void assemble_system (); void assemble_multigrid (const bool &use_mw); void solve (); - void refine_grid (const std::string& reftype); + void refine_grid (const std::string &reftype); void output_results (const unsigned int cycle) const; Triangulation triangulation; @@ -180,7 +180,7 @@ double Coefficient::value (const Point &p, // if (p.square() < 0.5*0.5) // return 20; // else - return 1; + return 1; } @@ -340,111 +340,111 @@ void LaplaceProblem::assemble_system () template -void LaplaceProblem::assemble_multigrid (const bool& use_mw) +void LaplaceProblem::assemble_multigrid (const bool &use_mw) { - if(use_mw == true) - { - mg_matrices = 0.; + if (use_mw == true) + { + mg_matrices = 0.; - MappingQ1 mapping; - MeshWorker::IntegrationInfoBox info_box; - UpdateFlags update_flags = update_values | update_gradients | update_hessians; - info_box.add_update_flags_all(update_flags); - info_box.initialize(fe, mapping); + MappingQ1 mapping; + MeshWorker::IntegrationInfoBox info_box; + UpdateFlags update_flags = update_values | update_gradients | update_hessians; + info_box.add_update_flags_all(update_flags); + info_box.initialize(fe, mapping); - MeshWorker::DoFInfo dof_info(mg_dof_handler); + MeshWorker::DoFInfo dof_info(mg_dof_handler); - MeshWorker::Assembler::MGMatrixSimple > assembler; - assembler.initialize(mg_constrained_dofs); - assembler.initialize(mg_matrices); - assembler.initialize_interfaces(mg_interface_in, mg_interface_out); + MeshWorker::Assembler::MGMatrixSimple > assembler; + assembler.initialize(mg_constrained_dofs); + assembler.initialize(mg_matrices); + assembler.initialize_interfaces(mg_interface_in, mg_interface_out); - MeshWorker::integration_loop ( + MeshWorker::integration_loop ( mg_dof_handler.begin_mg(), mg_dof_handler.end_mg(), dof_info, info_box, matrix_integrator, assembler); - const unsigned int nlevels = triangulation.n_levels(); - for (unsigned int level=0;level quadrature_formula(1+degree); + { + QGauss quadrature_formula(1+degree); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_quadrature_points | update_JxW_values); + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_quadrature_points | update_JxW_values); - const unsigned int dofs_per_cell = fe.dofs_per_cell; - const unsigned int n_q_points = quadrature_formula.size(); + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.size(); - FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); + FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); - std::vector local_dof_indices (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); - const Coefficient coefficient; - std::vector coefficient_values (n_q_points); + const Coefficient coefficient; + std::vector coefficient_values (n_q_points); - std::vector > interface_dofs - = mg_constrained_dofs.get_refinement_edge_indices (); - std::vector > boundary_interface_dofs - = mg_constrained_dofs.get_refinement_edge_boundary_indices (); + std::vector > interface_dofs + = mg_constrained_dofs.get_refinement_edge_indices (); + std::vector > boundary_interface_dofs + = mg_constrained_dofs.get_refinement_edge_boundary_indices (); - std::vector boundary_constraints (triangulation.n_levels()); - std::vector boundary_interface_constraints (triangulation.n_levels()); - for (unsigned int level=0; level boundary_constraints (triangulation.n_levels()); + std::vector boundary_interface_constraints (triangulation.n_levels()); + for (unsigned int level=0; level::level_cell_iterator cell = mg_dof_handler.begin_mg(), - endc = mg_dof_handler.end_mg(); + typename DoFHandler::level_cell_iterator cell = mg_dof_handler.begin_mg(), + endc = mg_dof_handler.end_mg(); - for (; cell!=endc; ++cell) - { - cell_matrix = 0; - fe_values.reinit (cell); + for (; cell!=endc; ++cell) + { + cell_matrix = 0; + fe_values.reinit (cell); - coefficient.value_list (fe_values.get_quadrature_points(), - coefficient_values); + coefficient.value_list (fe_values.get_quadrature_points(), + coefficient_values); - for (unsigned int q_point=0; q_pointget_mg_dof_indices (local_dof_indices); - - boundary_constraints[cell->level()] - .distribute_local_to_global (cell_matrix, - local_dof_indices, - mg_matrices[cell->level()]); - - for (unsigned int i=0; ilevel()][local_dof_indices[i]]==true && - interface_dofs[cell->level()][local_dof_indices[j]]==false)) - cell_matrix(i,j) = 0; - - boundary_interface_constraints[cell->level()] - .distribute_local_to_global (cell_matrix, - local_dof_indices, - mg_interface_in[cell->level()]); + for (unsigned int q_point=0; q_pointget_mg_dof_indices (local_dof_indices); + + boundary_constraints[cell->level()] + .distribute_local_to_global (cell_matrix, + local_dof_indices, + mg_matrices[cell->level()]); + + for (unsigned int i=0; ilevel()][local_dof_indices[i]]==true && + interface_dofs[cell->level()][local_dof_indices[j]]==false)) + cell_matrix(i,j) = 0; + + boundary_interface_constraints[cell->level()] + .distribute_local_to_global (cell_matrix, + local_dof_indices, + mg_interface_in[cell->level()]); + } } - } } @@ -497,32 +497,32 @@ void LaplaceProblem::solve () template -void LaplaceProblem::refine_grid (const std::string& reftype) +void LaplaceProblem::refine_grid (const std::string &reftype) { bool cell_refined = false; if (reftype == "center" || !cell_refined) { for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell) - for (unsigned int vertex=0; - vertex < GeometryInfo::vertices_per_cell; - ++vertex) - { - { - const Point p = cell->vertex(vertex); - const Point origin = (dim == 2 ? - Point(0,0) : - Point(0,0,0)); - const double dist = p.distance(origin); - if(dist<0.25/numbers::PI) - { - cell->set_refine_flag (); - cell_refined = true; - break; - } - } - } + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell) + for (unsigned int vertex=0; + vertex < GeometryInfo::vertices_per_cell; + ++vertex) + { + { + const Point p = cell->vertex(vertex); + const Point origin = (dim == 2 ? + Point(0,0) : + Point(0,0,0)); + const double dist = p.distance(origin); + if (dist<0.25/numbers::PI) + { + cell->set_refine_flag (); + cell_refined = true; + break; + } + } + } } if (reftype=="global" || !cell_refined) triangulation.refine_global(1); diff --git a/tests/multigrid/step-16-bdry1.cc b/tests/multigrid/step-16-bdry1.cc index 18c0f1c1e1..1306bd5756 100644 --- a/tests/multigrid/step-16-bdry1.cc +++ b/tests/multigrid/step-16-bdry1.cc @@ -75,48 +75,48 @@ class LaplaceMatrix : public MeshWorker::LocalIntegrator { public: LaplaceMatrix(); - virtual void cell(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const; - virtual void boundary(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const; - virtual void face(MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - MeshWorker::IntegrationInfo& info1, MeshWorker::IntegrationInfo& info2) const; + virtual void cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const; + virtual void boundary(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const; + virtual void face(MeshWorker::DoFInfo &dinfo1, MeshWorker::DoFInfo &dinfo2, + MeshWorker::IntegrationInfo &info1, MeshWorker::IntegrationInfo &info2) const; }; template LaplaceMatrix::LaplaceMatrix() - : - MeshWorker::LocalIntegrator(true, false, false) + : + MeshWorker::LocalIntegrator(true, false, false) {} template -void LaplaceMatrix::cell(MeshWorker::DoFInfo& dinfo, MeshWorker::IntegrationInfo& info) const +void LaplaceMatrix::cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const { - AssertDimension (dinfo.n_matrices(), 1); + AssertDimension (dinfo.n_matrices(), 1); Laplace::cell_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0)); } template -void LaplaceMatrix::boundary(MeshWorker::DoFInfo& /*dinfo*/, - typename MeshWorker::IntegrationInfo& /*info*/) const +void LaplaceMatrix::boundary(MeshWorker::DoFInfo & /*dinfo*/, + typename MeshWorker::IntegrationInfo & /*info*/) const { // const unsigned int deg = info.fe_values(0).get_fe().tensor_degree(); // Laplace::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0), -// Laplace::compute_penalty(dinfo, dinfo, deg, deg)); +// Laplace::compute_penalty(dinfo, dinfo, deg, deg)); } template void LaplaceMatrix::face( - MeshWorker::DoFInfo& /*dinfo1*/, MeshWorker::DoFInfo& /*dinfo2*/, - MeshWorker::IntegrationInfo& /*info1*/, MeshWorker::IntegrationInfo& /*info2*/) const + MeshWorker::DoFInfo & /*dinfo1*/, MeshWorker::DoFInfo & /*dinfo2*/, + MeshWorker::IntegrationInfo & /*info1*/, MeshWorker::IntegrationInfo & /*info2*/) const { // const unsigned int deg = info1.fe_values(0).get_fe().tensor_degree(); -// Laplace::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, -// dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, -// info1.fe_values(0), info2.fe_values(0), -// Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); +// Laplace::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, +// dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, +// info1.fe_values(0), info2.fe_values(0), +// Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); } template @@ -131,7 +131,7 @@ private: void assemble_system (); void assemble_multigrid (const bool &use_mw); void solve (); - void refine_grid (const std::string& reftype); + void refine_grid (const std::string &reftype); void output_results (const unsigned int cycle) const; Triangulation triangulation; @@ -181,7 +181,7 @@ double Coefficient::value (const Point &p, // if (p.square() < 0.5*0.5) // return 20; // else - return 1; + return 1; } @@ -341,111 +341,111 @@ void LaplaceProblem::assemble_system () template -void LaplaceProblem::assemble_multigrid (const bool& use_mw) +void LaplaceProblem::assemble_multigrid (const bool &use_mw) { - if(use_mw == true) - { - mg_matrices = 0.; + if (use_mw == true) + { + mg_matrices = 0.; - MappingQ1 mapping; - MeshWorker::IntegrationInfoBox info_box; - UpdateFlags update_flags = update_values | update_gradients | update_hessians; - info_box.add_update_flags_all(update_flags); - info_box.initialize(fe, mapping); + MappingQ1 mapping; + MeshWorker::IntegrationInfoBox info_box; + UpdateFlags update_flags = update_values | update_gradients | update_hessians; + info_box.add_update_flags_all(update_flags); + info_box.initialize(fe, mapping); - MeshWorker::DoFInfo dof_info(mg_dof_handler); + MeshWorker::DoFInfo dof_info(mg_dof_handler); - MeshWorker::Assembler::MGMatrixSimple > assembler; - assembler.initialize(mg_constrained_dofs); - assembler.initialize(mg_matrices); - assembler.initialize_interfaces(mg_interface_in, mg_interface_out); + MeshWorker::Assembler::MGMatrixSimple > assembler; + assembler.initialize(mg_constrained_dofs); + assembler.initialize(mg_matrices); + assembler.initialize_interfaces(mg_interface_in, mg_interface_out); - MeshWorker::integration_loop ( + MeshWorker::integration_loop ( mg_dof_handler.begin_mg(), mg_dof_handler.end_mg(), dof_info, info_box, matrix_integrator, assembler); - const unsigned int nlevels = triangulation.n_levels(); - for (unsigned int level=0;level quadrature_formula(1+degree); + { + QGauss quadrature_formula(1+degree); - FEValues fe_values (fe, quadrature_formula, - update_values | update_gradients | - update_quadrature_points | update_JxW_values); + FEValues fe_values (fe, quadrature_formula, + update_values | update_gradients | + update_quadrature_points | update_JxW_values); - const unsigned int dofs_per_cell = fe.dofs_per_cell; - const unsigned int n_q_points = quadrature_formula.size(); + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.size(); - FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); + FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); - std::vector local_dof_indices (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); - const Coefficient coefficient; - std::vector coefficient_values (n_q_points); + const Coefficient coefficient; + std::vector coefficient_values (n_q_points); - std::vector > interface_dofs - = mg_constrained_dofs.get_refinement_edge_indices (); - std::vector > boundary_interface_dofs - = mg_constrained_dofs.get_refinement_edge_boundary_indices (); + std::vector > interface_dofs + = mg_constrained_dofs.get_refinement_edge_indices (); + std::vector > boundary_interface_dofs + = mg_constrained_dofs.get_refinement_edge_boundary_indices (); - std::vector boundary_constraints (triangulation.n_levels()); - std::vector boundary_interface_constraints (triangulation.n_levels()); - for (unsigned int level=0; level boundary_constraints (triangulation.n_levels()); + std::vector boundary_interface_constraints (triangulation.n_levels()); + for (unsigned int level=0; level::level_cell_iterator cell = mg_dof_handler.begin_mg(), - endc = mg_dof_handler.end_mg(); + typename DoFHandler::level_cell_iterator cell = mg_dof_handler.begin_mg(), + endc = mg_dof_handler.end_mg(); - for (; cell!=endc; ++cell) - { - cell_matrix = 0; - fe_values.reinit (cell); + for (; cell!=endc; ++cell) + { + cell_matrix = 0; + fe_values.reinit (cell); - coefficient.value_list (fe_values.get_quadrature_points(), - coefficient_values); + coefficient.value_list (fe_values.get_quadrature_points(), + coefficient_values); - for (unsigned int q_point=0; q_pointget_mg_dof_indices (local_dof_indices); - - boundary_constraints[cell->level()] - .distribute_local_to_global (cell_matrix, - local_dof_indices, - mg_matrices[cell->level()]); - - for (unsigned int i=0; ilevel()][local_dof_indices[i]]==true && - interface_dofs[cell->level()][local_dof_indices[j]]==false)) - cell_matrix(i,j) = 0; - - boundary_interface_constraints[cell->level()] - .distribute_local_to_global (cell_matrix, - local_dof_indices, - mg_interface_in[cell->level()]); + for (unsigned int q_point=0; q_pointget_mg_dof_indices (local_dof_indices); + + boundary_constraints[cell->level()] + .distribute_local_to_global (cell_matrix, + local_dof_indices, + mg_matrices[cell->level()]); + + for (unsigned int i=0; ilevel()][local_dof_indices[i]]==true && + interface_dofs[cell->level()][local_dof_indices[j]]==false)) + cell_matrix(i,j) = 0; + + boundary_interface_constraints[cell->level()] + .distribute_local_to_global (cell_matrix, + local_dof_indices, + mg_interface_in[cell->level()]); + } } - } } @@ -498,32 +498,32 @@ void LaplaceProblem::solve () template -void LaplaceProblem::refine_grid (const std::string& reftype) +void LaplaceProblem::refine_grid (const std::string &reftype) { bool cell_refined = false; if (reftype == "center" || !cell_refined) { for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell) - for (unsigned int vertex=0; - vertex < GeometryInfo::vertices_per_cell; - ++vertex) - { - { - const Point p = cell->vertex(vertex); - const Point origin = (dim == 2 ? - Point(0,0) : - Point(0,0,0)); - const double dist = p.distance(origin); - if(dist<0.25/numbers::PI) - { - cell->set_refine_flag (); - cell_refined = true; - break; - } - } - } + cell = triangulation.begin_active(); + cell != triangulation.end(); ++cell) + for (unsigned int vertex=0; + vertex < GeometryInfo::vertices_per_cell; + ++vertex) + { + { + const Point p = cell->vertex(vertex); + const Point origin = (dim == 2 ? + Point(0,0) : + Point(0,0,0)); + const double dist = p.distance(origin); + if (dist<0.25/numbers::PI) + { + cell->set_refine_flag (); + cell_refined = true; + break; + } + } + } } if (reftype=="global" || !cell_refined) triangulation.refine_global(1); diff --git a/tests/multigrid/step-16.cc b/tests/multigrid/step-16.cc index cf11734a75..2b0b81426e 100644 --- a/tests/multigrid/step-16.cc +++ b/tests/multigrid/step-16.cc @@ -312,7 +312,7 @@ void LaplaceProblem::assemble_multigrid () } typename DoFHandler::cell_iterator cell = mg_dof_handler.begin(), - endc = mg_dof_handler.end(); + endc = mg_dof_handler.end(); for (; cell!=endc; ++cell) { diff --git a/tests/multigrid/step-39-02a.cc b/tests/multigrid/step-39-02a.cc index 75fce2a601..10836fbd0c 100644 --- a/tests/multigrid/step-39-02a.cc +++ b/tests/multigrid/step-39-02a.cc @@ -361,7 +361,7 @@ namespace Step39 const FiniteElement &fe; DoFHandler dof_handler; MGConstrainedDoFs mg_constraints; - + SparsityPattern sparsity; SparseMatrix matrix; Vector solution; @@ -399,10 +399,10 @@ namespace Step39 types::global_dof_index n_dofs = dof_handler.n_dofs(); solution.reinit(n_dofs); right_hand_side.reinit(n_dofs); - + mg_constraints.clear(); mg_constraints.initialize(dof_handler); - + DynamicSparsityPattern dsp(n_dofs); DoFTools::make_flux_sparsity_pattern(dof_handler, dsp); sparsity.copy_from(dsp); diff --git a/tests/numerics/assemble_matrix_parallel_01.cc b/tests/numerics/assemble_matrix_parallel_01.cc index 0316f7a385..7ee028b4e2 100644 --- a/tests/numerics/assemble_matrix_parallel_01.cc +++ b/tests/numerics/assemble_matrix_parallel_01.cc @@ -308,9 +308,9 @@ LaplaceProblem::local_assemble (const typename hp::DoFHandler::active_ fe_values.shape_grad(j,q_point) * fe_values.JxW(q_point)); - data.local_rhs(i) += (fe_values.shape_value(i,q_point) * - rhs_value * - fe_values.JxW(q_point)); + data.local_rhs(i) += (fe_values.shape_value(i,q_point) * + rhs_value * + fe_values.JxW(q_point)); } } @@ -361,19 +361,19 @@ void LaplaceProblem::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe_collection, quadrature_collection), - Assembly::Copy::Data ()); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe_collection, quadrature_collection), + Assembly::Copy::Data ()); test_matrix.add(-1, reference_matrix); diff --git a/tests/numerics/assemble_matrix_parallel_02.cc b/tests/numerics/assemble_matrix_parallel_02.cc index 946532e390..7df2ffa578 100644 --- a/tests/numerics/assemble_matrix_parallel_02.cc +++ b/tests/numerics/assemble_matrix_parallel_02.cc @@ -329,9 +329,9 @@ LaplaceProblem::local_assemble (const typename hp::DoFHandler::active_ fe_values.shape_grad(j,q_point) * fe_values.JxW(q_point)); - data.local_rhs(i) += (fe_values.shape_value(i,q_point) * - rhs_value * scale_mat * - fe_values.JxW(q_point)); + data.local_rhs(i) += (fe_values.shape_value(i,q_point) * + rhs_value * scale_mat * + fe_values.JxW(q_point)); } } @@ -387,21 +387,21 @@ void LaplaceProblem::assemble_test_1 () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe_collection, quadrature_collection), - Assembly::Copy::Data (), - MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe_collection, quadrature_collection), + Assembly::Copy::Data (), + MultithreadInfo::n_threads(), + 1); } @@ -412,21 +412,21 @@ void LaplaceProblem::assemble_test_2 () test_rhs_2 = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe_collection, quadrature_collection), - Assembly::Copy::Data (true), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe_collection, quadrature_collection), + Assembly::Copy::Data (true), + 2*MultithreadInfo::n_threads(), + 1); } template diff --git a/tests/numerics/assemble_matrix_parallel_03.cc b/tests/numerics/assemble_matrix_parallel_03.cc index f4a22fb728..84f7ced6a3 100644 --- a/tests/numerics/assemble_matrix_parallel_03.cc +++ b/tests/numerics/assemble_matrix_parallel_03.cc @@ -312,9 +312,9 @@ LaplaceProblem::local_assemble (const typename hp::DoFHandler::active_ fe_values.shape_grad(j,q_point) * fe_values.JxW(q_point)); - data.local_rhs(i) += (fe_values.shape_value(i,q_point) * - rhs_value * - fe_values.JxW(q_point)); + data.local_rhs(i) += (fe_values.shape_value(i,q_point) * + rhs_value * + fe_values.JxW(q_point)); } } @@ -365,19 +365,19 @@ void LaplaceProblem::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe_collection, quadrature_collection), - Assembly::Copy::Data ()); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe_collection, quadrature_collection), + Assembly::Copy::Data ()); test_matrix.add(-1, reference_matrix); diff --git a/tests/numerics/assemble_matrix_parallel_04.cc b/tests/numerics/assemble_matrix_parallel_04.cc index 5aab2efd56..cf4e0e4c79 100644 --- a/tests/numerics/assemble_matrix_parallel_04.cc +++ b/tests/numerics/assemble_matrix_parallel_04.cc @@ -341,9 +341,9 @@ LaplaceProblem::local_assemble (const typename hp::DoFHandler::active_ fe_values.shape_grad(j,q_point) * fe_values.JxW(q_point)); - data.local_rhs(i) += (fe_values.shape_value(i,q_point) * - rhs_value * scale_mat * - fe_values.JxW(q_point)); + data.local_rhs(i) += (fe_values.shape_value(i,q_point) * + rhs_value * scale_mat * + fe_values.JxW(q_point)); } } @@ -415,21 +415,21 @@ void LaplaceProblem::assemble_test_1 () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe_collection, quadrature_collection), - Assembly::Copy::Data (1), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe_collection, quadrature_collection), + Assembly::Copy::Data (1), + 2*MultithreadInfo::n_threads(), + 1); for (unsigned int i=0; i::assemble_test_2 () test_rhs_2 = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe_collection, quadrature_collection), - Assembly::Copy::Data (2), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe_collection, quadrature_collection), + Assembly::Copy::Data (2), + 2*MultithreadInfo::n_threads(), + 1); for (unsigned int i=0; i public: MyFunction(const double k); - virtual double value(const dealii::Point & point, + virtual double value(const dealii::Point &point, const unsigned int component = 0 ) const; double get_k() const; @@ -114,15 +114,15 @@ private: template MyFunction::MyFunction(const double k) -: -dealii::Function(1), -k(k) + : + dealii::Function(1), + k(k) { } template -double MyFunction::value(const dealii::Point & point, +double MyFunction::value(const dealii::Point &point, const unsigned int ) const { const double x = point[0]-1.0; @@ -146,7 +146,7 @@ class NeumanBC : public dealii::Function public: NeumanBC(const double c); - virtual double value(const dealii::Point & point, + virtual double value(const dealii::Point &point, const unsigned int component = 0 ) const; double get_c() const; @@ -157,14 +157,14 @@ private: template NeumanBC::NeumanBC(const double c) -: -dealii::Function(1), -c(c) + : + dealii::Function(1), + c(c) { } template -double NeumanBC::value(const dealii::Point & point, +double NeumanBC::value(const dealii::Point &point, const unsigned int ) const { return c; @@ -345,7 +345,7 @@ void test_regular(const MyFunction &func) p_degree.push_back(p1); p_degree.push_back(p2); - for (unsigned int i=0;i(p)); @@ -373,9 +373,9 @@ void test_regular(const MyFunction &func) /*colorize*/ false); typename dealii::hp::DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - for (;cell != endc; cell++) + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + for (; cell != endc; cell++) if (cell->center()[0] > 1.0) { cell->set_active_fe_index(1); @@ -459,7 +459,7 @@ void test_irregular(const MyFunction &func) p_degree.push_back(p2); p_degree.push_back(p3); - for (unsigned int i=0;i(p)); @@ -494,9 +494,9 @@ void test_irregular(const MyFunction &func) } typename dealii::hp::DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - for (;cell != endc; cell++) + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + for (; cell != endc; cell++) if (cell->center()[0] > 1.0) // right { cell->set_active_fe_index(0); @@ -560,7 +560,7 @@ void test_irregular(const MyFunction &func) const double expected_squared_1 = h*A*std::pow(func.get_k(),2)/2.0/std::max(p3,p1); const double expected_squared_2 = h*A*std::pow(func.get_k(),2)/2.0/std::max(p2,p1); const double expected_squared_3 = (dim==2) ? - expected_squared_1 + expected_squared_2: + expected_squared_1 + expected_squared_2: 2*expected_squared_1 + 2*expected_squared_2; std::vector expected_error(error.size(),0.0); @@ -592,21 +592,21 @@ class MySecondFunction : public dealii::Function public: MySecondFunction(); - virtual double value(const dealii::Point & point, + virtual double value(const dealii::Point &point, const unsigned int component = 0 ) const; }; template MySecondFunction::MySecondFunction() -: -dealii::Function(1) + : + dealii::Function(1) { } template -double MySecondFunction::value(const dealii::Point & point, - const unsigned int ) const +double MySecondFunction::value(const dealii::Point &point, + const unsigned int ) const { double f = 0.0; const double &x = point[0]; @@ -630,11 +630,11 @@ void test(const MySecondFunction &func) dealii::hp::QCollection face_quadrature_formula; dealii::ConstraintMatrix constraints; for (unsigned int p = 1; p <=3; p++) - { - fe_collection.push_back(dealii::FE_Q(p)); - quadrature_formula.push_back(dealii::QGauss(p+1)); - face_quadrature_formula.push_back(dealii::QGauss(p+1)); - } + { + fe_collection.push_back(dealii::FE_Q(p)); + quadrature_formula.push_back(dealii::QGauss(p+1)); + face_quadrature_formula.push_back(dealii::QGauss(p+1)); + } dealii::GridGenerator::hyper_cube (triangulation,0.0,1.0); // reference cell // refine @@ -646,9 +646,9 @@ void test(const MySecondFunction &func) dof_handler.distribute_dofs (fe_collection); typename dealii::hp::DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); - for (;cell != endc; cell++) + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + for (; cell != endc; cell++) { bool in_top_left = true; for (unsigned int d=0; d< dim; d++) @@ -668,7 +668,7 @@ void test(const MySecondFunction &func) cell = dof_handler.begin_active(); - for (;cell != endc; cell++) + for (; cell != endc; cell++) { if (cell->center()[0] < 0.25) { diff --git a/tests/numerics/no_flux_11.cc b/tests/numerics/no_flux_11.cc index 84896122b2..d20077cef5 100644 --- a/tests/numerics/no_flux_11.cc +++ b/tests/numerics/no_flux_11.cc @@ -50,73 +50,73 @@ void run() { typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(), - endc = triangulation.end(); + cell = triangulation.begin_active(), + endc = triangulation.end(); for (; cell!=endc; ++cell) { - if (cell->is_locally_owned()) - { - for (unsigned int face=0; - face::faces_per_cell; - ++face) - { - if (cell->face(face)->at_boundary()) - { - if ( (std::fabs(cell->face(face)->center()(0)) < 0.1) - && (std::fabs(cell->face(face)->center()(dim-1)) < 1e-12) ) - { - cell->face(face)->set_boundary_id (1); - } - - if ( (std::fabs(cell->face(face)->center()(0)) < 1e-12) - && (std::fabs(cell->face(face)->center()(dim-1)) < 0.1) ) - { - cell->face(face)->set_boundary_id (1); - } - - if ( (std::fabs(1.0-cell->face(face)->center()(0)) < 0.1) - && (std::fabs(1.0-cell->face(face)->center()(dim-1)) < 1e-12) ) - { - cell->face(face)->set_boundary_id (2); - } - - if ( (std::fabs(1.0-cell->face(face)->center()(0)) < 1e-12) - && (std::fabs(1.0-cell->face(face)->center()(dim-1)) < 0.1) ) - { - cell->face(face)->set_boundary_id (2); - } - - // no normal flux boundary - - if ( (std::fabs(cell->face(face)->center()(0)) >= 0.1 && std::fabs(cell->face(face)->center()(0)) <= 1.0) - && (std::fabs(cell->face(face)->center()(dim-1)) < 1e-12) ) - { - cell->face(face)->set_boundary_id (3); - } - - if ( (std::fabs(cell->face(face)->center()(0)) >= 0.0 && std::fabs(cell->face(face)->center()(0)) <= 0.9) - && (std::fabs(1.0-cell->face(face)->center()(dim-1)) < 1e-12) ) - { - cell->face(face)->set_boundary_id (5); - } - - if ( (std::fabs(1.0-cell->face(face)->center()(0)) < 1e-12) - && (std::fabs(cell->face(face)->center()(dim-1)) >= 0.0 && std::fabs(cell->face(face)->center()(dim-1)) <= 0.9) ) - { - cell->face(face)->set_boundary_id (4); - } - - if ( (std::fabs(cell->face(face)->center()(0)) < 1e-12) - && (std::fabs(cell->face(face)->center()(dim-1)) >= 0.1 && std::fabs(cell->face(face)->center()(dim-1)) <= 1.0) ) - { - cell->face(face)->set_boundary_id (6); - } - } - } - } + if (cell->is_locally_owned()) + { + for (unsigned int face=0; + face::faces_per_cell; + ++face) + { + if (cell->face(face)->at_boundary()) + { + if ( (std::fabs(cell->face(face)->center()(0)) < 0.1) + && (std::fabs(cell->face(face)->center()(dim-1)) < 1e-12) ) + { + cell->face(face)->set_boundary_id (1); + } + + if ( (std::fabs(cell->face(face)->center()(0)) < 1e-12) + && (std::fabs(cell->face(face)->center()(dim-1)) < 0.1) ) + { + cell->face(face)->set_boundary_id (1); + } + + if ( (std::fabs(1.0-cell->face(face)->center()(0)) < 0.1) + && (std::fabs(1.0-cell->face(face)->center()(dim-1)) < 1e-12) ) + { + cell->face(face)->set_boundary_id (2); + } + + if ( (std::fabs(1.0-cell->face(face)->center()(0)) < 1e-12) + && (std::fabs(1.0-cell->face(face)->center()(dim-1)) < 0.1) ) + { + cell->face(face)->set_boundary_id (2); + } + + // no normal flux boundary + + if ( (std::fabs(cell->face(face)->center()(0)) >= 0.1 && std::fabs(cell->face(face)->center()(0)) <= 1.0) + && (std::fabs(cell->face(face)->center()(dim-1)) < 1e-12) ) + { + cell->face(face)->set_boundary_id (3); + } + + if ( (std::fabs(cell->face(face)->center()(0)) >= 0.0 && std::fabs(cell->face(face)->center()(0)) <= 0.9) + && (std::fabs(1.0-cell->face(face)->center()(dim-1)) < 1e-12) ) + { + cell->face(face)->set_boundary_id (5); + } + + if ( (std::fabs(1.0-cell->face(face)->center()(0)) < 1e-12) + && (std::fabs(cell->face(face)->center()(dim-1)) >= 0.0 && std::fabs(cell->face(face)->center()(dim-1)) <= 0.9) ) + { + cell->face(face)->set_boundary_id (4); + } + + if ( (std::fabs(cell->face(face)->center()(0)) < 1e-12) + && (std::fabs(cell->face(face)->center()(dim-1)) >= 0.1 && std::fabs(cell->face(face)->center()(dim-1)) <= 1.0) ) + { + cell->face(face)->set_boundary_id (6); + } + } + } + } } } - + FESystem fe(FE_Q(1), dim); DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); @@ -125,9 +125,9 @@ void run() std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (6); VectorTools::compute_no_normal_flux_constraints - (dof_handler, 0, - no_normal_flux_boundaries, - constraints); + (dof_handler, 0, + no_normal_flux_boundaries, + constraints); constraints.print(deallog.get_file_stream()); diff --git a/tests/numerics/no_flux_12.cc b/tests/numerics/no_flux_12.cc index dc444cc353..1a1d7230c7 100644 --- a/tests/numerics/no_flux_12.cc +++ b/tests/numerics/no_flux_12.cc @@ -90,9 +90,9 @@ void run() no_normal_flux_boundaries.insert (5); // z=1 VectorTools::compute_no_normal_flux_constraints - (dof_handler, 0, - no_normal_flux_boundaries, - constraints); + (dof_handler, 0, + no_normal_flux_boundaries, + constraints); constraints.print(deallog.get_file_stream()); diff --git a/tests/numerics/no_flux_13.cc b/tests/numerics/no_flux_13.cc index f9b7c32aee..68f5bcedc4 100644 --- a/tests/numerics/no_flux_13.cc +++ b/tests/numerics/no_flux_13.cc @@ -41,18 +41,18 @@ void test() FE_Q fe(1); DoFHandler dof_handler(triangulation); dof_handler.distribute_dofs(fe); - + ConstraintMatrix constraints; std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (1); deal_II_exceptions::disable_abort_on_exception(); try { - - VectorTools::compute_no_normal_flux_constraints (dof_handler, - 0, - no_normal_flux_boundaries, - constraints); + + VectorTools::compute_no_normal_flux_constraints (dof_handler, + 0, + no_normal_flux_boundaries, + constraints); } catch (ExceptionBase &e) { diff --git a/tests/numerics/normal_flux_hp_01.cc b/tests/numerics/normal_flux_hp_01.cc index 9905e2d516..ce1007afd3 100644 --- a/tests/numerics/normal_flux_hp_01.cc +++ b/tests/numerics/normal_flux_hp_01.cc @@ -37,7 +37,7 @@ void test (const Triangulation &tr, { hp::DoFHandler dof(tr); for (typename hp::DoFHandler::active_cell_iterator - cell = dof.begin_active(); cell != dof.end(); ++cell) + cell = dof.begin_active(); cell != dof.end(); ++cell) cell->set_active_fe_index (cell->index() % 2); dof.distribute_dofs(fe); diff --git a/tests/numerics/normal_flux_inhom_01.cc b/tests/numerics/normal_flux_inhom_01.cc index 9105cfa983..0c9eb2c172 100644 --- a/tests/numerics/normal_flux_inhom_01.cc +++ b/tests/numerics/normal_flux_inhom_01.cc @@ -15,8 +15,8 @@ -// check the creation of inhomogeneous normal-flux boundary conditions -// for a finite element that consists of only a single set of vector +// check the creation of inhomogeneous normal-flux boundary conditions +// for a finite element that consists of only a single set of vector // components (i.e. it has dim components) #include "../tests.h" @@ -42,12 +42,12 @@ void test (const Triangulation &tr, { DoFHandler dof(tr); dof.distribute_dofs(fe); - + ConstantFunction constant_function(1.,dim); typename FunctionMap::type function_map; for (unsigned int j=0; j::faces_per_cell; ++j) function_map[j] = &constant_function; - + for (unsigned int i=0; i::faces_per_cell; ++i) { deallog << "FE=" << fe.get_name() @@ -60,14 +60,14 @@ void test (const Triangulation &tr, ConstraintMatrix cm; VectorTools::compute_nonzero_normal_flux_constraints - (dof, 0, boundary_ids, function_map, cm); + (dof, 0, boundary_ids, function_map, cm); cm.print (deallog.get_file_stream ()); } //Get the location of all boundary dofs std::vector face_dofs; const std::vector > & - unit_support_points = fe.get_unit_face_support_points(); + unit_support_points = fe.get_unit_face_support_points(); Quadrature quadrature(unit_support_points); FEFaceValues fe_face_values(fe, quadrature, update_q_points); typename DoFHandler::active_cell_iterator @@ -77,22 +77,22 @@ void test (const Triangulation &tr, for (unsigned int face_no=0; face_no < GeometryInfo::faces_per_cell; ++face_no) if (cell->face(face_no)->at_boundary()) - { - typename DoFHandler::face_iterator face = cell->face(face_no); - face_dofs.resize (fe.dofs_per_face); - face->get_dof_indices (face_dofs); - - fe_face_values.reinit(cell, face_no); - for (unsigned int i=0; i::face_iterator face = cell->face(face_no); + face_dofs.resize (fe.dofs_per_face); + face->get_dof_indices (face_dofs); + + fe_face_values.reinit(cell, face_no); + for (unsigned int i=0; i*> fe_list; std::vector*> function_list; - + // FE1: a system of a quadratic and a linear element fe_list.push_back (new FESystem (FE_Q(2), 1, FE_Q(1), 1)); function_list.push_back (new MySquareFunction(2)); diff --git a/tests/numerics/project_bv_curl_conf_02.cc b/tests/numerics/project_bv_curl_conf_02.cc index 4538e09bda..0bcd79df2c 100755 --- a/tests/numerics/project_bv_curl_conf_02.cc +++ b/tests/numerics/project_bv_curl_conf_02.cc @@ -82,36 +82,36 @@ void test(unsigned order) test_boundary_values (fe, constraints_fes); } - if(constraints_fes.n_constraints() == constraints_fe.n_constraints()) - { - const IndexSet& lines = constraints_fes.get_local_lines (); - - for(unsigned i = 0; i < lines.n_elements(); ++i) + if (constraints_fes.n_constraints() == constraints_fe.n_constraints()) { - if(!constraints_fe.is_constrained(lines.nth_index_in_set(i))) - { - deallog << "Failed" << std::endl; - return; - } - - const std::vector >& c1 - = *constraints_fes.get_constraint_entries(lines.nth_index_in_set(i)); - const std::vector >& c2 - = *constraints_fe.get_constraint_entries(lines.nth_index_in_set(i)); - - for(size_t j = 0; j < c1.size(); ++j) - if((c1[j].first != c2[j].first) || (fabs(c1[j].second - c2[j].second) > 1e-14)) + const IndexSet &lines = constraints_fes.get_local_lines (); + + for (unsigned i = 0; i < lines.n_elements(); ++i) { - deallog << "Failed" << std::endl; - return; + if (!constraints_fe.is_constrained(lines.nth_index_in_set(i))) + { + deallog << "Failed" << std::endl; + return; + } + + const std::vector > &c1 + = *constraints_fes.get_constraint_entries(lines.nth_index_in_set(i)); + const std::vector > &c2 + = *constraints_fe.get_constraint_entries(lines.nth_index_in_set(i)); + + for (size_t j = 0; j < c1.size(); ++j) + if ((c1[j].first != c2[j].first) || (fabs(c1[j].second - c2[j].second) > 1e-14)) + { + deallog << "Failed" << std::endl; + return; + } } } - } else - { - deallog << "Failed" << std::endl; - return; - } + { + deallog << "Failed" << std::endl; + return; + } deallog << "OK" << std::endl; } diff --git a/tests/numerics/tangential_flux_inhom_01.cc b/tests/numerics/tangential_flux_inhom_01.cc index c319185a22..e4cfaed0ed 100644 --- a/tests/numerics/tangential_flux_inhom_01.cc +++ b/tests/numerics/tangential_flux_inhom_01.cc @@ -17,7 +17,7 @@ // check the creation of tangential flux boundary conditions for a finite // element that consists of only a single set of vector components -// (i.e. it has dim components). Similar as the normal-flux test in +// (i.e. it has dim components). Similar as the normal-flux test in // normal_flux_inhom_01.cc #include "../tests.h" @@ -61,36 +61,36 @@ void test (const Triangulation &tr, ConstraintMatrix cm; VectorTools::compute_nonzero_tangential_flux_constraints - (dof, 0, boundary_ids, function_map, cm); + (dof, 0, boundary_ids, function_map, cm); cm.print (deallog.get_file_stream ()); } - //Get the location of all boundary dofs - std::vector face_dofs; - const std::vector > & - unit_support_points = fe.get_unit_face_support_points(); - Quadrature quadrature(unit_support_points); - FEFaceValues fe_face_values(fe, quadrature, update_q_points); - typename DoFHandler::active_cell_iterator - cell = dof.begin_active(), - endc = dof.end(); - for (; cell!=endc; ++cell) - for (unsigned int face_no=0; face_no < GeometryInfo::faces_per_cell; - ++face_no) - if (cell->face(face_no)->at_boundary()) + //Get the location of all boundary dofs + std::vector face_dofs; + const std::vector > & + unit_support_points = fe.get_unit_face_support_points(); + Quadrature quadrature(unit_support_points); + FEFaceValues fe_face_values(fe, quadrature, update_q_points); + typename DoFHandler::active_cell_iterator + cell = dof.begin_active(), + endc = dof.end(); + for (; cell!=endc; ++cell) + for (unsigned int face_no=0; face_no < GeometryInfo::faces_per_cell; + ++face_no) + if (cell->face(face_no)->at_boundary()) { typename DoFHandler::face_iterator face = cell->face(face_no); face_dofs.resize (fe.dofs_per_face); face->get_dof_indices (face_dofs); - + fe_face_values.reinit(cell, face_no); for (unsigned int i=0; i > pts; pts.push_back(Point<3>(0,0,0)); @@ -41,17 +41,17 @@ int main () TopoDS_Edge edge = interpolation_curve(pts); ArclengthProjectionLineManifold<1,3> manifold(edge); - + Triangulation<1,3> tria; GridGenerator::hyper_cube(tria); tria.begin_active()->set_all_manifold_ids(1); tria.set_manifold(1, manifold); - + tria.refine_global(4); GridOut gridout; gridout.write_msh(tria, logfile); return 0; } - + diff --git a/tests/opencascade/arclength_boundary_02.cc b/tests/opencascade/arclength_boundary_02.cc index 7061615363..5dde88372a 100644 --- a/tests/opencascade/arclength_boundary_02.cc +++ b/tests/opencascade/arclength_boundary_02.cc @@ -52,7 +52,7 @@ int main() vertices.push_back(Point<3>(0,1,0)); vertices.push_back(Point<3>(0,0,0)); TopoDS_Edge edge = interpolation_curve(vertices, Point<3>(), true); - + // Create a boundary projector. ArclengthProjectionLineManifold<2,3> boundary_line(edge); diff --git a/tests/opencascade/axis_boundary_02.cc b/tests/opencascade/axis_boundary_02.cc index e4a8ddf39b..228fd0594a 100644 --- a/tests/opencascade/axis_boundary_02.cc +++ b/tests/opencascade/axis_boundary_02.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -9,7 +9,7 @@ // //----------------------------------------------------------- -// Test the class DirectionalProjectionBoundary +// Test the class DirectionalProjectionBoundary #include "../tests.h" #include @@ -30,7 +30,7 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); @@ -42,14 +42,14 @@ int main () pts2.push_back(Point<3>(0,1,0)); pts2.push_back(Point<3>(.5,1,1)); pts2.push_back(Point<3>(1,1,0)); - + TopoDS_Edge edge1 = interpolation_curve(pts1); TopoDS_Edge edge2 = interpolation_curve(pts2); - + TopoDS_Face face = BRepFill::Face (edge1, edge2); DirectionalProjectionBoundary<2,3> manifold(face, Point<3>(0,0,1)); - + Triangulation<2,3> tria; GridGenerator::hyper_cube(tria); @@ -59,6 +59,6 @@ int main () tria.refine_global(2); GridOut gridout; gridout.write_msh(tria, logfile); - + return 0; -} +} diff --git a/tests/opencascade/circle_normal_projection.cc b/tests/opencascade/circle_normal_projection.cc index c6a53d9866..acc1789884 100644 --- a/tests/opencascade/circle_normal_projection.cc +++ b/tests/opencascade/circle_normal_projection.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -38,57 +38,57 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - // The circle passing through the - // vertices of the unit square + // The circle passing through the + // vertices of the unit square gp_Dir z_axis(0.,0.,1.); gp_Pnt center(.5,.5,0.); gp_Ax2 axis(center, z_axis); Standard_Real radius(std::sqrt(2.)/2.); - + Handle(Geom_Curve) circle = GC_MakeCircle(axis, radius); TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(circle); - - - // Create a boundary projector. + + + // Create a boundary projector. NormalProjectionBoundary<2,3> boundary_line(edge); - - // This one is for checking: This - // is what deal.II would do for a - // circle. + + // This one is for checking: This + // is what deal.II would do for a + // circle. HyperBallBoundary<2,3> boundary_line_deal (Point<3>(.5,.5,0), - std::sqrt(2.)/2.); - - - - // The unit square. + std::sqrt(2.)/2.); + + + + // The unit square. Triangulation<2,3> tria; GridGenerator::hyper_cube(tria); - // Set the exterior boundary + // Set the exterior boundary tria.set_boundary(0, boundary_line); - // This is here to ignore the - // points created in the interior - // of the face. + // This is here to ignore the + // points created in the interior + // of the face. tria.begin()->set_material_id(1); - // We refine twice, and expect the - // outer points to end up on the - // circle. + // We refine twice, and expect the + // outer points to end up on the + // circle. tria.refine_global(2); - // You can open the generated file - // with paraview. + // You can open the generated file + // with paraview. GridOut gridout; gridout.write_ucd (tria, logfile); - + return 0; } - + diff --git a/tests/opencascade/closest_point_to_shape.cc b/tests/opencascade/closest_point_to_shape.cc index 7bf68cf81c..983446fa12 100644 --- a/tests/opencascade/closest_point_to_shape.cc +++ b/tests/opencascade/closest_point_to_shape.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -34,54 +34,54 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - // A unit circle + // A unit circle gp_Dir z_axis(0.,0.,1.); gp_Pnt center(0.,0.,0.); gp_Ax2 axis(center, z_axis); Standard_Real radius(1.); - + Handle(Geom_Curve) circle = GC_MakeCircle(axis, radius); TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(circle); - - - // Now get a few points and project - // them on the circle + + + // Now get a few points and project + // them on the circle std::vector > points; - + points.push_back(Point<3>(3,0,0)); points.push_back(Point<3>(0,3,0)); - // This one is tricky... the point - // is not on the xy plane. If we - // put it on the axis (x=0, y=0), - // there should not exist a - // projection. Any value for z - // should give the same result. + // This one is tricky... the point + // is not on the xy plane. If we + // put it on the axis (x=0, y=0), + // there should not exist a + // projection. Any value for z + // should give the same result. points.push_back(Point<3>(.1,0,3)); - points.push_back(Point<3>(.1,0,4)); - + points.push_back(Point<3>(.1,0,4)); + double u, v; TopoDS_Shape sh; - for(unsigned int i=0; i, TopoDS_Shape, double, double> ref = - project_point_and_pull_back(edge, points[i]); - + std_cxx11::tuple, TopoDS_Shape, double, double> ref = + project_point_and_pull_back(edge, points[i]); + Point<3> pp = std_cxx11::get<0>(ref); sh = std_cxx11::get<1>(ref); u = std_cxx11::get<2>(ref); v = std_cxx11::get<3>(ref); - + deallog << "Origin: " << points[i] - << ", on unit circle: " << pp - << ", with local coordinates (u, v): (" << u - << ", " << v << ")" << std::endl; + << ", on unit circle: " << pp + << ", with local coordinates (u, v): (" << u + << ", " << v << ")" << std::endl; } return 0; } diff --git a/tests/opencascade/create_tria_00.cc b/tests/opencascade/create_tria_00.cc index e1794f8ca1..b4bb525be6 100644 --- a/tests/opencascade/create_tria_00.cc +++ b/tests/opencascade/create_tria_00.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -9,7 +9,7 @@ // //----------------------------------------------------------- -// Read the file side.iges, and +// Read the file side.iges, and // create a single-cell Triangulation #include "../tests.h" @@ -39,15 +39,15 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); - + TopoDS_Shape sh = read_IGES(SOURCE_DIR "/iges_files/wigley.iges", 0.001); std::vector faces; std::vector edges; std::vector vertices; - + extract_geometrical_shapes(sh, faces, edges, vertices); Triangulation<2,3> tria; @@ -56,7 +56,7 @@ int main () // You can open the generated file with gmsh GridOut gridout; gridout.write_msh (tria, logfile); - + return 0; } - + diff --git a/tests/opencascade/create_tria_01.cc b/tests/opencascade/create_tria_01.cc index c61d8d84ce..b85358af54 100644 --- a/tests/opencascade/create_tria_01.cc +++ b/tests/opencascade/create_tria_01.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -41,20 +41,20 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); - + TopoDS_Shape sh = read_IGES(SOURCE_DIR "/iges_files/wigley.iges", 0.001); std::vector faces; std::vector edges; std::vector vertices; - + extract_geometrical_shapes(sh, faces, edges, vertices); // Create a boundary projector on the first face. NormalProjectionBoundary<2,3> boundary(faces[0]); - + // Create a Triangulation with a single cell Triangulation<2,3> tria; create_triangulation(faces[0], tria); @@ -68,7 +68,7 @@ int main () // You can open the generated file with gmsh GridOut gridout; gridout.write_msh (tria, logfile); - + return 0; } - + diff --git a/tests/opencascade/directional_boundary_01.cc b/tests/opencascade/directional_boundary_01.cc index 6e993b2ff8..e5d9c83ad8 100644 --- a/tests/opencascade/directional_boundary_01.cc +++ b/tests/opencascade/directional_boundary_01.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -9,7 +9,7 @@ // //----------------------------------------------------------- -// Create a BSpline surface, and test axis projection. +// Create a BSpline surface, and test axis projection. #include "../tests.h" #include @@ -30,10 +30,10 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); - + // Create a bspline passign through the points std::vector > pts; pts.push_back(Point<3>(0,0,0)); @@ -42,7 +42,7 @@ int main () pts.push_back(Point<3>(1,0,0)); TopoDS_Edge edge1 = interpolation_curve(pts); - for(unsigned int i=0; i(0,0,1); TopoDS_Edge edge2 = interpolation_curve(pts); @@ -50,16 +50,16 @@ int main () DirectionalProjectionBoundary<1,3> manifold(face, Point<3>(0,1,0)); - + Triangulation<1,3> tria; GridGenerator::hyper_cube(tria); tria.begin_active()->set_all_manifold_ids(1); tria.set_manifold(1, manifold); - + tria.refine_global(4); GridOut gridout; gridout.write_msh(tria, logfile); return 0; -} +} diff --git a/tests/opencascade/iges_create.cc b/tests/opencascade/iges_create.cc index a27ee33806..b9a7368104 100644 --- a/tests/opencascade/iges_create.cc +++ b/tests/opencascade/iges_create.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -22,7 +22,7 @@ using namespace OpenCASCADE; -int main () +int main () { // Create a bspline passing through the points std::vector > pts; @@ -37,11 +37,11 @@ int main () std::ofstream out("output"); std::string line; unsigned int counter = 5; - while(counter--) std::getline(in, line); - while(std::getline(in, line)) + while (counter--) std::getline(in, line); + while (std::getline(in, line)) out << line << std::endl; in.close(); out.close(); return 0; } - + diff --git a/tests/opencascade/iges_describe.cc b/tests/opencascade/iges_describe.cc index 2842e5f459..ce4c2d3e8d 100644 --- a/tests/opencascade/iges_describe.cc +++ b/tests/opencascade/iges_describe.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -23,36 +23,36 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - + TopoDS_Shape sh = read_IGES(SOURCE_DIR "/iges_files/goteborg.iges"); std::vector faces; std::vector edges; std::vector vertices; extract_geometrical_shapes(sh, faces, edges, vertices); - + std_cxx11::tuple - n = count_elements(sh); + n = count_elements(sh); unsigned int nf=std_cxx11::get<0>(n); unsigned int ne=std_cxx11::get<1>(n); unsigned int nv=std_cxx11::get<2>(n); deallog << "Shape contains " << std_cxx11::get<0>(n) << " faces, " - << std_cxx11::get<1>(n) << " edges, and " - << std_cxx11::get<2>(n) << " vertices." << std::endl; - - if(nf != faces.size()) + << std_cxx11::get<1>(n) << " edges, and " + << std_cxx11::get<2>(n) << " vertices." << std::endl; + + if (nf != faces.size()) deallog << "Error!" << std::endl; - if(ne != edges.size()) + if (ne != edges.size()) deallog << "Error!" << std::endl; - if(nv != vertices.size()) + if (nv != vertices.size()) deallog << "Error!" << std::endl; - + return 0; } - + diff --git a/tests/opencascade/iges_describe_02.cc b/tests/opencascade/iges_describe_02.cc index d5b210fc58..701e113b84 100644 --- a/tests/opencascade/iges_describe_02.cc +++ b/tests/opencascade/iges_describe_02.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -23,12 +23,12 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - + TopoDS_Shape sh = read_IGES(SOURCE_DIR "/iges_files/goteborg.iges"); std::vector compounds; std::vector compsolids; @@ -36,12 +36,12 @@ int main () std::vector shells; std::vector wires; extract_compound_shapes(sh, compounds, compsolids, solids, shells, wires); - + deallog << "Shape contains " << compounds.size() << " compounds, " - << compsolids.size() << " compound solids, " - << solids.size() << " solids, " - << shells.size() << " shells, " - << wires.size() << " wires." << std::endl; + << compsolids.size() << " compound solids, " + << solids.size() << " solids, " + << shells.size() << " shells, " + << wires.size() << " wires." << std::endl; return 0; } - + diff --git a/tests/opencascade/iges_write.cc b/tests/opencascade/iges_write.cc index 74f9dd8995..2c06d1479d 100644 --- a/tests/opencascade/iges_write.cc +++ b/tests/opencascade/iges_write.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -23,7 +23,7 @@ using namespace OpenCASCADE; -int main () +int main () { TopoDS_Shape sh = read_IGES(SOURCE_DIR "/iges_files/wigley.iges"); write_IGES(sh, "tmp.iges"); @@ -31,8 +31,8 @@ int main () std::ofstream out("output"); std::string line; unsigned int counter = 5; - while(counter--) std::getline(in,line); - while(std::getline(in,line)) + while (counter--) std::getline(in,line); + while (std::getline(in,line)) out << line << std::endl; in.close(); out.close(); diff --git a/tests/opencascade/interpolation_curve_boundary.cc b/tests/opencascade/interpolation_curve_boundary.cc index 74f4e43bc8..ee086b0e85 100644 --- a/tests/opencascade/interpolation_curve_boundary.cc +++ b/tests/opencascade/interpolation_curve_boundary.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -38,7 +38,7 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); deallog.attach(logfile); @@ -51,7 +51,7 @@ int main () vertices.push_back(Point<3>(1,1,0)); vertices.push_back(Point<3>(0,1,0)); TopoDS_Shape shape = interpolation_curve(vertices, Point<3>(), true); - + // Create a boundary projector. NormalProjectionBoundary<2,3> boundary_line(shape); @@ -77,4 +77,4 @@ int main () return 0; } - + diff --git a/tests/opencascade/normal_projection_01.cc b/tests/opencascade/normal_projection_01.cc index a5709c16ab..bbc5fc698e 100644 --- a/tests/opencascade/normal_projection_01.cc +++ b/tests/opencascade/normal_projection_01.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -39,30 +39,30 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); gp_Pnt center(.5,.5,.5); Standard_Real radius(Point<3>().distance(point(center))); - + TopoDS_Face face = BRepPrimAPI_MakeSphere(center, radius); - - // Create a boundary projector. + + // Create a boundary projector. NormalProjectionBoundary<3,3> sphere(face); - - - // The unit cube. + + + // The unit cube. Triangulation<3,3> tria; GridGenerator::hyper_cube(tria); - // Set the exterior boundary + // Set the exterior boundary tria.set_manifold(1, sphere); - // This is here to ignore the - // points created in the interior - // of the face. + // This is here to ignore the + // points created in the interior + // of the face. tria.begin()->set_all_manifold_ids(1); tria.begin()->set_manifold_id(0); @@ -72,7 +72,7 @@ int main () // You can open the generated file with gmsh GridOut gridout; gridout.write_msh (tria, logfile); - + return 0; } - + diff --git a/tests/opencascade/normal_to_mesh_projection_01.cc b/tests/opencascade/normal_to_mesh_projection_01.cc index d88f62a5e5..cc95bdb77c 100644 --- a/tests/opencascade/normal_to_mesh_projection_01.cc +++ b/tests/opencascade/normal_to_mesh_projection_01.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -9,7 +9,7 @@ // //----------------------------------------------------------- -// Create a BSpline surface, and test axis projection. +// Create a BSpline surface, and test axis projection. #include "../tests.h" #include @@ -30,10 +30,10 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); - + // Create a bspline passing through the points std::vector > pts; pts.push_back(Point<3>(0,0,0)); @@ -42,7 +42,7 @@ int main () pts.push_back(Point<3>(1,0,0)); TopoDS_Edge edge1 = interpolation_curve(pts); - for(unsigned int i=0; i(0,0,1); TopoDS_Edge edge2 = interpolation_curve(pts); @@ -50,16 +50,16 @@ int main () NormalToMeshProjectionBoundary<1,3> manifold(face); - + Triangulation<1,3> tria; GridGenerator::hyper_cube(tria); tria.begin_active()->set_all_manifold_ids(1); tria.set_manifold(1, manifold); - + tria.refine_global(4); GridOut gridout; gridout.write_msh(tria, logfile); return 0; -} +} diff --git a/tests/opencascade/normal_to_mesh_projection_02.cc b/tests/opencascade/normal_to_mesh_projection_02.cc index 663d77c3e7..c8a65970bd 100644 --- a/tests/opencascade/normal_to_mesh_projection_02.cc +++ b/tests/opencascade/normal_to_mesh_projection_02.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -9,7 +9,7 @@ // //----------------------------------------------------------- -// Create a BSpline surface, and test axis projection. +// Create a BSpline surface, and test axis projection. #include "../tests.h" #include @@ -30,10 +30,10 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); - + // Create a bspline passing through the points std::vector > pts; pts.push_back(Point<3>(0,0,0)); @@ -42,7 +42,7 @@ int main () pts.push_back(Point<3>(0,0,-1)); TopoDS_Edge edge1 = interpolation_curve(pts); - for(unsigned int i=0; i(0,1,0); TopoDS_Edge edge2 = interpolation_curve(pts); @@ -50,16 +50,16 @@ int main () NormalToMeshProjectionBoundary<2,3> manifold(face); - + Triangulation<2,3> tria; GridGenerator::hyper_cube(tria); tria.begin_active()->set_all_manifold_ids(1); tria.set_manifold(1, manifold); - + tria.refine_global(2); GridOut gridout; gridout.write_msh(tria, logfile); return 0; -} +} diff --git a/tests/opencascade/plane_intersection_01.cc b/tests/opencascade/plane_intersection_01.cc index 1f10d8204a..03a2d9a618 100644 --- a/tests/opencascade/plane_intersection_01.cc +++ b/tests/opencascade/plane_intersection_01.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -52,14 +52,14 @@ int main() Standard_Real radius(Point<3>().distance(point(center))); TopoDS_Face face = BRepPrimAPI_MakeSphere(center, radius); - + // Intersect the sphere with the plane z = 0 TopoDS_Shape intersect = intersect_plane(face, 0, 0, 1, 0); // This shape should be the standard circle. Only one edge should be // in intersect: our edge. TopExp_Explorer exp(intersect, TopAbs_EDGE); TopoDS_Edge edge = TopoDS::Edge(exp.Current()); - + ArclengthProjectionLineManifold<2,3> boundary_line(edge); // The unit square. diff --git a/tests/opencascade/project_center_cell_01.cc b/tests/opencascade/project_center_cell_01.cc index b9f8367064..1066f03b1c 100644 --- a/tests/opencascade/project_center_cell_01.cc +++ b/tests/opencascade/project_center_cell_01.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -41,21 +41,21 @@ using namespace OpenCASCADE; -int main () +int main () { initlog(); - + TopoDS_Shape sh = read_IGES(SOURCE_DIR "/iges_files/wigley.iges", 0.001); std::vector faces; std::vector edges; std::vector vertices; - + extract_geometrical_shapes(sh, faces, edges, vertices); // Create a boundary projector on the first face. NormalProjectionBoundary<2,3> boundary(faces[0]); - + // Create a Triangulation with a single cell Triangulation<2,3> tria; create_triangulation(faces[0], tria); @@ -65,10 +65,10 @@ int main () tria.begin()->set_all_manifold_ids(1); deallog << "Ncells: " << tria.n_active_cells() << std::endl - << "Cell[0] center: " << tria.begin()->center() << std::endl - << "Projected center: " << tria.begin()->center(true) << std::endl; + << "Cell[0] center: " << tria.begin()->center() << std::endl + << "Projected center: " << tria.begin()->center(true) << std::endl; + - return 0; } - + diff --git a/tests/opencascade/project_center_cell_02.cc b/tests/opencascade/project_center_cell_02.cc index 96bafd8c1a..edd847f108 100644 --- a/tests/opencascade/project_center_cell_02.cc +++ b/tests/opencascade/project_center_cell_02.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -41,21 +41,21 @@ using namespace OpenCASCADE; -int main () +int main () { initlog(); - + TopoDS_Shape sh = read_IGES(SOURCE_DIR "/iges_files/wigley.iges", 0.001); std::vector faces; std::vector edges; std::vector vertices; - + extract_geometrical_shapes(sh, faces, edges, vertices); // Create a boundary projector on the first face. DirectionalProjectionBoundary<2,3> boundary(faces[0], Point<3>(0.,1.,0.)); - + // Create a Triangulation with a single cell Triangulation<2,3> tria; create_triangulation(faces[0], tria); @@ -65,10 +65,10 @@ int main () tria.begin()->set_all_manifold_ids(1); deallog << "Ncells: " << tria.n_active_cells() << std::endl - << "Cell[0] center: " << tria.begin()->center() << std::endl - << "Projected center: " << tria.begin()->center(true) << std::endl; + << "Cell[0] center: " << tria.begin()->center() << std::endl + << "Projected center: " << tria.begin()->center(true) << std::endl; + - return 0; } - + diff --git a/tests/opencascade/project_center_cell_03.cc b/tests/opencascade/project_center_cell_03.cc index 67a54f2a6f..e214a1732c 100644 --- a/tests/opencascade/project_center_cell_03.cc +++ b/tests/opencascade/project_center_cell_03.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -41,21 +41,21 @@ using namespace OpenCASCADE; -int main () +int main () { initlog(); - + TopoDS_Shape sh = read_IGES(SOURCE_DIR "/iges_files/wigley.iges", 0.001); std::vector faces; std::vector edges; std::vector vertices; - + extract_geometrical_shapes(sh, faces, edges, vertices); // Create a boundary projector on the first face. NormalToMeshProjectionBoundary<2,3> boundary(faces[0]); - + // Create a Triangulation with a single cell Triangulation<2,3> tria; create_triangulation(faces[0], tria); @@ -65,10 +65,10 @@ int main () tria.begin()->set_all_manifold_ids(1); deallog << "Ncells: " << tria.n_active_cells() << std::endl - << "Cell[0] center: " << tria.begin()->center() << std::endl - << "Projected center: " << tria.begin()->center(true) << std::endl; + << "Cell[0] center: " << tria.begin()->center() << std::endl + << "Projected center: " << tria.begin()->center(true) << std::endl; + - return 0; } - + diff --git a/tests/opencascade/step_create.cc b/tests/opencascade/step_create.cc index ae8b3de2a5..735147badc 100644 --- a/tests/opencascade/step_create.cc +++ b/tests/opencascade/step_create.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -22,7 +22,7 @@ using namespace OpenCASCADE; -int main () +int main () { // Create a bspline passing through the points std::vector > pts; @@ -38,21 +38,21 @@ int main () std::string line; unsigned int counter = 0; - while(std::getline(in,line)) - { - counter++; - if ( (counter == 4) || - (counter == 5) || - (counter == 6) || - (counter == 18) || - (counter == 19) ) - { - } - else - out << line << std::endl; - } + while (std::getline(in,line)) + { + counter++; + if ( (counter == 4) || + (counter == 5) || + (counter == 6) || + (counter == 18) || + (counter == 19) ) + { + } + else + out << line << std::endl; + } in.close(); out.close(); return 0; } - + diff --git a/tests/opencascade/step_describe.cc b/tests/opencascade/step_describe.cc index 653f236a63..0eb1c669ed 100644 --- a/tests/opencascade/step_describe.cc +++ b/tests/opencascade/step_describe.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -23,36 +23,36 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - + TopoDS_Shape sh = read_STEP(SOURCE_DIR "/step_files/goteborg.step"); std::vector faces; std::vector edges; std::vector vertices; extract_geometrical_shapes(sh, faces, edges, vertices); - + std_cxx11::tuple - n = count_elements(sh); + n = count_elements(sh); unsigned int nf=std_cxx11::get<0>(n); unsigned int ne=std_cxx11::get<1>(n); unsigned int nv=std_cxx11::get<2>(n); deallog << "Shape contains " << std_cxx11::get<0>(n) << " faces, " - << std_cxx11::get<1>(n) << " edges, and " - << std_cxx11::get<2>(n) << " vertices." << std::endl; - - if(nf != faces.size()) + << std_cxx11::get<1>(n) << " edges, and " + << std_cxx11::get<2>(n) << " vertices." << std::endl; + + if (nf != faces.size()) deallog << "Error!" << std::endl; - if(ne != edges.size()) + if (ne != edges.size()) deallog << "Error!" << std::endl; - if(nv != vertices.size()) + if (nv != vertices.size()) deallog << "Error!" << std::endl; - + return 0; } - + diff --git a/tests/opencascade/step_describe_02.cc b/tests/opencascade/step_describe_02.cc index e82c1429ec..38327a9a25 100644 --- a/tests/opencascade/step_describe_02.cc +++ b/tests/opencascade/step_describe_02.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -23,12 +23,12 @@ using namespace OpenCASCADE; -int main () +int main () { std::ofstream logfile("output"); deallog.attach(logfile); deallog.depth_console(0); - + TopoDS_Shape sh = read_STEP(SOURCE_DIR "/step_files/goteborg.step"); std::vector compounds; std::vector compsolids; @@ -36,12 +36,12 @@ int main () std::vector shells; std::vector wires; extract_compound_shapes(sh, compounds, compsolids, solids, shells, wires); - + deallog << "Shape contains " << compounds.size() << " compounds, " - << compsolids.size() << " compound solids, " - << solids.size() << " solids, " - << shells.size() << " shells, " - << wires.size() << " wires." << std::endl; + << compsolids.size() << " compound solids, " + << solids.size() << " solids, " + << shells.size() << " shells, " + << wires.size() << " wires." << std::endl; return 0; } - + diff --git a/tests/opencascade/step_write.cc b/tests/opencascade/step_write.cc index eb4457d15f..b8fb7ee8f1 100644 --- a/tests/opencascade/step_write.cc +++ b/tests/opencascade/step_write.cc @@ -1,6 +1,6 @@ //----------------------------------------------------------- // -// Copyright (C) 2014 - 2015 by the deal.II authors +// Copyright (C) 2014 - 2015 by the deal.II authors // // This file is subject to LGPL and may not be distributed // without copyright and license information. Please refer @@ -23,7 +23,7 @@ using namespace OpenCASCADE; -int main () +int main () { TopoDS_Shape sh = read_STEP(SOURCE_DIR "/step_files/wigley.step"); write_STEP(sh, "tmp.step"); @@ -32,21 +32,21 @@ int main () std::string line; unsigned int counter = 0; - while(std::getline(in,line)) - { - counter++; - if ( (counter == 4) || - (counter == 5) || - (counter == 6) || - (counter == 18) || - (counter == 19) ) - { - } - else - out << line << std::endl; - } - - + while (std::getline(in,line)) + { + counter++; + if ( (counter == 4) || + (counter == 5) || + (counter == 6) || + (counter == 18) || + (counter == 19) ) + { + } + else + out << line << std::endl; + } + + in.close(); out.close(); return 0; diff --git a/tests/petsc/deal_solver_01.cc b/tests/petsc/deal_solver_01.cc index 3bf37edc97..8aef923f4c 100644 --- a/tests/petsc/deal_solver_01.cc +++ b/tests/petsc/deal_solver_01.cc @@ -39,8 +39,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/deal_solver_02.cc b/tests/petsc/deal_solver_02.cc index bd2b853d56..5b9df1e086 100644 --- a/tests/petsc/deal_solver_02.cc +++ b/tests/petsc/deal_solver_02.cc @@ -41,8 +41,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/deal_solver_03.cc b/tests/petsc/deal_solver_03.cc index 6dd6142eae..5b0a4509a7 100644 --- a/tests/petsc/deal_solver_03.cc +++ b/tests/petsc/deal_solver_03.cc @@ -41,8 +41,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/deal_solver_04.cc b/tests/petsc/deal_solver_04.cc index f096d987bd..7e232a3601 100644 --- a/tests/petsc/deal_solver_04.cc +++ b/tests/petsc/deal_solver_04.cc @@ -40,8 +40,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/deal_solver_05.cc b/tests/petsc/deal_solver_05.cc index 13c380a4f4..0e8027b749 100644 --- a/tests/petsc/deal_solver_05.cc +++ b/tests/petsc/deal_solver_05.cc @@ -39,8 +39,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_01.cc b/tests/petsc/solver_01.cc index 4465717096..32229e2555 100644 --- a/tests/petsc/solver_01.cc +++ b/tests/petsc/solver_01.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_02.cc b/tests/petsc/solver_02.cc index ed26e88285..1d8bd425ff 100644 --- a/tests/petsc/solver_02.cc +++ b/tests/petsc/solver_02.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03.cc b/tests/petsc/solver_03.cc index 38092881a6..c5a0571787 100644 --- a/tests/petsc/solver_03.cc +++ b/tests/petsc/solver_03.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_mf.cc b/tests/petsc/solver_03_mf.cc index af2264c54b..6b9f6b2fa3 100644 --- a/tests/petsc/solver_03_mf.cc +++ b/tests/petsc/solver_03_mf.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_boomeramg.cc b/tests/petsc/solver_03_precondition_boomeramg.cc index 74d3137116..8861d2b025 100644 --- a/tests/petsc/solver_03_precondition_boomeramg.cc +++ b/tests/petsc/solver_03_precondition_boomeramg.cc @@ -35,8 +35,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc b/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc index d53c8b795d..b4e092ec2c 100644 --- a/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc +++ b/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc @@ -36,8 +36,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_eisenstat.cc b/tests/petsc/solver_03_precondition_eisenstat.cc index 8e3cae28a2..e6a7392fa1 100644 --- a/tests/petsc/solver_03_precondition_eisenstat.cc +++ b/tests/petsc/solver_03_precondition_eisenstat.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_icc.cc b/tests/petsc/solver_03_precondition_icc.cc index 1a856c939f..2a7f10876a 100644 --- a/tests/petsc/solver_03_precondition_icc.cc +++ b/tests/petsc/solver_03_precondition_icc.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_ilu.cc b/tests/petsc/solver_03_precondition_ilu.cc index b3b358481e..18f382071e 100644 --- a/tests/petsc/solver_03_precondition_ilu.cc +++ b/tests/petsc/solver_03_precondition_ilu.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_lu.cc b/tests/petsc/solver_03_precondition_lu.cc index ef528051b3..57a821f8e1 100644 --- a/tests/petsc/solver_03_precondition_lu.cc +++ b/tests/petsc/solver_03_precondition_lu.cc @@ -35,8 +35,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_parasails.cc b/tests/petsc/solver_03_precondition_parasails.cc index d3cbb01d1c..7a79ae0f9d 100644 --- a/tests/petsc/solver_03_precondition_parasails.cc +++ b/tests/petsc/solver_03_precondition_parasails.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_sor.cc b/tests/petsc/solver_03_precondition_sor.cc index c5fcf392c9..fa9f2e292c 100644 --- a/tests/petsc/solver_03_precondition_sor.cc +++ b/tests/petsc/solver_03_precondition_sor.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_03_precondition_ssor.cc b/tests/petsc/solver_03_precondition_ssor.cc index c5ad30ad97..90ad0826b3 100644 --- a/tests/petsc/solver_03_precondition_ssor.cc +++ b/tests/petsc/solver_03_precondition_ssor.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_04.cc b/tests/petsc/solver_04.cc index 9164c6a85a..78b11c2ff9 100644 --- a/tests/petsc/solver_04.cc +++ b/tests/petsc/solver_04.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_05.cc b/tests/petsc/solver_05.cc index 7a20eb7c85..327a465118 100644 --- a/tests/petsc/solver_05.cc +++ b/tests/petsc/solver_05.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_06.cc b/tests/petsc/solver_06.cc index 998a77ae6b..dd9795c462 100644 --- a/tests/petsc/solver_06.cc +++ b/tests/petsc/solver_06.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_07.cc b/tests/petsc/solver_07.cc index a2948dd1b3..b93e99cec5 100644 --- a/tests/petsc/solver_07.cc +++ b/tests/petsc/solver_07.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_08.cc b/tests/petsc/solver_08.cc index 7bac5e2eee..ec6268a11a 100644 --- a/tests/petsc/solver_08.cc +++ b/tests/petsc/solver_08.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_09.cc b/tests/petsc/solver_09.cc index b8bfb14af8..b7421238dc 100644 --- a/tests/petsc/solver_09.cc +++ b/tests/petsc/solver_09.cc @@ -38,8 +38,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_10.cc b/tests/petsc/solver_10.cc index 9e7bc941ab..0086dc0d58 100644 --- a/tests/petsc/solver_10.cc +++ b/tests/petsc/solver_10.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_11.cc b/tests/petsc/solver_11.cc index 1bc023818a..e088e3ec1f 100644 --- a/tests/petsc/solver_11.cc +++ b/tests/petsc/solver_11.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_12.cc b/tests/petsc/solver_12.cc index 969fa39abf..a24a04e4e2 100644 --- a/tests/petsc/solver_12.cc +++ b/tests/petsc/solver_12.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/petsc/solver_13.cc b/tests/petsc/solver_13.cc index 45e27ebc7d..12e3415b6a 100644 --- a/tests/petsc/solver_13.cc +++ b/tests/petsc/solver_13.cc @@ -34,8 +34,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/quick_tests/affinity.cc b/tests/quick_tests/affinity.cc index ad433a3d7b..35dd8db3e9 100644 --- a/tests/quick_tests/affinity.cc +++ b/tests/quick_tests/affinity.cc @@ -33,7 +33,7 @@ bool getaffinity(unsigned int &bits_set,unsigned int &mask) { bits_set = 0; mask = 0x00; - + #if defined(__linux__) cpu_set_t my_set; CPU_ZERO(&my_set); @@ -46,10 +46,10 @@ bool getaffinity(unsigned int &bits_set,unsigned int &mask) printf("sched_getaffinity() failed, return value: %d\n", ret); return false; } - for (int i=0;i test; diff --git a/tests/quick_tests/step-petsc.cc b/tests/quick_tests/step-petsc.cc index 41964d2499..ed204ad2df 100644 --- a/tests/quick_tests/step-petsc.cc +++ b/tests/quick_tests/step-petsc.cc @@ -49,18 +49,18 @@ class LaplaceProblem public: LaplaceProblem (); void run (); - + private: void setup_system (); void assemble_system (); void solve (); - + Triangulation<2> triangulation; FE_Q<2> fe; DoFHandler<2> dof_handler; - + PETScWrappers::SparseMatrix A; - PETScWrappers::Vector b, x; + PETScWrappers::Vector b, x; ConstraintMatrix constraints; TableHandler output_table; @@ -79,9 +79,9 @@ void LaplaceProblem::setup_system () constraints.clear (); DoFTools::make_zero_boundary_constraints (dof_handler, constraints); constraints.close (); - + A.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.max_couplings_between_dofs()); b.reinit (dof_handler.n_dofs()); x.reinit (dof_handler.n_dofs()); @@ -93,57 +93,57 @@ void LaplaceProblem::setup_system () void LaplaceProblem::assemble_system () { QGauss<2> quadrature_formula(2); - + FEValues<2> fe_values (fe, quadrature_formula, - update_values | - update_gradients | - update_quadrature_points | - update_JxW_values); - + update_values | + update_gradients | + update_quadrature_points | + update_JxW_values); + const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); - + FullMatrix cell_A (dofs_per_cell, dofs_per_cell); Vector cell_b (dofs_per_cell); - + std::vector local_dof_indices (dofs_per_cell); - + DoFHandler<2>::active_cell_iterator - cell = dof_handler.begin_active (), - endc = dof_handler.end (); - + cell = dof_handler.begin_active (), + endc = dof_handler.end (); + for (; cell!=endc; ++cell) { fe_values.reinit (cell); cell_A = 0; cell_b = 0; - + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - + constraints.distribute_local_to_global (cell_A, local_dof_indices, A); constraints.distribute_local_to_global (cell_b, local_dof_indices, b); } - + A.compress (VectorOperation::add); b.compress (VectorOperation::add); } @@ -186,7 +186,7 @@ int main (int argc, char **argv) deallog.depth_console (0); LaplaceProblem problem; problem.run (); - deallog << "OK" << std::endl; + deallog << "OK" << std::endl; } } diff --git a/tests/quick_tests/step-slepc.cc b/tests/quick_tests/step-slepc.cc index 96cda3a682..bdf51c56d3 100644 --- a/tests/quick_tests/step-slepc.cc +++ b/tests/quick_tests/step-slepc.cc @@ -48,19 +48,19 @@ class LaplaceEigenspectrumProblem public: LaplaceEigenspectrumProblem (); void run (); - + private: void setup_system (); void assemble_system (); void solve (); - + Triangulation<2> triangulation; FE_Q<2> fe; DoFHandler<2> dof_handler; - + PETScWrappers::SparseMatrix A, B; std::vector x; - std::vector lambda; + std::vector lambda; ConstraintMatrix constraints; TableHandler output_table; @@ -75,16 +75,16 @@ LaplaceEigenspectrumProblem::LaplaceEigenspectrumProblem () void LaplaceEigenspectrumProblem::setup_system () { dof_handler.distribute_dofs (fe); - + constraints.clear (); DoFTools::make_zero_boundary_constraints (dof_handler, constraints); constraints.close (); - + A.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); + dof_handler.max_couplings_between_dofs()); B.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), - dof_handler.max_couplings_between_dofs()); - + dof_handler.max_couplings_between_dofs()); + x.resize (1); x[0].reinit (dof_handler.n_dofs ()); lambda.resize (1); @@ -98,56 +98,56 @@ void LaplaceEigenspectrumProblem::setup_system () void LaplaceEigenspectrumProblem::assemble_system () { QGauss<2> quadrature_formula(2); - + FEValues<2> fe_values (fe, quadrature_formula, - update_values | - update_gradients | - update_quadrature_points | - update_JxW_values); - + update_values | + update_gradients | + update_quadrature_points | + update_JxW_values); + const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); - + FullMatrix cell_A (dofs_per_cell, dofs_per_cell); FullMatrix cell_B (dofs_per_cell, dofs_per_cell); - + std::vector local_dof_indices (dofs_per_cell); - + typename DoFHandler<2>::active_cell_iterator - cell = dof_handler.begin_active (), - endc = dof_handler.end (); - + cell = dof_handler.begin_active (), + endc = dof_handler.end (); + for (; cell!=endc; ++cell) { fe_values.reinit (cell); cell_A = 0; cell_B = 0; - + for (unsigned int q_point=0; q_pointget_dof_indices (local_dof_indices); - + constraints.distribute_local_to_global (cell_A, local_dof_indices, A); constraints.distribute_local_to_global (cell_B, local_dof_indices, B); } - + A.compress (VectorOperation::add); B.compress (VectorOperation::add); } diff --git a/tests/quick_tests/step.cc b/tests/quick_tests/step.cc index 111cae4c98..2875a4d96e 100644 --- a/tests/quick_tests/step.cc +++ b/tests/quick_tests/step.cc @@ -78,7 +78,7 @@ private: TableHandler output_table; - double last_error; + double last_error; }; @@ -207,9 +207,9 @@ void LaplaceProblem::run () }; AssertThrow (last_error<1e-3, ExcMessage("solution is not converging")); - - - + + + output_table.set_precision("|u|_1", 6); output_table.set_precision("error", 6); output_table.write_text (std::cout); diff --git a/tests/quick_tests/tbb.cc b/tests/quick_tests/tbb.cc index 50d550f566..0a9c886a4e 100644 --- a/tests/quick_tests/tbb.cc +++ b/tests/quick_tests/tbb.cc @@ -42,18 +42,18 @@ struct scratch_data struct copy_data { - int value; + int value; }; void assemble(const std::vector::iterator &it, - scratch_data &scratch, - copy_data &data) + scratch_data &scratch, + copy_data &data) { data.value = (*it); } -void copy(int & value, const copy_data &data) +void copy(int &value, const copy_data &data) { value += data.value; } @@ -62,16 +62,16 @@ void test2() { const int maxi = 10000; std::vector v(maxi); - for (unsigned int i=0;ivertex_index(v) != c2->vertex_index(v)) return false; } - + for (unsigned int f=0; f::faces_per_cell; ++f) { if (c1->face(f)->at_boundary() != c2->face(f)->at_boundary()) return false; - if (c1->face(f)->manifold_id() != c2->face(f)->manifold_id()) - return false; + if (c1->face(f)->manifold_id() != c2->face(f)->manifold_id()) + return false; if (c1->face(f)->at_boundary()) { @@ -91,16 +91,16 @@ namespace dealii if (c1->user_flag_set() != c2->user_flag_set()) return false; - if (c1->manifold_id() != c2->manifold_id()) - return false; + if (c1->manifold_id() != c2->manifold_id()) + return false; - if (c1->active() && c2->active()) - if (c1->active_cell_index() != c2->active_cell_index()) - return false; + if (c1->active() && c2->active()) + if (c1->active_cell_index() != c2->active_cell_index()) + return false; - if (c1->level()>0) - if (c1->parent_index() != c2->parent_index()) - return false; + if (c1->level()>0) + if (c1->parent_index() != c2->parent_index()) + return false; } // also check the order of raw iterators as they contain @@ -128,10 +128,11 @@ void do_boundary (Triangulation &t1) c1 = t1.begin(); for (; c1 != t1.end(); ++c1) for (unsigned int f=0; f::faces_per_cell; ++f) - if (c1->at_boundary(f)) { - c1->face(f)->set_boundary_id (42); - // c1->face(f)->set_manifold_id (43); - } + if (c1->at_boundary(f)) + { + c1->face(f)->set_boundary_id (42); + // c1->face(f)->set_manifold_id (43); + } } diff --git a/tests/serialization/triangulation_02.cc b/tests/serialization/triangulation_02.cc index 8941dfab7b..8905f90bde 100644 --- a/tests/serialization/triangulation_02.cc +++ b/tests/serialization/triangulation_02.cc @@ -58,9 +58,9 @@ namespace dealii { if (c1->face(f)->at_boundary() != c2->face(f)->at_boundary()) return false; - - if (c1->face(f)->manifold_id() != c2->face(f)->manifold_id()) - return false; + + if (c1->face(f)->manifold_id() != c2->face(f)->manifold_id()) + return false; if (c1->face(f)->at_boundary()) { @@ -92,17 +92,17 @@ namespace dealii if (c1->user_flag_set() != c2->user_flag_set()) return false; - - if (c1->manifold_id() != c2->manifold_id()) - return false; - if (c1->active() && c2->active()) - if (c1->active_cell_index() != c2->active_cell_index()) - return false; + if (c1->manifold_id() != c2->manifold_id()) + return false; + + if (c1->active() && c2->active()) + if (c1->active_cell_index() != c2->active_cell_index()) + return false; - if (c1->level()>0) - if (c1->parent_index() != c2->parent_index()) - return false; + if (c1->level()>0) + if (c1->parent_index() != c2->parent_index()) + return false; } // also check the order of raw iterators as they contain diff --git a/tests/sharedtria/dof_01.cc b/tests/sharedtria/dof_01.cc index fd2c669f62..77a0c8078c 100644 --- a/tests/sharedtria/dof_01.cc +++ b/tests/sharedtria/dof_01.cc @@ -67,11 +67,11 @@ void test() for (typename Triangulation::active_cell_iterator cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) - { - if (flags[index]) - cell->set_refine_flag(); - ++index; - } + { + if (flags[index]) + cell->set_refine_flag(); + ++index; + } Assert (index <= triangulation.n_active_cells(), ExcInternalError()); @@ -83,23 +83,23 @@ void test() for (typename Triangulation::active_cell_iterator cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) - { - if (!flags[index]) - cell->set_coarsen_flag(); - ++index; - } + { + if (!flags[index]) + cell->set_coarsen_flag(); + ++index; + } triangulation.execute_coarsening_and_refinement (); dof_handler.distribute_dofs (fe); deallog - << "n_dofs: " << dof_handler.n_dofs() << std::endl - << "n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs() << std::endl; + << "n_dofs: " << dof_handler.n_dofs() << std::endl + << "n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs() << std::endl; deallog << "n_locally_owned_dofs_per_processor: "; std::vector v = dof_handler.n_locally_owned_dofs_per_processor(); unsigned int sum = 0; - for (unsigned int i=0;i::active_cell_iterator cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) - { - if (flags[index]) - cell->set_refine_flag(); - ++index; - } + { + if (flags[index]) + cell->set_refine_flag(); + ++index; + } Assert (index <= triangulation.n_active_cells(), ExcInternalError()); @@ -84,24 +84,24 @@ void test() for (typename Triangulation::active_cell_iterator cell = triangulation.begin_active(); cell != triangulation.end(); ++cell) - { - if (!flags[index]) - cell->set_coarsen_flag(); - ++index; - } + { + if (!flags[index]) + cell->set_coarsen_flag(); + ++index; + } triangulation.execute_coarsening_and_refinement (); dof_handler.distribute_dofs (fe); - DoFRenumbering::component_wise(dof_handler); + DoFRenumbering::component_wise(dof_handler); deallog - << "n_dofs: " << dof_handler.n_dofs() << std::endl - << "n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs() << std::endl; + << "n_dofs: " << dof_handler.n_dofs() << std::endl + << "n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs() << std::endl; deallog << "n_locally_owned_dofs_per_processor: "; std::vector v = dof_handler.n_locally_owned_dofs_per_processor(); unsigned int sum = 0; - for (unsigned int i=0;i void write_mesh (const parallel::shared::Triangulation &tria, - const char *filename_) + const char *filename_) { - DataOut data_out; - data_out.attach_triangulation (tria); - Vector subdomain (tria.n_active_cells()); - for (unsigned int i=0; i data_out; + data_out.attach_triangulation (tria); + Vector subdomain (tria.n_active_cells()); + for (unsigned int i=0; i v = tr.n_locally_owned_active_cells_per_processor(); diff --git a/tests/trilinos/add_matrices_04.cc b/tests/trilinos/add_matrices_04.cc index de6890fae8..cb87257401 100644 --- a/tests/trilinos/add_matrices_04.cc +++ b/tests/trilinos/add_matrices_04.cc @@ -53,7 +53,7 @@ void test (TrilinosWrappers::SparseMatrix &m) m.copy_from(m2); m.add(-1., m2); - + deallog << std::endl << "Frobenius norm: " << m.frobenius_norm() << std::endl; deallog << "OK" << std::endl; diff --git a/tests/trilinos/assemble_matrix_parallel_01.cc b/tests/trilinos/assemble_matrix_parallel_01.cc index 27f1a477eb..5b688c1f5f 100644 --- a/tests/trilinos/assemble_matrix_parallel_01.cc +++ b/tests/trilinos/assemble_matrix_parallel_01.cc @@ -301,9 +301,9 @@ LaplaceProblem::local_assemble (const typename hp::DoFHandler::active_ fe_values.shape_grad(j,q_point) * fe_values.JxW(q_point)); - data.local_rhs(i) += (fe_values.shape_value(i,q_point) * - rhs_value * - fe_values.JxW(q_point)); + data.local_rhs(i) += (fe_values.shape_value(i,q_point) * + rhs_value * + fe_values.JxW(q_point)); } } @@ -356,21 +356,21 @@ void LaplaceProblem::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe_collection, quadrature_collection), - Assembly::Copy::Data (), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe_collection, quadrature_collection), + Assembly::Copy::Data (), + 2*MultithreadInfo::n_threads(), + 1); test_matrix.compress(VectorOperation::add); test_rhs.compress(VectorOperation::add); diff --git a/tests/trilinos/assemble_matrix_parallel_02.cc b/tests/trilinos/assemble_matrix_parallel_02.cc index 93cd62a9ce..86f2d0a144 100644 --- a/tests/trilinos/assemble_matrix_parallel_02.cc +++ b/tests/trilinos/assemble_matrix_parallel_02.cc @@ -247,9 +247,9 @@ void LaplaceProblem::setup_system () CellFilter begin(IteratorFilters::LocallyOwnedCell(),dof_handler.begin_active()); CellFilter end(IteratorFilters::LocallyOwnedCell(),dof_handler.end()); graph = GraphColoring::make_graph_coloring(begin,end, - static_cast - (FilteredIterator::active_cell_iterator> const &)> > - (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); + static_cast + (FilteredIterator::active_cell_iterator> const &)> > + (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); IndexSet locally_owned = dof_handler.locally_owned_dofs(); { @@ -308,9 +308,9 @@ LaplaceProblem::local_assemble (const FilteredIterator::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe, quadrature), - Assembly::Copy::Data (false), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe, quadrature), + Assembly::Copy::Data (false), + 2*MultithreadInfo::n_threads(), + 1); test_matrix.compress(VectorOperation::add); test_rhs.compress(VectorOperation::add); diff --git a/tests/trilinos/assemble_matrix_parallel_03.cc b/tests/trilinos/assemble_matrix_parallel_03.cc index 6fe53fe6f3..61be5ae91b 100644 --- a/tests/trilinos/assemble_matrix_parallel_03.cc +++ b/tests/trilinos/assemble_matrix_parallel_03.cc @@ -248,9 +248,9 @@ void LaplaceProblem::setup_system () CellFilter begin(IteratorFilters::LocallyOwnedCell(),dof_handler.begin_active()); CellFilter end(IteratorFilters::LocallyOwnedCell(),dof_handler.end()); graph = GraphColoring::make_graph_coloring(begin,end, - static_cast - (FilteredIterator::active_cell_iterator> const &)> > - (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); + static_cast + (FilteredIterator::active_cell_iterator> const &)> > + (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); IndexSet locally_owned = dof_handler.locally_owned_dofs(); { @@ -309,9 +309,9 @@ LaplaceProblem::local_assemble (const FilteredIterator::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe, quadrature), - Assembly::Copy::Data (false), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe, quadrature), + Assembly::Copy::Data (false), + 2*MultithreadInfo::n_threads(), + 1); test_matrix.compress(VectorOperation::add); test_rhs.compress(VectorOperation::add); test_matrix.compress(VectorOperation::add); diff --git a/tests/trilinos/assemble_matrix_parallel_04.cc b/tests/trilinos/assemble_matrix_parallel_04.cc index d359982fa5..e14611969a 100644 --- a/tests/trilinos/assemble_matrix_parallel_04.cc +++ b/tests/trilinos/assemble_matrix_parallel_04.cc @@ -252,9 +252,9 @@ void LaplaceProblem::setup_system () CellFilter begin(IteratorFilters::LocallyOwnedCell(),dof_handler.begin_active()); CellFilter end(IteratorFilters::LocallyOwnedCell(),dof_handler.end()); graph = GraphColoring::make_graph_coloring(begin,end, - static_cast - (FilteredIterator::active_cell_iterator> const &)> > - (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); + static_cast + (FilteredIterator::active_cell_iterator> const &)> > + (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); TrilinosWrappers::BlockSparsityPattern csp(2,2); std::vector locally_owned(2), relevant_set(2); @@ -324,9 +324,9 @@ LaplaceProblem::local_assemble (const FilteredIterator::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe, quadrature), - Assembly::Copy::Data (false), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe, quadrature), + Assembly::Copy::Data (false), + 2*MultithreadInfo::n_threads(), + 1); test_matrix.compress(VectorOperation::add); test_rhs.compress(VectorOperation::add); diff --git a/tests/trilinos/assemble_matrix_parallel_05.cc b/tests/trilinos/assemble_matrix_parallel_05.cc index 79e76156ac..e819a78713 100644 --- a/tests/trilinos/assemble_matrix_parallel_05.cc +++ b/tests/trilinos/assemble_matrix_parallel_05.cc @@ -250,9 +250,9 @@ void LaplaceProblem::setup_system () CellFilter begin(IteratorFilters::LocallyOwnedCell(),dof_handler.begin_active()); CellFilter end(IteratorFilters::LocallyOwnedCell(),dof_handler.end()); graph = GraphColoring::make_graph_coloring(begin,end, - static_cast - (FilteredIterator::active_cell_iterator> const &)> > - (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); + static_cast + (FilteredIterator::active_cell_iterator> const &)> > + (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); IndexSet locally_owned = dof_handler.locally_owned_dofs(); { @@ -310,9 +310,9 @@ LaplaceProblem::local_assemble (const FilteredIterator::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe, quadrature), - Assembly::Copy::Data (false), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe, quadrature), + Assembly::Copy::Data (false), + 2*MultithreadInfo::n_threads(), + 1); test_matrix.compress(VectorOperation::add); test_rhs.compress(VectorOperation::add); diff --git a/tests/trilinos/assemble_matrix_parallel_06.cc b/tests/trilinos/assemble_matrix_parallel_06.cc index 183e713c7a..20ee3ca678 100644 --- a/tests/trilinos/assemble_matrix_parallel_06.cc +++ b/tests/trilinos/assemble_matrix_parallel_06.cc @@ -254,9 +254,9 @@ void LaplaceProblem::setup_system () CellFilter begin(IteratorFilters::LocallyOwnedCell(),dof_handler.begin_active()); CellFilter end(IteratorFilters::LocallyOwnedCell(),dof_handler.end()); graph = GraphColoring::make_graph_coloring(begin,end, - static_cast - (FilteredIterator::active_cell_iterator> const &)> > - (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); + static_cast + (FilteredIterator::active_cell_iterator> const &)> > + (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); TrilinosWrappers::BlockSparsityPattern csp(2,2); std::vector locally_owned(2), relevant_set(2); @@ -325,9 +325,9 @@ LaplaceProblem::local_assemble (const FilteredIterator::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe, quadrature), - Assembly::Copy::Data (false), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe, quadrature), + Assembly::Copy::Data (false), + 2*MultithreadInfo::n_threads(), + 1); test_matrix.compress(VectorOperation::add); test_rhs.compress(VectorOperation::add); diff --git a/tests/trilinos/assemble_matrix_parallel_07.cc b/tests/trilinos/assemble_matrix_parallel_07.cc index 909ee0f21a..7b688aebc9 100644 --- a/tests/trilinos/assemble_matrix_parallel_07.cc +++ b/tests/trilinos/assemble_matrix_parallel_07.cc @@ -248,9 +248,9 @@ void LaplaceProblem::setup_system () CellFilter begin(IteratorFilters::LocallyOwnedCell(),dof_handler.begin_active()); CellFilter end(IteratorFilters::LocallyOwnedCell(),dof_handler.end()); graph = GraphColoring::make_graph_coloring(begin,end, - static_cast - (FilteredIterator::active_cell_iterator> const &)> > - (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); + static_cast + (FilteredIterator::active_cell_iterator> const &)> > + (std_cxx11::bind(&LaplaceProblem::get_conflict_indices, this,std_cxx11::_1))); IndexSet locally_owned = dof_handler.locally_owned_dofs(); { @@ -317,9 +317,9 @@ LaplaceProblem::local_assemble (const FilteredIterator::assemble_test () test_rhs = 0; WorkStream:: - run (graph, - std_cxx11::bind (&LaplaceProblem:: - local_assemble, - this, - std_cxx11::_1, - std_cxx11::_2, - std_cxx11::_3), - std_cxx11::bind (&LaplaceProblem:: - copy_local_to_global, - this, - std_cxx11::_1), - Assembly::Scratch::Data(fe, quadrature), - Assembly::Copy::Data (false), - 2*MultithreadInfo::n_threads(), - 1); + run (graph, + std_cxx11::bind (&LaplaceProblem:: + local_assemble, + this, + std_cxx11::_1, + std_cxx11::_2, + std_cxx11::_3), + std_cxx11::bind (&LaplaceProblem:: + copy_local_to_global, + this, + std_cxx11::_1), + Assembly::Scratch::Data(fe, quadrature), + Assembly::Copy::Data (false), + 2*MultithreadInfo::n_threads(), + 1); test_matrix.compress(VectorOperation::add); test_matrix.compress(VectorOperation::add); test_rhs.compress(VectorOperation::add); diff --git a/tests/trilinos/deal_solver_01.cc b/tests/trilinos/deal_solver_01.cc index a9e2d476f0..5a94be72e4 100644 --- a/tests/trilinos/deal_solver_01.cc +++ b/tests/trilinos/deal_solver_01.cc @@ -40,8 +40,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/deal_solver_02.cc b/tests/trilinos/deal_solver_02.cc index 966e67c4bd..073cdb7528 100644 --- a/tests/trilinos/deal_solver_02.cc +++ b/tests/trilinos/deal_solver_02.cc @@ -42,8 +42,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/deal_solver_03.cc b/tests/trilinos/deal_solver_03.cc index d12741b140..37ac44b28c 100644 --- a/tests/trilinos/deal_solver_03.cc +++ b/tests/trilinos/deal_solver_03.cc @@ -42,8 +42,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/deal_solver_04.cc b/tests/trilinos/deal_solver_04.cc index 27f716010a..afa0020f0a 100644 --- a/tests/trilinos/deal_solver_04.cc +++ b/tests/trilinos/deal_solver_04.cc @@ -41,8 +41,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/deal_solver_05.cc b/tests/trilinos/deal_solver_05.cc index e44dc23483..5db7c660ac 100644 --- a/tests/trilinos/deal_solver_05.cc +++ b/tests/trilinos/deal_solver_05.cc @@ -40,8 +40,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/deal_solver_06.cc b/tests/trilinos/deal_solver_06.cc index b58e443064..0e17abaa46 100644 --- a/tests/trilinos/deal_solver_06.cc +++ b/tests/trilinos/deal_solver_06.cc @@ -40,8 +40,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/precondition_amg_dgp.cc b/tests/trilinos/precondition_amg_dgp.cc index afe27a2d61..a5248e5ea1 100644 --- a/tests/trilinos/precondition_amg_dgp.cc +++ b/tests/trilinos/precondition_amg_dgp.cc @@ -74,9 +74,9 @@ void MatrixIntegrator { const unsigned int deg = info.fe_values(0).get_fe().degree; LocalIntegrators::Laplace - ::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0), - LocalIntegrators::Laplace:: - compute_penalty(dinfo, dinfo, deg, deg)); + ::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0), + LocalIntegrators::Laplace:: + compute_penalty(dinfo, dinfo, deg, deg)); } template @@ -88,10 +88,10 @@ void MatrixIntegrator { const unsigned int deg = info1.fe_values(0).get_fe().degree; LocalIntegrators::Laplace - ::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, - dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, - info1.fe_values(0), info2.fe_values(0), - LocalIntegrators::Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); + ::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, + dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, + info1.fe_values(0), info2.fe_values(0), + LocalIntegrators::Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); } @@ -163,7 +163,7 @@ void Step4::setup_system () dof_handler.end(), dof_info, info_box, integrator, assembler); - + system_matrix.compress(VectorOperation::add); for (unsigned int i=0; i { const unsigned int deg = info.fe_values(0).get_fe().degree; LocalIntegrators::Laplace - ::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0), - LocalIntegrators::Laplace:: - compute_penalty(dinfo, dinfo, deg, deg)); + ::nitsche_matrix(dinfo.matrix(0,false).matrix, info.fe_values(0), + LocalIntegrators::Laplace:: + compute_penalty(dinfo, dinfo, deg, deg)); } template @@ -88,10 +88,10 @@ void MatrixIntegrator { const unsigned int deg = info1.fe_values(0).get_fe().degree; LocalIntegrators::Laplace - ::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, - dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, - info1.fe_values(0), info2.fe_values(0), - LocalIntegrators::Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); + ::ip_matrix(dinfo1.matrix(0,false).matrix, dinfo1.matrix(0,true).matrix, + dinfo2.matrix(0,true).matrix, dinfo2.matrix(0,false).matrix, + info1.fe_values(0), info2.fe_values(0), + LocalIntegrators::Laplace::compute_penalty(dinfo1, dinfo2, deg, deg)); } @@ -163,7 +163,7 @@ void Step4::setup_system () dof_handler.end(), dof_info, info_box, integrator, assembler); - + system_matrix.compress(VectorOperation::add); for (unsigned int i=0; i::solve () check_solver_within_range( solver.solve (system_matrix, solution, system_rhs, - preconditioner), + preconditioner), solver_control.last_step(), 18, 32); } deallog.pop(); diff --git a/tests/trilinos/precondition_muelu_q_iso_q1.cc b/tests/trilinos/precondition_muelu_q_iso_q1.cc index c6b1befdfe..6b28fb0e48 100644 --- a/tests/trilinos/precondition_muelu_q_iso_q1.cc +++ b/tests/trilinos/precondition_muelu_q_iso_q1.cc @@ -275,7 +275,7 @@ void Step4::solve () preconditioner.initialize(system_matrix); check_solver_within_range( solver.solve (system_matrix, solution, system_rhs, - preconditioner), + preconditioner), solver_control.last_step(), 31, 33); } deallog.pop(); @@ -289,7 +289,7 @@ void Step4::solve () preconditioner.initialize(preconditioner_matrix); check_solver_within_range( solver.solve (system_matrix, solution, system_rhs, - preconditioner), + preconditioner), solver_control.last_step(), 24, 38); } deallog.pop(); diff --git a/tests/trilinos/solver_03.cc b/tests/trilinos/solver_03.cc index 6887cfcd86..a82cd87d23 100644 --- a/tests/trilinos/solver_03.cc +++ b/tests/trilinos/solver_03.cc @@ -35,8 +35,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/solver_05.cc b/tests/trilinos/solver_05.cc index 885322f97e..a3c2d09875 100644 --- a/tests/trilinos/solver_05.cc +++ b/tests/trilinos/solver_05.cc @@ -35,8 +35,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/solver_07.cc b/tests/trilinos/solver_07.cc index 2ec3a9df35..ed9227cc6e 100644 --- a/tests/trilinos/solver_07.cc +++ b/tests/trilinos/solver_07.cc @@ -35,8 +35,8 @@ template void check_solve( SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, + const SolverControl &solver_control, + const MATRIX &A, VECTOR &u, VECTOR &f, const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; diff --git a/tests/trilinos/trilinos_sparsity_pattern_02.cc b/tests/trilinos/trilinos_sparsity_pattern_02.cc index 84422ec5d9..358ed07fc6 100644 --- a/tests/trilinos/trilinos_sparsity_pattern_02.cc +++ b/tests/trilinos/trilinos_sparsity_pattern_02.cc @@ -72,7 +72,7 @@ namespace Step22 fe (FE_Q(degree+1), dim, FE_Q(degree) , 1), dof_handler (triangulation) -{} + {} @@ -108,11 +108,11 @@ namespace Step22 new_constraints.close(); { TrilinosWrappers::BlockSparsityPattern bsp - (owned_partitioning, owned_partitioning, - relevant_partitioning, mpi_communicator); + (owned_partitioning, owned_partitioning, + relevant_partitioning, mpi_communicator); DoFTools::make_sparsity_pattern (dof_handler, bsp, - new_constraints, - false, Utilities::MPI::this_mpi_process(mpi_communicator)); + new_constraints, + false, Utilities::MPI::this_mpi_process(mpi_communicator)); bsp.compress(); } diff --git a/tests/vector_tools/integrate_difference_01.cc b/tests/vector_tools/integrate_difference_01.cc index 02a634c4d7..af7895bccb 100644 --- a/tests/vector_tools/integrate_difference_01.cc +++ b/tests/vector_tools/integrate_difference_01.cc @@ -37,20 +37,20 @@ using namespace dealii; template class Ref : public Function { - public: - Ref() - :Function(dim) - {} - - double value (const Point &p, const unsigned int c) const - { - if (c==0) - return p[0]+p[1]+((dim==3)?p[2]:0.0); - if (c==1) - return p[0]*p[0]+p[1]*p[1]; - if (c==2) - return p[2]+p[0]*p[1]; - } +public: + Ref() + :Function(dim) + {} + + double value (const Point &p, const unsigned int c) const + { + if (c==0) + return p[0]+p[1]+((dim==3)?p[2]:0.0); + if (c==1) + return p[0]*p[0]+p[1]*p[1]; + if (c==2) + return p[2]+p[0]*p[1]; + } }; @@ -68,22 +68,22 @@ void test(VectorTools::NormType norm, double value) Vector solution (dofh.n_dofs ()); VectorTools::interpolate(dofh, Ref(), solution); - + Vector cellwise_errors (tria.n_active_cells()); VectorTools::integrate_difference (dofh, - solution, - ZeroFunction(dim), - cellwise_errors, - QGauss(5), - norm); - + solution, + ZeroFunction(dim), + cellwise_errors, + QGauss(5), + norm); + const double error = cellwise_errors.l2_norm(); const double difference = std::abs(error-value); deallog << "computed: " << error - << " expected: " << value - << " difference: " << difference - << std::endl; + << " expected: " << value + << " difference: " << difference + << std::endl; Assert(difference<1e-10, ExcMessage("Error in integrate_difference")); }